Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
Use this data source to query detailed information of ecs key pairs
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
import * as volcengine from "@volcengine/pulumi";
const fooKeyPair = new volcengine.ecs.KeyPair("fooKeyPair", {
keyPairName: "acc-test-key-name",
description: "acc-test",
});
const fooKeyPairs = volcengine.ecs.getKeyPairsOutput({
keyPairName: fooKeyPair.keyPairName,
});
import pulumi
import pulumi_volcengine as volcengine
foo_key_pair = volcengine.ecs.KeyPair("fooKeyPair",
key_pair_name="acc-test-key-name",
description="acc-test")
foo_key_pairs = volcengine.ecs.get_key_pairs_output(key_pair_name=foo_key_pair.key_pair_name)
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/ecs"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooKeyPair, err := ecs.NewKeyPair(ctx, "fooKeyPair", &ecs.KeyPairArgs{
KeyPairName: pulumi.String("acc-test-key-name"),
Description: pulumi.String("acc-test"),
})
if err != nil {
return err
}
_ = ecs.GetKeyPairsOutput(ctx, ecs.GetKeyPairsOutputArgs{
KeyPairName: fooKeyPair.KeyPairName,
}, nil)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooKeyPair = new Volcengine.Ecs.KeyPair("fooKeyPair", new()
{
KeyPairName = "acc-test-key-name",
Description = "acc-test",
});
var fooKeyPairs = Volcengine.Ecs.GetKeyPairs.Invoke(new()
{
KeyPairName = fooKeyPair.KeyPairName,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.ecs.KeyPair;
import com.pulumi.volcengine.ecs.KeyPairArgs;
import com.pulumi.volcengine.ecs.EcsFunctions;
import com.pulumi.volcengine.ecs.inputs.GetKeyPairsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var fooKeyPair = new KeyPair("fooKeyPair", KeyPairArgs.builder()
.keyPairName("acc-test-key-name")
.description("acc-test")
.build());
final var fooKeyPairs = EcsFunctions.getKeyPairs(GetKeyPairsArgs.builder()
.keyPairName(fooKeyPair.keyPairName())
.build());
}
}
resources:
fooKeyPair:
type: volcengine:ecs:KeyPair
properties:
keyPairName: acc-test-key-name
description: acc-test
variables:
fooKeyPairs:
fn::invoke:
Function: volcengine:ecs:getKeyPairs
Arguments:
keyPairName: ${fooKeyPair.keyPairName}
Using getKeyPairs
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getKeyPairs(args: GetKeyPairsArgs, opts?: InvokeOptions): Promise<GetKeyPairsResult>
function getKeyPairsOutput(args: GetKeyPairsOutputArgs, opts?: InvokeOptions): Output<GetKeyPairsResult>def get_key_pairs(finger_print: Optional[str] = None,
key_pair_ids: Optional[Sequence[str]] = None,
key_pair_name: Optional[str] = None,
key_pair_names: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetKeyPairsResult
def get_key_pairs_output(finger_print: Optional[pulumi.Input[str]] = None,
key_pair_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
key_pair_name: Optional[pulumi.Input[str]] = None,
key_pair_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetKeyPairsResult]func GetKeyPairs(ctx *Context, args *GetKeyPairsArgs, opts ...InvokeOption) (*GetKeyPairsResult, error)
func GetKeyPairsOutput(ctx *Context, args *GetKeyPairsOutputArgs, opts ...InvokeOption) GetKeyPairsResultOutput> Note: This function is named GetKeyPairs in the Go SDK.
public static class GetKeyPairs
{
public static Task<GetKeyPairsResult> InvokeAsync(GetKeyPairsArgs args, InvokeOptions? opts = null)
public static Output<GetKeyPairsResult> Invoke(GetKeyPairsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetKeyPairsResult> getKeyPairs(GetKeyPairsArgs args, InvokeOptions options)
public static Output<GetKeyPairsResult> getKeyPairs(GetKeyPairsArgs args, InvokeOptions options)
fn::invoke:
function: volcengine:ecs/getKeyPairs:getKeyPairs
arguments:
# arguments dictionaryThe following arguments are supported:
- Finger
Print string - The finger print info.
- Key
Pair List<string>Ids - Ids of key pair.
- Key
Pair stringName - Name of key pair.
- Key
Pair List<string>Names - Key pair names info.
- Name
Regex string - A Name Regex of ECS key pairs.
- Output
File string - File name where to save data source results.
- Finger
Print string - The finger print info.
- Key
Pair []stringIds - Ids of key pair.
- Key
Pair stringName - Name of key pair.
- Key
Pair []stringNames - Key pair names info.
- Name
Regex string - A Name Regex of ECS key pairs.
- Output
File string - File name where to save data source results.
- finger
Print String - The finger print info.
- key
Pair List<String>Ids - Ids of key pair.
- key
Pair StringName - Name of key pair.
- key
Pair List<String>Names - Key pair names info.
- name
Regex String - A Name Regex of ECS key pairs.
- output
File String - File name where to save data source results.
- finger
Print string - The finger print info.
- key
Pair string[]Ids - Ids of key pair.
- key
Pair stringName - Name of key pair.
- key
Pair string[]Names - Key pair names info.
- name
Regex string - A Name Regex of ECS key pairs.
- output
File string - File name where to save data source results.
- finger_
print str - The finger print info.
- key_
pair_ Sequence[str]ids - Ids of key pair.
- key_
pair_ strname - Name of key pair.
- key_
pair_ Sequence[str]names - Key pair names info.
- name_
regex str - A Name Regex of ECS key pairs.
- output_
file str - File name where to save data source results.
- finger
Print String - The finger print info.
- key
Pair List<String>Ids - Ids of key pair.
- key
Pair StringName - Name of key pair.
- key
Pair List<String>Names - Key pair names info.
- name
Regex String - A Name Regex of ECS key pairs.
- output
File String - File name where to save data source results.
getKeyPairs Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Key
Pairs List<GetKey Pairs Key Pair> - The target query key pairs info.
- Total
Count int - The total count of ECS key pair query.
- Finger
Print string - The finger print info.
- Key
Pair List<string>Ids - Key
Pair stringName - The name of key pair.
- Key
Pair List<string>Names - Name
Regex string - Output
File string
- Id string
- The provider-assigned unique ID for this managed resource.
- Key
Pairs []GetKey Pairs Key Pair - The target query key pairs info.
- Total
Count int - The total count of ECS key pair query.
- Finger
Print string - The finger print info.
- Key
Pair []stringIds - Key
Pair stringName - The name of key pair.
- Key
Pair []stringNames - Name
Regex string - Output
File string
- id String
- The provider-assigned unique ID for this managed resource.
- key
Pairs List<GetKey Pairs Key Pair> - The target query key pairs info.
- total
Count Integer - The total count of ECS key pair query.
- finger
Print String - The finger print info.
- key
Pair List<String>Ids - key
Pair StringName - The name of key pair.
- key
Pair List<String>Names - name
Regex String - output
File String
- id string
- The provider-assigned unique ID for this managed resource.
- key
Pairs GetKey Pairs Key Pair[] - The target query key pairs info.
- total
Count number - The total count of ECS key pair query.
- finger
Print string - The finger print info.
- key
Pair string[]Ids - key
Pair stringName - The name of key pair.
- key
Pair string[]Names - name
Regex string - output
File string
- id str
- The provider-assigned unique ID for this managed resource.
- key_
pairs Sequence[GetKey Pairs Key Pair] - The target query key pairs info.
- total_
count int - The total count of ECS key pair query.
- finger_
print str - The finger print info.
- key_
pair_ Sequence[str]ids - key_
pair_ strname - The name of key pair.
- key_
pair_ Sequence[str]names - name_
regex str - output_
file str
- id String
- The provider-assigned unique ID for this managed resource.
- key
Pairs List<Property Map> - The target query key pairs info.
- total
Count Number - The total count of ECS key pair query.
- finger
Print String - The finger print info.
- key
Pair List<String>Ids - key
Pair StringName - The name of key pair.
- key
Pair List<String>Names - name
Regex String - output
File String
Supporting Types
GetKeyPairsKeyPair
- Created
At string - The creation time of key pair.
- Description string
- The description of key pair.
- Finger
Print string - The finger print info.
- Id string
- The id of key pair.
- Key
Pair stringId - The id of key pair.
- Key
Pair stringName - Name of key pair.
- Updated
At string - The update time of key pair.
- Created
At string - The creation time of key pair.
- Description string
- The description of key pair.
- Finger
Print string - The finger print info.
- Id string
- The id of key pair.
- Key
Pair stringId - The id of key pair.
- Key
Pair stringName - Name of key pair.
- Updated
At string - The update time of key pair.
- created
At String - The creation time of key pair.
- description String
- The description of key pair.
- finger
Print String - The finger print info.
- id String
- The id of key pair.
- key
Pair StringId - The id of key pair.
- key
Pair StringName - Name of key pair.
- updated
At String - The update time of key pair.
- created
At string - The creation time of key pair.
- description string
- The description of key pair.
- finger
Print string - The finger print info.
- id string
- The id of key pair.
- key
Pair stringId - The id of key pair.
- key
Pair stringName - Name of key pair.
- updated
At string - The update time of key pair.
- created_
at str - The creation time of key pair.
- description str
- The description of key pair.
- finger_
print str - The finger print info.
- id str
- The id of key pair.
- key_
pair_ strid - The id of key pair.
- key_
pair_ strname - Name of key pair.
- updated_
at str - The update time of key pair.
- created
At String - The creation time of key pair.
- description String
- The description of key pair.
- finger
Print String - The finger print info.
- id String
- The id of key pair.
- key
Pair StringId - The id of key pair.
- key
Pair StringName - Name of key pair.
- updated
At String - The update time of key pair.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengineTerraform Provider.
Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
