1. Packages
  2. Volcengine
  3. API Docs
  4. ecs
  5. KeyPairs
Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine

volcengine.ecs.KeyPairs

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine

    Use this data source to query detailed information of ecs key pairs

    Example Usage

    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.KeyPairs.Invoke(new()
        {
            KeyPairName = fooKeyPair.KeyPairName,
        });
    
    });
    
    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.KeyPairsOutput(ctx, ecs.KeyPairsOutputArgs{
    			KeyPairName: fooKeyPair.KeyPairName,
    		}, nil)
    		return nil
    	})
    }
    
    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.KeyPairsArgs;
    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.KeyPairs(KeyPairsArgs.builder()
                .keyPairName(fooKeyPair.keyPairName())
                .build());
    
        }
    }
    
    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.key_pairs_output(key_pair_name=foo_key_pair.key_pair_name)
    
    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.KeyPairsOutput({
        keyPairName: fooKeyPair.keyPairName,
    });
    
    resources:
      fooKeyPair:
        type: volcengine:ecs:KeyPair
        properties:
          keyPairName: acc-test-key-name
          description: acc-test
    variables:
      fooKeyPairs:
        fn::invoke:
          Function: volcengine:ecs:KeyPairs
          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) KeyPairsResultOutput
    public 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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: volcengine:ecs:KeyPairs
      arguments:
        # arguments dictionary

    The following arguments are supported:

    FingerPrint string
    The finger print info.
    KeyPairIds List<string>
    Ids of key pair.
    KeyPairName string
    Name of key pair.
    KeyPairNames List<string>
    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.
    KeyPairIds []string
    Ids of key pair.
    KeyPairName string
    Name of key pair.
    KeyPairNames []string
    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.
    keyPairIds List<String>
    Ids of key pair.
    keyPairName String
    Name of key pair.
    keyPairNames List<String>
    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.
    keyPairIds string[]
    Ids of key pair.
    keyPairName string
    Name of key pair.
    keyPairNames string[]
    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_ids Sequence[str]
    Ids of key pair.
    key_pair_name str
    Name of key pair.
    key_pair_names Sequence[str]
    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.
    keyPairIds List<String>
    Ids of key pair.
    keyPairName String
    Name of key pair.
    keyPairNames List<String>
    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<KeyPairsKeyPair>
    The target query key pairs info.
    TotalCount int
    The total count of ECS key pair query.
    FingerPrint string
    The finger print info.
    KeyPairIds List<string>
    KeyPairName string
    The name of key pair.
    KeyPairNames List<string>
    NameRegex string
    OutputFile string
    Id string
    The provider-assigned unique ID for this managed resource.
    KeyPairs []KeyPairsKeyPair
    The target query key pairs info.
    TotalCount int
    The total count of ECS key pair query.
    FingerPrint string
    The finger print info.
    KeyPairIds []string
    KeyPairName string
    The name of key pair.
    KeyPairNames []string
    NameRegex string
    OutputFile string
    id String
    The provider-assigned unique ID for this managed resource.
    keyPairs List<KeyPairsKeyPair>
    The target query key pairs info.
    totalCount Integer
    The total count of ECS key pair query.
    fingerPrint String
    The finger print info.
    keyPairIds List<String>
    keyPairName String
    The name of key pair.
    keyPairNames List<String>
    nameRegex String
    outputFile String
    id string
    The provider-assigned unique ID for this managed resource.
    keyPairs KeyPairsKeyPair[]
    The target query key pairs info.
    totalCount number
    The total count of ECS key pair query.
    fingerPrint string
    The finger print info.
    keyPairIds string[]
    keyPairName string
    The name of key pair.
    keyPairNames string[]
    nameRegex string
    outputFile string
    id str
    The provider-assigned unique ID for this managed resource.
    key_pairs Sequence[KeyPairsKeyPair]
    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_ids Sequence[str]
    key_pair_name str
    The name of key pair.
    key_pair_names Sequence[str]
    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.
    keyPairIds List<String>
    keyPairName String
    The name of key pair.
    keyPairNames List<String>
    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.
    KeyPairId string
    The id of key pair.
    KeyPairName string
    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.
    KeyPairId string
    The id of key pair.
    KeyPairName string
    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.
    keyPairId String
    The id of key pair.
    keyPairName String
    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.
    keyPairId string
    The id of key pair.
    keyPairName string
    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_id str
    The id of key pair.
    key_pair_name str
    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.
    keyPairId String
    The id of key pair.
    keyPairName String
    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 volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine