Volcengine v0.0.37 published on Wednesday, Oct 22, 2025 by Volcengine
volcengine.ecs.KeyPairs
Deprecated: volcengine.ecs.KeyPairs has been deprecated in favor of volcengine.ecs.getKeyPairs
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 KeyPairs
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 keyPairs(args: KeyPairsArgs, opts?: InvokeOptions): Promise<KeyPairsResult>
function keyPairsOutput(args: KeyPairsOutputArgs, opts?: InvokeOptions): Output<KeyPairsResult>def 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) -> KeyPairsResult
def 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[KeyPairsResult]func KeyPairs(ctx *Context, args *KeyPairsArgs, opts ...InvokeOption) (*KeyPairsResult, error)
func KeyPairsOutput(ctx *Context, args *KeyPairsOutputArgs, opts ...InvokeOption) KeyPairsResultOutputpublic static class KeyPairs 
{
    public static Task<KeyPairsResult> InvokeAsync(KeyPairsArgs args, InvokeOptions? opts = null)
    public static Output<KeyPairsResult> Invoke(KeyPairsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<KeyPairsResult> keyPairs(KeyPairsArgs args, InvokeOptions options)
public static Output<KeyPairsResult> keyPairs(KeyPairsArgs args, InvokeOptions options)
fn::invoke:
  function: volcengine:ecs:KeyPairs
  arguments:
    # arguments dictionaryThe following arguments are supported:
- FingerPrint string
- The finger print info.
- KeyPair List<string>Ids 
- Ids of key pair.
- KeyPair stringName 
- Name of key pair.
- KeyPair List<string>Names 
- Key pair names info.
- NameRegex string
- A Name Regex of ECS key pairs.
- OutputFile string
- File name where to save data source results.
- FingerPrint string
- The finger print info.
- KeyPair []stringIds 
- Ids of key pair.
- KeyPair stringName 
- Name of key pair.
- KeyPair []stringNames 
- Key pair names info.
- NameRegex string
- A Name Regex of ECS key pairs.
- OutputFile string
- File name where to save data source results.
- fingerPrint String
- The finger print info.
- keyPair List<String>Ids 
- Ids of key pair.
- keyPair StringName 
- Name of key pair.
- keyPair List<String>Names 
- Key pair names info.
- nameRegex String
- A Name Regex of ECS key pairs.
- outputFile String
- File name where to save data source results.
- fingerPrint string
- The finger print info.
- keyPair string[]Ids 
- Ids of key pair.
- keyPair stringName 
- Name of key pair.
- keyPair string[]Names 
- Key pair names info.
- nameRegex string
- A Name Regex of ECS key pairs.
- outputFile 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.
- fingerPrint String
- The finger print info.
- keyPair List<String>Ids 
- Ids of key pair.
- keyPair StringName 
- Name of key pair.
- keyPair List<String>Names 
- Key pair names info.
- nameRegex String
- A Name Regex of ECS key pairs.
- outputFile String
- File name where to save data source results.
KeyPairs Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- KeyPairs List<KeyPairs Key Pair> 
- The target query key pairs info.
- TotalCount int
- The total count of ECS key pair query.
- FingerPrint string
- The finger print info.
- KeyPair List<string>Ids 
- KeyPair stringName 
- The name of key pair.
- KeyPair List<string>Names 
- NameRegex string
- OutputFile string
- Id string
- The provider-assigned unique ID for this managed resource.
- KeyPairs []KeyPairs Key Pair 
- The target query key pairs info.
- TotalCount int
- The total count of ECS key pair query.
- FingerPrint string
- The finger print info.
- KeyPair []stringIds 
- KeyPair stringName 
- The name of key pair.
- KeyPair []stringNames 
- NameRegex string
- OutputFile string
- id String
- The provider-assigned unique ID for this managed resource.
- keyPairs List<KeyPairs Key Pair> 
- The target query key pairs info.
- totalCount Integer
- The total count of ECS key pair query.
- fingerPrint String
- The finger print info.
- keyPair List<String>Ids 
- keyPair StringName 
- The name of key pair.
- keyPair List<String>Names 
- nameRegex String
- outputFile String
- id string
- The provider-assigned unique ID for this managed resource.
- keyPairs KeyPairs Key Pair[] 
- The target query key pairs info.
- totalCount number
- The total count of ECS key pair query.
- fingerPrint string
- The finger print info.
- keyPair string[]Ids 
- keyPair stringName 
- The name of key pair.
- keyPair string[]Names 
- nameRegex string
- outputFile string
- id str
- The provider-assigned unique ID for this managed resource.
- key_pairs Sequence[KeyPairs 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.
- keyPairs List<Property Map>
- The target query key pairs info.
- totalCount Number
- The total count of ECS key pair query.
- fingerPrint String
- The finger print info.
- keyPair List<String>Ids 
- keyPair StringName 
- The name of key pair.
- keyPair List<String>Names 
- nameRegex String
- outputFile String
Supporting Types
KeyPairsKeyPair   
- CreatedAt string
- The creation time of key pair.
- Description string
- The description of key pair.
- FingerPrint string
- The finger print info.
- Id string
- The id of key pair.
- KeyPair stringId 
- The id of key pair.
- KeyPair stringName 
- Name of key pair.
- UpdatedAt string
- The update time of key pair.
- CreatedAt string
- The creation time of key pair.
- Description string
- The description of key pair.
- FingerPrint string
- The finger print info.
- Id string
- The id of key pair.
- KeyPair stringId 
- The id of key pair.
- KeyPair stringName 
- Name of key pair.
- UpdatedAt string
- The update time of key pair.
- createdAt String
- The creation time of key pair.
- description String
- The description of key pair.
- fingerPrint String
- The finger print info.
- id String
- The id of key pair.
- keyPair StringId 
- The id of key pair.
- keyPair StringName 
- Name of key pair.
- updatedAt String
- The update time of key pair.
- createdAt string
- The creation time of key pair.
- description string
- The description of key pair.
- fingerPrint string
- The finger print info.
- id string
- The id of key pair.
- keyPair stringId 
- The id of key pair.
- keyPair stringName 
- Name of key pair.
- updatedAt 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.
- createdAt String
- The creation time of key pair.
- description String
- The description of key pair.
- fingerPrint String
- The finger print info.
- id String
- The id of key pair.
- keyPair StringId 
- The id of key pair.
- keyPair StringName 
- Name of key pair.
- updatedAt 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.
