Documentation
¶
Index ¶
- type GetPairsArgs
- type GetPairsKeyPairList
- type GetPairsKeyPairListArgs
- type GetPairsKeyPairListArray
- type GetPairsKeyPairListArrayInput
- type GetPairsKeyPairListArrayOutput
- func (GetPairsKeyPairListArrayOutput) ElementType() reflect.Type
- func (o GetPairsKeyPairListArrayOutput) Index(i pulumi.IntInput) GetPairsKeyPairListOutput
- func (o GetPairsKeyPairListArrayOutput) ToGetPairsKeyPairListArrayOutput() GetPairsKeyPairListArrayOutput
- func (o GetPairsKeyPairListArrayOutput) ToGetPairsKeyPairListArrayOutputWithContext(ctx context.Context) GetPairsKeyPairListArrayOutput
- type GetPairsKeyPairListInput
- type GetPairsKeyPairListOutput
- func (o GetPairsKeyPairListOutput) CreateTime() pulumi.StringOutput
- func (GetPairsKeyPairListOutput) ElementType() reflect.Type
- func (o GetPairsKeyPairListOutput) KeyId() pulumi.StringOutput
- func (o GetPairsKeyPairListOutput) KeyName() pulumi.StringOutput
- func (o GetPairsKeyPairListOutput) ProjectId() pulumi.IntOutput
- func (o GetPairsKeyPairListOutput) PublicKey() pulumi.StringOutput
- func (o GetPairsKeyPairListOutput) ToGetPairsKeyPairListOutput() GetPairsKeyPairListOutput
- func (o GetPairsKeyPairListOutput) ToGetPairsKeyPairListOutputWithContext(ctx context.Context) GetPairsKeyPairListOutput
- type GetPairsOutputArgs
- type GetPairsResult
- type GetPairsResultOutput
- func (GetPairsResultOutput) ElementType() reflect.Type
- func (o GetPairsResultOutput) Id() pulumi.StringOutput
- func (o GetPairsResultOutput) KeyId() pulumi.StringPtrOutput
- func (o GetPairsResultOutput) KeyName() pulumi.StringPtrOutput
- func (o GetPairsResultOutput) KeyPairLists() GetPairsKeyPairListArrayOutput
- func (o GetPairsResultOutput) ProjectId() pulumi.IntPtrOutput
- func (o GetPairsResultOutput) ResultOutputFile() pulumi.StringPtrOutput
- func (o GetPairsResultOutput) ToGetPairsResultOutput() GetPairsResultOutput
- func (o GetPairsResultOutput) ToGetPairsResultOutputWithContext(ctx context.Context) GetPairsResultOutput
- type Pair
- type PairArgs
- type PairArray
- type PairArrayInput
- type PairArrayOutput
- type PairInput
- type PairMap
- type PairMapInput
- type PairMapOutput
- type PairOutput
- func (PairOutput) ElementType() reflect.Type
- func (o PairOutput) KeyName() pulumi.StringOutput
- func (o PairOutput) ProjectId() pulumi.IntPtrOutput
- func (o PairOutput) PublicKey() pulumi.StringOutput
- func (o PairOutput) Tags() pulumi.MapOutput
- func (o PairOutput) ToPairOutput() PairOutput
- func (o PairOutput) ToPairOutputWithContext(ctx context.Context) PairOutput
- type PairState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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) ElementType() reflect.Type
func (GetPairsKeyPairListArrayOutput) Index ¶
func (o GetPairsKeyPairListArrayOutput) Index(i pulumi.IntInput) GetPairsKeyPairListOutput
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 ¶
func (o GetPairsKeyPairListOutput) CreateTime() pulumi.StringOutput
Creation time of the key pair.
func (GetPairsKeyPairListOutput) ElementType ¶
func (GetPairsKeyPairListOutput) ElementType() reflect.Type
func (GetPairsKeyPairListOutput) KeyId ¶
func (o GetPairsKeyPairListOutput) KeyId() pulumi.StringOutput
ID of the key pair to be queried.
func (GetPairsKeyPairListOutput) KeyName ¶
func (o GetPairsKeyPairListOutput) KeyName() pulumi.StringOutput
Name of the key pair to be queried. Support regular expression search, only `^` and `$` are supported.
func (GetPairsKeyPairListOutput) ProjectId ¶
func (o GetPairsKeyPairListOutput) ProjectId() pulumi.IntOutput
Project ID of the key pair to be queried.
func (GetPairsKeyPairListOutput) PublicKey ¶
func (o GetPairsKeyPairListOutput) PublicKey() pulumi.StringOutput
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
### Query key pairs by key ID
<!--Start PulumiCodeChooser --> ```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.GetPairs(ctx, &key.GetPairsArgs{ KeyId: pulumi.StringRef("skey-ie97i3ml"), }, nil) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
### Query key pairs by key name
<!--Start PulumiCodeChooser --> ```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.GetPairs(ctx, &key.GetPairsArgs{ KeyName: pulumi.StringRef("^test$"), }, nil) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
type GetPairsResultOutput ¶
type GetPairsResultOutput struct{ *pulumi.OutputState }
A collection of values returned by getPairs.
func GetPairsOutput ¶
func GetPairsOutput(ctx *pulumi.Context, args GetPairsOutputArgs, opts ...pulumi.InvokeOption) GetPairsResultOutput
func (GetPairsResultOutput) ElementType ¶
func (GetPairsResultOutput) ElementType() reflect.Type
func (GetPairsResultOutput) Id ¶
func (o GetPairsResultOutput) Id() pulumi.StringOutput
The provider-assigned unique ID for this managed resource.
func (GetPairsResultOutput) KeyId ¶
func (o GetPairsResultOutput) KeyId() pulumi.StringPtrOutput
ID of the key pair.
func (GetPairsResultOutput) KeyName ¶
func (o GetPairsResultOutput) KeyName() pulumi.StringPtrOutput
Name of the key pair.
func (GetPairsResultOutput) KeyPairLists ¶
func (o GetPairsResultOutput) KeyPairLists() GetPairsKeyPairListArrayOutput
An information list of key pair. Each element contains the following attributes:
func (GetPairsResultOutput) ProjectId ¶
func (o GetPairsResultOutput) ProjectId() pulumi.IntPtrOutput
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
<!--Start PulumiCodeChooser --> ```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 }) }
``` <!--End PulumiCodeChooser -->
## 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) 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 ¶
type PairArray ¶
type PairArray []PairInput
func (PairArray) ElementType ¶
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 (o PairArrayOutput) Index(i pulumi.IntInput) PairOutput
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 ¶
func (PairMap) ElementType ¶
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 (o PairMapOutput) MapIndex(k pulumi.StringInput) PairOutput
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 }