kms

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 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.1

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 Alias

type Alias struct {
	pulumi.CustomResourceState

	// The alias of CMK. `Encrypt`、`GenerateDataKey`、`DescribeKey` can be called using aliases. Length of characters other than prefixes: minimum length of 1 character and maximum length of 255 characters. Must contain prefix `alias/`.
	AliasName pulumi.StringOutput `pulumi:"aliasName"`
	// The id of the key.
	KeyId pulumi.StringOutput `pulumi:"keyId"`
}

Create an alias for the master key (CMK).

> **NOTE:** Available in v1.77.0+.

## Example Usage

Basic Usage

```go package main

import (

"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/kms"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		thisKey, err := kms.NewKey(ctx, "thisKey", nil)
		if err != nil {
			return err
		}
		_, err = kms.NewAlias(ctx, "thisAlias", &kms.AliasArgs{
			AliasName: pulumi.String("alias/test_kms_alias"),
			KeyId:     thisKey.ID(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

KMS alias can be imported using the id, e.g.

```sh

$ pulumi import alicloud:kms/alias:Alias example alias/test_kms_alias

```

func GetAlias

func GetAlias(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *AliasState, opts ...pulumi.ResourceOption) (*Alias, error)

GetAlias gets an existing Alias 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 NewAlias

func NewAlias(ctx *pulumi.Context,
	name string, args *AliasArgs, opts ...pulumi.ResourceOption) (*Alias, error)

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

func (*Alias) ElementType

func (*Alias) ElementType() reflect.Type

func (*Alias) ToAliasOutput

func (i *Alias) ToAliasOutput() AliasOutput

func (*Alias) ToAliasOutputWithContext

func (i *Alias) ToAliasOutputWithContext(ctx context.Context) AliasOutput

type AliasArgs

type AliasArgs struct {
	// The alias of CMK. `Encrypt`、`GenerateDataKey`、`DescribeKey` can be called using aliases. Length of characters other than prefixes: minimum length of 1 character and maximum length of 255 characters. Must contain prefix `alias/`.
	AliasName pulumi.StringInput
	// The id of the key.
	KeyId pulumi.StringInput
}

The set of arguments for constructing a Alias resource.

func (AliasArgs) ElementType

func (AliasArgs) ElementType() reflect.Type

type AliasArray

type AliasArray []AliasInput

func (AliasArray) ElementType

func (AliasArray) ElementType() reflect.Type

func (AliasArray) ToAliasArrayOutput

func (i AliasArray) ToAliasArrayOutput() AliasArrayOutput

func (AliasArray) ToAliasArrayOutputWithContext

func (i AliasArray) ToAliasArrayOutputWithContext(ctx context.Context) AliasArrayOutput

type AliasArrayInput

type AliasArrayInput interface {
	pulumi.Input

	ToAliasArrayOutput() AliasArrayOutput
	ToAliasArrayOutputWithContext(context.Context) AliasArrayOutput
}

AliasArrayInput is an input type that accepts AliasArray and AliasArrayOutput values. You can construct a concrete instance of `AliasArrayInput` via:

AliasArray{ AliasArgs{...} }

type AliasArrayOutput

type AliasArrayOutput struct{ *pulumi.OutputState }

func (AliasArrayOutput) ElementType

func (AliasArrayOutput) ElementType() reflect.Type

func (AliasArrayOutput) Index

func (AliasArrayOutput) ToAliasArrayOutput

func (o AliasArrayOutput) ToAliasArrayOutput() AliasArrayOutput

func (AliasArrayOutput) ToAliasArrayOutputWithContext

func (o AliasArrayOutput) ToAliasArrayOutputWithContext(ctx context.Context) AliasArrayOutput

type AliasInput

type AliasInput interface {
	pulumi.Input

	ToAliasOutput() AliasOutput
	ToAliasOutputWithContext(ctx context.Context) AliasOutput
}

type AliasMap

type AliasMap map[string]AliasInput

func (AliasMap) ElementType

func (AliasMap) ElementType() reflect.Type

func (AliasMap) ToAliasMapOutput

func (i AliasMap) ToAliasMapOutput() AliasMapOutput

func (AliasMap) ToAliasMapOutputWithContext

func (i AliasMap) ToAliasMapOutputWithContext(ctx context.Context) AliasMapOutput

type AliasMapInput

type AliasMapInput interface {
	pulumi.Input

	ToAliasMapOutput() AliasMapOutput
	ToAliasMapOutputWithContext(context.Context) AliasMapOutput
}

AliasMapInput is an input type that accepts AliasMap and AliasMapOutput values. You can construct a concrete instance of `AliasMapInput` via:

AliasMap{ "key": AliasArgs{...} }

type AliasMapOutput

type AliasMapOutput struct{ *pulumi.OutputState }

func (AliasMapOutput) ElementType

func (AliasMapOutput) ElementType() reflect.Type

func (AliasMapOutput) MapIndex

func (AliasMapOutput) ToAliasMapOutput

func (o AliasMapOutput) ToAliasMapOutput() AliasMapOutput

func (AliasMapOutput) ToAliasMapOutputWithContext

func (o AliasMapOutput) ToAliasMapOutputWithContext(ctx context.Context) AliasMapOutput

type AliasOutput

type AliasOutput struct{ *pulumi.OutputState }

func (AliasOutput) AliasName

func (o AliasOutput) AliasName() pulumi.StringOutput

The alias of CMK. `Encrypt`、`GenerateDataKey`、`DescribeKey` can be called using aliases. Length of characters other than prefixes: minimum length of 1 character and maximum length of 255 characters. Must contain prefix `alias/`.

func (AliasOutput) ElementType

func (AliasOutput) ElementType() reflect.Type

func (AliasOutput) KeyId

func (o AliasOutput) KeyId() pulumi.StringOutput

The id of the key.

func (AliasOutput) ToAliasOutput

func (o AliasOutput) ToAliasOutput() AliasOutput

func (AliasOutput) ToAliasOutputWithContext

func (o AliasOutput) ToAliasOutputWithContext(ctx context.Context) AliasOutput

type AliasState

type AliasState struct {
	// The alias of CMK. `Encrypt`、`GenerateDataKey`、`DescribeKey` can be called using aliases. Length of characters other than prefixes: minimum length of 1 character and maximum length of 255 characters. Must contain prefix `alias/`.
	AliasName pulumi.StringPtrInput
	// The id of the key.
	KeyId pulumi.StringPtrInput
}

func (AliasState) ElementType

func (AliasState) ElementType() reflect.Type

type Ciphertext

type Ciphertext struct {
	pulumi.CustomResourceState

	// The ciphertext of the data key encrypted with the primary CMK version.
	CiphertextBlob pulumi.StringOutput `pulumi:"ciphertextBlob"`
	// -
	// (Optional, ForceNew) The Encryption context. If you specify this parameter here, it is also required when you call the Decrypt API operation. For more information, see [Encryption Context](https://www.alibabacloud.com/help/doc-detail/42975.htm).
	EncryptionContext pulumi.StringMapOutput `pulumi:"encryptionContext"`
	// The globally unique ID of the CMK.
	KeyId pulumi.StringOutput `pulumi:"keyId"`
	// The plaintext to be encrypted which must be encoded in Base64.
	Plaintext pulumi.StringOutput `pulumi:"plaintext"`
}

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/kms"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		key, err := kms.NewKey(ctx, "key", &kms.KeyArgs{
			Description: pulumi.String("example key"),
			IsEnabled:   pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		_, err = kms.NewCiphertext(ctx, "encrypted", &kms.CiphertextArgs{
			KeyId:     key.ID(),
			Plaintext: pulumi.String("example"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

func GetCiphertext

func GetCiphertext(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *CiphertextState, opts ...pulumi.ResourceOption) (*Ciphertext, error)

GetCiphertext gets an existing Ciphertext 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 NewCiphertext

func NewCiphertext(ctx *pulumi.Context,
	name string, args *CiphertextArgs, opts ...pulumi.ResourceOption) (*Ciphertext, error)

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

func (*Ciphertext) ElementType

func (*Ciphertext) ElementType() reflect.Type

func (*Ciphertext) ToCiphertextOutput

func (i *Ciphertext) ToCiphertextOutput() CiphertextOutput

func (*Ciphertext) ToCiphertextOutputWithContext

func (i *Ciphertext) ToCiphertextOutputWithContext(ctx context.Context) CiphertextOutput

type CiphertextArgs

type CiphertextArgs struct {
	// -
	// (Optional, ForceNew) The Encryption context. If you specify this parameter here, it is also required when you call the Decrypt API operation. For more information, see [Encryption Context](https://www.alibabacloud.com/help/doc-detail/42975.htm).
	EncryptionContext pulumi.StringMapInput
	// The globally unique ID of the CMK.
	KeyId pulumi.StringInput
	// The plaintext to be encrypted which must be encoded in Base64.
	Plaintext pulumi.StringInput
}

The set of arguments for constructing a Ciphertext resource.

func (CiphertextArgs) ElementType

func (CiphertextArgs) ElementType() reflect.Type

type CiphertextArray

type CiphertextArray []CiphertextInput

func (CiphertextArray) ElementType

func (CiphertextArray) ElementType() reflect.Type

func (CiphertextArray) ToCiphertextArrayOutput

func (i CiphertextArray) ToCiphertextArrayOutput() CiphertextArrayOutput

func (CiphertextArray) ToCiphertextArrayOutputWithContext

func (i CiphertextArray) ToCiphertextArrayOutputWithContext(ctx context.Context) CiphertextArrayOutput

type CiphertextArrayInput

type CiphertextArrayInput interface {
	pulumi.Input

	ToCiphertextArrayOutput() CiphertextArrayOutput
	ToCiphertextArrayOutputWithContext(context.Context) CiphertextArrayOutput
}

CiphertextArrayInput is an input type that accepts CiphertextArray and CiphertextArrayOutput values. You can construct a concrete instance of `CiphertextArrayInput` via:

CiphertextArray{ CiphertextArgs{...} }

type CiphertextArrayOutput

type CiphertextArrayOutput struct{ *pulumi.OutputState }

func (CiphertextArrayOutput) ElementType

func (CiphertextArrayOutput) ElementType() reflect.Type

func (CiphertextArrayOutput) Index

func (CiphertextArrayOutput) ToCiphertextArrayOutput

func (o CiphertextArrayOutput) ToCiphertextArrayOutput() CiphertextArrayOutput

func (CiphertextArrayOutput) ToCiphertextArrayOutputWithContext

func (o CiphertextArrayOutput) ToCiphertextArrayOutputWithContext(ctx context.Context) CiphertextArrayOutput

type CiphertextInput

type CiphertextInput interface {
	pulumi.Input

	ToCiphertextOutput() CiphertextOutput
	ToCiphertextOutputWithContext(ctx context.Context) CiphertextOutput
}

type CiphertextMap

type CiphertextMap map[string]CiphertextInput

func (CiphertextMap) ElementType

func (CiphertextMap) ElementType() reflect.Type

func (CiphertextMap) ToCiphertextMapOutput

func (i CiphertextMap) ToCiphertextMapOutput() CiphertextMapOutput

func (CiphertextMap) ToCiphertextMapOutputWithContext

func (i CiphertextMap) ToCiphertextMapOutputWithContext(ctx context.Context) CiphertextMapOutput

type CiphertextMapInput

type CiphertextMapInput interface {
	pulumi.Input

	ToCiphertextMapOutput() CiphertextMapOutput
	ToCiphertextMapOutputWithContext(context.Context) CiphertextMapOutput
}

CiphertextMapInput is an input type that accepts CiphertextMap and CiphertextMapOutput values. You can construct a concrete instance of `CiphertextMapInput` via:

CiphertextMap{ "key": CiphertextArgs{...} }

type CiphertextMapOutput

type CiphertextMapOutput struct{ *pulumi.OutputState }

func (CiphertextMapOutput) ElementType

func (CiphertextMapOutput) ElementType() reflect.Type

func (CiphertextMapOutput) MapIndex

func (CiphertextMapOutput) ToCiphertextMapOutput

func (o CiphertextMapOutput) ToCiphertextMapOutput() CiphertextMapOutput

func (CiphertextMapOutput) ToCiphertextMapOutputWithContext

func (o CiphertextMapOutput) ToCiphertextMapOutputWithContext(ctx context.Context) CiphertextMapOutput

type CiphertextOutput

type CiphertextOutput struct{ *pulumi.OutputState }

func (CiphertextOutput) CiphertextBlob

func (o CiphertextOutput) CiphertextBlob() pulumi.StringOutput

The ciphertext of the data key encrypted with the primary CMK version.

func (CiphertextOutput) ElementType

func (CiphertextOutput) ElementType() reflect.Type

func (CiphertextOutput) EncryptionContext

func (o CiphertextOutput) EncryptionContext() pulumi.StringMapOutput

- (Optional, ForceNew) The Encryption context. If you specify this parameter here, it is also required when you call the Decrypt API operation. For more information, see [Encryption Context](https://www.alibabacloud.com/help/doc-detail/42975.htm).

func (CiphertextOutput) KeyId

The globally unique ID of the CMK.

func (CiphertextOutput) Plaintext

func (o CiphertextOutput) Plaintext() pulumi.StringOutput

The plaintext to be encrypted which must be encoded in Base64.

func (CiphertextOutput) ToCiphertextOutput

func (o CiphertextOutput) ToCiphertextOutput() CiphertextOutput

func (CiphertextOutput) ToCiphertextOutputWithContext

func (o CiphertextOutput) ToCiphertextOutputWithContext(ctx context.Context) CiphertextOutput

type CiphertextState

type CiphertextState struct {
	// The ciphertext of the data key encrypted with the primary CMK version.
	CiphertextBlob pulumi.StringPtrInput
	// -
	// (Optional, ForceNew) The Encryption context. If you specify this parameter here, it is also required when you call the Decrypt API operation. For more information, see [Encryption Context](https://www.alibabacloud.com/help/doc-detail/42975.htm).
	EncryptionContext pulumi.StringMapInput
	// The globally unique ID of the CMK.
	KeyId pulumi.StringPtrInput
	// The plaintext to be encrypted which must be encoded in Base64.
	Plaintext pulumi.StringPtrInput
}

func (CiphertextState) ElementType

func (CiphertextState) ElementType() reflect.Type

type GetAliasesAlias

type GetAliasesAlias struct {
	// The unique identifier of the alias.
	AliasName string `pulumi:"aliasName"`
	// ID of the alias. The value is same as KMS alias_name.
	Id string `pulumi:"id"`
	// ID of the key.
	KeyId string `pulumi:"keyId"`
}

type GetAliasesAliasArgs

type GetAliasesAliasArgs struct {
	// The unique identifier of the alias.
	AliasName pulumi.StringInput `pulumi:"aliasName"`
	// ID of the alias. The value is same as KMS alias_name.
	Id pulumi.StringInput `pulumi:"id"`
	// ID of the key.
	KeyId pulumi.StringInput `pulumi:"keyId"`
}

func (GetAliasesAliasArgs) ElementType

func (GetAliasesAliasArgs) ElementType() reflect.Type

func (GetAliasesAliasArgs) ToGetAliasesAliasOutput

func (i GetAliasesAliasArgs) ToGetAliasesAliasOutput() GetAliasesAliasOutput

func (GetAliasesAliasArgs) ToGetAliasesAliasOutputWithContext

func (i GetAliasesAliasArgs) ToGetAliasesAliasOutputWithContext(ctx context.Context) GetAliasesAliasOutput

type GetAliasesAliasArray

type GetAliasesAliasArray []GetAliasesAliasInput

func (GetAliasesAliasArray) ElementType

func (GetAliasesAliasArray) ElementType() reflect.Type

func (GetAliasesAliasArray) ToGetAliasesAliasArrayOutput

func (i GetAliasesAliasArray) ToGetAliasesAliasArrayOutput() GetAliasesAliasArrayOutput

func (GetAliasesAliasArray) ToGetAliasesAliasArrayOutputWithContext

func (i GetAliasesAliasArray) ToGetAliasesAliasArrayOutputWithContext(ctx context.Context) GetAliasesAliasArrayOutput

type GetAliasesAliasArrayInput

type GetAliasesAliasArrayInput interface {
	pulumi.Input

	ToGetAliasesAliasArrayOutput() GetAliasesAliasArrayOutput
	ToGetAliasesAliasArrayOutputWithContext(context.Context) GetAliasesAliasArrayOutput
}

GetAliasesAliasArrayInput is an input type that accepts GetAliasesAliasArray and GetAliasesAliasArrayOutput values. You can construct a concrete instance of `GetAliasesAliasArrayInput` via:

GetAliasesAliasArray{ GetAliasesAliasArgs{...} }

type GetAliasesAliasArrayOutput

type GetAliasesAliasArrayOutput struct{ *pulumi.OutputState }

func (GetAliasesAliasArrayOutput) ElementType

func (GetAliasesAliasArrayOutput) ElementType() reflect.Type

func (GetAliasesAliasArrayOutput) Index

func (GetAliasesAliasArrayOutput) ToGetAliasesAliasArrayOutput

func (o GetAliasesAliasArrayOutput) ToGetAliasesAliasArrayOutput() GetAliasesAliasArrayOutput

func (GetAliasesAliasArrayOutput) ToGetAliasesAliasArrayOutputWithContext

func (o GetAliasesAliasArrayOutput) ToGetAliasesAliasArrayOutputWithContext(ctx context.Context) GetAliasesAliasArrayOutput

type GetAliasesAliasInput

type GetAliasesAliasInput interface {
	pulumi.Input

	ToGetAliasesAliasOutput() GetAliasesAliasOutput
	ToGetAliasesAliasOutputWithContext(context.Context) GetAliasesAliasOutput
}

GetAliasesAliasInput is an input type that accepts GetAliasesAliasArgs and GetAliasesAliasOutput values. You can construct a concrete instance of `GetAliasesAliasInput` via:

GetAliasesAliasArgs{...}

type GetAliasesAliasOutput

type GetAliasesAliasOutput struct{ *pulumi.OutputState }

func (GetAliasesAliasOutput) AliasName

The unique identifier of the alias.

func (GetAliasesAliasOutput) ElementType

func (GetAliasesAliasOutput) ElementType() reflect.Type

func (GetAliasesAliasOutput) Id

ID of the alias. The value is same as KMS alias_name.

func (GetAliasesAliasOutput) KeyId

ID of the key.

func (GetAliasesAliasOutput) ToGetAliasesAliasOutput

func (o GetAliasesAliasOutput) ToGetAliasesAliasOutput() GetAliasesAliasOutput

func (GetAliasesAliasOutput) ToGetAliasesAliasOutputWithContext

func (o GetAliasesAliasOutput) ToGetAliasesAliasOutputWithContext(ctx context.Context) GetAliasesAliasOutput

type GetAliasesArgs

type GetAliasesArgs struct {
	// A list of KMS aliases IDs. The value is same as KMS alias_name.
	Ids []string `pulumi:"ids"`
	// A regex string to filter the results by the KMS alias name.
	NameRegex  *string `pulumi:"nameRegex"`
	OutputFile *string `pulumi:"outputFile"`
}

A collection of arguments for invoking getAliases.

type GetAliasesOutputArgs

type GetAliasesOutputArgs struct {
	// A list of KMS aliases IDs. The value is same as KMS alias_name.
	Ids pulumi.StringArrayInput `pulumi:"ids"`
	// A regex string to filter the results by the KMS alias name.
	NameRegex  pulumi.StringPtrInput `pulumi:"nameRegex"`
	OutputFile pulumi.StringPtrInput `pulumi:"outputFile"`
}

A collection of arguments for invoking getAliases.

func (GetAliasesOutputArgs) ElementType

func (GetAliasesOutputArgs) ElementType() reflect.Type

type GetAliasesResult

type GetAliasesResult struct {
	// A list of KMS User alias. Each element contains the following attributes:
	Aliases []GetAliasesAlias `pulumi:"aliases"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// A list of kms aliases IDs. The value is same as KMS alias_name.
	Ids       []string `pulumi:"ids"`
	NameRegex *string  `pulumi:"nameRegex"`
	// A list of KMS alias name.
	Names      []string `pulumi:"names"`
	OutputFile *string  `pulumi:"outputFile"`
}

A collection of values returned by getAliases.

func GetAliases

func GetAliases(ctx *pulumi.Context, args *GetAliasesArgs, opts ...pulumi.InvokeOption) (*GetAliasesResult, error)

This data source provides a list of KMS aliases in an Alibaba Cloud account according to the specified filters.

> **NOTE:** Available in v1.79.0+.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/go/alicloud/kms"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/kms"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := kms.GetAliases(ctx, &kms.GetAliasesArgs{
			Ids: []string{
				"d89e8a53-b708-41aa-8c67-6873axxx",
			},
			NameRegex: pulumi.StringRef("alias/tf-testKmsAlias_123"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstKeyId", data.Alicloud_kms_keys.Kms_keys_ds.Keys[0].Id)
		return nil
	})
}

```

type GetAliasesResultOutput

type GetAliasesResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getAliases.

func (GetAliasesResultOutput) Aliases

A list of KMS User alias. Each element contains the following attributes:

func (GetAliasesResultOutput) ElementType

func (GetAliasesResultOutput) ElementType() reflect.Type

func (GetAliasesResultOutput) Id

The provider-assigned unique ID for this managed resource.

func (GetAliasesResultOutput) Ids

A list of kms aliases IDs. The value is same as KMS alias_name.

func (GetAliasesResultOutput) NameRegex

func (GetAliasesResultOutput) Names

A list of KMS alias name.

func (GetAliasesResultOutput) OutputFile

func (GetAliasesResultOutput) ToGetAliasesResultOutput

func (o GetAliasesResultOutput) ToGetAliasesResultOutput() GetAliasesResultOutput

func (GetAliasesResultOutput) ToGetAliasesResultOutputWithContext

func (o GetAliasesResultOutput) ToGetAliasesResultOutputWithContext(ctx context.Context) GetAliasesResultOutput

type GetKeyVersionsArgs

type GetKeyVersionsArgs struct {
	// A list of KMS KeyVersion IDs.
	Ids []string `pulumi:"ids"`
	// The id of kms key.
	KeyId      string  `pulumi:"keyId"`
	OutputFile *string `pulumi:"outputFile"`
}

A collection of arguments for invoking getKeyVersions.

type GetKeyVersionsOutputArgs

type GetKeyVersionsOutputArgs struct {
	// A list of KMS KeyVersion IDs.
	Ids pulumi.StringArrayInput `pulumi:"ids"`
	// The id of kms key.
	KeyId      pulumi.StringInput    `pulumi:"keyId"`
	OutputFile pulumi.StringPtrInput `pulumi:"outputFile"`
}

A collection of arguments for invoking getKeyVersions.

func (GetKeyVersionsOutputArgs) ElementType

func (GetKeyVersionsOutputArgs) ElementType() reflect.Type

type GetKeyVersionsResult

type GetKeyVersionsResult struct {
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// A list of KMS KeyVersion IDs.
	Ids []string `pulumi:"ids"`
	// ID of the key.
	KeyId      string  `pulumi:"keyId"`
	OutputFile *string `pulumi:"outputFile"`
	// A list of KMS KeyVersions. Each element contains the following attributes:
	Versions []GetKeyVersionsVersion `pulumi:"versions"`
}

A collection of values returned by getKeyVersions.

func GetKeyVersions

func GetKeyVersions(ctx *pulumi.Context, args *GetKeyVersionsArgs, opts ...pulumi.InvokeOption) (*GetKeyVersionsResult, error)

This data source provides a list of KMS KeyVersions in an Alibaba Cloud account according to the specified filters.

> NOTE: Available in v1.85.0+

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/go/alicloud/kms"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/kms"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		alicloudKmsKeyVersionsDs, err := kms.GetKeyVersions(ctx, &kms.GetKeyVersionsArgs{
			Ids: []string{
				"d89e8a53-b708-41aa-8c67-6873axxx",
			},
			KeyId: "08438c-b4d5-4d05-928c-07b7xxxx",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("allVersions", alicloudKmsKeyVersionsDs.Versions)
		return nil
	})
}

```

type GetKeyVersionsResultOutput

type GetKeyVersionsResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getKeyVersions.

func (GetKeyVersionsResultOutput) ElementType

func (GetKeyVersionsResultOutput) ElementType() reflect.Type

func (GetKeyVersionsResultOutput) Id

The provider-assigned unique ID for this managed resource.

func (GetKeyVersionsResultOutput) Ids

A list of KMS KeyVersion IDs.

func (GetKeyVersionsResultOutput) KeyId

ID of the key.

func (GetKeyVersionsResultOutput) OutputFile

func (GetKeyVersionsResultOutput) ToGetKeyVersionsResultOutput

func (o GetKeyVersionsResultOutput) ToGetKeyVersionsResultOutput() GetKeyVersionsResultOutput

func (GetKeyVersionsResultOutput) ToGetKeyVersionsResultOutputWithContext

func (o GetKeyVersionsResultOutput) ToGetKeyVersionsResultOutputWithContext(ctx context.Context) GetKeyVersionsResultOutput

func (GetKeyVersionsResultOutput) Versions

A list of KMS KeyVersions. Each element contains the following attributes:

type GetKeyVersionsVersion

type GetKeyVersionsVersion struct {
	// Date and time when the key version was created (UTC time).
	CreateTime string `pulumi:"createTime"`
	// (Removed from v1.124.4) It has been removed and using `createTime` instead.
	CreationDate string `pulumi:"creationDate"`
	// ID of the KMS KeyVersion resource.
	Id string `pulumi:"id"`
	// The id of kms key.
	KeyId string `pulumi:"keyId"`
	// ID of the key version.
	KeyVersionId string `pulumi:"keyVersionId"`
}

type GetKeyVersionsVersionArgs

type GetKeyVersionsVersionArgs struct {
	// Date and time when the key version was created (UTC time).
	CreateTime pulumi.StringInput `pulumi:"createTime"`
	// (Removed from v1.124.4) It has been removed and using `createTime` instead.
	CreationDate pulumi.StringInput `pulumi:"creationDate"`
	// ID of the KMS KeyVersion resource.
	Id pulumi.StringInput `pulumi:"id"`
	// The id of kms key.
	KeyId pulumi.StringInput `pulumi:"keyId"`
	// ID of the key version.
	KeyVersionId pulumi.StringInput `pulumi:"keyVersionId"`
}

func (GetKeyVersionsVersionArgs) ElementType

func (GetKeyVersionsVersionArgs) ElementType() reflect.Type

func (GetKeyVersionsVersionArgs) ToGetKeyVersionsVersionOutput

func (i GetKeyVersionsVersionArgs) ToGetKeyVersionsVersionOutput() GetKeyVersionsVersionOutput

func (GetKeyVersionsVersionArgs) ToGetKeyVersionsVersionOutputWithContext

func (i GetKeyVersionsVersionArgs) ToGetKeyVersionsVersionOutputWithContext(ctx context.Context) GetKeyVersionsVersionOutput

type GetKeyVersionsVersionArray

type GetKeyVersionsVersionArray []GetKeyVersionsVersionInput

func (GetKeyVersionsVersionArray) ElementType

func (GetKeyVersionsVersionArray) ElementType() reflect.Type

func (GetKeyVersionsVersionArray) ToGetKeyVersionsVersionArrayOutput

func (i GetKeyVersionsVersionArray) ToGetKeyVersionsVersionArrayOutput() GetKeyVersionsVersionArrayOutput

func (GetKeyVersionsVersionArray) ToGetKeyVersionsVersionArrayOutputWithContext

func (i GetKeyVersionsVersionArray) ToGetKeyVersionsVersionArrayOutputWithContext(ctx context.Context) GetKeyVersionsVersionArrayOutput

type GetKeyVersionsVersionArrayInput

type GetKeyVersionsVersionArrayInput interface {
	pulumi.Input

	ToGetKeyVersionsVersionArrayOutput() GetKeyVersionsVersionArrayOutput
	ToGetKeyVersionsVersionArrayOutputWithContext(context.Context) GetKeyVersionsVersionArrayOutput
}

GetKeyVersionsVersionArrayInput is an input type that accepts GetKeyVersionsVersionArray and GetKeyVersionsVersionArrayOutput values. You can construct a concrete instance of `GetKeyVersionsVersionArrayInput` via:

GetKeyVersionsVersionArray{ GetKeyVersionsVersionArgs{...} }

type GetKeyVersionsVersionArrayOutput

type GetKeyVersionsVersionArrayOutput struct{ *pulumi.OutputState }

func (GetKeyVersionsVersionArrayOutput) ElementType

func (GetKeyVersionsVersionArrayOutput) Index

func (GetKeyVersionsVersionArrayOutput) ToGetKeyVersionsVersionArrayOutput

func (o GetKeyVersionsVersionArrayOutput) ToGetKeyVersionsVersionArrayOutput() GetKeyVersionsVersionArrayOutput

func (GetKeyVersionsVersionArrayOutput) ToGetKeyVersionsVersionArrayOutputWithContext

func (o GetKeyVersionsVersionArrayOutput) ToGetKeyVersionsVersionArrayOutputWithContext(ctx context.Context) GetKeyVersionsVersionArrayOutput

type GetKeyVersionsVersionInput

type GetKeyVersionsVersionInput interface {
	pulumi.Input

	ToGetKeyVersionsVersionOutput() GetKeyVersionsVersionOutput
	ToGetKeyVersionsVersionOutputWithContext(context.Context) GetKeyVersionsVersionOutput
}

GetKeyVersionsVersionInput is an input type that accepts GetKeyVersionsVersionArgs and GetKeyVersionsVersionOutput values. You can construct a concrete instance of `GetKeyVersionsVersionInput` via:

GetKeyVersionsVersionArgs{...}

type GetKeyVersionsVersionOutput

type GetKeyVersionsVersionOutput struct{ *pulumi.OutputState }

func (GetKeyVersionsVersionOutput) CreateTime

Date and time when the key version was created (UTC time).

func (GetKeyVersionsVersionOutput) CreationDate

(Removed from v1.124.4) It has been removed and using `createTime` instead.

func (GetKeyVersionsVersionOutput) ElementType

func (GetKeyVersionsVersionOutput) Id

ID of the KMS KeyVersion resource.

func (GetKeyVersionsVersionOutput) KeyId

The id of kms key.

func (GetKeyVersionsVersionOutput) KeyVersionId

ID of the key version.

func (GetKeyVersionsVersionOutput) ToGetKeyVersionsVersionOutput

func (o GetKeyVersionsVersionOutput) ToGetKeyVersionsVersionOutput() GetKeyVersionsVersionOutput

func (GetKeyVersionsVersionOutput) ToGetKeyVersionsVersionOutputWithContext

func (o GetKeyVersionsVersionOutput) ToGetKeyVersionsVersionOutputWithContext(ctx context.Context) GetKeyVersionsVersionOutput

type GetKeysArgs

type GetKeysArgs struct {
	// A regex string to filter the results by the KMS key description.
	DescriptionRegex *string `pulumi:"descriptionRegex"`
	EnableDetails    *bool   `pulumi:"enableDetails"`
	Filters          *string `pulumi:"filters"`
	// A list of KMS key IDs.
	Ids        []string `pulumi:"ids"`
	OutputFile *string  `pulumi:"outputFile"`
	// Filter the results by status of the KMS keys. Valid values: `Enabled`, `Disabled`, `PendingDeletion`.
	Status *string `pulumi:"status"`
}

A collection of arguments for invoking getKeys.

type GetKeysKey

type GetKeysKey struct {
	// The Alibaba Cloud Resource Name (ARN) of the key.
	Arn               string `pulumi:"arn"`
	AutomaticRotation string `pulumi:"automaticRotation"`
	// Creation date of key.
	CreationDate string `pulumi:"creationDate"`
	// The owner of the key.
	// * `automaticRotation` -(Available in 1.123.1+) Specifies whether to enable automatic key rotation.
	// * `keyId` -(Available in 1.123.1+)  ID of the key.
	// * `keySpec` -(Available in 1.123.1+)  The type of the CMK.
	// * `keyUsage` -(Available in 1.123.1+)  The usage of CMK.
	// * `lastRotationDate` -(Available in 1.123.1+)  The date and time the last rotation was performed.
	// * `materialExpireTime` -(Available in 1.123.1+)  The time and date the key material for the CMK expires.
	// * `nextRotationDate` -(Available in 1.123.1+)  The time the next rotation is scheduled for execution.
	// * `origin` -(Available in 1.123.1+)  The source of the key material for the CMK.
	// * `protectionLevel` -(Available in 1.123.1+)  The protection level of the CMK.
	// * `rotationInterval` -(Available in 1.123.1+)  The period of automatic key rotation.
	// * `primaryKeyVersion` -(Available in 1.123.1+)  The ID of the current primary key version of the symmetric CMK.
	Creator string `pulumi:"creator"`
	// Deletion date of key.
	DeleteDate string `pulumi:"deleteDate"`
	// Description of the key.
	Description string `pulumi:"description"`
	// ID of the key.
	Id                 string `pulumi:"id"`
	KeyId              string `pulumi:"keyId"`
	KeySpec            string `pulumi:"keySpec"`
	KeyUsage           string `pulumi:"keyUsage"`
	LastRotationDate   string `pulumi:"lastRotationDate"`
	MaterialExpireTime string `pulumi:"materialExpireTime"`
	NextRotationDate   string `pulumi:"nextRotationDate"`
	Origin             string `pulumi:"origin"`
	PrimaryKeyVersion  string `pulumi:"primaryKeyVersion"`
	ProtectionLevel    string `pulumi:"protectionLevel"`
	RotationInterval   string `pulumi:"rotationInterval"`
	// Filter the results by status of the KMS keys. Valid values: `Enabled`, `Disabled`, `PendingDeletion`.
	Status string `pulumi:"status"`
}

type GetKeysKeyArgs

type GetKeysKeyArgs struct {
	// The Alibaba Cloud Resource Name (ARN) of the key.
	Arn               pulumi.StringInput `pulumi:"arn"`
	AutomaticRotation pulumi.StringInput `pulumi:"automaticRotation"`
	// Creation date of key.
	CreationDate pulumi.StringInput `pulumi:"creationDate"`
	// The owner of the key.
	// * `automaticRotation` -(Available in 1.123.1+) Specifies whether to enable automatic key rotation.
	// * `keyId` -(Available in 1.123.1+)  ID of the key.
	// * `keySpec` -(Available in 1.123.1+)  The type of the CMK.
	// * `keyUsage` -(Available in 1.123.1+)  The usage of CMK.
	// * `lastRotationDate` -(Available in 1.123.1+)  The date and time the last rotation was performed.
	// * `materialExpireTime` -(Available in 1.123.1+)  The time and date the key material for the CMK expires.
	// * `nextRotationDate` -(Available in 1.123.1+)  The time the next rotation is scheduled for execution.
	// * `origin` -(Available in 1.123.1+)  The source of the key material for the CMK.
	// * `protectionLevel` -(Available in 1.123.1+)  The protection level of the CMK.
	// * `rotationInterval` -(Available in 1.123.1+)  The period of automatic key rotation.
	// * `primaryKeyVersion` -(Available in 1.123.1+)  The ID of the current primary key version of the symmetric CMK.
	Creator pulumi.StringInput `pulumi:"creator"`
	// Deletion date of key.
	DeleteDate pulumi.StringInput `pulumi:"deleteDate"`
	// Description of the key.
	Description pulumi.StringInput `pulumi:"description"`
	// ID of the key.
	Id                 pulumi.StringInput `pulumi:"id"`
	KeyId              pulumi.StringInput `pulumi:"keyId"`
	KeySpec            pulumi.StringInput `pulumi:"keySpec"`
	KeyUsage           pulumi.StringInput `pulumi:"keyUsage"`
	LastRotationDate   pulumi.StringInput `pulumi:"lastRotationDate"`
	MaterialExpireTime pulumi.StringInput `pulumi:"materialExpireTime"`
	NextRotationDate   pulumi.StringInput `pulumi:"nextRotationDate"`
	Origin             pulumi.StringInput `pulumi:"origin"`
	PrimaryKeyVersion  pulumi.StringInput `pulumi:"primaryKeyVersion"`
	ProtectionLevel    pulumi.StringInput `pulumi:"protectionLevel"`
	RotationInterval   pulumi.StringInput `pulumi:"rotationInterval"`
	// Filter the results by status of the KMS keys. Valid values: `Enabled`, `Disabled`, `PendingDeletion`.
	Status pulumi.StringInput `pulumi:"status"`
}

func (GetKeysKeyArgs) ElementType

func (GetKeysKeyArgs) ElementType() reflect.Type

func (GetKeysKeyArgs) ToGetKeysKeyOutput

func (i GetKeysKeyArgs) ToGetKeysKeyOutput() GetKeysKeyOutput

func (GetKeysKeyArgs) ToGetKeysKeyOutputWithContext

func (i GetKeysKeyArgs) ToGetKeysKeyOutputWithContext(ctx context.Context) GetKeysKeyOutput

type GetKeysKeyArray

type GetKeysKeyArray []GetKeysKeyInput

func (GetKeysKeyArray) ElementType

func (GetKeysKeyArray) ElementType() reflect.Type

func (GetKeysKeyArray) ToGetKeysKeyArrayOutput

func (i GetKeysKeyArray) ToGetKeysKeyArrayOutput() GetKeysKeyArrayOutput

func (GetKeysKeyArray) ToGetKeysKeyArrayOutputWithContext

func (i GetKeysKeyArray) ToGetKeysKeyArrayOutputWithContext(ctx context.Context) GetKeysKeyArrayOutput

type GetKeysKeyArrayInput

type GetKeysKeyArrayInput interface {
	pulumi.Input

	ToGetKeysKeyArrayOutput() GetKeysKeyArrayOutput
	ToGetKeysKeyArrayOutputWithContext(context.Context) GetKeysKeyArrayOutput
}

GetKeysKeyArrayInput is an input type that accepts GetKeysKeyArray and GetKeysKeyArrayOutput values. You can construct a concrete instance of `GetKeysKeyArrayInput` via:

GetKeysKeyArray{ GetKeysKeyArgs{...} }

type GetKeysKeyArrayOutput

type GetKeysKeyArrayOutput struct{ *pulumi.OutputState }

func (GetKeysKeyArrayOutput) ElementType

func (GetKeysKeyArrayOutput) ElementType() reflect.Type

func (GetKeysKeyArrayOutput) Index

func (GetKeysKeyArrayOutput) ToGetKeysKeyArrayOutput

func (o GetKeysKeyArrayOutput) ToGetKeysKeyArrayOutput() GetKeysKeyArrayOutput

func (GetKeysKeyArrayOutput) ToGetKeysKeyArrayOutputWithContext

func (o GetKeysKeyArrayOutput) ToGetKeysKeyArrayOutputWithContext(ctx context.Context) GetKeysKeyArrayOutput

type GetKeysKeyInput

type GetKeysKeyInput interface {
	pulumi.Input

	ToGetKeysKeyOutput() GetKeysKeyOutput
	ToGetKeysKeyOutputWithContext(context.Context) GetKeysKeyOutput
}

GetKeysKeyInput is an input type that accepts GetKeysKeyArgs and GetKeysKeyOutput values. You can construct a concrete instance of `GetKeysKeyInput` via:

GetKeysKeyArgs{...}

type GetKeysKeyOutput

type GetKeysKeyOutput struct{ *pulumi.OutputState }

func (GetKeysKeyOutput) Arn

The Alibaba Cloud Resource Name (ARN) of the key.

func (GetKeysKeyOutput) AutomaticRotation

func (o GetKeysKeyOutput) AutomaticRotation() pulumi.StringOutput

func (GetKeysKeyOutput) CreationDate

func (o GetKeysKeyOutput) CreationDate() pulumi.StringOutput

Creation date of key.

func (GetKeysKeyOutput) Creator

func (o GetKeysKeyOutput) Creator() pulumi.StringOutput

The owner of the key. * `automaticRotation` -(Available in 1.123.1+) Specifies whether to enable automatic key rotation. * `keyId` -(Available in 1.123.1+) ID of the key. * `keySpec` -(Available in 1.123.1+) The type of the CMK. * `keyUsage` -(Available in 1.123.1+) The usage of CMK. * `lastRotationDate` -(Available in 1.123.1+) The date and time the last rotation was performed. * `materialExpireTime` -(Available in 1.123.1+) The time and date the key material for the CMK expires. * `nextRotationDate` -(Available in 1.123.1+) The time the next rotation is scheduled for execution. * `origin` -(Available in 1.123.1+) The source of the key material for the CMK. * `protectionLevel` -(Available in 1.123.1+) The protection level of the CMK. * `rotationInterval` -(Available in 1.123.1+) The period of automatic key rotation. * `primaryKeyVersion` -(Available in 1.123.1+) The ID of the current primary key version of the symmetric CMK.

func (GetKeysKeyOutput) DeleteDate

func (o GetKeysKeyOutput) DeleteDate() pulumi.StringOutput

Deletion date of key.

func (GetKeysKeyOutput) Description

func (o GetKeysKeyOutput) Description() pulumi.StringOutput

Description of the key.

func (GetKeysKeyOutput) ElementType

func (GetKeysKeyOutput) ElementType() reflect.Type

func (GetKeysKeyOutput) Id

ID of the key.

func (GetKeysKeyOutput) KeyId

func (GetKeysKeyOutput) KeySpec

func (o GetKeysKeyOutput) KeySpec() pulumi.StringOutput

func (GetKeysKeyOutput) KeyUsage

func (o GetKeysKeyOutput) KeyUsage() pulumi.StringOutput

func (GetKeysKeyOutput) LastRotationDate

func (o GetKeysKeyOutput) LastRotationDate() pulumi.StringOutput

func (GetKeysKeyOutput) MaterialExpireTime

func (o GetKeysKeyOutput) MaterialExpireTime() pulumi.StringOutput

func (GetKeysKeyOutput) NextRotationDate

func (o GetKeysKeyOutput) NextRotationDate() pulumi.StringOutput

func (GetKeysKeyOutput) Origin

func (GetKeysKeyOutput) PrimaryKeyVersion

func (o GetKeysKeyOutput) PrimaryKeyVersion() pulumi.StringOutput

func (GetKeysKeyOutput) ProtectionLevel

func (o GetKeysKeyOutput) ProtectionLevel() pulumi.StringOutput

func (GetKeysKeyOutput) RotationInterval

func (o GetKeysKeyOutput) RotationInterval() pulumi.StringOutput

func (GetKeysKeyOutput) Status

Filter the results by status of the KMS keys. Valid values: `Enabled`, `Disabled`, `PendingDeletion`.

func (GetKeysKeyOutput) ToGetKeysKeyOutput

func (o GetKeysKeyOutput) ToGetKeysKeyOutput() GetKeysKeyOutput

func (GetKeysKeyOutput) ToGetKeysKeyOutputWithContext

func (o GetKeysKeyOutput) ToGetKeysKeyOutputWithContext(ctx context.Context) GetKeysKeyOutput

type GetKeysOutputArgs

type GetKeysOutputArgs struct {
	// A regex string to filter the results by the KMS key description.
	DescriptionRegex pulumi.StringPtrInput `pulumi:"descriptionRegex"`
	EnableDetails    pulumi.BoolPtrInput   `pulumi:"enableDetails"`
	Filters          pulumi.StringPtrInput `pulumi:"filters"`
	// A list of KMS key IDs.
	Ids        pulumi.StringArrayInput `pulumi:"ids"`
	OutputFile pulumi.StringPtrInput   `pulumi:"outputFile"`
	// Filter the results by status of the KMS keys. Valid values: `Enabled`, `Disabled`, `PendingDeletion`.
	Status pulumi.StringPtrInput `pulumi:"status"`
}

A collection of arguments for invoking getKeys.

func (GetKeysOutputArgs) ElementType

func (GetKeysOutputArgs) ElementType() reflect.Type

type GetKeysResult

type GetKeysResult struct {
	DescriptionRegex *string `pulumi:"descriptionRegex"`
	EnableDetails    *bool   `pulumi:"enableDetails"`
	Filters          *string `pulumi:"filters"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// A list of KMS key IDs.
	Ids []string `pulumi:"ids"`
	// A list of KMS keys. Each element contains the following attributes:
	Keys       []GetKeysKey `pulumi:"keys"`
	OutputFile *string      `pulumi:"outputFile"`
	// Status of the key. Possible values: `Enabled`, `Disabled` and `PendingDeletion`.
	Status *string `pulumi:"status"`
}

A collection of values returned by getKeys.

func GetKeys

func GetKeys(ctx *pulumi.Context, args *GetKeysArgs, opts ...pulumi.InvokeOption) (*GetKeysResult, error)

This data source provides a list of KMS keys in an Alibaba Cloud account according to the specified filters.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/go/alicloud/kms"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/kms"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		kmsKeysDs, err := kms.GetKeys(ctx, &kms.GetKeysArgs{
			DescriptionRegex: pulumi.StringRef("Hello KMS"),
			OutputFile:       pulumi.StringRef("kms_keys.json"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstKeyId", kmsKeysDs.Keys[0].Id)
		return nil
	})
}

```

type GetKeysResultOutput

type GetKeysResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getKeys.

func (GetKeysResultOutput) DescriptionRegex

func (o GetKeysResultOutput) DescriptionRegex() pulumi.StringPtrOutput

func (GetKeysResultOutput) ElementType

func (GetKeysResultOutput) ElementType() reflect.Type

func (GetKeysResultOutput) EnableDetails

func (o GetKeysResultOutput) EnableDetails() pulumi.BoolPtrOutput

func (GetKeysResultOutput) Filters

func (GetKeysResultOutput) Id

The provider-assigned unique ID for this managed resource.

func (GetKeysResultOutput) Ids

A list of KMS key IDs.

func (GetKeysResultOutput) Keys

A list of KMS keys. Each element contains the following attributes:

func (GetKeysResultOutput) OutputFile

func (GetKeysResultOutput) Status

Status of the key. Possible values: `Enabled`, `Disabled` and `PendingDeletion`.

func (GetKeysResultOutput) ToGetKeysResultOutput

func (o GetKeysResultOutput) ToGetKeysResultOutput() GetKeysResultOutput

func (GetKeysResultOutput) ToGetKeysResultOutputWithContext

func (o GetKeysResultOutput) ToGetKeysResultOutputWithContext(ctx context.Context) GetKeysResultOutput

type GetPlaintextArgs

type GetPlaintextArgs struct {
	// The ciphertext to be decrypted.
	CiphertextBlob string `pulumi:"ciphertextBlob"`
	// -
	// (Optional) The Encryption context. If you specify this parameter in the Encrypt or GenerateDataKey API operation, it is also required when you call the Decrypt API operation. For more information, see [Encryption Context](https://www.alibabacloud.com/help/doc-detail/42975.htm).
	EncryptionContext map[string]string `pulumi:"encryptionContext"`
}

A collection of arguments for invoking getPlaintext.

type GetPlaintextOutputArgs

type GetPlaintextOutputArgs struct {
	// The ciphertext to be decrypted.
	CiphertextBlob pulumi.StringInput `pulumi:"ciphertextBlob"`
	// -
	// (Optional) The Encryption context. If you specify this parameter in the Encrypt or GenerateDataKey API operation, it is also required when you call the Decrypt API operation. For more information, see [Encryption Context](https://www.alibabacloud.com/help/doc-detail/42975.htm).
	EncryptionContext pulumi.StringMapInput `pulumi:"encryptionContext"`
}

A collection of arguments for invoking getPlaintext.

func (GetPlaintextOutputArgs) ElementType

func (GetPlaintextOutputArgs) ElementType() reflect.Type

type GetPlaintextResult

type GetPlaintextResult struct {
	CiphertextBlob    string            `pulumi:"ciphertextBlob"`
	EncryptionContext map[string]string `pulumi:"encryptionContext"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// The globally unique ID of the CMK. It is the ID of the CMK used to decrypt ciphertext.
	KeyId string `pulumi:"keyId"`
	// The decrypted plaintext.
	Plaintext string `pulumi:"plaintext"`
}

A collection of values returned by getPlaintext.

func GetPlaintext

func GetPlaintext(ctx *pulumi.Context, args *GetPlaintextArgs, opts ...pulumi.InvokeOption) (*GetPlaintextResult, error)

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/go/alicloud/kms"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/kms"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		key, err := kms.NewKey(ctx, "key", &kms.KeyArgs{
			Description: pulumi.String("example key"),
			IsEnabled:   pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		encrypted, err := kms.NewCiphertext(ctx, "encrypted", &kms.CiphertextArgs{
			KeyId:     key.ID(),
			Plaintext: pulumi.String("example"),
		})
		if err != nil {
			return err
		}
		plaintext := kms.GetPlaintextOutput(ctx, kms.GetPlaintextOutputArgs{
			CiphertextBlob: encrypted.CiphertextBlob,
		}, nil)
		ctx.Export("decrypted", plaintext.ApplyT(func(plaintext kms.GetPlaintextResult) (string, error) {
			return plaintext.Plaintext, nil
		}).(pulumi.StringOutput))
		return nil
	})
}

```

type GetPlaintextResultOutput

type GetPlaintextResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getPlaintext.

func (GetPlaintextResultOutput) CiphertextBlob

func (o GetPlaintextResultOutput) CiphertextBlob() pulumi.StringOutput

func (GetPlaintextResultOutput) ElementType

func (GetPlaintextResultOutput) ElementType() reflect.Type

func (GetPlaintextResultOutput) EncryptionContext

func (o GetPlaintextResultOutput) EncryptionContext() pulumi.StringMapOutput

func (GetPlaintextResultOutput) Id

The provider-assigned unique ID for this managed resource.

func (GetPlaintextResultOutput) KeyId

The globally unique ID of the CMK. It is the ID of the CMK used to decrypt ciphertext.

func (GetPlaintextResultOutput) Plaintext

The decrypted plaintext.

func (GetPlaintextResultOutput) ToGetPlaintextResultOutput

func (o GetPlaintextResultOutput) ToGetPlaintextResultOutput() GetPlaintextResultOutput

func (GetPlaintextResultOutput) ToGetPlaintextResultOutputWithContext

func (o GetPlaintextResultOutput) ToGetPlaintextResultOutputWithContext(ctx context.Context) GetPlaintextResultOutput

type GetSecretVersionsArgs

type GetSecretVersionsArgs struct {
	// Default to false and only output `secretName`, `versionId`, `versionStages`. Set it to true can output more details.
	EnableDetails *bool `pulumi:"enableDetails"`
	// A list of KMS Secret Version ids.
	Ids []string `pulumi:"ids"`
	// Specifies whether to return deprecated secret versions. Default to `false`.
	IncludeDeprecated *string `pulumi:"includeDeprecated"`
	OutputFile        *string `pulumi:"outputFile"`
	// The name of the secret.
	SecretName string `pulumi:"secretName"`
	// The stage of the secret version.
	VersionStage *string `pulumi:"versionStage"`
}

A collection of arguments for invoking getSecretVersions.

type GetSecretVersionsOutputArgs

type GetSecretVersionsOutputArgs struct {
	// Default to false and only output `secretName`, `versionId`, `versionStages`. Set it to true can output more details.
	EnableDetails pulumi.BoolPtrInput `pulumi:"enableDetails"`
	// A list of KMS Secret Version ids.
	Ids pulumi.StringArrayInput `pulumi:"ids"`
	// Specifies whether to return deprecated secret versions. Default to `false`.
	IncludeDeprecated pulumi.StringPtrInput `pulumi:"includeDeprecated"`
	OutputFile        pulumi.StringPtrInput `pulumi:"outputFile"`
	// The name of the secret.
	SecretName pulumi.StringInput `pulumi:"secretName"`
	// The stage of the secret version.
	VersionStage pulumi.StringPtrInput `pulumi:"versionStage"`
}

A collection of arguments for invoking getSecretVersions.

func (GetSecretVersionsOutputArgs) ElementType

type GetSecretVersionsResult

type GetSecretVersionsResult struct {
	EnableDetails *bool `pulumi:"enableDetails"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// A list of Kms Secret Version ids.
	Ids               []string `pulumi:"ids"`
	IncludeDeprecated *string  `pulumi:"includeDeprecated"`
	OutputFile        *string  `pulumi:"outputFile"`
	// The name of the secret.
	SecretName   string  `pulumi:"secretName"`
	VersionStage *string `pulumi:"versionStage"`
	// A list of KMS Secret Versions. Each element contains the following attributes:
	Versions []GetSecretVersionsVersion `pulumi:"versions"`
}

A collection of values returned by getSecretVersions.

func GetSecretVersions

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

This data source provides a list of KMS Secret Versions in an Alibaba Cloud account according to the specified filters.

> **NOTE:** Available in v1.88.0+.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/go/alicloud/kms"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/kms"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		kmsSecretVersionsDs, err := kms.GetSecretVersions(ctx, &kms.GetSecretVersionsArgs{
			EnableDetails: pulumi.BoolRef(true),
			SecretName:    "secret_name",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstSecretData", kmsSecretVersionsDs.Versions[0].SecretData)
		return nil
	})
}

```

type GetSecretVersionsResultOutput

type GetSecretVersionsResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getSecretVersions.

func (GetSecretVersionsResultOutput) ElementType

func (GetSecretVersionsResultOutput) EnableDetails

func (GetSecretVersionsResultOutput) Id

The provider-assigned unique ID for this managed resource.

func (GetSecretVersionsResultOutput) Ids

A list of Kms Secret Version ids.

func (GetSecretVersionsResultOutput) IncludeDeprecated

func (GetSecretVersionsResultOutput) OutputFile

func (GetSecretVersionsResultOutput) SecretName

The name of the secret.

func (GetSecretVersionsResultOutput) ToGetSecretVersionsResultOutput

func (o GetSecretVersionsResultOutput) ToGetSecretVersionsResultOutput() GetSecretVersionsResultOutput

func (GetSecretVersionsResultOutput) ToGetSecretVersionsResultOutputWithContext

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

func (GetSecretVersionsResultOutput) VersionStage

func (GetSecretVersionsResultOutput) Versions

A list of KMS Secret Versions. Each element contains the following attributes:

type GetSecretVersionsVersion

type GetSecretVersionsVersion struct {
	// The secret value. Secrets Manager decrypts the stored secret value in ciphertext and returns it. (Returned when `enableDetails` is true).
	SecretData string `pulumi:"secretData"`
	// The type of the secret value. (Returned when `enableDetails` is true).
	SecretDataType string `pulumi:"secretDataType"`
	// The name of the secret.
	SecretName string `pulumi:"secretName"`
	// The version number of the secret value.
	VersionId string `pulumi:"versionId"`
	// Stage labels that mark the secret version.
	VersionStages []string `pulumi:"versionStages"`
}

type GetSecretVersionsVersionArgs

type GetSecretVersionsVersionArgs struct {
	// The secret value. Secrets Manager decrypts the stored secret value in ciphertext and returns it. (Returned when `enableDetails` is true).
	SecretData pulumi.StringInput `pulumi:"secretData"`
	// The type of the secret value. (Returned when `enableDetails` is true).
	SecretDataType pulumi.StringInput `pulumi:"secretDataType"`
	// The name of the secret.
	SecretName pulumi.StringInput `pulumi:"secretName"`
	// The version number of the secret value.
	VersionId pulumi.StringInput `pulumi:"versionId"`
	// Stage labels that mark the secret version.
	VersionStages pulumi.StringArrayInput `pulumi:"versionStages"`
}

func (GetSecretVersionsVersionArgs) ElementType

func (GetSecretVersionsVersionArgs) ToGetSecretVersionsVersionOutput

func (i GetSecretVersionsVersionArgs) ToGetSecretVersionsVersionOutput() GetSecretVersionsVersionOutput

func (GetSecretVersionsVersionArgs) ToGetSecretVersionsVersionOutputWithContext

func (i GetSecretVersionsVersionArgs) ToGetSecretVersionsVersionOutputWithContext(ctx context.Context) GetSecretVersionsVersionOutput

type GetSecretVersionsVersionArray

type GetSecretVersionsVersionArray []GetSecretVersionsVersionInput

func (GetSecretVersionsVersionArray) ElementType

func (GetSecretVersionsVersionArray) ToGetSecretVersionsVersionArrayOutput

func (i GetSecretVersionsVersionArray) ToGetSecretVersionsVersionArrayOutput() GetSecretVersionsVersionArrayOutput

func (GetSecretVersionsVersionArray) ToGetSecretVersionsVersionArrayOutputWithContext

func (i GetSecretVersionsVersionArray) ToGetSecretVersionsVersionArrayOutputWithContext(ctx context.Context) GetSecretVersionsVersionArrayOutput

type GetSecretVersionsVersionArrayInput

type GetSecretVersionsVersionArrayInput interface {
	pulumi.Input

	ToGetSecretVersionsVersionArrayOutput() GetSecretVersionsVersionArrayOutput
	ToGetSecretVersionsVersionArrayOutputWithContext(context.Context) GetSecretVersionsVersionArrayOutput
}

GetSecretVersionsVersionArrayInput is an input type that accepts GetSecretVersionsVersionArray and GetSecretVersionsVersionArrayOutput values. You can construct a concrete instance of `GetSecretVersionsVersionArrayInput` via:

GetSecretVersionsVersionArray{ GetSecretVersionsVersionArgs{...} }

type GetSecretVersionsVersionArrayOutput

type GetSecretVersionsVersionArrayOutput struct{ *pulumi.OutputState }

func (GetSecretVersionsVersionArrayOutput) ElementType

func (GetSecretVersionsVersionArrayOutput) Index

func (GetSecretVersionsVersionArrayOutput) ToGetSecretVersionsVersionArrayOutput

func (o GetSecretVersionsVersionArrayOutput) ToGetSecretVersionsVersionArrayOutput() GetSecretVersionsVersionArrayOutput

func (GetSecretVersionsVersionArrayOutput) ToGetSecretVersionsVersionArrayOutputWithContext

func (o GetSecretVersionsVersionArrayOutput) ToGetSecretVersionsVersionArrayOutputWithContext(ctx context.Context) GetSecretVersionsVersionArrayOutput

type GetSecretVersionsVersionInput

type GetSecretVersionsVersionInput interface {
	pulumi.Input

	ToGetSecretVersionsVersionOutput() GetSecretVersionsVersionOutput
	ToGetSecretVersionsVersionOutputWithContext(context.Context) GetSecretVersionsVersionOutput
}

GetSecretVersionsVersionInput is an input type that accepts GetSecretVersionsVersionArgs and GetSecretVersionsVersionOutput values. You can construct a concrete instance of `GetSecretVersionsVersionInput` via:

GetSecretVersionsVersionArgs{...}

type GetSecretVersionsVersionOutput

type GetSecretVersionsVersionOutput struct{ *pulumi.OutputState }

func (GetSecretVersionsVersionOutput) ElementType

func (GetSecretVersionsVersionOutput) SecretData

The secret value. Secrets Manager decrypts the stored secret value in ciphertext and returns it. (Returned when `enableDetails` is true).

func (GetSecretVersionsVersionOutput) SecretDataType

The type of the secret value. (Returned when `enableDetails` is true).

func (GetSecretVersionsVersionOutput) SecretName

The name of the secret.

func (GetSecretVersionsVersionOutput) ToGetSecretVersionsVersionOutput

func (o GetSecretVersionsVersionOutput) ToGetSecretVersionsVersionOutput() GetSecretVersionsVersionOutput

func (GetSecretVersionsVersionOutput) ToGetSecretVersionsVersionOutputWithContext

func (o GetSecretVersionsVersionOutput) ToGetSecretVersionsVersionOutputWithContext(ctx context.Context) GetSecretVersionsVersionOutput

func (GetSecretVersionsVersionOutput) VersionId

The version number of the secret value.

func (GetSecretVersionsVersionOutput) VersionStages

Stage labels that mark the secret version.

type GetSecretsArgs

type GetSecretsArgs struct {
	// Default to `false`. Set it to true can output more details.
	EnableDetails *bool `pulumi:"enableDetails"`
	// Whether to include the predetermined resource tag in the return value. Default to `false`.
	FetchTags *bool `pulumi:"fetchTags"`
	// Credential filter. It is composed of Key-Values ​​key-value pairs, the length is 0~1. When using a tag key to filter resources, the number of resources queried cannot exceed 4000.
	Filters *string `pulumi:"filters"`
	// A list of KMS Secret ids. The value is same as KMS secret_name.
	Ids []string `pulumi:"ids"`
	// A regex string to filter the results by the KMS secret_name.
	NameRegex  *string `pulumi:"nameRegex"`
	OutputFile *string `pulumi:"outputFile"`
	// A mapping of tags to assign to the resource.
	Tags map[string]interface{} `pulumi:"tags"`
}

A collection of arguments for invoking getSecrets.

type GetSecretsOutputArgs

type GetSecretsOutputArgs struct {
	// Default to `false`. Set it to true can output more details.
	EnableDetails pulumi.BoolPtrInput `pulumi:"enableDetails"`
	// Whether to include the predetermined resource tag in the return value. Default to `false`.
	FetchTags pulumi.BoolPtrInput `pulumi:"fetchTags"`
	// Credential filter. It is composed of Key-Values ​​key-value pairs, the length is 0~1. When using a tag key to filter resources, the number of resources queried cannot exceed 4000.
	Filters pulumi.StringPtrInput `pulumi:"filters"`
	// A list of KMS Secret ids. The value is same as KMS secret_name.
	Ids pulumi.StringArrayInput `pulumi:"ids"`
	// A regex string to filter the results by the KMS secret_name.
	NameRegex  pulumi.StringPtrInput `pulumi:"nameRegex"`
	OutputFile pulumi.StringPtrInput `pulumi:"outputFile"`
	// A mapping of tags to assign to the resource.
	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 {
	EnableDetails *bool   `pulumi:"enableDetails"`
	FetchTags     *bool   `pulumi:"fetchTags"`
	Filters       *string `pulumi:"filters"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// A list of Kms Secret ids. The value is same as KMS secret_name.
	Ids       []string `pulumi:"ids"`
	NameRegex *string  `pulumi:"nameRegex"`
	// A list of KMS Secret names.
	Names      []string `pulumi:"names"`
	OutputFile *string  `pulumi:"outputFile"`
	// A list of KMS Secrets. Each element contains the following attributes:
	Secrets []GetSecretsSecret `pulumi:"secrets"`
	// (Optional) A mapping of tags to assign to the resource.
	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)

This data source provides a list of KMS Secrets in an Alibaba Cloud account according to the specified filters.

> **NOTE:** Available in v1.86.0+.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/go/alicloud/kms"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/kms"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		kmsSecretsDs, err := kms.GetSecrets(ctx, &kms.GetSecretsArgs{
			FetchTags: pulumi.BoolRef(true),
			NameRegex: pulumi.StringRef("name_regex"),
			Tags: map[string]interface{}{
				"k-aa": "v-aa",
				"k-bb": "v-bb",
			},
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstSecretId", kmsSecretsDs.Secrets[0].Id)
		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) EnableDetails

func (o GetSecretsResultOutput) EnableDetails() pulumi.BoolPtrOutput

func (GetSecretsResultOutput) FetchTags

func (GetSecretsResultOutput) Filters

func (GetSecretsResultOutput) Id

The provider-assigned unique ID for this managed resource.

func (GetSecretsResultOutput) Ids

A list of Kms Secret ids. The value is same as KMS secret_name.

func (GetSecretsResultOutput) NameRegex

func (GetSecretsResultOutput) Names

A list of KMS Secret names.

func (GetSecretsResultOutput) OutputFile

func (GetSecretsResultOutput) Secrets

A list of KMS Secrets. Each element contains the following attributes:

func (GetSecretsResultOutput) Tags

(Optional) A mapping of tags to assign to the resource.

func (GetSecretsResultOutput) ToGetSecretsResultOutput

func (o GetSecretsResultOutput) ToGetSecretsResultOutput() GetSecretsResultOutput

func (GetSecretsResultOutput) ToGetSecretsResultOutputWithContext

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

type GetSecretsSecret

type GetSecretsSecret struct {
	// (Available in 1.124.0+) A mapping of tags to assign to the resource.
	Arn string `pulumi:"arn"`
	// (Available in 1.124.0+)  The description of the secret.
	Description string `pulumi:"description"`
	// (Available in 1.124.0+)  The ID of the KMS CMK that is used to encrypt the secret value.
	EncryptionKeyId string `pulumi:"encryptionKeyId"`
	// ID of the Kms Secret. The value is same as KMS secret_name.
	Id string `pulumi:"id"`
	// Schedule deletion time.
	PlannedDeleteTime string `pulumi:"plannedDeleteTime"`
	// (Available in 1.124.0+)  The value of the secret that you want to create.
	SecretData string `pulumi:"secretData"`
	// (Available in 1.124.0+)  The type of the secret data value.
	SecretDataType string `pulumi:"secretDataType"`
	// Name of the KMS Secret.
	SecretName string `pulumi:"secretName"`
	// (Available in 1.124.0+)  The type of the secret.
	SecretType string `pulumi:"secretType"`
	// A mapping of tags to assign to the resource.
	Tags map[string]interface{} `pulumi:"tags"`
	// (Available in 1.124.0+)  The version number of the initial version.
	VersionId string `pulumi:"versionId"`
	// (Available in 1.124.0+)  The stage labels that mark the new secret version.
	VersionStages []string `pulumi:"versionStages"`
}

type GetSecretsSecretArgs

type GetSecretsSecretArgs struct {
	// (Available in 1.124.0+) A mapping of tags to assign to the resource.
	Arn pulumi.StringInput `pulumi:"arn"`
	// (Available in 1.124.0+)  The description of the secret.
	Description pulumi.StringInput `pulumi:"description"`
	// (Available in 1.124.0+)  The ID of the KMS CMK that is used to encrypt the secret value.
	EncryptionKeyId pulumi.StringInput `pulumi:"encryptionKeyId"`
	// ID of the Kms Secret. The value is same as KMS secret_name.
	Id pulumi.StringInput `pulumi:"id"`
	// Schedule deletion time.
	PlannedDeleteTime pulumi.StringInput `pulumi:"plannedDeleteTime"`
	// (Available in 1.124.0+)  The value of the secret that you want to create.
	SecretData pulumi.StringInput `pulumi:"secretData"`
	// (Available in 1.124.0+)  The type of the secret data value.
	SecretDataType pulumi.StringInput `pulumi:"secretDataType"`
	// Name of the KMS Secret.
	SecretName pulumi.StringInput `pulumi:"secretName"`
	// (Available in 1.124.0+)  The type of the secret.
	SecretType pulumi.StringInput `pulumi:"secretType"`
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapInput `pulumi:"tags"`
	// (Available in 1.124.0+)  The version number of the initial version.
	VersionId pulumi.StringInput `pulumi:"versionId"`
	// (Available in 1.124.0+)  The stage labels that mark the new secret version.
	VersionStages pulumi.StringArrayInput `pulumi:"versionStages"`
}

func (GetSecretsSecretArgs) ElementType

func (GetSecretsSecretArgs) ElementType() reflect.Type

func (GetSecretsSecretArgs) ToGetSecretsSecretOutput

func (i GetSecretsSecretArgs) ToGetSecretsSecretOutput() GetSecretsSecretOutput

func (GetSecretsSecretArgs) ToGetSecretsSecretOutputWithContext

func (i GetSecretsSecretArgs) ToGetSecretsSecretOutputWithContext(ctx context.Context) GetSecretsSecretOutput

type GetSecretsSecretArray

type GetSecretsSecretArray []GetSecretsSecretInput

func (GetSecretsSecretArray) ElementType

func (GetSecretsSecretArray) ElementType() reflect.Type

func (GetSecretsSecretArray) ToGetSecretsSecretArrayOutput

func (i GetSecretsSecretArray) ToGetSecretsSecretArrayOutput() GetSecretsSecretArrayOutput

func (GetSecretsSecretArray) ToGetSecretsSecretArrayOutputWithContext

func (i GetSecretsSecretArray) ToGetSecretsSecretArrayOutputWithContext(ctx context.Context) GetSecretsSecretArrayOutput

type GetSecretsSecretArrayInput

type GetSecretsSecretArrayInput interface {
	pulumi.Input

	ToGetSecretsSecretArrayOutput() GetSecretsSecretArrayOutput
	ToGetSecretsSecretArrayOutputWithContext(context.Context) GetSecretsSecretArrayOutput
}

GetSecretsSecretArrayInput is an input type that accepts GetSecretsSecretArray and GetSecretsSecretArrayOutput values. You can construct a concrete instance of `GetSecretsSecretArrayInput` via:

GetSecretsSecretArray{ GetSecretsSecretArgs{...} }

type GetSecretsSecretArrayOutput

type GetSecretsSecretArrayOutput struct{ *pulumi.OutputState }

func (GetSecretsSecretArrayOutput) ElementType

func (GetSecretsSecretArrayOutput) Index

func (GetSecretsSecretArrayOutput) ToGetSecretsSecretArrayOutput

func (o GetSecretsSecretArrayOutput) ToGetSecretsSecretArrayOutput() GetSecretsSecretArrayOutput

func (GetSecretsSecretArrayOutput) ToGetSecretsSecretArrayOutputWithContext

func (o GetSecretsSecretArrayOutput) ToGetSecretsSecretArrayOutputWithContext(ctx context.Context) GetSecretsSecretArrayOutput

type GetSecretsSecretInput

type GetSecretsSecretInput interface {
	pulumi.Input

	ToGetSecretsSecretOutput() GetSecretsSecretOutput
	ToGetSecretsSecretOutputWithContext(context.Context) GetSecretsSecretOutput
}

GetSecretsSecretInput is an input type that accepts GetSecretsSecretArgs and GetSecretsSecretOutput values. You can construct a concrete instance of `GetSecretsSecretInput` via:

GetSecretsSecretArgs{...}

type GetSecretsSecretOutput

type GetSecretsSecretOutput struct{ *pulumi.OutputState }

func (GetSecretsSecretOutput) Arn

(Available in 1.124.0+) A mapping of tags to assign to the resource.

func (GetSecretsSecretOutput) Description

func (o GetSecretsSecretOutput) Description() pulumi.StringOutput

(Available in 1.124.0+) The description of the secret.

func (GetSecretsSecretOutput) ElementType

func (GetSecretsSecretOutput) ElementType() reflect.Type

func (GetSecretsSecretOutput) EncryptionKeyId

func (o GetSecretsSecretOutput) EncryptionKeyId() pulumi.StringOutput

(Available in 1.124.0+) The ID of the KMS CMK that is used to encrypt the secret value.

func (GetSecretsSecretOutput) Id

ID of the Kms Secret. The value is same as KMS secret_name.

func (GetSecretsSecretOutput) PlannedDeleteTime

func (o GetSecretsSecretOutput) PlannedDeleteTime() pulumi.StringOutput

Schedule deletion time.

func (GetSecretsSecretOutput) SecretData

(Available in 1.124.0+) The value of the secret that you want to create.

func (GetSecretsSecretOutput) SecretDataType

func (o GetSecretsSecretOutput) SecretDataType() pulumi.StringOutput

(Available in 1.124.0+) The type of the secret data value.

func (GetSecretsSecretOutput) SecretName

Name of the KMS Secret.

func (GetSecretsSecretOutput) SecretType

(Available in 1.124.0+) The type of the secret.

func (GetSecretsSecretOutput) Tags

A mapping of tags to assign to the resource.

func (GetSecretsSecretOutput) ToGetSecretsSecretOutput

func (o GetSecretsSecretOutput) ToGetSecretsSecretOutput() GetSecretsSecretOutput

func (GetSecretsSecretOutput) ToGetSecretsSecretOutputWithContext

func (o GetSecretsSecretOutput) ToGetSecretsSecretOutputWithContext(ctx context.Context) GetSecretsSecretOutput

func (GetSecretsSecretOutput) VersionId

(Available in 1.124.0+) The version number of the initial version.

func (GetSecretsSecretOutput) VersionStages

(Available in 1.124.0+) The stage labels that mark the new secret version.

type GetServiceArgs

type GetServiceArgs struct {
	// Setting the value to `On` to enable the service. If has been enabled, return the result. Valid values: "On" or "Off". Default to "Off".
	Enable *string `pulumi:"enable"`
}

A collection of arguments for invoking getService.

type GetServiceOutputArgs

type GetServiceOutputArgs struct {
	// Setting the value to `On` to enable the service. If has been enabled, return the result. Valid values: "On" or "Off". Default to "Off".
	Enable pulumi.StringPtrInput `pulumi:"enable"`
}

A collection of arguments for invoking getService.

func (GetServiceOutputArgs) ElementType

func (GetServiceOutputArgs) ElementType() reflect.Type

type GetServiceResult

type GetServiceResult struct {
	Enable *string `pulumi:"enable"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// The current service enable status.
	Status string `pulumi:"status"`
}

A collection of values returned by getService.

func GetService

func GetService(ctx *pulumi.Context, args *GetServiceArgs, opts ...pulumi.InvokeOption) (*GetServiceResult, error)

Using this data source can open KMS service automatically. If the service has been opened, it will return opened.

For information about KMS and how to use it, see [What is KMS](https://help.aliyun.com/document_detail/186020.html).

> **NOTE:** Available in v1.108.0+

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/go/alicloud/kms"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/kms"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := kms.GetService(ctx, &kms.GetServiceArgs{
			Enable: pulumi.StringRef("On"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

type GetServiceResultOutput

type GetServiceResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getService.

func (GetServiceResultOutput) ElementType

func (GetServiceResultOutput) ElementType() reflect.Type

func (GetServiceResultOutput) Enable

func (GetServiceResultOutput) Id

The provider-assigned unique ID for this managed resource.

func (GetServiceResultOutput) Status

The current service enable status.

func (GetServiceResultOutput) ToGetServiceResultOutput

func (o GetServiceResultOutput) ToGetServiceResultOutput() GetServiceResultOutput

func (GetServiceResultOutput) ToGetServiceResultOutputWithContext

func (o GetServiceResultOutput) ToGetServiceResultOutputWithContext(ctx context.Context) GetServiceResultOutput

type Key

type Key struct {
	pulumi.CustomResourceState

	// The Alicloud Resource Name (ARN) of the key.
	// * `creationDate` -The date and time when the CMK was created. The time is displayed in UTC.
	// * `creator` -The creator of the CMK.
	// * `deleteDate` -The scheduled date to delete CMK. The time is displayed in UTC. This value is returned only when the KeyState value is PendingDeletion.
	Arn pulumi.StringOutput `pulumi:"arn"`
	// Specifies whether to enable automatic key rotation. Valid values:
	// - Enabled
	// - Disabled (default value)
	//   **NOTE**: If you set the origin parameter to EXTERNAL or the keySpec parameter to an asymmetric CMK type, automatic key rotation is unavailable.
	AutomaticRotation pulumi.StringPtrOutput `pulumi:"automaticRotation"`
	CreationDate      pulumi.StringOutput    `pulumi:"creationDate"`
	Creator           pulumi.StringOutput    `pulumi:"creator"`
	DeleteDate        pulumi.StringOutput    `pulumi:"deleteDate"`
	// Field `deletionWindowInDays` has been deprecated from provider version 1.85.0. New field `pendingWindowInDays` instead.
	//
	// Deprecated: Field 'deletion_window_in_days' has been deprecated from provider version 1.85.0. New field 'pending_window_in_days' instead.
	DeletionWindowInDays pulumi.IntOutput `pulumi:"deletionWindowInDays"`
	// The description of the CMK. The description can be 0 to 8,192 characters in length.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// The instance ID of the exclusive KMS instance.
	DkmsInstanceId pulumi.StringPtrOutput `pulumi:"dkmsInstanceId"`
	// Field `isEnabled` has been deprecated from provider version 1.85.0. New field `keyState` instead.
	//
	// Deprecated: Field 'is_enabled' has been deprecated from provider version 1.85.0. New field 'key_state' instead.
	IsEnabled pulumi.BoolPtrOutput `pulumi:"isEnabled"`
	// The type of the CMK. Valid values:
	// "Aliyun_AES_256", "Aliyun_AES_128", "Aliyun_AES_192", "Aliyun_SM4", "RSA_2048", "RSA_3072", "EC_P256", "EC_P256K", "EC_SM2".
	// Note: The default type of the CMK is Aliyun_AES_256. Only Dedicated KMS supports Aliyun_AES_128 and Aliyun_AES_192.
	KeySpec pulumi.StringOutput `pulumi:"keySpec"`
	// Field `keyState` has been deprecated from provider version 1.123.1. New field `status` instead.
	//
	// Deprecated: Field 'key_state' has been deprecated from provider version 1.123.1. New field 'status' instead.
	KeyState pulumi.StringOutput `pulumi:"keyState"`
	// The usage of the CMK. Valid values:
	// - ENCRYPT/DECRYPT(default value): encrypts or decrypts data.
	// - SIGN/VERIFY: generates or verifies a digital signature.
	KeyUsage pulumi.StringPtrOutput `pulumi:"keyUsage"`
	// The date and time the last rotation was performed. The time is displayed in UTC.
	LastRotationDate pulumi.StringOutput `pulumi:"lastRotationDate"`
	// The time and date the key material for the CMK expires. The time is displayed in UTC. If the value is empty, the key material for the CMK does not expire.
	MaterialExpireTime pulumi.StringOutput `pulumi:"materialExpireTime"`
	// The time the next rotation is scheduled for execution.
	NextRotationDate pulumi.StringOutput `pulumi:"nextRotationDate"`
	// The source of key material. Valid values:
	// - Aliyun_KMS (default value)
	// - EXTERNAL
	//   **NOTE**: The value of this parameter is case-sensitive. If you set the `keySpec` to an asymmetric CMK type,
	//   you are not allowed to set the `origin` to EXTERNAL. If you set the `origin` to EXTERNAL, you must import key material.
	//   For more information, see [import key material](https://www.alibabacloud.com/help/en/doc-detail/68523.htm).
	Origin pulumi.StringOutput `pulumi:"origin"`
	// The number of days before the CMK is deleted.
	// During this period, the CMK is in the PendingDeletion state.
	// After this period ends, you cannot cancel the deletion. Valid values: 7 to 366. Unit: days.
	// **NOTE:** From version 1.184.0, `pendingWindowInDays` can be set to `366`.
	PendingWindowInDays pulumi.IntOutput `pulumi:"pendingWindowInDays"`
	// The ID of the current primary key version of the symmetric CMK.
	PrimaryKeyVersion pulumi.StringOutput `pulumi:"primaryKeyVersion"`
	// The protection level of the CMK. Valid values:
	// - SOFTWARE (default value)
	// - HSM
	//   **NOTE**: The value of this parameter is case-sensitive. Assume that you set this parameter to HSM.
	//   If you set the origin parameter to Aliyun_KMS, the CMK is created in a managed hardware security module (HSM).
	//   If you set the origin parameter to EXTERNA, you can import an external key to the managed HSM.
	ProtectionLevel pulumi.StringPtrOutput `pulumi:"protectionLevel"`
	// The interval for automatic key rotation. Specify the value in the integer[unit] format.
	// The following units are supported: d (day), h (hour), m (minute), and s (second).
	// For example, you can use either 7d or 604800s to specify a seven-day interval.
	// The interval can range from 7 days to 730 days.
	// **NOTE**: It is Required when `automaticRotation = "Enabled"`
	RotationInterval pulumi.StringPtrOutput `pulumi:"rotationInterval"`
	// The status of CMK. Valid Values:
	// - Disabled
	// - Enabled (default value)
	// - PendingDeletion
	Status pulumi.StringOutput `pulumi:"status"`
}

A kms key can help user to protect data security in the transmission process. For information about Alikms Key and how to use it, see [What is Resource Alikms Key](https://www.alibabacloud.com/help/doc-detail/28947.htm).

> **NOTE:** Available in v1.85.0+.

## Example Usage

Basic Usage

```go package main

import (

"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/kms"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := kms.NewKey(ctx, "key", &kms.KeyArgs{
			Description:         pulumi.String("Hello KMS"),
			PendingWindowInDays: pulumi.Int(7),
			Status:              pulumi.String("Enabled"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Alikms key can be imported using the id, e.g.

```sh

$ pulumi import alicloud:kms/key:Key example abc123456

```

func GetKey

func GetKey(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *KeyState, opts ...pulumi.ResourceOption) (*Key, error)

GetKey gets an existing Key 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 NewKey

func NewKey(ctx *pulumi.Context,
	name string, args *KeyArgs, opts ...pulumi.ResourceOption) (*Key, error)

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

func (*Key) ElementType

func (*Key) ElementType() reflect.Type

func (*Key) ToKeyOutput

func (i *Key) ToKeyOutput() KeyOutput

func (*Key) ToKeyOutputWithContext

func (i *Key) ToKeyOutputWithContext(ctx context.Context) KeyOutput

type KeyArgs

type KeyArgs struct {
	// Specifies whether to enable automatic key rotation. Valid values:
	// - Enabled
	// - Disabled (default value)
	//   **NOTE**: If you set the origin parameter to EXTERNAL or the keySpec parameter to an asymmetric CMK type, automatic key rotation is unavailable.
	AutomaticRotation pulumi.StringPtrInput
	// Field `deletionWindowInDays` has been deprecated from provider version 1.85.0. New field `pendingWindowInDays` instead.
	//
	// Deprecated: Field 'deletion_window_in_days' has been deprecated from provider version 1.85.0. New field 'pending_window_in_days' instead.
	DeletionWindowInDays pulumi.IntPtrInput
	// The description of the CMK. The description can be 0 to 8,192 characters in length.
	Description pulumi.StringPtrInput
	// The instance ID of the exclusive KMS instance.
	DkmsInstanceId pulumi.StringPtrInput
	// Field `isEnabled` has been deprecated from provider version 1.85.0. New field `keyState` instead.
	//
	// Deprecated: Field 'is_enabled' has been deprecated from provider version 1.85.0. New field 'key_state' instead.
	IsEnabled pulumi.BoolPtrInput
	// The type of the CMK. Valid values:
	// "Aliyun_AES_256", "Aliyun_AES_128", "Aliyun_AES_192", "Aliyun_SM4", "RSA_2048", "RSA_3072", "EC_P256", "EC_P256K", "EC_SM2".
	// Note: The default type of the CMK is Aliyun_AES_256. Only Dedicated KMS supports Aliyun_AES_128 and Aliyun_AES_192.
	KeySpec pulumi.StringPtrInput
	// Field `keyState` has been deprecated from provider version 1.123.1. New field `status` instead.
	//
	// Deprecated: Field 'key_state' has been deprecated from provider version 1.123.1. New field 'status' instead.
	KeyState pulumi.StringPtrInput
	// The usage of the CMK. Valid values:
	// - ENCRYPT/DECRYPT(default value): encrypts or decrypts data.
	// - SIGN/VERIFY: generates or verifies a digital signature.
	KeyUsage pulumi.StringPtrInput
	// The source of key material. Valid values:
	// - Aliyun_KMS (default value)
	// - EXTERNAL
	//   **NOTE**: The value of this parameter is case-sensitive. If you set the `keySpec` to an asymmetric CMK type,
	//   you are not allowed to set the `origin` to EXTERNAL. If you set the `origin` to EXTERNAL, you must import key material.
	//   For more information, see [import key material](https://www.alibabacloud.com/help/en/doc-detail/68523.htm).
	Origin pulumi.StringPtrInput
	// The number of days before the CMK is deleted.
	// During this period, the CMK is in the PendingDeletion state.
	// After this period ends, you cannot cancel the deletion. Valid values: 7 to 366. Unit: days.
	// **NOTE:** From version 1.184.0, `pendingWindowInDays` can be set to `366`.
	PendingWindowInDays pulumi.IntPtrInput
	// The protection level of the CMK. Valid values:
	// - SOFTWARE (default value)
	// - HSM
	//   **NOTE**: The value of this parameter is case-sensitive. Assume that you set this parameter to HSM.
	//   If you set the origin parameter to Aliyun_KMS, the CMK is created in a managed hardware security module (HSM).
	//   If you set the origin parameter to EXTERNA, you can import an external key to the managed HSM.
	ProtectionLevel pulumi.StringPtrInput
	// The interval for automatic key rotation. Specify the value in the integer[unit] format.
	// The following units are supported: d (day), h (hour), m (minute), and s (second).
	// For example, you can use either 7d or 604800s to specify a seven-day interval.
	// The interval can range from 7 days to 730 days.
	// **NOTE**: It is Required when `automaticRotation = "Enabled"`
	RotationInterval pulumi.StringPtrInput
	// The status of CMK. Valid Values:
	// - Disabled
	// - Enabled (default value)
	// - PendingDeletion
	Status pulumi.StringPtrInput
}

The set of arguments for constructing a Key resource.

func (KeyArgs) ElementType

func (KeyArgs) ElementType() reflect.Type

type KeyArray

type KeyArray []KeyInput

func (KeyArray) ElementType

func (KeyArray) ElementType() reflect.Type

func (KeyArray) ToKeyArrayOutput

func (i KeyArray) ToKeyArrayOutput() KeyArrayOutput

func (KeyArray) ToKeyArrayOutputWithContext

func (i KeyArray) ToKeyArrayOutputWithContext(ctx context.Context) KeyArrayOutput

type KeyArrayInput

type KeyArrayInput interface {
	pulumi.Input

	ToKeyArrayOutput() KeyArrayOutput
	ToKeyArrayOutputWithContext(context.Context) KeyArrayOutput
}

KeyArrayInput is an input type that accepts KeyArray and KeyArrayOutput values. You can construct a concrete instance of `KeyArrayInput` via:

KeyArray{ KeyArgs{...} }

type KeyArrayOutput

type KeyArrayOutput struct{ *pulumi.OutputState }

func (KeyArrayOutput) ElementType

func (KeyArrayOutput) ElementType() reflect.Type

func (KeyArrayOutput) Index

func (KeyArrayOutput) ToKeyArrayOutput

func (o KeyArrayOutput) ToKeyArrayOutput() KeyArrayOutput

func (KeyArrayOutput) ToKeyArrayOutputWithContext

func (o KeyArrayOutput) ToKeyArrayOutputWithContext(ctx context.Context) KeyArrayOutput

type KeyInput

type KeyInput interface {
	pulumi.Input

	ToKeyOutput() KeyOutput
	ToKeyOutputWithContext(ctx context.Context) KeyOutput
}

type KeyMap

type KeyMap map[string]KeyInput

func (KeyMap) ElementType

func (KeyMap) ElementType() reflect.Type

func (KeyMap) ToKeyMapOutput

func (i KeyMap) ToKeyMapOutput() KeyMapOutput

func (KeyMap) ToKeyMapOutputWithContext

func (i KeyMap) ToKeyMapOutputWithContext(ctx context.Context) KeyMapOutput

type KeyMapInput

type KeyMapInput interface {
	pulumi.Input

	ToKeyMapOutput() KeyMapOutput
	ToKeyMapOutputWithContext(context.Context) KeyMapOutput
}

KeyMapInput is an input type that accepts KeyMap and KeyMapOutput values. You can construct a concrete instance of `KeyMapInput` via:

KeyMap{ "key": KeyArgs{...} }

type KeyMapOutput

type KeyMapOutput struct{ *pulumi.OutputState }

func (KeyMapOutput) ElementType

func (KeyMapOutput) ElementType() reflect.Type

func (KeyMapOutput) MapIndex

func (o KeyMapOutput) MapIndex(k pulumi.StringInput) KeyOutput

func (KeyMapOutput) ToKeyMapOutput

func (o KeyMapOutput) ToKeyMapOutput() KeyMapOutput

func (KeyMapOutput) ToKeyMapOutputWithContext

func (o KeyMapOutput) ToKeyMapOutputWithContext(ctx context.Context) KeyMapOutput

type KeyOutput

type KeyOutput struct{ *pulumi.OutputState }

func (KeyOutput) Arn

func (o KeyOutput) Arn() pulumi.StringOutput

The Alicloud Resource Name (ARN) of the key. * `creationDate` -The date and time when the CMK was created. The time is displayed in UTC. * `creator` -The creator of the CMK. * `deleteDate` -The scheduled date to delete CMK. The time is displayed in UTC. This value is returned only when the KeyState value is PendingDeletion.

func (KeyOutput) AutomaticRotation

func (o KeyOutput) AutomaticRotation() pulumi.StringPtrOutput

Specifies whether to enable automatic key rotation. Valid values:

  • Enabled
  • Disabled (default value) **NOTE**: If you set the origin parameter to EXTERNAL or the keySpec parameter to an asymmetric CMK type, automatic key rotation is unavailable.

func (KeyOutput) CreationDate

func (o KeyOutput) CreationDate() pulumi.StringOutput

func (KeyOutput) Creator

func (o KeyOutput) Creator() pulumi.StringOutput

func (KeyOutput) DeleteDate

func (o KeyOutput) DeleteDate() pulumi.StringOutput

func (KeyOutput) DeletionWindowInDays deprecated

func (o KeyOutput) DeletionWindowInDays() pulumi.IntOutput

Field `deletionWindowInDays` has been deprecated from provider version 1.85.0. New field `pendingWindowInDays` instead.

Deprecated: Field 'deletion_window_in_days' has been deprecated from provider version 1.85.0. New field 'pending_window_in_days' instead.

func (KeyOutput) Description

func (o KeyOutput) Description() pulumi.StringPtrOutput

The description of the CMK. The description can be 0 to 8,192 characters in length.

func (KeyOutput) DkmsInstanceId

func (o KeyOutput) DkmsInstanceId() pulumi.StringPtrOutput

The instance ID of the exclusive KMS instance.

func (KeyOutput) ElementType

func (KeyOutput) ElementType() reflect.Type

func (KeyOutput) IsEnabled deprecated

func (o KeyOutput) IsEnabled() pulumi.BoolPtrOutput

Field `isEnabled` has been deprecated from provider version 1.85.0. New field `keyState` instead.

Deprecated: Field 'is_enabled' has been deprecated from provider version 1.85.0. New field 'key_state' instead.

func (KeyOutput) KeySpec

func (o KeyOutput) KeySpec() pulumi.StringOutput

The type of the CMK. Valid values: "Aliyun_AES_256", "Aliyun_AES_128", "Aliyun_AES_192", "Aliyun_SM4", "RSA_2048", "RSA_3072", "EC_P256", "EC_P256K", "EC_SM2". Note: The default type of the CMK is Aliyun_AES_256. Only Dedicated KMS supports Aliyun_AES_128 and Aliyun_AES_192.

func (KeyOutput) KeyState deprecated

func (o KeyOutput) KeyState() pulumi.StringOutput

Field `keyState` has been deprecated from provider version 1.123.1. New field `status` instead.

Deprecated: Field 'key_state' has been deprecated from provider version 1.123.1. New field 'status' instead.

func (KeyOutput) KeyUsage

func (o KeyOutput) KeyUsage() pulumi.StringPtrOutput

The usage of the CMK. Valid values: - ENCRYPT/DECRYPT(default value): encrypts or decrypts data. - SIGN/VERIFY: generates or verifies a digital signature.

func (KeyOutput) LastRotationDate

func (o KeyOutput) LastRotationDate() pulumi.StringOutput

The date and time the last rotation was performed. The time is displayed in UTC.

func (KeyOutput) MaterialExpireTime

func (o KeyOutput) MaterialExpireTime() pulumi.StringOutput

The time and date the key material for the CMK expires. The time is displayed in UTC. If the value is empty, the key material for the CMK does not expire.

func (KeyOutput) NextRotationDate

func (o KeyOutput) NextRotationDate() pulumi.StringOutput

The time the next rotation is scheduled for execution.

func (KeyOutput) Origin

func (o KeyOutput) Origin() pulumi.StringOutput

The source of key material. Valid values:

  • Aliyun_KMS (default value)
  • EXTERNAL **NOTE**: The value of this parameter is case-sensitive. If you set the `keySpec` to an asymmetric CMK type, you are not allowed to set the `origin` to EXTERNAL. If you set the `origin` to EXTERNAL, you must import key material. For more information, see [import key material](https://www.alibabacloud.com/help/en/doc-detail/68523.htm).

func (KeyOutput) PendingWindowInDays

func (o KeyOutput) PendingWindowInDays() pulumi.IntOutput

The number of days before the CMK is deleted. During this period, the CMK is in the PendingDeletion state. After this period ends, you cannot cancel the deletion. Valid values: 7 to 366. Unit: days. **NOTE:** From version 1.184.0, `pendingWindowInDays` can be set to `366`.

func (KeyOutput) PrimaryKeyVersion

func (o KeyOutput) PrimaryKeyVersion() pulumi.StringOutput

The ID of the current primary key version of the symmetric CMK.

func (KeyOutput) ProtectionLevel

func (o KeyOutput) ProtectionLevel() pulumi.StringPtrOutput

The protection level of the CMK. Valid values:

  • SOFTWARE (default value)
  • HSM **NOTE**: The value of this parameter is case-sensitive. Assume that you set this parameter to HSM. If you set the origin parameter to Aliyun_KMS, the CMK is created in a managed hardware security module (HSM). If you set the origin parameter to EXTERNA, you can import an external key to the managed HSM.

func (KeyOutput) RotationInterval

func (o KeyOutput) RotationInterval() pulumi.StringPtrOutput

The interval for automatic key rotation. Specify the value in the integer[unit] format. The following units are supported: d (day), h (hour), m (minute), and s (second). For example, you can use either 7d or 604800s to specify a seven-day interval. The interval can range from 7 days to 730 days. **NOTE**: It is Required when `automaticRotation = "Enabled"`

func (KeyOutput) Status

func (o KeyOutput) Status() pulumi.StringOutput

The status of CMK. Valid Values: - Disabled - Enabled (default value) - PendingDeletion

func (KeyOutput) ToKeyOutput

func (o KeyOutput) ToKeyOutput() KeyOutput

func (KeyOutput) ToKeyOutputWithContext

func (o KeyOutput) ToKeyOutputWithContext(ctx context.Context) KeyOutput

type KeyState

type KeyState struct {
	// The Alicloud Resource Name (ARN) of the key.
	// * `creationDate` -The date and time when the CMK was created. The time is displayed in UTC.
	// * `creator` -The creator of the CMK.
	// * `deleteDate` -The scheduled date to delete CMK. The time is displayed in UTC. This value is returned only when the KeyState value is PendingDeletion.
	Arn pulumi.StringPtrInput
	// Specifies whether to enable automatic key rotation. Valid values:
	// - Enabled
	// - Disabled (default value)
	//   **NOTE**: If you set the origin parameter to EXTERNAL or the keySpec parameter to an asymmetric CMK type, automatic key rotation is unavailable.
	AutomaticRotation pulumi.StringPtrInput
	CreationDate      pulumi.StringPtrInput
	Creator           pulumi.StringPtrInput
	DeleteDate        pulumi.StringPtrInput
	// Field `deletionWindowInDays` has been deprecated from provider version 1.85.0. New field `pendingWindowInDays` instead.
	//
	// Deprecated: Field 'deletion_window_in_days' has been deprecated from provider version 1.85.0. New field 'pending_window_in_days' instead.
	DeletionWindowInDays pulumi.IntPtrInput
	// The description of the CMK. The description can be 0 to 8,192 characters in length.
	Description pulumi.StringPtrInput
	// The instance ID of the exclusive KMS instance.
	DkmsInstanceId pulumi.StringPtrInput
	// Field `isEnabled` has been deprecated from provider version 1.85.0. New field `keyState` instead.
	//
	// Deprecated: Field 'is_enabled' has been deprecated from provider version 1.85.0. New field 'key_state' instead.
	IsEnabled pulumi.BoolPtrInput
	// The type of the CMK. Valid values:
	// "Aliyun_AES_256", "Aliyun_AES_128", "Aliyun_AES_192", "Aliyun_SM4", "RSA_2048", "RSA_3072", "EC_P256", "EC_P256K", "EC_SM2".
	// Note: The default type of the CMK is Aliyun_AES_256. Only Dedicated KMS supports Aliyun_AES_128 and Aliyun_AES_192.
	KeySpec pulumi.StringPtrInput
	// Field `keyState` has been deprecated from provider version 1.123.1. New field `status` instead.
	//
	// Deprecated: Field 'key_state' has been deprecated from provider version 1.123.1. New field 'status' instead.
	KeyState pulumi.StringPtrInput
	// The usage of the CMK. Valid values:
	// - ENCRYPT/DECRYPT(default value): encrypts or decrypts data.
	// - SIGN/VERIFY: generates or verifies a digital signature.
	KeyUsage pulumi.StringPtrInput
	// The date and time the last rotation was performed. The time is displayed in UTC.
	LastRotationDate pulumi.StringPtrInput
	// The time and date the key material for the CMK expires. The time is displayed in UTC. If the value is empty, the key material for the CMK does not expire.
	MaterialExpireTime pulumi.StringPtrInput
	// The time the next rotation is scheduled for execution.
	NextRotationDate pulumi.StringPtrInput
	// The source of key material. Valid values:
	// - Aliyun_KMS (default value)
	// - EXTERNAL
	//   **NOTE**: The value of this parameter is case-sensitive. If you set the `keySpec` to an asymmetric CMK type,
	//   you are not allowed to set the `origin` to EXTERNAL. If you set the `origin` to EXTERNAL, you must import key material.
	//   For more information, see [import key material](https://www.alibabacloud.com/help/en/doc-detail/68523.htm).
	Origin pulumi.StringPtrInput
	// The number of days before the CMK is deleted.
	// During this period, the CMK is in the PendingDeletion state.
	// After this period ends, you cannot cancel the deletion. Valid values: 7 to 366. Unit: days.
	// **NOTE:** From version 1.184.0, `pendingWindowInDays` can be set to `366`.
	PendingWindowInDays pulumi.IntPtrInput
	// The ID of the current primary key version of the symmetric CMK.
	PrimaryKeyVersion pulumi.StringPtrInput
	// The protection level of the CMK. Valid values:
	// - SOFTWARE (default value)
	// - HSM
	//   **NOTE**: The value of this parameter is case-sensitive. Assume that you set this parameter to HSM.
	//   If you set the origin parameter to Aliyun_KMS, the CMK is created in a managed hardware security module (HSM).
	//   If you set the origin parameter to EXTERNA, you can import an external key to the managed HSM.
	ProtectionLevel pulumi.StringPtrInput
	// The interval for automatic key rotation. Specify the value in the integer[unit] format.
	// The following units are supported: d (day), h (hour), m (minute), and s (second).
	// For example, you can use either 7d or 604800s to specify a seven-day interval.
	// The interval can range from 7 days to 730 days.
	// **NOTE**: It is Required when `automaticRotation = "Enabled"`
	RotationInterval pulumi.StringPtrInput
	// The status of CMK. Valid Values:
	// - Disabled
	// - Enabled (default value)
	// - PendingDeletion
	Status pulumi.StringPtrInput
}

func (KeyState) ElementType

func (KeyState) ElementType() reflect.Type

type KeyVersion

type KeyVersion struct {
	pulumi.CustomResourceState

	// The id of the master key (CMK).
	KeyId pulumi.StringOutput `pulumi:"keyId"`
	// The id of the Alikms key version.
	KeyVersionId pulumi.StringOutput `pulumi:"keyVersionId"`
}

Provides a Alikms Key Version resource. For information about Alikms Key Version and how to use it, see [What is Resource Alikms Key Version](https://www.alibabacloud.com/help/doc-detail/133838.htm).

> **NOTE:** Available in v1.85.0+.

## Example Usage

Basic Usage

```go package main

import (

"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/kms"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		this, err := kms.NewKey(ctx, "this", nil)
		if err != nil {
			return err
		}
		_, err = kms.NewKeyVersion(ctx, "keyversion", &kms.KeyVersionArgs{
			KeyId: this.ID(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Alikms key version can be imported using the id, e.g.

```sh

$ pulumi import alicloud:kms/keyVersion:KeyVersion example 72da539a-2fa8-4f2d-b854-*****

```

func GetKeyVersion

func GetKeyVersion(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *KeyVersionState, opts ...pulumi.ResourceOption) (*KeyVersion, error)

GetKeyVersion gets an existing KeyVersion 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 NewKeyVersion

func NewKeyVersion(ctx *pulumi.Context,
	name string, args *KeyVersionArgs, opts ...pulumi.ResourceOption) (*KeyVersion, error)

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

func (*KeyVersion) ElementType

func (*KeyVersion) ElementType() reflect.Type

func (*KeyVersion) ToKeyVersionOutput

func (i *KeyVersion) ToKeyVersionOutput() KeyVersionOutput

func (*KeyVersion) ToKeyVersionOutputWithContext

func (i *KeyVersion) ToKeyVersionOutputWithContext(ctx context.Context) KeyVersionOutput

type KeyVersionArgs

type KeyVersionArgs struct {
	// The id of the master key (CMK).
	KeyId pulumi.StringInput
}

The set of arguments for constructing a KeyVersion resource.

func (KeyVersionArgs) ElementType

func (KeyVersionArgs) ElementType() reflect.Type

type KeyVersionArray

type KeyVersionArray []KeyVersionInput

func (KeyVersionArray) ElementType

func (KeyVersionArray) ElementType() reflect.Type

func (KeyVersionArray) ToKeyVersionArrayOutput

func (i KeyVersionArray) ToKeyVersionArrayOutput() KeyVersionArrayOutput

func (KeyVersionArray) ToKeyVersionArrayOutputWithContext

func (i KeyVersionArray) ToKeyVersionArrayOutputWithContext(ctx context.Context) KeyVersionArrayOutput

type KeyVersionArrayInput

type KeyVersionArrayInput interface {
	pulumi.Input

	ToKeyVersionArrayOutput() KeyVersionArrayOutput
	ToKeyVersionArrayOutputWithContext(context.Context) KeyVersionArrayOutput
}

KeyVersionArrayInput is an input type that accepts KeyVersionArray and KeyVersionArrayOutput values. You can construct a concrete instance of `KeyVersionArrayInput` via:

KeyVersionArray{ KeyVersionArgs{...} }

type KeyVersionArrayOutput

type KeyVersionArrayOutput struct{ *pulumi.OutputState }

func (KeyVersionArrayOutput) ElementType

func (KeyVersionArrayOutput) ElementType() reflect.Type

func (KeyVersionArrayOutput) Index

func (KeyVersionArrayOutput) ToKeyVersionArrayOutput

func (o KeyVersionArrayOutput) ToKeyVersionArrayOutput() KeyVersionArrayOutput

func (KeyVersionArrayOutput) ToKeyVersionArrayOutputWithContext

func (o KeyVersionArrayOutput) ToKeyVersionArrayOutputWithContext(ctx context.Context) KeyVersionArrayOutput

type KeyVersionInput

type KeyVersionInput interface {
	pulumi.Input

	ToKeyVersionOutput() KeyVersionOutput
	ToKeyVersionOutputWithContext(ctx context.Context) KeyVersionOutput
}

type KeyVersionMap

type KeyVersionMap map[string]KeyVersionInput

func (KeyVersionMap) ElementType

func (KeyVersionMap) ElementType() reflect.Type

func (KeyVersionMap) ToKeyVersionMapOutput

func (i KeyVersionMap) ToKeyVersionMapOutput() KeyVersionMapOutput

func (KeyVersionMap) ToKeyVersionMapOutputWithContext

func (i KeyVersionMap) ToKeyVersionMapOutputWithContext(ctx context.Context) KeyVersionMapOutput

type KeyVersionMapInput

type KeyVersionMapInput interface {
	pulumi.Input

	ToKeyVersionMapOutput() KeyVersionMapOutput
	ToKeyVersionMapOutputWithContext(context.Context) KeyVersionMapOutput
}

KeyVersionMapInput is an input type that accepts KeyVersionMap and KeyVersionMapOutput values. You can construct a concrete instance of `KeyVersionMapInput` via:

KeyVersionMap{ "key": KeyVersionArgs{...} }

type KeyVersionMapOutput

type KeyVersionMapOutput struct{ *pulumi.OutputState }

func (KeyVersionMapOutput) ElementType

func (KeyVersionMapOutput) ElementType() reflect.Type

func (KeyVersionMapOutput) MapIndex

func (KeyVersionMapOutput) ToKeyVersionMapOutput

func (o KeyVersionMapOutput) ToKeyVersionMapOutput() KeyVersionMapOutput

func (KeyVersionMapOutput) ToKeyVersionMapOutputWithContext

func (o KeyVersionMapOutput) ToKeyVersionMapOutputWithContext(ctx context.Context) KeyVersionMapOutput

type KeyVersionOutput

type KeyVersionOutput struct{ *pulumi.OutputState }

func (KeyVersionOutput) ElementType

func (KeyVersionOutput) ElementType() reflect.Type

func (KeyVersionOutput) KeyId

The id of the master key (CMK).

func (KeyVersionOutput) KeyVersionId

func (o KeyVersionOutput) KeyVersionId() pulumi.StringOutput

The id of the Alikms key version.

func (KeyVersionOutput) ToKeyVersionOutput

func (o KeyVersionOutput) ToKeyVersionOutput() KeyVersionOutput

func (KeyVersionOutput) ToKeyVersionOutputWithContext

func (o KeyVersionOutput) ToKeyVersionOutputWithContext(ctx context.Context) KeyVersionOutput

type KeyVersionState

type KeyVersionState struct {
	// The id of the master key (CMK).
	KeyId pulumi.StringPtrInput
	// The id of the Alikms key version.
	KeyVersionId pulumi.StringPtrInput
}

func (KeyVersionState) ElementType

func (KeyVersionState) ElementType() reflect.Type

type LookupCiphertextArgs

type LookupCiphertextArgs struct {
	// -
	// (Optional) The Encryption context. If you specify this parameter here, it is also required when you call the Decrypt API operation. For more information, see [Encryption Context](https://www.alibabacloud.com/help/doc-detail/42975.htm).
	EncryptionContext map[string]string `pulumi:"encryptionContext"`
	// The globally unique ID of the CMK.
	KeyId string `pulumi:"keyId"`
	// The plaintext to be encrypted which must be encoded in Base64.
	Plaintext string `pulumi:"plaintext"`
}

A collection of arguments for invoking getCiphertext.

type LookupCiphertextOutputArgs

type LookupCiphertextOutputArgs struct {
	// -
	// (Optional) The Encryption context. If you specify this parameter here, it is also required when you call the Decrypt API operation. For more information, see [Encryption Context](https://www.alibabacloud.com/help/doc-detail/42975.htm).
	EncryptionContext pulumi.StringMapInput `pulumi:"encryptionContext"`
	// The globally unique ID of the CMK.
	KeyId pulumi.StringInput `pulumi:"keyId"`
	// The plaintext to be encrypted which must be encoded in Base64.
	Plaintext pulumi.StringInput `pulumi:"plaintext"`
}

A collection of arguments for invoking getCiphertext.

func (LookupCiphertextOutputArgs) ElementType

func (LookupCiphertextOutputArgs) ElementType() reflect.Type

type LookupCiphertextResult

type LookupCiphertextResult struct {
	// The ciphertext of the data key encrypted with the primary CMK version.
	CiphertextBlob    string            `pulumi:"ciphertextBlob"`
	EncryptionContext map[string]string `pulumi:"encryptionContext"`
	// The provider-assigned unique ID for this managed resource.
	Id        string `pulumi:"id"`
	KeyId     string `pulumi:"keyId"`
	Plaintext string `pulumi:"plaintext"`
}

A collection of values returned by getCiphertext.

func LookupCiphertext

func LookupCiphertext(ctx *pulumi.Context, args *LookupCiphertextArgs, opts ...pulumi.InvokeOption) (*LookupCiphertextResult, error)

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/go/alicloud/kms"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/kms"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		key, err := kms.NewKey(ctx, "key", &kms.KeyArgs{
			Description: pulumi.String("example key"),
			IsEnabled:   pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		_ = kms.LookupCiphertextOutput(ctx, kms.GetCiphertextOutputArgs{
			KeyId:     key.ID(),
			Plaintext: pulumi.String("example"),
		}, nil)
		return nil
	})
}

```

type LookupCiphertextResultOutput

type LookupCiphertextResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getCiphertext.

func (LookupCiphertextResultOutput) CiphertextBlob

The ciphertext of the data key encrypted with the primary CMK version.

func (LookupCiphertextResultOutput) ElementType

func (LookupCiphertextResultOutput) EncryptionContext

func (o LookupCiphertextResultOutput) EncryptionContext() pulumi.StringMapOutput

func (LookupCiphertextResultOutput) Id

The provider-assigned unique ID for this managed resource.

func (LookupCiphertextResultOutput) KeyId

func (LookupCiphertextResultOutput) Plaintext

func (LookupCiphertextResultOutput) ToLookupCiphertextResultOutput

func (o LookupCiphertextResultOutput) ToLookupCiphertextResultOutput() LookupCiphertextResultOutput

func (LookupCiphertextResultOutput) ToLookupCiphertextResultOutputWithContext

func (o LookupCiphertextResultOutput) ToLookupCiphertextResultOutputWithContext(ctx context.Context) LookupCiphertextResultOutput

type Secret

type Secret struct {
	pulumi.CustomResourceState

	// The Alicloud Resource Name (ARN) of the secret.
	Arn pulumi.StringOutput `pulumi:"arn"`
	// The description of the secret.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// The instance ID of the exclusive KMS instance.
	DkmsInstanceId pulumi.StringPtrOutput `pulumi:"dkmsInstanceId"`
	// Whether to enable automatic key rotation.
	EnableAutomaticRotation pulumi.BoolPtrOutput `pulumi:"enableAutomaticRotation"`
	// The ID of the KMS CMK that is used to encrypt the secret value. If you do not specify this parameter, Secrets Manager automatically creates an encryption key to encrypt the secret.
	EncryptionKeyId pulumi.StringPtrOutput `pulumi:"encryptionKeyId"`
	// Specifies whether to forcibly delete the secret. If this parameter is set to true, the secret cannot be recovered. Valid values: true, false. Default to: false.
	ForceDeleteWithoutRecovery pulumi.BoolPtrOutput `pulumi:"forceDeleteWithoutRecovery"`
	// The time when the secret is scheduled to be deleted.
	PlannedDeleteTime pulumi.StringOutput `pulumi:"plannedDeleteTime"`
	// Specifies the recovery period of the secret if you do not forcibly delete it. Default value: 30. It will be ignored when `forceDeleteWithoutRecovery` is true.
	RecoveryWindowInDays pulumi.IntPtrOutput `pulumi:"recoveryWindowInDays"`
	// The time period of automatic rotation. The format is integer[unit], where integer represents the length of time, and unit represents the unit of time. The legal unit units are: d (day), h (hour), m (minute), s (second). 7d or 604800s both indicate a 7-day cycle.
	RotationInterval pulumi.StringPtrOutput `pulumi:"rotationInterval"`
	// The value of the secret that you want to create. Secrets Manager encrypts the secret value and stores it in the initial version.
	SecretData pulumi.StringOutput `pulumi:"secretData"`
	// The type of the secret value. Valid values: text, binary. Default to "text".
	SecretDataType pulumi.StringPtrOutput `pulumi:"secretDataType"`
	// The name of the secret.
	SecretName pulumi.StringOutput `pulumi:"secretName"`
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapOutput `pulumi:"tags"`
	// The version number of the initial version. Version numbers are unique in each secret object.
	VersionId pulumi.StringOutput `pulumi:"versionId"`
	// ) The stage labels that mark the new secret version. If you do not specify this parameter, Secrets Manager marks it with "ACSCurrent".
	VersionStages pulumi.StringArrayOutput `pulumi:"versionStages"`
}

This resouce used to create a secret and store its initial version.

> **NOTE:** Available in 1.76.0+.

## Example Usage

Basic Usage

```go package main

import (

"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/kms"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := kms.NewSecret(ctx, "default", &kms.SecretArgs{
			Description:                pulumi.String("from terraform"),
			ForceDeleteWithoutRecovery: pulumi.Bool(true),
			SecretData:                 pulumi.String("Secret data."),
			SecretName:                 pulumi.String("secret-foo"),
			VersionId:                  pulumi.String("000000000001"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

KMS secret can be imported using the id, e.g.

```sh

$ pulumi import alicloud:kms/secret:Secret default secret-foo

```

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 {
	// The description of the secret.
	Description pulumi.StringPtrInput
	// The instance ID of the exclusive KMS instance.
	DkmsInstanceId pulumi.StringPtrInput
	// Whether to enable automatic key rotation.
	EnableAutomaticRotation pulumi.BoolPtrInput
	// The ID of the KMS CMK that is used to encrypt the secret value. If you do not specify this parameter, Secrets Manager automatically creates an encryption key to encrypt the secret.
	EncryptionKeyId pulumi.StringPtrInput
	// Specifies whether to forcibly delete the secret. If this parameter is set to true, the secret cannot be recovered. Valid values: true, false. Default to: false.
	ForceDeleteWithoutRecovery pulumi.BoolPtrInput
	// Specifies the recovery period of the secret if you do not forcibly delete it. Default value: 30. It will be ignored when `forceDeleteWithoutRecovery` is true.
	RecoveryWindowInDays pulumi.IntPtrInput
	// The time period of automatic rotation. The format is integer[unit], where integer represents the length of time, and unit represents the unit of time. The legal unit units are: d (day), h (hour), m (minute), s (second). 7d or 604800s both indicate a 7-day cycle.
	RotationInterval pulumi.StringPtrInput
	// The value of the secret that you want to create. Secrets Manager encrypts the secret value and stores it in the initial version.
	SecretData pulumi.StringInput
	// The type of the secret value. Valid values: text, binary. Default to "text".
	SecretDataType pulumi.StringPtrInput
	// The name of the secret.
	SecretName pulumi.StringInput
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapInput
	// The version number of the initial version. Version numbers are unique in each secret object.
	VersionId pulumi.StringInput
	// ) The stage labels that mark the new secret version. If you do not specify this parameter, Secrets Manager marks it with "ACSCurrent".
	VersionStages pulumi.StringArrayInput
}

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) Arn

The Alicloud Resource Name (ARN) of the secret.

func (SecretOutput) Description

func (o SecretOutput) Description() pulumi.StringPtrOutput

The description of the secret.

func (SecretOutput) DkmsInstanceId

func (o SecretOutput) DkmsInstanceId() pulumi.StringPtrOutput

The instance ID of the exclusive KMS instance.

func (SecretOutput) ElementType

func (SecretOutput) ElementType() reflect.Type

func (SecretOutput) EnableAutomaticRotation

func (o SecretOutput) EnableAutomaticRotation() pulumi.BoolPtrOutput

Whether to enable automatic key rotation.

func (SecretOutput) EncryptionKeyId

func (o SecretOutput) EncryptionKeyId() pulumi.StringPtrOutput

The ID of the KMS CMK that is used to encrypt the secret value. If you do not specify this parameter, Secrets Manager automatically creates an encryption key to encrypt the secret.

func (SecretOutput) ForceDeleteWithoutRecovery

func (o SecretOutput) ForceDeleteWithoutRecovery() pulumi.BoolPtrOutput

Specifies whether to forcibly delete the secret. If this parameter is set to true, the secret cannot be recovered. Valid values: true, false. Default to: false.

func (SecretOutput) PlannedDeleteTime

func (o SecretOutput) PlannedDeleteTime() pulumi.StringOutput

The time when the secret is scheduled to be deleted.

func (SecretOutput) RecoveryWindowInDays

func (o SecretOutput) RecoveryWindowInDays() pulumi.IntPtrOutput

Specifies the recovery period of the secret if you do not forcibly delete it. Default value: 30. It will be ignored when `forceDeleteWithoutRecovery` is true.

func (SecretOutput) RotationInterval

func (o SecretOutput) RotationInterval() pulumi.StringPtrOutput

The time period of automatic rotation. The format is integer[unit], where integer represents the length of time, and unit represents the unit of time. The legal unit units are: d (day), h (hour), m (minute), s (second). 7d or 604800s both indicate a 7-day cycle.

func (SecretOutput) SecretData

func (o SecretOutput) SecretData() pulumi.StringOutput

The value of the secret that you want to create. Secrets Manager encrypts the secret value and stores it in the initial version.

func (SecretOutput) SecretDataType

func (o SecretOutput) SecretDataType() pulumi.StringPtrOutput

The type of the secret value. Valid values: text, binary. Default to "text".

func (SecretOutput) SecretName

func (o SecretOutput) SecretName() pulumi.StringOutput

The name of the secret.

func (SecretOutput) Tags

func (o SecretOutput) Tags() pulumi.MapOutput

A mapping of tags to assign to the resource.

func (SecretOutput) ToSecretOutput

func (o SecretOutput) ToSecretOutput() SecretOutput

func (SecretOutput) ToSecretOutputWithContext

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

func (SecretOutput) VersionId

func (o SecretOutput) VersionId() pulumi.StringOutput

The version number of the initial version. Version numbers are unique in each secret object.

func (SecretOutput) VersionStages

func (o SecretOutput) VersionStages() pulumi.StringArrayOutput

) The stage labels that mark the new secret version. If you do not specify this parameter, Secrets Manager marks it with "ACSCurrent".

type SecretState

type SecretState struct {
	// The Alicloud Resource Name (ARN) of the secret.
	Arn pulumi.StringPtrInput
	// The description of the secret.
	Description pulumi.StringPtrInput
	// The instance ID of the exclusive KMS instance.
	DkmsInstanceId pulumi.StringPtrInput
	// Whether to enable automatic key rotation.
	EnableAutomaticRotation pulumi.BoolPtrInput
	// The ID of the KMS CMK that is used to encrypt the secret value. If you do not specify this parameter, Secrets Manager automatically creates an encryption key to encrypt the secret.
	EncryptionKeyId pulumi.StringPtrInput
	// Specifies whether to forcibly delete the secret. If this parameter is set to true, the secret cannot be recovered. Valid values: true, false. Default to: false.
	ForceDeleteWithoutRecovery pulumi.BoolPtrInput
	// The time when the secret is scheduled to be deleted.
	PlannedDeleteTime pulumi.StringPtrInput
	// Specifies the recovery period of the secret if you do not forcibly delete it. Default value: 30. It will be ignored when `forceDeleteWithoutRecovery` is true.
	RecoveryWindowInDays pulumi.IntPtrInput
	// The time period of automatic rotation. The format is integer[unit], where integer represents the length of time, and unit represents the unit of time. The legal unit units are: d (day), h (hour), m (minute), s (second). 7d or 604800s both indicate a 7-day cycle.
	RotationInterval pulumi.StringPtrInput
	// The value of the secret that you want to create. Secrets Manager encrypts the secret value and stores it in the initial version.
	SecretData pulumi.StringPtrInput
	// The type of the secret value. Valid values: text, binary. Default to "text".
	SecretDataType pulumi.StringPtrInput
	// The name of the secret.
	SecretName pulumi.StringPtrInput
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapInput
	// The version number of the initial version. Version numbers are unique in each secret object.
	VersionId pulumi.StringPtrInput
	// ) The stage labels that mark the new secret version. If you do not specify this parameter, Secrets Manager marks it with "ACSCurrent".
	VersionStages pulumi.StringArrayInput
}

func (SecretState) ElementType

func (SecretState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

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