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

tencentcloud.LighthouseKeyPair

Explore with Pulumi AI

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

    Provides a resource to create a lighthouse key_pair

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const keyPair = new tencentcloud.LighthouseKeyPair("keyPair", {keyName: "key_name_test"});
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    key_pair = tencentcloud.LighthouseKeyPair("keyPair", key_name="key_name_test")
    
    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.NewLighthouseKeyPair(ctx, "keyPair", &tencentcloud.LighthouseKeyPairArgs{
    			KeyName: pulumi.String("key_name_test"),
    		})
    		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 keyPair = new Tencentcloud.LighthouseKeyPair("keyPair", new()
        {
            KeyName = "key_name_test",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.LighthouseKeyPair;
    import com.pulumi.tencentcloud.LighthouseKeyPairArgs;
    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 keyPair = new LighthouseKeyPair("keyPair", LighthouseKeyPairArgs.builder()
                .keyName("key_name_test")
                .build());
    
        }
    }
    
    resources:
      keyPair:
        type: tencentcloud:LighthouseKeyPair
        properties:
          keyName: key_name_test
    

    Create LighthouseKeyPair Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new LighthouseKeyPair(name: string, args: LighthouseKeyPairArgs, opts?: CustomResourceOptions);
    @overload
    def LighthouseKeyPair(resource_name: str,
                          args: LighthouseKeyPairArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def LighthouseKeyPair(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          key_name: Optional[str] = None,
                          lighthouse_key_pair_id: Optional[str] = None,
                          public_key: Optional[str] = None)
    func NewLighthouseKeyPair(ctx *Context, name string, args LighthouseKeyPairArgs, opts ...ResourceOption) (*LighthouseKeyPair, error)
    public LighthouseKeyPair(string name, LighthouseKeyPairArgs args, CustomResourceOptions? opts = null)
    public LighthouseKeyPair(String name, LighthouseKeyPairArgs args)
    public LighthouseKeyPair(String name, LighthouseKeyPairArgs args, CustomResourceOptions options)
    
    type: tencentcloud:LighthouseKeyPair
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args LighthouseKeyPairArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args LighthouseKeyPairArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args LighthouseKeyPairArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args LighthouseKeyPairArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args LighthouseKeyPairArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    LighthouseKeyPair Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The LighthouseKeyPair resource accepts the following input properties:

    KeyName string
    Key pair name, which can contain up to 25 digits, letters, and underscores.
    LighthouseKeyPairId string
    ID of the resource.
    PublicKey string
    Public key content of the key pair, which is in the OpenSSH RSA format.
    KeyName string
    Key pair name, which can contain up to 25 digits, letters, and underscores.
    LighthouseKeyPairId string
    ID of the resource.
    PublicKey string
    Public key content of the key pair, which is in the OpenSSH RSA format.
    keyName String
    Key pair name, which can contain up to 25 digits, letters, and underscores.
    lighthouseKeyPairId String
    ID of the resource.
    publicKey String
    Public key content of the key pair, which is in the OpenSSH RSA format.
    keyName string
    Key pair name, which can contain up to 25 digits, letters, and underscores.
    lighthouseKeyPairId string
    ID of the resource.
    publicKey string
    Public key content of the key pair, which is in the OpenSSH RSA format.
    key_name str
    Key pair name, which can contain up to 25 digits, letters, and underscores.
    lighthouse_key_pair_id str
    ID of the resource.
    public_key str
    Public key content of the key pair, which is in the OpenSSH RSA format.
    keyName String
    Key pair name, which can contain up to 25 digits, letters, and underscores.
    lighthouseKeyPairId String
    ID of the resource.
    publicKey String
    Public key content of the key pair, which is in the OpenSSH RSA format.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the LighthouseKeyPair resource produces the following output properties:

    CreatedTime string
    Creation time. Expressed according to the ISO8601 standard, and using UTC time. Format: YYYY-MM-DDThh:mm:ssZ.
    Id string
    The provider-assigned unique ID for this managed resource.
    PrivateKey string
    Key to private key.
    CreatedTime string
    Creation time. Expressed according to the ISO8601 standard, and using UTC time. Format: YYYY-MM-DDThh:mm:ssZ.
    Id string
    The provider-assigned unique ID for this managed resource.
    PrivateKey string
    Key to private key.
    createdTime String
    Creation time. Expressed according to the ISO8601 standard, and using UTC time. Format: YYYY-MM-DDThh:mm:ssZ.
    id String
    The provider-assigned unique ID for this managed resource.
    privateKey String
    Key to private key.
    createdTime string
    Creation time. Expressed according to the ISO8601 standard, and using UTC time. Format: YYYY-MM-DDThh:mm:ssZ.
    id string
    The provider-assigned unique ID for this managed resource.
    privateKey string
    Key to private key.
    created_time str
    Creation time. Expressed according to the ISO8601 standard, and using UTC time. Format: YYYY-MM-DDThh:mm:ssZ.
    id str
    The provider-assigned unique ID for this managed resource.
    private_key str
    Key to private key.
    createdTime String
    Creation time. Expressed according to the ISO8601 standard, and using UTC time. Format: YYYY-MM-DDThh:mm:ssZ.
    id String
    The provider-assigned unique ID for this managed resource.
    privateKey String
    Key to private key.

    Look up Existing LighthouseKeyPair Resource

    Get an existing LighthouseKeyPair resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: LighthouseKeyPairState, opts?: CustomResourceOptions): LighthouseKeyPair
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_time: Optional[str] = None,
            key_name: Optional[str] = None,
            lighthouse_key_pair_id: Optional[str] = None,
            private_key: Optional[str] = None,
            public_key: Optional[str] = None) -> LighthouseKeyPair
    func GetLighthouseKeyPair(ctx *Context, name string, id IDInput, state *LighthouseKeyPairState, opts ...ResourceOption) (*LighthouseKeyPair, error)
    public static LighthouseKeyPair Get(string name, Input<string> id, LighthouseKeyPairState? state, CustomResourceOptions? opts = null)
    public static LighthouseKeyPair get(String name, Output<String> id, LighthouseKeyPairState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:LighthouseKeyPair    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CreatedTime string
    Creation time. Expressed according to the ISO8601 standard, and using UTC time. Format: YYYY-MM-DDThh:mm:ssZ.
    KeyName string
    Key pair name, which can contain up to 25 digits, letters, and underscores.
    LighthouseKeyPairId string
    ID of the resource.
    PrivateKey string
    Key to private key.
    PublicKey string
    Public key content of the key pair, which is in the OpenSSH RSA format.
    CreatedTime string
    Creation time. Expressed according to the ISO8601 standard, and using UTC time. Format: YYYY-MM-DDThh:mm:ssZ.
    KeyName string
    Key pair name, which can contain up to 25 digits, letters, and underscores.
    LighthouseKeyPairId string
    ID of the resource.
    PrivateKey string
    Key to private key.
    PublicKey string
    Public key content of the key pair, which is in the OpenSSH RSA format.
    createdTime String
    Creation time. Expressed according to the ISO8601 standard, and using UTC time. Format: YYYY-MM-DDThh:mm:ssZ.
    keyName String
    Key pair name, which can contain up to 25 digits, letters, and underscores.
    lighthouseKeyPairId String
    ID of the resource.
    privateKey String
    Key to private key.
    publicKey String
    Public key content of the key pair, which is in the OpenSSH RSA format.
    createdTime string
    Creation time. Expressed according to the ISO8601 standard, and using UTC time. Format: YYYY-MM-DDThh:mm:ssZ.
    keyName string
    Key pair name, which can contain up to 25 digits, letters, and underscores.
    lighthouseKeyPairId string
    ID of the resource.
    privateKey string
    Key to private key.
    publicKey string
    Public key content of the key pair, which is in the OpenSSH RSA format.
    created_time str
    Creation time. Expressed according to the ISO8601 standard, and using UTC time. Format: YYYY-MM-DDThh:mm:ssZ.
    key_name str
    Key pair name, which can contain up to 25 digits, letters, and underscores.
    lighthouse_key_pair_id str
    ID of the resource.
    private_key str
    Key to private key.
    public_key str
    Public key content of the key pair, which is in the OpenSSH RSA format.
    createdTime String
    Creation time. Expressed according to the ISO8601 standard, and using UTC time. Format: YYYY-MM-DDThh:mm:ssZ.
    keyName String
    Key pair name, which can contain up to 25 digits, letters, and underscores.
    lighthouseKeyPairId String
    ID of the resource.
    privateKey String
    Key to private key.
    publicKey String
    Public key content of the key pair, which is in the OpenSSH RSA format.

    Import

    lighthouse key_pair can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/lighthouseKeyPair:LighthouseKeyPair key_pair key_pair_id
    

    To learn more about importing existing cloud resources, see Importing resources.

    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