ssm

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2022 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 GetSecretVersionsArgs

type GetSecretVersionsArgs struct {
	// Used to save results.
	ResultOutputFile *string `pulumi:"resultOutputFile"`
	// Secret name used to filter result.
	SecretName string `pulumi:"secretName"`
	// VersionId used to filter result.
	VersionId *string `pulumi:"versionId"`
}

A collection of arguments for invoking getSecretVersions.

type GetSecretVersionsOutputArgs

type GetSecretVersionsOutputArgs struct {
	// Used to save results.
	ResultOutputFile pulumi.StringPtrInput `pulumi:"resultOutputFile"`
	// Secret name used to filter result.
	SecretName pulumi.StringInput `pulumi:"secretName"`
	// VersionId used to filter result.
	VersionId pulumi.StringPtrInput `pulumi:"versionId"`
}

A collection of arguments for invoking getSecretVersions.

func (GetSecretVersionsOutputArgs) ElementType

type GetSecretVersionsResult

type GetSecretVersionsResult struct {
	// The provider-assigned unique ID for this managed resource.
	Id               string  `pulumi:"id"`
	ResultOutputFile *string `pulumi:"resultOutputFile"`
	SecretName       string  `pulumi:"secretName"`
	// A list of SSM secret versions. When secret status is `Disabled`, this field will not update anymore.
	SecretVersionLists []GetSecretVersionsSecretVersionList `pulumi:"secretVersionLists"`
	// Version of secret.
	VersionId *string `pulumi:"versionId"`
}

A collection of values returned by getSecretVersions.

func GetSecretVersions

func GetSecretVersions(ctx *pulumi.Context, args *GetSecretVersionsArgs, opts ...pulumi.InvokeOption) (*GetSecretVersionsResult, error)

Use this data source to query detailed information of SSM secret version

## Example Usage

```go package main

import (

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

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := Ssm.GetSecretVersions(ctx, &ssm.GetSecretVersionsArgs{
			SecretName: "test",
			VersionId:  pulumi.StringRef("v1"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

type GetSecretVersionsResultOutput

type GetSecretVersionsResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getSecretVersions.

func (GetSecretVersionsResultOutput) ElementType

func (GetSecretVersionsResultOutput) Id

The provider-assigned unique ID for this managed resource.

func (GetSecretVersionsResultOutput) ResultOutputFile

func (GetSecretVersionsResultOutput) SecretName

func (GetSecretVersionsResultOutput) SecretVersionLists

A list of SSM secret versions. When secret status is `Disabled`, this field will not update anymore.

func (GetSecretVersionsResultOutput) ToGetSecretVersionsResultOutput

func (o GetSecretVersionsResultOutput) ToGetSecretVersionsResultOutput() GetSecretVersionsResultOutput

func (GetSecretVersionsResultOutput) ToGetSecretVersionsResultOutputWithContext

func (o GetSecretVersionsResultOutput) ToGetSecretVersionsResultOutputWithContext(ctx context.Context) GetSecretVersionsResultOutput

func (GetSecretVersionsResultOutput) VersionId

Version of secret.

type GetSecretVersionsSecretVersionList

type GetSecretVersionsSecretVersionList struct {
	// The base64-encoded binary secret.
	SecretBinary string `pulumi:"secretBinary"`
	// The string text of secret.
	SecretString string `pulumi:"secretString"`
	// VersionId used to filter result.
	VersionId string `pulumi:"versionId"`
}

type GetSecretVersionsSecretVersionListArgs

type GetSecretVersionsSecretVersionListArgs struct {
	// The base64-encoded binary secret.
	SecretBinary pulumi.StringInput `pulumi:"secretBinary"`
	// The string text of secret.
	SecretString pulumi.StringInput `pulumi:"secretString"`
	// VersionId used to filter result.
	VersionId pulumi.StringInput `pulumi:"versionId"`
}

func (GetSecretVersionsSecretVersionListArgs) ElementType

func (GetSecretVersionsSecretVersionListArgs) ToGetSecretVersionsSecretVersionListOutput

func (i GetSecretVersionsSecretVersionListArgs) ToGetSecretVersionsSecretVersionListOutput() GetSecretVersionsSecretVersionListOutput

func (GetSecretVersionsSecretVersionListArgs) ToGetSecretVersionsSecretVersionListOutputWithContext

func (i GetSecretVersionsSecretVersionListArgs) ToGetSecretVersionsSecretVersionListOutputWithContext(ctx context.Context) GetSecretVersionsSecretVersionListOutput

type GetSecretVersionsSecretVersionListArray

type GetSecretVersionsSecretVersionListArray []GetSecretVersionsSecretVersionListInput

func (GetSecretVersionsSecretVersionListArray) ElementType

func (GetSecretVersionsSecretVersionListArray) ToGetSecretVersionsSecretVersionListArrayOutput

func (i GetSecretVersionsSecretVersionListArray) ToGetSecretVersionsSecretVersionListArrayOutput() GetSecretVersionsSecretVersionListArrayOutput

func (GetSecretVersionsSecretVersionListArray) ToGetSecretVersionsSecretVersionListArrayOutputWithContext

func (i GetSecretVersionsSecretVersionListArray) ToGetSecretVersionsSecretVersionListArrayOutputWithContext(ctx context.Context) GetSecretVersionsSecretVersionListArrayOutput

type GetSecretVersionsSecretVersionListArrayInput

type GetSecretVersionsSecretVersionListArrayInput interface {
	pulumi.Input

	ToGetSecretVersionsSecretVersionListArrayOutput() GetSecretVersionsSecretVersionListArrayOutput
	ToGetSecretVersionsSecretVersionListArrayOutputWithContext(context.Context) GetSecretVersionsSecretVersionListArrayOutput
}

GetSecretVersionsSecretVersionListArrayInput is an input type that accepts GetSecretVersionsSecretVersionListArray and GetSecretVersionsSecretVersionListArrayOutput values. You can construct a concrete instance of `GetSecretVersionsSecretVersionListArrayInput` via:

GetSecretVersionsSecretVersionListArray{ GetSecretVersionsSecretVersionListArgs{...} }

type GetSecretVersionsSecretVersionListArrayOutput

type GetSecretVersionsSecretVersionListArrayOutput struct{ *pulumi.OutputState }

func (GetSecretVersionsSecretVersionListArrayOutput) ElementType

func (GetSecretVersionsSecretVersionListArrayOutput) Index

func (GetSecretVersionsSecretVersionListArrayOutput) ToGetSecretVersionsSecretVersionListArrayOutput

func (o GetSecretVersionsSecretVersionListArrayOutput) ToGetSecretVersionsSecretVersionListArrayOutput() GetSecretVersionsSecretVersionListArrayOutput

func (GetSecretVersionsSecretVersionListArrayOutput) ToGetSecretVersionsSecretVersionListArrayOutputWithContext

func (o GetSecretVersionsSecretVersionListArrayOutput) ToGetSecretVersionsSecretVersionListArrayOutputWithContext(ctx context.Context) GetSecretVersionsSecretVersionListArrayOutput

type GetSecretVersionsSecretVersionListInput

type GetSecretVersionsSecretVersionListInput interface {
	pulumi.Input

	ToGetSecretVersionsSecretVersionListOutput() GetSecretVersionsSecretVersionListOutput
	ToGetSecretVersionsSecretVersionListOutputWithContext(context.Context) GetSecretVersionsSecretVersionListOutput
}

GetSecretVersionsSecretVersionListInput is an input type that accepts GetSecretVersionsSecretVersionListArgs and GetSecretVersionsSecretVersionListOutput values. You can construct a concrete instance of `GetSecretVersionsSecretVersionListInput` via:

GetSecretVersionsSecretVersionListArgs{...}

type GetSecretVersionsSecretVersionListOutput

type GetSecretVersionsSecretVersionListOutput struct{ *pulumi.OutputState }

func (GetSecretVersionsSecretVersionListOutput) ElementType

func (GetSecretVersionsSecretVersionListOutput) SecretBinary

The base64-encoded binary secret.

func (GetSecretVersionsSecretVersionListOutput) SecretString

The string text of secret.

func (GetSecretVersionsSecretVersionListOutput) ToGetSecretVersionsSecretVersionListOutput

func (o GetSecretVersionsSecretVersionListOutput) ToGetSecretVersionsSecretVersionListOutput() GetSecretVersionsSecretVersionListOutput

func (GetSecretVersionsSecretVersionListOutput) ToGetSecretVersionsSecretVersionListOutputWithContext

func (o GetSecretVersionsSecretVersionListOutput) ToGetSecretVersionsSecretVersionListOutputWithContext(ctx context.Context) GetSecretVersionsSecretVersionListOutput

func (GetSecretVersionsSecretVersionListOutput) VersionId

VersionId used to filter result.

type GetSecretsArgs

type GetSecretsArgs struct {
	// The order to sort the create time of secret. `0` - desc, `1` - asc. Default value is `0`.
	OrderType *int `pulumi:"orderType"`
	// Used to save results.
	ResultOutputFile *string `pulumi:"resultOutputFile"`
	// Secret name used to filter result.
	SecretName *string `pulumi:"secretName"`
	// Filter by state of secret. `0` - all secrets are queried, `1` - only Enabled secrets are queried, `2` - only Disabled secrets are queried, `3` - only PendingDelete secrets are queried.
	State *int `pulumi:"state"`
	// Tags to filter secret.
	Tags map[string]interface{} `pulumi:"tags"`
}

A collection of arguments for invoking getSecrets.

type GetSecretsOutputArgs

type GetSecretsOutputArgs struct {
	// The order to sort the create time of secret. `0` - desc, `1` - asc. Default value is `0`.
	OrderType pulumi.IntPtrInput `pulumi:"orderType"`
	// Used to save results.
	ResultOutputFile pulumi.StringPtrInput `pulumi:"resultOutputFile"`
	// Secret name used to filter result.
	SecretName pulumi.StringPtrInput `pulumi:"secretName"`
	// Filter by state of secret. `0` - all secrets are queried, `1` - only Enabled secrets are queried, `2` - only Disabled secrets are queried, `3` - only PendingDelete secrets are queried.
	State pulumi.IntPtrInput `pulumi:"state"`
	// Tags to filter secret.
	Tags pulumi.MapInput `pulumi:"tags"`
}

A collection of arguments for invoking getSecrets.

func (GetSecretsOutputArgs) ElementType

func (GetSecretsOutputArgs) ElementType() reflect.Type

type GetSecretsResult

type GetSecretsResult struct {
	// The provider-assigned unique ID for this managed resource.
	Id               string  `pulumi:"id"`
	OrderType        *int    `pulumi:"orderType"`
	ResultOutputFile *string `pulumi:"resultOutputFile"`
	// A list of SSM secrets.
	SecretLists []GetSecretsSecretList `pulumi:"secretLists"`
	// Name of secret.
	SecretName *string                `pulumi:"secretName"`
	State      *int                   `pulumi:"state"`
	Tags       map[string]interface{} `pulumi:"tags"`
}

A collection of values returned by getSecrets.

func GetSecrets

func GetSecrets(ctx *pulumi.Context, args *GetSecretsArgs, opts ...pulumi.InvokeOption) (*GetSecretsResult, error)

Use this data source to query detailed information of SSM secret

## Example Usage

```go package main

import (

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

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := Ssm.GetSecrets(ctx, &ssm.GetSecretsArgs{
			OrderType:  pulumi.IntRef(1),
			SecretName: pulumi.StringRef("test"),
			State:      pulumi.IntRef(1),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

type GetSecretsResultOutput

type GetSecretsResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getSecrets.

func (GetSecretsResultOutput) ElementType

func (GetSecretsResultOutput) ElementType() reflect.Type

func (GetSecretsResultOutput) Id

The provider-assigned unique ID for this managed resource.

func (GetSecretsResultOutput) OrderType

func (GetSecretsResultOutput) ResultOutputFile

func (o GetSecretsResultOutput) ResultOutputFile() pulumi.StringPtrOutput

func (GetSecretsResultOutput) SecretLists

A list of SSM secrets.

func (GetSecretsResultOutput) SecretName

Name of secret.

func (GetSecretsResultOutput) State

func (GetSecretsResultOutput) Tags

func (GetSecretsResultOutput) ToGetSecretsResultOutput

func (o GetSecretsResultOutput) ToGetSecretsResultOutput() GetSecretsResultOutput

func (GetSecretsResultOutput) ToGetSecretsResultOutputWithContext

func (o GetSecretsResultOutput) ToGetSecretsResultOutputWithContext(ctx context.Context) GetSecretsResultOutput

type GetSecretsSecretList

type GetSecretsSecretList struct {
	// Create time of secret.
	CreateTime int `pulumi:"createTime"`
	// Uin of Creator.
	CreateUin int `pulumi:"createUin"`
	// Delete time of CMK.
	DeleteTime int `pulumi:"deleteTime"`
	// Description of secret.
	Description string `pulumi:"description"`
	// KMS keyId used to encrypt secret.
	KmsKeyId string `pulumi:"kmsKeyId"`
	// Secret name used to filter result.
	SecretName string `pulumi:"secretName"`
	// Status of secret.
	Status string `pulumi:"status"`
}

type GetSecretsSecretListArgs

type GetSecretsSecretListArgs struct {
	// Create time of secret.
	CreateTime pulumi.IntInput `pulumi:"createTime"`
	// Uin of Creator.
	CreateUin pulumi.IntInput `pulumi:"createUin"`
	// Delete time of CMK.
	DeleteTime pulumi.IntInput `pulumi:"deleteTime"`
	// Description of secret.
	Description pulumi.StringInput `pulumi:"description"`
	// KMS keyId used to encrypt secret.
	KmsKeyId pulumi.StringInput `pulumi:"kmsKeyId"`
	// Secret name used to filter result.
	SecretName pulumi.StringInput `pulumi:"secretName"`
	// Status of secret.
	Status pulumi.StringInput `pulumi:"status"`
}

func (GetSecretsSecretListArgs) ElementType

func (GetSecretsSecretListArgs) ElementType() reflect.Type

func (GetSecretsSecretListArgs) ToGetSecretsSecretListOutput

func (i GetSecretsSecretListArgs) ToGetSecretsSecretListOutput() GetSecretsSecretListOutput

func (GetSecretsSecretListArgs) ToGetSecretsSecretListOutputWithContext

func (i GetSecretsSecretListArgs) ToGetSecretsSecretListOutputWithContext(ctx context.Context) GetSecretsSecretListOutput

type GetSecretsSecretListArray

type GetSecretsSecretListArray []GetSecretsSecretListInput

func (GetSecretsSecretListArray) ElementType

func (GetSecretsSecretListArray) ElementType() reflect.Type

func (GetSecretsSecretListArray) ToGetSecretsSecretListArrayOutput

func (i GetSecretsSecretListArray) ToGetSecretsSecretListArrayOutput() GetSecretsSecretListArrayOutput

func (GetSecretsSecretListArray) ToGetSecretsSecretListArrayOutputWithContext

func (i GetSecretsSecretListArray) ToGetSecretsSecretListArrayOutputWithContext(ctx context.Context) GetSecretsSecretListArrayOutput

type GetSecretsSecretListArrayInput

type GetSecretsSecretListArrayInput interface {
	pulumi.Input

	ToGetSecretsSecretListArrayOutput() GetSecretsSecretListArrayOutput
	ToGetSecretsSecretListArrayOutputWithContext(context.Context) GetSecretsSecretListArrayOutput
}

GetSecretsSecretListArrayInput is an input type that accepts GetSecretsSecretListArray and GetSecretsSecretListArrayOutput values. You can construct a concrete instance of `GetSecretsSecretListArrayInput` via:

GetSecretsSecretListArray{ GetSecretsSecretListArgs{...} }

type GetSecretsSecretListArrayOutput

type GetSecretsSecretListArrayOutput struct{ *pulumi.OutputState }

func (GetSecretsSecretListArrayOutput) ElementType

func (GetSecretsSecretListArrayOutput) Index

func (GetSecretsSecretListArrayOutput) ToGetSecretsSecretListArrayOutput

func (o GetSecretsSecretListArrayOutput) ToGetSecretsSecretListArrayOutput() GetSecretsSecretListArrayOutput

func (GetSecretsSecretListArrayOutput) ToGetSecretsSecretListArrayOutputWithContext

func (o GetSecretsSecretListArrayOutput) ToGetSecretsSecretListArrayOutputWithContext(ctx context.Context) GetSecretsSecretListArrayOutput

type GetSecretsSecretListInput

type GetSecretsSecretListInput interface {
	pulumi.Input

	ToGetSecretsSecretListOutput() GetSecretsSecretListOutput
	ToGetSecretsSecretListOutputWithContext(context.Context) GetSecretsSecretListOutput
}

GetSecretsSecretListInput is an input type that accepts GetSecretsSecretListArgs and GetSecretsSecretListOutput values. You can construct a concrete instance of `GetSecretsSecretListInput` via:

GetSecretsSecretListArgs{...}

type GetSecretsSecretListOutput

type GetSecretsSecretListOutput struct{ *pulumi.OutputState }

func (GetSecretsSecretListOutput) CreateTime

Create time of secret.

func (GetSecretsSecretListOutput) CreateUin

Uin of Creator.

func (GetSecretsSecretListOutput) DeleteTime

Delete time of CMK.

func (GetSecretsSecretListOutput) Description

Description of secret.

func (GetSecretsSecretListOutput) ElementType

func (GetSecretsSecretListOutput) ElementType() reflect.Type

func (GetSecretsSecretListOutput) KmsKeyId

KMS keyId used to encrypt secret.

func (GetSecretsSecretListOutput) SecretName

Secret name used to filter result.

func (GetSecretsSecretListOutput) Status

Status of secret.

func (GetSecretsSecretListOutput) ToGetSecretsSecretListOutput

func (o GetSecretsSecretListOutput) ToGetSecretsSecretListOutput() GetSecretsSecretListOutput

func (GetSecretsSecretListOutput) ToGetSecretsSecretListOutputWithContext

func (o GetSecretsSecretListOutput) ToGetSecretsSecretListOutputWithContext(ctx context.Context) GetSecretsSecretListOutput

type Secret

type Secret struct {
	pulumi.CustomResourceState

	// Description of secret. The maximum is 2048 bytes.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// Specify whether to enable secret. Default value is `true`.
	IsEnabled pulumi.BoolPtrOutput `pulumi:"isEnabled"`
	// KMS keyId used to encrypt secret. If it is empty, it means that the CMK created by SSM for you by default is used for encryption. You can also specify the KMS CMK created by yourself in the same region for encryption.
	KmsKeyId pulumi.StringOutput `pulumi:"kmsKeyId"`
	// Specify the scheduled deletion date. Default value is `0` that means to delete immediately. 1-30 means the number of days reserved, completely deleted after this date.
	RecoveryWindowInDays pulumi.IntPtrOutput `pulumi:"recoveryWindowInDays"`
	// Name of secret which cannot be repeated in the same region. The maximum length is 128 bytes. The name can only contain English letters, numbers, underscore and hyphen '-'. The first character must be a letter or number.
	SecretName pulumi.StringOutput `pulumi:"secretName"`
	// Status of secret.
	Status pulumi.StringOutput `pulumi:"status"`
	// Tags of secret.
	Tags pulumi.MapOutput `pulumi:"tags"`
}

Provide a resource to create a SSM secret.

## Example Usage

```go package main

import (

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

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := Ssm.NewSecret(ctx, "foo", &Ssm.SecretArgs{
			Description:          pulumi.String("test secret"),
			IsEnabled:            pulumi.Bool(true),
			RecoveryWindowInDays: pulumi.Int(0),
			SecretName:           pulumi.String("test"),
			Tags: pulumi.AnyMap{
				"test-tag": pulumi.Any("test"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

SSM secret can be imported using the secretName, e.g.

```sh

$ pulumi import tencentcloud:Ssm/secret:Secret foo test

```

func GetSecret

func GetSecret(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *SecretState, opts ...pulumi.ResourceOption) (*Secret, error)

GetSecret gets an existing Secret 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 NewSecret

func NewSecret(ctx *pulumi.Context,
	name string, args *SecretArgs, opts ...pulumi.ResourceOption) (*Secret, error)

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

func (*Secret) ElementType

func (*Secret) ElementType() reflect.Type

func (*Secret) ToSecretOutput

func (i *Secret) ToSecretOutput() SecretOutput

func (*Secret) ToSecretOutputWithContext

func (i *Secret) ToSecretOutputWithContext(ctx context.Context) SecretOutput

type SecretArgs

type SecretArgs struct {
	// Description of secret. The maximum is 2048 bytes.
	Description pulumi.StringPtrInput
	// Specify whether to enable secret. Default value is `true`.
	IsEnabled pulumi.BoolPtrInput
	// KMS keyId used to encrypt secret. If it is empty, it means that the CMK created by SSM for you by default is used for encryption. You can also specify the KMS CMK created by yourself in the same region for encryption.
	KmsKeyId pulumi.StringPtrInput
	// Specify the scheduled deletion date. Default value is `0` that means to delete immediately. 1-30 means the number of days reserved, completely deleted after this date.
	RecoveryWindowInDays pulumi.IntPtrInput
	// Name of secret which cannot be repeated in the same region. The maximum length is 128 bytes. The name can only contain English letters, numbers, underscore and hyphen '-'. The first character must be a letter or number.
	SecretName pulumi.StringInput
	// Tags of secret.
	Tags pulumi.MapInput
}

The set of arguments for constructing a Secret resource.

func (SecretArgs) ElementType

func (SecretArgs) ElementType() reflect.Type

type SecretArray

type SecretArray []SecretInput

func (SecretArray) ElementType

func (SecretArray) ElementType() reflect.Type

func (SecretArray) ToSecretArrayOutput

func (i SecretArray) ToSecretArrayOutput() SecretArrayOutput

func (SecretArray) ToSecretArrayOutputWithContext

func (i SecretArray) ToSecretArrayOutputWithContext(ctx context.Context) SecretArrayOutput

type SecretArrayInput

type SecretArrayInput interface {
	pulumi.Input

	ToSecretArrayOutput() SecretArrayOutput
	ToSecretArrayOutputWithContext(context.Context) SecretArrayOutput
}

SecretArrayInput is an input type that accepts SecretArray and SecretArrayOutput values. You can construct a concrete instance of `SecretArrayInput` via:

SecretArray{ SecretArgs{...} }

type SecretArrayOutput

type SecretArrayOutput struct{ *pulumi.OutputState }

func (SecretArrayOutput) ElementType

func (SecretArrayOutput) ElementType() reflect.Type

func (SecretArrayOutput) Index

func (SecretArrayOutput) ToSecretArrayOutput

func (o SecretArrayOutput) ToSecretArrayOutput() SecretArrayOutput

func (SecretArrayOutput) ToSecretArrayOutputWithContext

func (o SecretArrayOutput) ToSecretArrayOutputWithContext(ctx context.Context) SecretArrayOutput

type SecretInput

type SecretInput interface {
	pulumi.Input

	ToSecretOutput() SecretOutput
	ToSecretOutputWithContext(ctx context.Context) SecretOutput
}

type SecretMap

type SecretMap map[string]SecretInput

func (SecretMap) ElementType

func (SecretMap) ElementType() reflect.Type

func (SecretMap) ToSecretMapOutput

func (i SecretMap) ToSecretMapOutput() SecretMapOutput

func (SecretMap) ToSecretMapOutputWithContext

func (i SecretMap) ToSecretMapOutputWithContext(ctx context.Context) SecretMapOutput

type SecretMapInput

type SecretMapInput interface {
	pulumi.Input

	ToSecretMapOutput() SecretMapOutput
	ToSecretMapOutputWithContext(context.Context) SecretMapOutput
}

SecretMapInput is an input type that accepts SecretMap and SecretMapOutput values. You can construct a concrete instance of `SecretMapInput` via:

SecretMap{ "key": SecretArgs{...} }

type SecretMapOutput

type SecretMapOutput struct{ *pulumi.OutputState }

func (SecretMapOutput) ElementType

func (SecretMapOutput) ElementType() reflect.Type

func (SecretMapOutput) MapIndex

func (SecretMapOutput) ToSecretMapOutput

func (o SecretMapOutput) ToSecretMapOutput() SecretMapOutput

func (SecretMapOutput) ToSecretMapOutputWithContext

func (o SecretMapOutput) ToSecretMapOutputWithContext(ctx context.Context) SecretMapOutput

type SecretOutput

type SecretOutput struct{ *pulumi.OutputState }

func (SecretOutput) Description

func (o SecretOutput) Description() pulumi.StringPtrOutput

Description of secret. The maximum is 2048 bytes.

func (SecretOutput) ElementType

func (SecretOutput) ElementType() reflect.Type

func (SecretOutput) IsEnabled

func (o SecretOutput) IsEnabled() pulumi.BoolPtrOutput

Specify whether to enable secret. Default value is `true`.

func (SecretOutput) KmsKeyId

func (o SecretOutput) KmsKeyId() pulumi.StringOutput

KMS keyId used to encrypt secret. If it is empty, it means that the CMK created by SSM for you by default is used for encryption. You can also specify the KMS CMK created by yourself in the same region for encryption.

func (SecretOutput) RecoveryWindowInDays

func (o SecretOutput) RecoveryWindowInDays() pulumi.IntPtrOutput

Specify the scheduled deletion date. Default value is `0` that means to delete immediately. 1-30 means the number of days reserved, completely deleted after this date.

func (SecretOutput) SecretName

func (o SecretOutput) SecretName() pulumi.StringOutput

Name of secret which cannot be repeated in the same region. The maximum length is 128 bytes. The name can only contain English letters, numbers, underscore and hyphen '-'. The first character must be a letter or number.

func (SecretOutput) Status

func (o SecretOutput) Status() pulumi.StringOutput

Status of secret.

func (SecretOutput) Tags

func (o SecretOutput) Tags() pulumi.MapOutput

Tags of secret.

func (SecretOutput) ToSecretOutput

func (o SecretOutput) ToSecretOutput() SecretOutput

func (SecretOutput) ToSecretOutputWithContext

func (o SecretOutput) ToSecretOutputWithContext(ctx context.Context) SecretOutput

type SecretState

type SecretState struct {
	// Description of secret. The maximum is 2048 bytes.
	Description pulumi.StringPtrInput
	// Specify whether to enable secret. Default value is `true`.
	IsEnabled pulumi.BoolPtrInput
	// KMS keyId used to encrypt secret. If it is empty, it means that the CMK created by SSM for you by default is used for encryption. You can also specify the KMS CMK created by yourself in the same region for encryption.
	KmsKeyId pulumi.StringPtrInput
	// Specify the scheduled deletion date. Default value is `0` that means to delete immediately. 1-30 means the number of days reserved, completely deleted after this date.
	RecoveryWindowInDays pulumi.IntPtrInput
	// Name of secret which cannot be repeated in the same region. The maximum length is 128 bytes. The name can only contain English letters, numbers, underscore and hyphen '-'. The first character must be a letter or number.
	SecretName pulumi.StringPtrInput
	// Status of secret.
	Status pulumi.StringPtrInput
	// Tags of secret.
	Tags pulumi.MapInput
}

func (SecretState) ElementType

func (SecretState) ElementType() reflect.Type

type SecretVersion

type SecretVersion struct {
	pulumi.CustomResourceState

	// The base64-encoded binary secret. secretBinary and secretString must be set only one, and the maximum support is 4096 bytes. When secret status is `Disabled`, this field will not update anymore.
	SecretBinary pulumi.StringPtrOutput `pulumi:"secretBinary"`
	// Name of secret which cannot be repeated in the same region. The maximum length is 128 bytes. The name can only contain English letters, numbers, underscore and hyphen '-'. The first character must be a letter or number.
	SecretName pulumi.StringOutput `pulumi:"secretName"`
	// The string text of secret. secretBinary and secretString must be set only one, and the maximum support is 4096 bytes. When secret status is `Disabled`, this field will not update anymore.
	SecretString pulumi.StringPtrOutput `pulumi:"secretString"`
	// Version of secret. The maximum length is 64 bytes. The versionId can only contain English letters, numbers, underscore and hyphen '-'. The first character must be a letter or number.
	VersionId pulumi.StringOutput `pulumi:"versionId"`
}

Provide a resource to create a SSM secret version.

## Example Usage

```go package main

import (

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

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		foo, err := Ssm.NewSecret(ctx, "foo", &Ssm.SecretArgs{
			SecretName:           pulumi.String("test"),
			Description:          pulumi.String("test secret"),
			RecoveryWindowInDays: pulumi.Int(0),
			IsEnabled:            pulumi.Bool(true),
			Tags: pulumi.AnyMap{
				"test-tag": pulumi.Any("test"),
			},
		})
		if err != nil {
			return err
		}
		_, err = Ssm.NewSecretVersion(ctx, "v1", &Ssm.SecretVersionArgs{
			SecretName:   foo.SecretName,
			VersionId:    pulumi.String("v1"),
			SecretBinary: pulumi.String("MTIzMTIzMTIzMTIzMTIzQQ=="),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

SSM secret version can be imported using the secretName#versionId, e.g.

```sh

$ pulumi import tencentcloud:Ssm/secretVersion:SecretVersion v1 test#v1

```

func GetSecretVersion

func GetSecretVersion(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *SecretVersionState, opts ...pulumi.ResourceOption) (*SecretVersion, error)

GetSecretVersion gets an existing SecretVersion 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 NewSecretVersion

func NewSecretVersion(ctx *pulumi.Context,
	name string, args *SecretVersionArgs, opts ...pulumi.ResourceOption) (*SecretVersion, error)

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

func (*SecretVersion) ElementType

func (*SecretVersion) ElementType() reflect.Type

func (*SecretVersion) ToSecretVersionOutput

func (i *SecretVersion) ToSecretVersionOutput() SecretVersionOutput

func (*SecretVersion) ToSecretVersionOutputWithContext

func (i *SecretVersion) ToSecretVersionOutputWithContext(ctx context.Context) SecretVersionOutput

type SecretVersionArgs

type SecretVersionArgs struct {
	// The base64-encoded binary secret. secretBinary and secretString must be set only one, and the maximum support is 4096 bytes. When secret status is `Disabled`, this field will not update anymore.
	SecretBinary pulumi.StringPtrInput
	// Name of secret which cannot be repeated in the same region. The maximum length is 128 bytes. The name can only contain English letters, numbers, underscore and hyphen '-'. The first character must be a letter or number.
	SecretName pulumi.StringInput
	// The string text of secret. secretBinary and secretString must be set only one, and the maximum support is 4096 bytes. When secret status is `Disabled`, this field will not update anymore.
	SecretString pulumi.StringPtrInput
	// Version of secret. The maximum length is 64 bytes. The versionId can only contain English letters, numbers, underscore and hyphen '-'. The first character must be a letter or number.
	VersionId pulumi.StringInput
}

The set of arguments for constructing a SecretVersion resource.

func (SecretVersionArgs) ElementType

func (SecretVersionArgs) ElementType() reflect.Type

type SecretVersionArray

type SecretVersionArray []SecretVersionInput

func (SecretVersionArray) ElementType

func (SecretVersionArray) ElementType() reflect.Type

func (SecretVersionArray) ToSecretVersionArrayOutput

func (i SecretVersionArray) ToSecretVersionArrayOutput() SecretVersionArrayOutput

func (SecretVersionArray) ToSecretVersionArrayOutputWithContext

func (i SecretVersionArray) ToSecretVersionArrayOutputWithContext(ctx context.Context) SecretVersionArrayOutput

type SecretVersionArrayInput

type SecretVersionArrayInput interface {
	pulumi.Input

	ToSecretVersionArrayOutput() SecretVersionArrayOutput
	ToSecretVersionArrayOutputWithContext(context.Context) SecretVersionArrayOutput
}

SecretVersionArrayInput is an input type that accepts SecretVersionArray and SecretVersionArrayOutput values. You can construct a concrete instance of `SecretVersionArrayInput` via:

SecretVersionArray{ SecretVersionArgs{...} }

type SecretVersionArrayOutput

type SecretVersionArrayOutput struct{ *pulumi.OutputState }

func (SecretVersionArrayOutput) ElementType

func (SecretVersionArrayOutput) ElementType() reflect.Type

func (SecretVersionArrayOutput) Index

func (SecretVersionArrayOutput) ToSecretVersionArrayOutput

func (o SecretVersionArrayOutput) ToSecretVersionArrayOutput() SecretVersionArrayOutput

func (SecretVersionArrayOutput) ToSecretVersionArrayOutputWithContext

func (o SecretVersionArrayOutput) ToSecretVersionArrayOutputWithContext(ctx context.Context) SecretVersionArrayOutput

type SecretVersionInput

type SecretVersionInput interface {
	pulumi.Input

	ToSecretVersionOutput() SecretVersionOutput
	ToSecretVersionOutputWithContext(ctx context.Context) SecretVersionOutput
}

type SecretVersionMap

type SecretVersionMap map[string]SecretVersionInput

func (SecretVersionMap) ElementType

func (SecretVersionMap) ElementType() reflect.Type

func (SecretVersionMap) ToSecretVersionMapOutput

func (i SecretVersionMap) ToSecretVersionMapOutput() SecretVersionMapOutput

func (SecretVersionMap) ToSecretVersionMapOutputWithContext

func (i SecretVersionMap) ToSecretVersionMapOutputWithContext(ctx context.Context) SecretVersionMapOutput

type SecretVersionMapInput

type SecretVersionMapInput interface {
	pulumi.Input

	ToSecretVersionMapOutput() SecretVersionMapOutput
	ToSecretVersionMapOutputWithContext(context.Context) SecretVersionMapOutput
}

SecretVersionMapInput is an input type that accepts SecretVersionMap and SecretVersionMapOutput values. You can construct a concrete instance of `SecretVersionMapInput` via:

SecretVersionMap{ "key": SecretVersionArgs{...} }

type SecretVersionMapOutput

type SecretVersionMapOutput struct{ *pulumi.OutputState }

func (SecretVersionMapOutput) ElementType

func (SecretVersionMapOutput) ElementType() reflect.Type

func (SecretVersionMapOutput) MapIndex

func (SecretVersionMapOutput) ToSecretVersionMapOutput

func (o SecretVersionMapOutput) ToSecretVersionMapOutput() SecretVersionMapOutput

func (SecretVersionMapOutput) ToSecretVersionMapOutputWithContext

func (o SecretVersionMapOutput) ToSecretVersionMapOutputWithContext(ctx context.Context) SecretVersionMapOutput

type SecretVersionOutput

type SecretVersionOutput struct{ *pulumi.OutputState }

func (SecretVersionOutput) ElementType

func (SecretVersionOutput) ElementType() reflect.Type

func (SecretVersionOutput) SecretBinary

func (o SecretVersionOutput) SecretBinary() pulumi.StringPtrOutput

The base64-encoded binary secret. secretBinary and secretString must be set only one, and the maximum support is 4096 bytes. When secret status is `Disabled`, this field will not update anymore.

func (SecretVersionOutput) SecretName

func (o SecretVersionOutput) SecretName() pulumi.StringOutput

Name of secret which cannot be repeated in the same region. The maximum length is 128 bytes. The name can only contain English letters, numbers, underscore and hyphen '-'. The first character must be a letter or number.

func (SecretVersionOutput) SecretString

func (o SecretVersionOutput) SecretString() pulumi.StringPtrOutput

The string text of secret. secretBinary and secretString must be set only one, and the maximum support is 4096 bytes. When secret status is `Disabled`, this field will not update anymore.

func (SecretVersionOutput) ToSecretVersionOutput

func (o SecretVersionOutput) ToSecretVersionOutput() SecretVersionOutput

func (SecretVersionOutput) ToSecretVersionOutputWithContext

func (o SecretVersionOutput) ToSecretVersionOutputWithContext(ctx context.Context) SecretVersionOutput

func (SecretVersionOutput) VersionId

func (o SecretVersionOutput) VersionId() pulumi.StringOutput

Version of secret. The maximum length is 64 bytes. The versionId can only contain English letters, numbers, underscore and hyphen '-'. The first character must be a letter or number.

type SecretVersionState

type SecretVersionState struct {
	// The base64-encoded binary secret. secretBinary and secretString must be set only one, and the maximum support is 4096 bytes. When secret status is `Disabled`, this field will not update anymore.
	SecretBinary pulumi.StringPtrInput
	// Name of secret which cannot be repeated in the same region. The maximum length is 128 bytes. The name can only contain English letters, numbers, underscore and hyphen '-'. The first character must be a letter or number.
	SecretName pulumi.StringPtrInput
	// The string text of secret. secretBinary and secretString must be set only one, and the maximum support is 4096 bytes. When secret status is `Disabled`, this field will not update anymore.
	SecretString pulumi.StringPtrInput
	// Version of secret. The maximum length is 64 bytes. The versionId can only contain English letters, numbers, underscore and hyphen '-'. The first character must be a letter or number.
	VersionId pulumi.StringPtrInput
}

func (SecretVersionState) ElementType

func (SecretVersionState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

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