1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getSsmSshKeyPairValue
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.getSsmSshKeyPairValue

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Use this data source to query detailed information of ssm ssh_key_pair_value

    NOTE: Must set at least one of secret_name or ssh_key_id.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = tencentcloud.getSsmSshKeyPairValue({
        secretName: "keep_terraform",
        sshKeyId: "skey-2ae2snwd",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.get_ssm_ssh_key_pair_value(secret_name="keep_terraform",
        ssh_key_id="skey-2ae2snwd")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.GetSsmSshKeyPairValue(ctx, &tencentcloud.GetSsmSshKeyPairValueArgs{
    			SecretName: pulumi.StringRef("keep_terraform"),
    			SshKeyId:   pulumi.StringRef("skey-2ae2snwd"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Tencentcloud.GetSsmSshKeyPairValue.Invoke(new()
        {
            SecretName = "keep_terraform",
            SshKeyId = "skey-2ae2snwd",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.inputs.GetSsmSshKeyPairValueArgs;
    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) {
            final var example = TencentcloudFunctions.getSsmSshKeyPairValue(GetSsmSshKeyPairValueArgs.builder()
                .secretName("keep_terraform")
                .sshKeyId("skey-2ae2snwd")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: tencentcloud:getSsmSshKeyPairValue
          arguments:
            secretName: keep_terraform
            sshKeyId: skey-2ae2snwd
    

    Or

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = tencentcloud.getSsmSshKeyPairValue({
        secretName: "keep_terraform",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.get_ssm_ssh_key_pair_value(secret_name="keep_terraform")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.GetSsmSshKeyPairValue(ctx, &tencentcloud.GetSsmSshKeyPairValueArgs{
    			SecretName: pulumi.StringRef("keep_terraform"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Tencentcloud.GetSsmSshKeyPairValue.Invoke(new()
        {
            SecretName = "keep_terraform",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.inputs.GetSsmSshKeyPairValueArgs;
    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) {
            final var example = TencentcloudFunctions.getSsmSshKeyPairValue(GetSsmSshKeyPairValueArgs.builder()
                .secretName("keep_terraform")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: tencentcloud:getSsmSshKeyPairValue
          arguments:
            secretName: keep_terraform
    

    Or

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = tencentcloud.getSsmSshKeyPairValue({
        sshKeyId: "skey-2ae2snwd",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.get_ssm_ssh_key_pair_value(ssh_key_id="skey-2ae2snwd")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.GetSsmSshKeyPairValue(ctx, &tencentcloud.GetSsmSshKeyPairValueArgs{
    			SshKeyId: pulumi.StringRef("skey-2ae2snwd"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Tencentcloud.GetSsmSshKeyPairValue.Invoke(new()
        {
            SshKeyId = "skey-2ae2snwd",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.inputs.GetSsmSshKeyPairValueArgs;
    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) {
            final var example = TencentcloudFunctions.getSsmSshKeyPairValue(GetSsmSshKeyPairValueArgs.builder()
                .sshKeyId("skey-2ae2snwd")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: tencentcloud:getSsmSshKeyPairValue
          arguments:
            sshKeyId: skey-2ae2snwd
    

    Using getSsmSshKeyPairValue

    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 getSsmSshKeyPairValue(args: GetSsmSshKeyPairValueArgs, opts?: InvokeOptions): Promise<GetSsmSshKeyPairValueResult>
    function getSsmSshKeyPairValueOutput(args: GetSsmSshKeyPairValueOutputArgs, opts?: InvokeOptions): Output<GetSsmSshKeyPairValueResult>
    def get_ssm_ssh_key_pair_value(id: Optional[str] = None,
                                   result_output_file: Optional[str] = None,
                                   secret_name: Optional[str] = None,
                                   ssh_key_id: Optional[str] = None,
                                   opts: Optional[InvokeOptions] = None) -> GetSsmSshKeyPairValueResult
    def get_ssm_ssh_key_pair_value_output(id: Optional[pulumi.Input[str]] = None,
                                   result_output_file: Optional[pulumi.Input[str]] = None,
                                   secret_name: Optional[pulumi.Input[str]] = None,
                                   ssh_key_id: Optional[pulumi.Input[str]] = None,
                                   opts: Optional[InvokeOptions] = None) -> Output[GetSsmSshKeyPairValueResult]
    func GetSsmSshKeyPairValue(ctx *Context, args *GetSsmSshKeyPairValueArgs, opts ...InvokeOption) (*GetSsmSshKeyPairValueResult, error)
    func GetSsmSshKeyPairValueOutput(ctx *Context, args *GetSsmSshKeyPairValueOutputArgs, opts ...InvokeOption) GetSsmSshKeyPairValueResultOutput

    > Note: This function is named GetSsmSshKeyPairValue in the Go SDK.

    public static class GetSsmSshKeyPairValue 
    {
        public static Task<GetSsmSshKeyPairValueResult> InvokeAsync(GetSsmSshKeyPairValueArgs args, InvokeOptions? opts = null)
        public static Output<GetSsmSshKeyPairValueResult> Invoke(GetSsmSshKeyPairValueInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSsmSshKeyPairValueResult> getSsmSshKeyPairValue(GetSsmSshKeyPairValueArgs args, InvokeOptions options)
    public static Output<GetSsmSshKeyPairValueResult> getSsmSshKeyPairValue(GetSsmSshKeyPairValueArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getSsmSshKeyPairValue:getSsmSshKeyPairValue
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    ResultOutputFile string
    Used to save results.
    SecretName string
    Secret name.
    SshKeyId string
    The key pair ID is the unique identifier of the key pair in the cloud server.
    Id string
    ResultOutputFile string
    Used to save results.
    SecretName string
    Secret name.
    SshKeyId string
    The key pair ID is the unique identifier of the key pair in the cloud server.
    id String
    resultOutputFile String
    Used to save results.
    secretName String
    Secret name.
    sshKeyId String
    The key pair ID is the unique identifier of the key pair in the cloud server.
    id string
    resultOutputFile string
    Used to save results.
    secretName string
    Secret name.
    sshKeyId string
    The key pair ID is the unique identifier of the key pair in the cloud server.
    id str
    result_output_file str
    Used to save results.
    secret_name str
    Secret name.
    ssh_key_id str
    The key pair ID is the unique identifier of the key pair in the cloud server.
    id String
    resultOutputFile String
    Used to save results.
    secretName String
    Secret name.
    sshKeyId String
    The key pair ID is the unique identifier of the key pair in the cloud server.

    getSsmSshKeyPairValue Result

    The following output properties are available:

    Id string
    PrivateKey string
    Private key plain text, encoded using base64.
    ProjectId double
    The project ID to which this key pair belongs.
    PublicKey string
    Public key plain text, encoded using base64.
    SecretName string
    SshKeyDescription string
    Description of the SSH key pair. Users can modify the description information of the key pair in the CVM console.
    SshKeyId string
    SshKeyName string
    SSH key name.
    ResultOutputFile string
    Id string
    PrivateKey string
    Private key plain text, encoded using base64.
    ProjectId float64
    The project ID to which this key pair belongs.
    PublicKey string
    Public key plain text, encoded using base64.
    SecretName string
    SshKeyDescription string
    Description of the SSH key pair. Users can modify the description information of the key pair in the CVM console.
    SshKeyId string
    SshKeyName string
    SSH key name.
    ResultOutputFile string
    id String
    privateKey String
    Private key plain text, encoded using base64.
    projectId Double
    The project ID to which this key pair belongs.
    publicKey String
    Public key plain text, encoded using base64.
    secretName String
    sshKeyDescription String
    Description of the SSH key pair. Users can modify the description information of the key pair in the CVM console.
    sshKeyId String
    sshKeyName String
    SSH key name.
    resultOutputFile String
    id string
    privateKey string
    Private key plain text, encoded using base64.
    projectId number
    The project ID to which this key pair belongs.
    publicKey string
    Public key plain text, encoded using base64.
    secretName string
    sshKeyDescription string
    Description of the SSH key pair. Users can modify the description information of the key pair in the CVM console.
    sshKeyId string
    sshKeyName string
    SSH key name.
    resultOutputFile string
    id str
    private_key str
    Private key plain text, encoded using base64.
    project_id float
    The project ID to which this key pair belongs.
    public_key str
    Public key plain text, encoded using base64.
    secret_name str
    ssh_key_description str
    Description of the SSH key pair. Users can modify the description information of the key pair in the CVM console.
    ssh_key_id str
    ssh_key_name str
    SSH key name.
    result_output_file str
    id String
    privateKey String
    Private key plain text, encoded using base64.
    projectId Number
    The project ID to which this key pair belongs.
    publicKey String
    Public key plain text, encoded using base64.
    secretName String
    sshKeyDescription String
    Description of the SSH key pair. Users can modify the description information of the key pair in the CVM console.
    sshKeyId String
    sshKeyName String
    SSH key name.
    resultOutputFile String

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack