key

package
v0.1.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PkgVersion added in v0.0.5

func PkgVersion() (semver.Version, error)

PkgVersion uses reflection to determine the version of the current package. If a version cannot be determined, v1 will be assumed. The second return value is always nil.

Types

type GetPairsArgs

type GetPairsArgs struct {
	// ID of the key pair to be queried.
	KeyId *string `pulumi:"keyId"`
	// Name of the key pair to be queried. Support regular expression search, only `^` and `$` are supported.
	KeyName *string `pulumi:"keyName"`
	// Project ID of the key pair to be queried.
	ProjectId *int `pulumi:"projectId"`
	// Used to save results.
	ResultOutputFile *string `pulumi:"resultOutputFile"`
}

A collection of arguments for invoking getPairs.

type GetPairsKeyPairList

type GetPairsKeyPairList struct {
	// Creation time of the key pair.
	CreateTime string `pulumi:"createTime"`
	// ID of the key pair to be queried.
	KeyId string `pulumi:"keyId"`
	// Name of the key pair to be queried. Support regular expression search, only `^` and `$` are supported.
	KeyName string `pulumi:"keyName"`
	// Project ID of the key pair to be queried.
	ProjectId int `pulumi:"projectId"`
	// public key of the key pair.
	PublicKey string `pulumi:"publicKey"`
}

type GetPairsKeyPairListArgs

type GetPairsKeyPairListArgs struct {
	// Creation time of the key pair.
	CreateTime pulumi.StringInput `pulumi:"createTime"`
	// ID of the key pair to be queried.
	KeyId pulumi.StringInput `pulumi:"keyId"`
	// Name of the key pair to be queried. Support regular expression search, only `^` and `$` are supported.
	KeyName pulumi.StringInput `pulumi:"keyName"`
	// Project ID of the key pair to be queried.
	ProjectId pulumi.IntInput `pulumi:"projectId"`
	// public key of the key pair.
	PublicKey pulumi.StringInput `pulumi:"publicKey"`
}

func (GetPairsKeyPairListArgs) ElementType

func (GetPairsKeyPairListArgs) ElementType() reflect.Type

func (GetPairsKeyPairListArgs) ToGetPairsKeyPairListOutput

func (i GetPairsKeyPairListArgs) ToGetPairsKeyPairListOutput() GetPairsKeyPairListOutput

func (GetPairsKeyPairListArgs) ToGetPairsKeyPairListOutputWithContext

func (i GetPairsKeyPairListArgs) ToGetPairsKeyPairListOutputWithContext(ctx context.Context) GetPairsKeyPairListOutput

type GetPairsKeyPairListArray

type GetPairsKeyPairListArray []GetPairsKeyPairListInput

func (GetPairsKeyPairListArray) ElementType

func (GetPairsKeyPairListArray) ElementType() reflect.Type

func (GetPairsKeyPairListArray) ToGetPairsKeyPairListArrayOutput

func (i GetPairsKeyPairListArray) ToGetPairsKeyPairListArrayOutput() GetPairsKeyPairListArrayOutput

func (GetPairsKeyPairListArray) ToGetPairsKeyPairListArrayOutputWithContext

func (i GetPairsKeyPairListArray) ToGetPairsKeyPairListArrayOutputWithContext(ctx context.Context) GetPairsKeyPairListArrayOutput

type GetPairsKeyPairListArrayInput

type GetPairsKeyPairListArrayInput interface {
	pulumi.Input

	ToGetPairsKeyPairListArrayOutput() GetPairsKeyPairListArrayOutput
	ToGetPairsKeyPairListArrayOutputWithContext(context.Context) GetPairsKeyPairListArrayOutput
}

GetPairsKeyPairListArrayInput is an input type that accepts GetPairsKeyPairListArray and GetPairsKeyPairListArrayOutput values. You can construct a concrete instance of `GetPairsKeyPairListArrayInput` via:

GetPairsKeyPairListArray{ GetPairsKeyPairListArgs{...} }

type GetPairsKeyPairListArrayOutput

type GetPairsKeyPairListArrayOutput struct{ *pulumi.OutputState }

func (GetPairsKeyPairListArrayOutput) ElementType

func (GetPairsKeyPairListArrayOutput) Index

func (GetPairsKeyPairListArrayOutput) ToGetPairsKeyPairListArrayOutput

func (o GetPairsKeyPairListArrayOutput) ToGetPairsKeyPairListArrayOutput() GetPairsKeyPairListArrayOutput

func (GetPairsKeyPairListArrayOutput) ToGetPairsKeyPairListArrayOutputWithContext

func (o GetPairsKeyPairListArrayOutput) ToGetPairsKeyPairListArrayOutputWithContext(ctx context.Context) GetPairsKeyPairListArrayOutput

type GetPairsKeyPairListInput

type GetPairsKeyPairListInput interface {
	pulumi.Input

	ToGetPairsKeyPairListOutput() GetPairsKeyPairListOutput
	ToGetPairsKeyPairListOutputWithContext(context.Context) GetPairsKeyPairListOutput
}

GetPairsKeyPairListInput is an input type that accepts GetPairsKeyPairListArgs and GetPairsKeyPairListOutput values. You can construct a concrete instance of `GetPairsKeyPairListInput` via:

GetPairsKeyPairListArgs{...}

type GetPairsKeyPairListOutput

type GetPairsKeyPairListOutput struct{ *pulumi.OutputState }

func (GetPairsKeyPairListOutput) CreateTime

Creation time of the key pair.

func (GetPairsKeyPairListOutput) ElementType

func (GetPairsKeyPairListOutput) ElementType() reflect.Type

func (GetPairsKeyPairListOutput) KeyId

ID of the key pair to be queried.

func (GetPairsKeyPairListOutput) KeyName

Name of the key pair to be queried. Support regular expression search, only `^` and `$` are supported.

func (GetPairsKeyPairListOutput) ProjectId

Project ID of the key pair to be queried.

func (GetPairsKeyPairListOutput) PublicKey

public key of the key pair.

func (GetPairsKeyPairListOutput) ToGetPairsKeyPairListOutput

func (o GetPairsKeyPairListOutput) ToGetPairsKeyPairListOutput() GetPairsKeyPairListOutput

func (GetPairsKeyPairListOutput) ToGetPairsKeyPairListOutputWithContext

func (o GetPairsKeyPairListOutput) ToGetPairsKeyPairListOutputWithContext(ctx context.Context) GetPairsKeyPairListOutput

type GetPairsOutputArgs

type GetPairsOutputArgs struct {
	// ID of the key pair to be queried.
	KeyId pulumi.StringPtrInput `pulumi:"keyId"`
	// Name of the key pair to be queried. Support regular expression search, only `^` and `$` are supported.
	KeyName pulumi.StringPtrInput `pulumi:"keyName"`
	// Project ID of the key pair to be queried.
	ProjectId pulumi.IntPtrInput `pulumi:"projectId"`
	// Used to save results.
	ResultOutputFile pulumi.StringPtrInput `pulumi:"resultOutputFile"`
}

A collection of arguments for invoking getPairs.

func (GetPairsOutputArgs) ElementType

func (GetPairsOutputArgs) ElementType() reflect.Type

type GetPairsResult

type GetPairsResult struct {
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// ID of the key pair.
	KeyId *string `pulumi:"keyId"`
	// Name of the key pair.
	KeyName *string `pulumi:"keyName"`
	// An information list of key pair. Each element contains the following attributes:
	KeyPairLists []GetPairsKeyPairList `pulumi:"keyPairLists"`
	// Project ID of the key pair.
	ProjectId        *int    `pulumi:"projectId"`
	ResultOutputFile *string `pulumi:"resultOutputFile"`
}

A collection of values returned by getPairs.

func GetPairs

func GetPairs(ctx *pulumi.Context, args *GetPairsArgs, opts ...pulumi.InvokeOption) (*GetPairsResult, error)

Use this data source to query key pairs.

## Example Usage

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-tencentcloud/sdk/go/tencentcloud/Key"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/Key"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := Key.GetPairs(ctx, &key.GetPairsArgs{
			KeyId: pulumi.StringRef("skey-ie97i3ml"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = Key.GetPairs(ctx, &key.GetPairsArgs{
			KeyName: pulumi.StringRef(fmt.Sprintf("%v%v", "^test", "$")),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

type GetPairsResultOutput

type GetPairsResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getPairs.

func (GetPairsResultOutput) ElementType

func (GetPairsResultOutput) ElementType() reflect.Type

func (GetPairsResultOutput) Id

The provider-assigned unique ID for this managed resource.

func (GetPairsResultOutput) KeyId

ID of the key pair.

func (GetPairsResultOutput) KeyName

Name of the key pair.

func (GetPairsResultOutput) KeyPairLists

An information list of key pair. Each element contains the following attributes:

func (GetPairsResultOutput) ProjectId

Project ID of the key pair.

func (GetPairsResultOutput) ResultOutputFile

func (o GetPairsResultOutput) ResultOutputFile() pulumi.StringPtrOutput

func (GetPairsResultOutput) ToGetPairsResultOutput

func (o GetPairsResultOutput) ToGetPairsResultOutput() GetPairsResultOutput

func (GetPairsResultOutput) ToGetPairsResultOutputWithContext

func (o GetPairsResultOutput) ToGetPairsResultOutputWithContext(ctx context.Context) GetPairsResultOutput

type Pair

type Pair struct {
	pulumi.CustomResourceState

	// The key pair's name. It is the only in one TencentCloud account.
	KeyName pulumi.StringOutput `pulumi:"keyName"`
	// Specifys to which project the key pair belongs.
	ProjectId pulumi.IntPtrOutput `pulumi:"projectId"`
	// You can import an existing public key and using TencentCloud key pair to manage it.
	PublicKey pulumi.StringOutput `pulumi:"publicKey"`
	// Tags of the key pair.
	Tags pulumi.MapOutput `pulumi:"tags"`
}

Provides a key pair resource.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/Key"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := Key.NewPair(ctx, "foo", &Key.PairArgs{
			KeyName: pulumi.String("terraform_test"),
		})
		if err != nil {
			return err
		}
		_, err = Key.NewPair(ctx, "foo1", &Key.PairArgs{
			KeyName:   pulumi.String("terraform_test"),
			PublicKey: pulumi.String("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDjd8fTnp7Dcuj4mLaQxf9Zs/ORgUL9fQxRCNKkPgP1paTy1I513maMX126i36Lxxl3+FUB52oVbo/FgwlIfX8hyCnv8MCxqnuSDozf1CD0/wRYHcTWAtgHQHBPCC2nJtod6cVC3kB18KeV4U7zsxmwFeBIxojMOOmcOBuh7+trRw=="),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Key pair can be imported using the id, e.g.

```sh

$ pulumi import tencentcloud:Key/pair:Pair foo skey-17634f05

```

func GetPair

func GetPair(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *PairState, opts ...pulumi.ResourceOption) (*Pair, error)

GetPair gets an existing Pair resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewPair

func NewPair(ctx *pulumi.Context,
	name string, args *PairArgs, opts ...pulumi.ResourceOption) (*Pair, error)

NewPair registers a new resource with the given unique name, arguments, and options.

func (*Pair) ElementType

func (*Pair) ElementType() reflect.Type

func (*Pair) ToPairOutput

func (i *Pair) ToPairOutput() PairOutput

func (*Pair) ToPairOutputWithContext

func (i *Pair) ToPairOutputWithContext(ctx context.Context) PairOutput

type PairArgs

type PairArgs struct {
	// The key pair's name. It is the only in one TencentCloud account.
	KeyName pulumi.StringInput
	// Specifys to which project the key pair belongs.
	ProjectId pulumi.IntPtrInput
	// You can import an existing public key and using TencentCloud key pair to manage it.
	PublicKey pulumi.StringPtrInput
	// Tags of the key pair.
	Tags pulumi.MapInput
}

The set of arguments for constructing a Pair resource.

func (PairArgs) ElementType

func (PairArgs) ElementType() reflect.Type

type PairArray

type PairArray []PairInput

func (PairArray) ElementType

func (PairArray) ElementType() reflect.Type

func (PairArray) ToPairArrayOutput

func (i PairArray) ToPairArrayOutput() PairArrayOutput

func (PairArray) ToPairArrayOutputWithContext

func (i PairArray) ToPairArrayOutputWithContext(ctx context.Context) PairArrayOutput

type PairArrayInput

type PairArrayInput interface {
	pulumi.Input

	ToPairArrayOutput() PairArrayOutput
	ToPairArrayOutputWithContext(context.Context) PairArrayOutput
}

PairArrayInput is an input type that accepts PairArray and PairArrayOutput values. You can construct a concrete instance of `PairArrayInput` via:

PairArray{ PairArgs{...} }

type PairArrayOutput

type PairArrayOutput struct{ *pulumi.OutputState }

func (PairArrayOutput) ElementType

func (PairArrayOutput) ElementType() reflect.Type

func (PairArrayOutput) Index

func (PairArrayOutput) ToPairArrayOutput

func (o PairArrayOutput) ToPairArrayOutput() PairArrayOutput

func (PairArrayOutput) ToPairArrayOutputWithContext

func (o PairArrayOutput) ToPairArrayOutputWithContext(ctx context.Context) PairArrayOutput

type PairInput

type PairInput interface {
	pulumi.Input

	ToPairOutput() PairOutput
	ToPairOutputWithContext(ctx context.Context) PairOutput
}

type PairMap

type PairMap map[string]PairInput

func (PairMap) ElementType

func (PairMap) ElementType() reflect.Type

func (PairMap) ToPairMapOutput

func (i PairMap) ToPairMapOutput() PairMapOutput

func (PairMap) ToPairMapOutputWithContext

func (i PairMap) ToPairMapOutputWithContext(ctx context.Context) PairMapOutput

type PairMapInput

type PairMapInput interface {
	pulumi.Input

	ToPairMapOutput() PairMapOutput
	ToPairMapOutputWithContext(context.Context) PairMapOutput
}

PairMapInput is an input type that accepts PairMap and PairMapOutput values. You can construct a concrete instance of `PairMapInput` via:

PairMap{ "key": PairArgs{...} }

type PairMapOutput

type PairMapOutput struct{ *pulumi.OutputState }

func (PairMapOutput) ElementType

func (PairMapOutput) ElementType() reflect.Type

func (PairMapOutput) MapIndex

func (PairMapOutput) ToPairMapOutput

func (o PairMapOutput) ToPairMapOutput() PairMapOutput

func (PairMapOutput) ToPairMapOutputWithContext

func (o PairMapOutput) ToPairMapOutputWithContext(ctx context.Context) PairMapOutput

type PairOutput

type PairOutput struct{ *pulumi.OutputState }

func (PairOutput) ElementType

func (PairOutput) ElementType() reflect.Type

func (PairOutput) KeyName

func (o PairOutput) KeyName() pulumi.StringOutput

The key pair's name. It is the only in one TencentCloud account.

func (PairOutput) ProjectId

func (o PairOutput) ProjectId() pulumi.IntPtrOutput

Specifys to which project the key pair belongs.

func (PairOutput) PublicKey

func (o PairOutput) PublicKey() pulumi.StringOutput

You can import an existing public key and using TencentCloud key pair to manage it.

func (PairOutput) Tags added in v0.1.3

func (o PairOutput) Tags() pulumi.MapOutput

Tags of the key pair.

func (PairOutput) ToPairOutput

func (o PairOutput) ToPairOutput() PairOutput

func (PairOutput) ToPairOutputWithContext

func (o PairOutput) ToPairOutputWithContext(ctx context.Context) PairOutput

type PairState

type PairState struct {
	// The key pair's name. It is the only in one TencentCloud account.
	KeyName pulumi.StringPtrInput
	// Specifys to which project the key pair belongs.
	ProjectId pulumi.IntPtrInput
	// You can import an existing public key and using TencentCloud key pair to manage it.
	PublicKey pulumi.StringPtrInput
	// Tags of the key pair.
	Tags pulumi.MapInput
}

func (PairState) ElementType

func (PairState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL