secretsmanager

package
v0.104.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LookupSecretArgs added in v0.12.0

type LookupSecretArgs struct {
	Id string `pulumi:"id"`
}

type LookupSecretOutputArgs added in v0.12.0

type LookupSecretOutputArgs struct {
	Id pulumi.StringInput `pulumi:"id"`
}

func (LookupSecretOutputArgs) ElementType added in v0.12.0

func (LookupSecretOutputArgs) ElementType() reflect.Type

type LookupSecretResult added in v0.12.0

type LookupSecretResult struct {
	// The description of the secret.
	Description *string `pulumi:"description"`
	Id          *string `pulumi:"id"`
	// The ARN, key ID, or alias of the KMS key that Secrets Manager uses to encrypt the secret value in the secret. An alias is always prefixed by “alias/“, for example “alias/aws/secretsmanager“. For more information, see [About aliases](https://docs.aws.amazon.com/kms/latest/developerguide/alias-about.html).
	//  To use a KMS key in a different account, use the key ARN or the alias ARN.
	//  If you don't specify this value, then Secrets Manager uses the key “aws/secretsmanager“. If that key doesn't yet exist, then Secrets Manager creates it for you automatically the first time it encrypts the secret value.
	//  If the secret is in a different AWS account from the credentials calling the API, then you can't use “aws/secretsmanager“ to encrypt the secret, and you must create and use a customer managed KMS key.
	KmsKeyId *string `pulumi:"kmsKeyId"`
	// A custom type that specifies a “Region“ and the “KmsKeyId“ for a replica secret.
	ReplicaRegions []SecretReplicaRegion `pulumi:"replicaRegions"`
	// A list of tags to attach to the secret. Each tag is a key and value pair of strings in a JSON text string, for example:
	//   “[{"Key":"CostCenter","Value":"12345"},{"Key":"environment","Value":"production"}]“
	//  Secrets Manager tag key names are case sensitive. A tag with the key "ABC" is a different tag from one with key "abc".
	//  Stack-level tags, tags you apply to the CloudFormation stack, are also attached to the secret.
	//  If you check tags in permissions policies as part of your security strategy, then adding or removing a tag can change permissions. If the completion of this operation would result in you losing your permissions for this secret, then Secrets Manager blocks the operation and returns an “Access Denied“ error. For more information, see [Control access to secrets using tags](https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_examples.html#tag-secrets-abac) and [Limit access to identities with tags that match secrets' tags](https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_examples.html#auth-and-access_tags2).
	//  For information about how to format a JSON parameter for the various command line tool environments, see [Using JSON for Parameters](https://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json). If your command-line tool or SDK requires quotation marks around the parameter, you should use single quotes to avoid confusion with the double quotes required in the JSON text.
	//  The following restrictions apply to tags:
	//   +  Maximum number of tags per secret: 50
	//   +  Maximum key length: 127 Unicode characters in UTF-8
	//   +  Maximum value length: 255 Unicode characters in UTF-8
	//   +  Tag keys and values are case sensitive.
	//   +  Do not use the “aws:“ prefix in your tag names or values because AWS reserves it for AWS use. You can't edit or delete tag names or values with this prefix. Tags with this prefix do not count against your tags per secret limit.
	//   +  If you use your tagging schema across multiple services and resources, other services might have restrictions on allowed characters. Generally allowed characters: letters, spaces, and numbers representable in UTF-8, plus the following special characters: + - = . _ : / @.
	Tags []aws.Tag `pulumi:"tags"`
}

func LookupSecret added in v0.12.0

func LookupSecret(ctx *pulumi.Context, args *LookupSecretArgs, opts ...pulumi.InvokeOption) (*LookupSecretResult, error)

Creates a new secret. A *secret* can be a password, a set of credentials such as a user name and password, an OAuth token, or other secret information that you store in an encrypted form in Secrets Manager.

For RDS master user credentials, see [AWS::RDS::DBCluster MasterUserSecret](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbcluster-masterusersecret.html).
To retrieve a secret in a CFNshort template, use a *dynamic reference*. For more information, see [Retrieve a secret in an resource](https://docs.aws.amazon.com/secretsmanager/latest/userguide/cfn-example_reference-secret.html).
A common scenario is to first create a secret with ``GenerateSecretString``, which generates a password, and then use a dynamic reference to retrieve the username and password from the secret to use as credentials for a new database. See the example *Creating a Redshift cluster and a secret for the admin credentials*.
For information about creating a secret in the console, see [Create a secret](https://docs.aws.amazon.com/secretsmanager/latest/userguide/manage_create-basic-secret.html). For information about creating a secret using the CLI or SDK, see [CreateSecret](https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_CreateSecret.html).
For information about retrieving a secret in code, see [Retrieve secrets from Secrets Manager](https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieving-secrets.html).

type LookupSecretResultOutput added in v0.12.0

type LookupSecretResultOutput struct{ *pulumi.OutputState }

func LookupSecretOutput added in v0.12.0

func LookupSecretOutput(ctx *pulumi.Context, args LookupSecretOutputArgs, opts ...pulumi.InvokeOption) LookupSecretResultOutput

func (LookupSecretResultOutput) Description added in v0.12.0

The description of the secret.

func (LookupSecretResultOutput) ElementType added in v0.12.0

func (LookupSecretResultOutput) ElementType() reflect.Type

func (LookupSecretResultOutput) Id added in v0.12.0

func (LookupSecretResultOutput) KmsKeyId added in v0.12.0

The ARN, key ID, or alias of the KMS key that Secrets Manager uses to encrypt the secret value in the secret. An alias is always prefixed by “alias/“, for example “alias/aws/secretsmanager“. For more information, see [About aliases](https://docs.aws.amazon.com/kms/latest/developerguide/alias-about.html).

To use a KMS key in a different account, use the key ARN or the alias ARN.
If you don't specify this value, then Secrets Manager uses the key ``aws/secretsmanager``. If that key doesn't yet exist, then Secrets Manager creates it for you automatically the first time it encrypts the secret value.
If the secret is in a different AWS account from the credentials calling the API, then you can't use ``aws/secretsmanager`` to encrypt the secret, and you must create and use a customer managed KMS key.

func (LookupSecretResultOutput) ReplicaRegions added in v0.12.0

A custom type that specifies a “Region“ and the “KmsKeyId“ for a replica secret.

func (LookupSecretResultOutput) Tags added in v0.12.0

A list of tags to attach to the secret. Each tag is a key and value pair of strings in a JSON text string, for example:

 ``[{"Key":"CostCenter","Value":"12345"},{"Key":"environment","Value":"production"}]``
Secrets Manager tag key names are case sensitive. A tag with the key "ABC" is a different tag from one with key "abc".
Stack-level tags, tags you apply to the CloudFormation stack, are also attached to the secret.
If you check tags in permissions policies as part of your security strategy, then adding or removing a tag can change permissions. If the completion of this operation would result in you losing your permissions for this secret, then Secrets Manager blocks the operation and returns an ``Access Denied`` error. For more information, see [Control access to secrets using tags](https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_examples.html#tag-secrets-abac) and [Limit access to identities with tags that match secrets' tags](https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_examples.html#auth-and-access_tags2).
For information about how to format a JSON parameter for the various command line tool environments, see [Using JSON for Parameters](https://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json). If your command-line tool or SDK requires quotation marks around the parameter, you should use single quotes to avoid confusion with the double quotes required in the JSON text.
The following restrictions apply to tags:
 +  Maximum number of tags per secret: 50
 +  Maximum key length: 127 Unicode characters in UTF-8
 +  Maximum value length: 255 Unicode characters in UTF-8
 +  Tag keys and values are case sensitive.
 +  Do not use the ``aws:`` prefix in your tag names or values because AWS reserves it for AWS use. You can't edit or delete tag names or values with this prefix. Tags with this prefix do not count against your tags per secret limit.
 +  If you use your tagging schema across multiple services and resources, other services might have restrictions on allowed characters. Generally allowed characters: letters, spaces, and numbers representable in UTF-8, plus the following special characters: + - = . _ : / @.

func (LookupSecretResultOutput) ToLookupSecretResultOutput added in v0.12.0

func (o LookupSecretResultOutput) ToLookupSecretResultOutput() LookupSecretResultOutput

func (LookupSecretResultOutput) ToLookupSecretResultOutputWithContext added in v0.12.0

func (o LookupSecretResultOutput) ToLookupSecretResultOutputWithContext(ctx context.Context) LookupSecretResultOutput

type Secret

type Secret struct {
	pulumi.CustomResourceState

	AwsId pulumi.StringOutput `pulumi:"awsId"`
	// The description of the secret.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// A structure that specifies how to generate a password to encrypt and store in the secret. To include a specific string in the secret, use “SecretString“ instead. If you omit both “GenerateSecretString“ and “SecretString“, you create an empty secret. When you make a change to this property, a new secret version is created.
	//  We recommend that you specify the maximum length and include every character type that the system you are generating a password for can support.
	GenerateSecretString SecretGenerateSecretStringPtrOutput `pulumi:"generateSecretString"`
	// The ARN, key ID, or alias of the KMS key that Secrets Manager uses to encrypt the secret value in the secret. An alias is always prefixed by “alias/“, for example “alias/aws/secretsmanager“. For more information, see [About aliases](https://docs.aws.amazon.com/kms/latest/developerguide/alias-about.html).
	//  To use a KMS key in a different account, use the key ARN or the alias ARN.
	//  If you don't specify this value, then Secrets Manager uses the key “aws/secretsmanager“. If that key doesn't yet exist, then Secrets Manager creates it for you automatically the first time it encrypts the secret value.
	//  If the secret is in a different AWS account from the credentials calling the API, then you can't use “aws/secretsmanager“ to encrypt the secret, and you must create and use a customer managed KMS key.
	KmsKeyId pulumi.StringPtrOutput `pulumi:"kmsKeyId"`
	// The name of the new secret.
	//  The secret name can contain ASCII letters, numbers, and the following characters: /_+=.@-
	//  Do not end your secret name with a hyphen followed by six characters. If you do so, you risk confusion and unexpected results when searching for a secret by partial ARN. Secrets Manager automatically adds a hyphen and six random characters after the secret name at the end of the ARN.
	Name pulumi.StringPtrOutput `pulumi:"name"`
	// A custom type that specifies a “Region“ and the “KmsKeyId“ for a replica secret.
	ReplicaRegions SecretReplicaRegionArrayOutput `pulumi:"replicaRegions"`
	// The text to encrypt and store in the secret. We recommend you use a JSON structure of key/value pairs for your secret value. To generate a random password, use “GenerateSecretString“ instead. If you omit both “GenerateSecretString“ and “SecretString“, you create an empty secret. When you make a change to this property, a new secret version is created.
	SecretString pulumi.StringPtrOutput `pulumi:"secretString"`
	// A list of tags to attach to the secret. Each tag is a key and value pair of strings in a JSON text string, for example:
	//   “[{"Key":"CostCenter","Value":"12345"},{"Key":"environment","Value":"production"}]“
	//  Secrets Manager tag key names are case sensitive. A tag with the key "ABC" is a different tag from one with key "abc".
	//  Stack-level tags, tags you apply to the CloudFormation stack, are also attached to the secret.
	//  If you check tags in permissions policies as part of your security strategy, then adding or removing a tag can change permissions. If the completion of this operation would result in you losing your permissions for this secret, then Secrets Manager blocks the operation and returns an “Access Denied“ error. For more information, see [Control access to secrets using tags](https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_examples.html#tag-secrets-abac) and [Limit access to identities with tags that match secrets' tags](https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_examples.html#auth-and-access_tags2).
	//  For information about how to format a JSON parameter for the various command line tool environments, see [Using JSON for Parameters](https://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json). If your command-line tool or SDK requires quotation marks around the parameter, you should use single quotes to avoid confusion with the double quotes required in the JSON text.
	//  The following restrictions apply to tags:
	//   +  Maximum number of tags per secret: 50
	//   +  Maximum key length: 127 Unicode characters in UTF-8
	//   +  Maximum value length: 255 Unicode characters in UTF-8
	//   +  Tag keys and values are case sensitive.
	//   +  Do not use the “aws:“ prefix in your tag names or values because AWS reserves it for AWS use. You can't edit or delete tag names or values with this prefix. Tags with this prefix do not count against your tags per secret limit.
	//   +  If you use your tagging schema across multiple services and resources, other services might have restrictions on allowed characters. Generally allowed characters: letters, spaces, and numbers representable in UTF-8, plus the following special characters: + - = . _ : / @.
	Tags aws.TagArrayOutput `pulumi:"tags"`
}

Creates a new secret. A *secret* can be a password, a set of credentials such as a user name and password, an OAuth token, or other secret information that you store in an encrypted form in Secrets Manager.

For RDS master user credentials, see [AWS::RDS::DBCluster MasterUserSecret](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbcluster-masterusersecret.html).
To retrieve a secret in a CFNshort template, use a *dynamic reference*. For more information, see [Retrieve a secret in an resource](https://docs.aws.amazon.com/secretsmanager/latest/userguide/cfn-example_reference-secret.html).
A common scenario is to first create a secret with ``GenerateSecretString``, which generates a password, and then use a dynamic reference to retrieve the username and password from the secret to use as credentials for a new database. See the example *Creating a Redshift cluster and a secret for the admin credentials*.
For information about creating a secret in the console, see [Create a secret](https://docs.aws.amazon.com/secretsmanager/latest/userguide/manage_create-basic-secret.html). For information about creating a secret using the CLI or SDK, see [CreateSecret](https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_CreateSecret.html).
For information about retrieving a secret in code, see [Retrieve secrets from Secrets Manager](https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieving-secrets.html).

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
	// A structure that specifies how to generate a password to encrypt and store in the secret. To include a specific string in the secret, use “SecretString“ instead. If you omit both “GenerateSecretString“ and “SecretString“, you create an empty secret. When you make a change to this property, a new secret version is created.
	//  We recommend that you specify the maximum length and include every character type that the system you are generating a password for can support.
	GenerateSecretString SecretGenerateSecretStringPtrInput
	// The ARN, key ID, or alias of the KMS key that Secrets Manager uses to encrypt the secret value in the secret. An alias is always prefixed by “alias/“, for example “alias/aws/secretsmanager“. For more information, see [About aliases](https://docs.aws.amazon.com/kms/latest/developerguide/alias-about.html).
	//  To use a KMS key in a different account, use the key ARN or the alias ARN.
	//  If you don't specify this value, then Secrets Manager uses the key “aws/secretsmanager“. If that key doesn't yet exist, then Secrets Manager creates it for you automatically the first time it encrypts the secret value.
	//  If the secret is in a different AWS account from the credentials calling the API, then you can't use “aws/secretsmanager“ to encrypt the secret, and you must create and use a customer managed KMS key.
	KmsKeyId pulumi.StringPtrInput
	// The name of the new secret.
	//  The secret name can contain ASCII letters, numbers, and the following characters: /_+=.@-
	//  Do not end your secret name with a hyphen followed by six characters. If you do so, you risk confusion and unexpected results when searching for a secret by partial ARN. Secrets Manager automatically adds a hyphen and six random characters after the secret name at the end of the ARN.
	Name pulumi.StringPtrInput
	// A custom type that specifies a “Region“ and the “KmsKeyId“ for a replica secret.
	ReplicaRegions SecretReplicaRegionArrayInput
	// The text to encrypt and store in the secret. We recommend you use a JSON structure of key/value pairs for your secret value. To generate a random password, use “GenerateSecretString“ instead. If you omit both “GenerateSecretString“ and “SecretString“, you create an empty secret. When you make a change to this property, a new secret version is created.
	SecretString pulumi.StringPtrInput
	// A list of tags to attach to the secret. Each tag is a key and value pair of strings in a JSON text string, for example:
	//   “[{"Key":"CostCenter","Value":"12345"},{"Key":"environment","Value":"production"}]“
	//  Secrets Manager tag key names are case sensitive. A tag with the key "ABC" is a different tag from one with key "abc".
	//  Stack-level tags, tags you apply to the CloudFormation stack, are also attached to the secret.
	//  If you check tags in permissions policies as part of your security strategy, then adding or removing a tag can change permissions. If the completion of this operation would result in you losing your permissions for this secret, then Secrets Manager blocks the operation and returns an “Access Denied“ error. For more information, see [Control access to secrets using tags](https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_examples.html#tag-secrets-abac) and [Limit access to identities with tags that match secrets' tags](https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_examples.html#auth-and-access_tags2).
	//  For information about how to format a JSON parameter for the various command line tool environments, see [Using JSON for Parameters](https://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json). If your command-line tool or SDK requires quotation marks around the parameter, you should use single quotes to avoid confusion with the double quotes required in the JSON text.
	//  The following restrictions apply to tags:
	//   +  Maximum number of tags per secret: 50
	//   +  Maximum key length: 127 Unicode characters in UTF-8
	//   +  Maximum value length: 255 Unicode characters in UTF-8
	//   +  Tag keys and values are case sensitive.
	//   +  Do not use the “aws:“ prefix in your tag names or values because AWS reserves it for AWS use. You can't edit or delete tag names or values with this prefix. Tags with this prefix do not count against your tags per secret limit.
	//   +  If you use your tagging schema across multiple services and resources, other services might have restrictions on allowed characters. Generally allowed characters: letters, spaces, and numbers representable in UTF-8, plus the following special characters: + - = . _ : / @.
	Tags aws.TagArrayInput
}

The set of arguments for constructing a Secret resource.

func (SecretArgs) ElementType

func (SecretArgs) ElementType() reflect.Type

type SecretGenerateSecretString

type SecretGenerateSecretString struct {
	// A string of the characters that you don't want in the password.
	ExcludeCharacters *string `pulumi:"excludeCharacters"`
	// Specifies whether to exclude lowercase letters from the password. If you don't include this switch, the password can contain lowercase letters.
	ExcludeLowercase *bool `pulumi:"excludeLowercase"`
	// Specifies whether to exclude numbers from the password. If you don't include this switch, the password can contain numbers.
	ExcludeNumbers *bool `pulumi:"excludeNumbers"`
	// Specifies whether to exclude the following punctuation characters from the password: “! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~“. If you don't include this switch, the password can contain punctuation.
	ExcludePunctuation *bool `pulumi:"excludePunctuation"`
	// Specifies whether to exclude uppercase letters from the password. If you don't include this switch, the password can contain uppercase letters.
	ExcludeUppercase *bool `pulumi:"excludeUppercase"`
	// The JSON key name for the key/value pair, where the value is the generated password. This pair is added to the JSON structure specified by the “SecretStringTemplate“ parameter. If you specify this parameter, then you must also specify “SecretStringTemplate“.
	GenerateStringKey *string `pulumi:"generateStringKey"`
	// Specifies whether to include the space character. If you include this switch, the password can contain space characters.
	IncludeSpace *bool `pulumi:"includeSpace"`
	// The length of the password. If you don't include this parameter, the default length is 32 characters.
	PasswordLength *int `pulumi:"passwordLength"`
	// Specifies whether to include at least one upper and lowercase letter, one number, and one punctuation. If you don't include this switch, the password contains at least one of every character type.
	RequireEachIncludedType *bool `pulumi:"requireEachIncludedType"`
	// A template that the generated string must match. When you make a change to this property, a new secret version is created.
	SecretStringTemplate *string `pulumi:"secretStringTemplate"`
}

Generates a random password. We recommend that you specify the maximum length and include every character type that the system you are generating a password for can support.

*Required permissions:* ``secretsmanager:GetRandomPassword``. For more information, see [IAM policy actions for Secrets Manager](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions) and [Authentication and access control in Secrets Manager](https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html).

type SecretGenerateSecretStringArgs

type SecretGenerateSecretStringArgs struct {
	// A string of the characters that you don't want in the password.
	ExcludeCharacters pulumi.StringPtrInput `pulumi:"excludeCharacters"`
	// Specifies whether to exclude lowercase letters from the password. If you don't include this switch, the password can contain lowercase letters.
	ExcludeLowercase pulumi.BoolPtrInput `pulumi:"excludeLowercase"`
	// Specifies whether to exclude numbers from the password. If you don't include this switch, the password can contain numbers.
	ExcludeNumbers pulumi.BoolPtrInput `pulumi:"excludeNumbers"`
	// Specifies whether to exclude the following punctuation characters from the password: “! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~“. If you don't include this switch, the password can contain punctuation.
	ExcludePunctuation pulumi.BoolPtrInput `pulumi:"excludePunctuation"`
	// Specifies whether to exclude uppercase letters from the password. If you don't include this switch, the password can contain uppercase letters.
	ExcludeUppercase pulumi.BoolPtrInput `pulumi:"excludeUppercase"`
	// The JSON key name for the key/value pair, where the value is the generated password. This pair is added to the JSON structure specified by the “SecretStringTemplate“ parameter. If you specify this parameter, then you must also specify “SecretStringTemplate“.
	GenerateStringKey pulumi.StringPtrInput `pulumi:"generateStringKey"`
	// Specifies whether to include the space character. If you include this switch, the password can contain space characters.
	IncludeSpace pulumi.BoolPtrInput `pulumi:"includeSpace"`
	// The length of the password. If you don't include this parameter, the default length is 32 characters.
	PasswordLength pulumi.IntPtrInput `pulumi:"passwordLength"`
	// Specifies whether to include at least one upper and lowercase letter, one number, and one punctuation. If you don't include this switch, the password contains at least one of every character type.
	RequireEachIncludedType pulumi.BoolPtrInput `pulumi:"requireEachIncludedType"`
	// A template that the generated string must match. When you make a change to this property, a new secret version is created.
	SecretStringTemplate pulumi.StringPtrInput `pulumi:"secretStringTemplate"`
}

Generates a random password. We recommend that you specify the maximum length and include every character type that the system you are generating a password for can support.

*Required permissions:* ``secretsmanager:GetRandomPassword``. For more information, see [IAM policy actions for Secrets Manager](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions) and [Authentication and access control in Secrets Manager](https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html).

func (SecretGenerateSecretStringArgs) ElementType

func (SecretGenerateSecretStringArgs) ToSecretGenerateSecretStringOutput

func (i SecretGenerateSecretStringArgs) ToSecretGenerateSecretStringOutput() SecretGenerateSecretStringOutput

func (SecretGenerateSecretStringArgs) ToSecretGenerateSecretStringOutputWithContext

func (i SecretGenerateSecretStringArgs) ToSecretGenerateSecretStringOutputWithContext(ctx context.Context) SecretGenerateSecretStringOutput

func (SecretGenerateSecretStringArgs) ToSecretGenerateSecretStringPtrOutput

func (i SecretGenerateSecretStringArgs) ToSecretGenerateSecretStringPtrOutput() SecretGenerateSecretStringPtrOutput

func (SecretGenerateSecretStringArgs) ToSecretGenerateSecretStringPtrOutputWithContext

func (i SecretGenerateSecretStringArgs) ToSecretGenerateSecretStringPtrOutputWithContext(ctx context.Context) SecretGenerateSecretStringPtrOutput

type SecretGenerateSecretStringInput

type SecretGenerateSecretStringInput interface {
	pulumi.Input

	ToSecretGenerateSecretStringOutput() SecretGenerateSecretStringOutput
	ToSecretGenerateSecretStringOutputWithContext(context.Context) SecretGenerateSecretStringOutput
}

SecretGenerateSecretStringInput is an input type that accepts SecretGenerateSecretStringArgs and SecretGenerateSecretStringOutput values. You can construct a concrete instance of `SecretGenerateSecretStringInput` via:

SecretGenerateSecretStringArgs{...}

type SecretGenerateSecretStringOutput

type SecretGenerateSecretStringOutput struct{ *pulumi.OutputState }

Generates a random password. We recommend that you specify the maximum length and include every character type that the system you are generating a password for can support.

*Required permissions:* ``secretsmanager:GetRandomPassword``. For more information, see [IAM policy actions for Secrets Manager](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions) and [Authentication and access control in Secrets Manager](https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html).

func (SecretGenerateSecretStringOutput) ElementType

func (SecretGenerateSecretStringOutput) ExcludeCharacters

A string of the characters that you don't want in the password.

func (SecretGenerateSecretStringOutput) ExcludeLowercase

Specifies whether to exclude lowercase letters from the password. If you don't include this switch, the password can contain lowercase letters.

func (SecretGenerateSecretStringOutput) ExcludeNumbers

Specifies whether to exclude numbers from the password. If you don't include this switch, the password can contain numbers.

func (SecretGenerateSecretStringOutput) ExcludePunctuation

func (o SecretGenerateSecretStringOutput) ExcludePunctuation() pulumi.BoolPtrOutput

Specifies whether to exclude the following punctuation characters from the password: “! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~“. If you don't include this switch, the password can contain punctuation.

func (SecretGenerateSecretStringOutput) ExcludeUppercase

Specifies whether to exclude uppercase letters from the password. If you don't include this switch, the password can contain uppercase letters.

func (SecretGenerateSecretStringOutput) GenerateStringKey

The JSON key name for the key/value pair, where the value is the generated password. This pair is added to the JSON structure specified by the “SecretStringTemplate“ parameter. If you specify this parameter, then you must also specify “SecretStringTemplate“.

func (SecretGenerateSecretStringOutput) IncludeSpace

Specifies whether to include the space character. If you include this switch, the password can contain space characters.

func (SecretGenerateSecretStringOutput) PasswordLength

The length of the password. If you don't include this parameter, the default length is 32 characters.

func (SecretGenerateSecretStringOutput) RequireEachIncludedType

func (o SecretGenerateSecretStringOutput) RequireEachIncludedType() pulumi.BoolPtrOutput

Specifies whether to include at least one upper and lowercase letter, one number, and one punctuation. If you don't include this switch, the password contains at least one of every character type.

func (SecretGenerateSecretStringOutput) SecretStringTemplate

func (o SecretGenerateSecretStringOutput) SecretStringTemplate() pulumi.StringPtrOutput

A template that the generated string must match. When you make a change to this property, a new secret version is created.

func (SecretGenerateSecretStringOutput) ToSecretGenerateSecretStringOutput

func (o SecretGenerateSecretStringOutput) ToSecretGenerateSecretStringOutput() SecretGenerateSecretStringOutput

func (SecretGenerateSecretStringOutput) ToSecretGenerateSecretStringOutputWithContext

func (o SecretGenerateSecretStringOutput) ToSecretGenerateSecretStringOutputWithContext(ctx context.Context) SecretGenerateSecretStringOutput

func (SecretGenerateSecretStringOutput) ToSecretGenerateSecretStringPtrOutput

func (o SecretGenerateSecretStringOutput) ToSecretGenerateSecretStringPtrOutput() SecretGenerateSecretStringPtrOutput

func (SecretGenerateSecretStringOutput) ToSecretGenerateSecretStringPtrOutputWithContext

func (o SecretGenerateSecretStringOutput) ToSecretGenerateSecretStringPtrOutputWithContext(ctx context.Context) SecretGenerateSecretStringPtrOutput

type SecretGenerateSecretStringPtrInput

type SecretGenerateSecretStringPtrInput interface {
	pulumi.Input

	ToSecretGenerateSecretStringPtrOutput() SecretGenerateSecretStringPtrOutput
	ToSecretGenerateSecretStringPtrOutputWithContext(context.Context) SecretGenerateSecretStringPtrOutput
}

SecretGenerateSecretStringPtrInput is an input type that accepts SecretGenerateSecretStringArgs, SecretGenerateSecretStringPtr and SecretGenerateSecretStringPtrOutput values. You can construct a concrete instance of `SecretGenerateSecretStringPtrInput` via:

        SecretGenerateSecretStringArgs{...}

or:

        nil

type SecretGenerateSecretStringPtrOutput

type SecretGenerateSecretStringPtrOutput struct{ *pulumi.OutputState }

func (SecretGenerateSecretStringPtrOutput) Elem

func (SecretGenerateSecretStringPtrOutput) ElementType

func (SecretGenerateSecretStringPtrOutput) ExcludeCharacters

A string of the characters that you don't want in the password.

func (SecretGenerateSecretStringPtrOutput) ExcludeLowercase

Specifies whether to exclude lowercase letters from the password. If you don't include this switch, the password can contain lowercase letters.

func (SecretGenerateSecretStringPtrOutput) ExcludeNumbers

Specifies whether to exclude numbers from the password. If you don't include this switch, the password can contain numbers.

func (SecretGenerateSecretStringPtrOutput) ExcludePunctuation

Specifies whether to exclude the following punctuation characters from the password: “! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~“. If you don't include this switch, the password can contain punctuation.

func (SecretGenerateSecretStringPtrOutput) ExcludeUppercase

Specifies whether to exclude uppercase letters from the password. If you don't include this switch, the password can contain uppercase letters.

func (SecretGenerateSecretStringPtrOutput) GenerateStringKey

The JSON key name for the key/value pair, where the value is the generated password. This pair is added to the JSON structure specified by the “SecretStringTemplate“ parameter. If you specify this parameter, then you must also specify “SecretStringTemplate“.

func (SecretGenerateSecretStringPtrOutput) IncludeSpace

Specifies whether to include the space character. If you include this switch, the password can contain space characters.

func (SecretGenerateSecretStringPtrOutput) PasswordLength

The length of the password. If you don't include this parameter, the default length is 32 characters.

func (SecretGenerateSecretStringPtrOutput) RequireEachIncludedType

func (o SecretGenerateSecretStringPtrOutput) RequireEachIncludedType() pulumi.BoolPtrOutput

Specifies whether to include at least one upper and lowercase letter, one number, and one punctuation. If you don't include this switch, the password contains at least one of every character type.

func (SecretGenerateSecretStringPtrOutput) SecretStringTemplate

A template that the generated string must match. When you make a change to this property, a new secret version is created.

func (SecretGenerateSecretStringPtrOutput) ToSecretGenerateSecretStringPtrOutput

func (o SecretGenerateSecretStringPtrOutput) ToSecretGenerateSecretStringPtrOutput() SecretGenerateSecretStringPtrOutput

func (SecretGenerateSecretStringPtrOutput) ToSecretGenerateSecretStringPtrOutputWithContext

func (o SecretGenerateSecretStringPtrOutput) ToSecretGenerateSecretStringPtrOutputWithContext(ctx context.Context) SecretGenerateSecretStringPtrOutput

type SecretInput

type SecretInput interface {
	pulumi.Input

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

type SecretOutput

type SecretOutput struct{ *pulumi.OutputState }

func (SecretOutput) AwsId added in v0.99.0

func (o SecretOutput) AwsId() pulumi.StringOutput

func (SecretOutput) Description added in v0.17.0

func (o SecretOutput) Description() pulumi.StringPtrOutput

The description of the secret.

func (SecretOutput) ElementType

func (SecretOutput) ElementType() reflect.Type

func (SecretOutput) GenerateSecretString added in v0.17.0

func (o SecretOutput) GenerateSecretString() SecretGenerateSecretStringPtrOutput

A structure that specifies how to generate a password to encrypt and store in the secret. To include a specific string in the secret, use “SecretString“ instead. If you omit both “GenerateSecretString“ and “SecretString“, you create an empty secret. When you make a change to this property, a new secret version is created.

We recommend that you specify the maximum length and include every character type that the system you are generating a password for can support.

func (SecretOutput) KmsKeyId added in v0.17.0

func (o SecretOutput) KmsKeyId() pulumi.StringPtrOutput

The ARN, key ID, or alias of the KMS key that Secrets Manager uses to encrypt the secret value in the secret. An alias is always prefixed by “alias/“, for example “alias/aws/secretsmanager“. For more information, see [About aliases](https://docs.aws.amazon.com/kms/latest/developerguide/alias-about.html).

To use a KMS key in a different account, use the key ARN or the alias ARN.
If you don't specify this value, then Secrets Manager uses the key ``aws/secretsmanager``. If that key doesn't yet exist, then Secrets Manager creates it for you automatically the first time it encrypts the secret value.
If the secret is in a different AWS account from the credentials calling the API, then you can't use ``aws/secretsmanager`` to encrypt the secret, and you must create and use a customer managed KMS key.

func (SecretOutput) Name added in v0.17.0

The name of the new secret.

The secret name can contain ASCII letters, numbers, and the following characters: /_+=.@-
Do not end your secret name with a hyphen followed by six characters. If you do so, you risk confusion and unexpected results when searching for a secret by partial ARN. Secrets Manager automatically adds a hyphen and six random characters after the secret name at the end of the ARN.

func (SecretOutput) ReplicaRegions added in v0.17.0

func (o SecretOutput) ReplicaRegions() SecretReplicaRegionArrayOutput

A custom type that specifies a “Region“ and the “KmsKeyId“ for a replica secret.

func (SecretOutput) SecretString added in v0.17.0

func (o SecretOutput) SecretString() pulumi.StringPtrOutput

The text to encrypt and store in the secret. We recommend you use a JSON structure of key/value pairs for your secret value. To generate a random password, use “GenerateSecretString“ instead. If you omit both “GenerateSecretString“ and “SecretString“, you create an empty secret. When you make a change to this property, a new secret version is created.

func (SecretOutput) Tags added in v0.17.0

func (o SecretOutput) Tags() aws.TagArrayOutput

A list of tags to attach to the secret. Each tag is a key and value pair of strings in a JSON text string, for example:

 ``[{"Key":"CostCenter","Value":"12345"},{"Key":"environment","Value":"production"}]``
Secrets Manager tag key names are case sensitive. A tag with the key "ABC" is a different tag from one with key "abc".
Stack-level tags, tags you apply to the CloudFormation stack, are also attached to the secret.
If you check tags in permissions policies as part of your security strategy, then adding or removing a tag can change permissions. If the completion of this operation would result in you losing your permissions for this secret, then Secrets Manager blocks the operation and returns an ``Access Denied`` error. For more information, see [Control access to secrets using tags](https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_examples.html#tag-secrets-abac) and [Limit access to identities with tags that match secrets' tags](https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_examples.html#auth-and-access_tags2).
For information about how to format a JSON parameter for the various command line tool environments, see [Using JSON for Parameters](https://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json). If your command-line tool or SDK requires quotation marks around the parameter, you should use single quotes to avoid confusion with the double quotes required in the JSON text.
The following restrictions apply to tags:
 +  Maximum number of tags per secret: 50
 +  Maximum key length: 127 Unicode characters in UTF-8
 +  Maximum value length: 255 Unicode characters in UTF-8
 +  Tag keys and values are case sensitive.
 +  Do not use the ``aws:`` prefix in your tag names or values because AWS reserves it for AWS use. You can't edit or delete tag names or values with this prefix. Tags with this prefix do not count against your tags per secret limit.
 +  If you use your tagging schema across multiple services and resources, other services might have restrictions on allowed characters. Generally allowed characters: letters, spaces, and numbers representable in UTF-8, plus the following special characters: + - = . _ : / @.

func (SecretOutput) ToSecretOutput

func (o SecretOutput) ToSecretOutput() SecretOutput

func (SecretOutput) ToSecretOutputWithContext

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

type SecretReplicaRegion

type SecretReplicaRegion struct {
	// The ARN, key ID, or alias of the KMS key to encrypt the secret. If you don't include this field, Secrets Manager uses “aws/secretsmanager“.
	KmsKeyId *string `pulumi:"kmsKeyId"`
	// A string that represents a “Region“, for example "us-east-1".
	Region string `pulumi:"region"`
}

Specifies a “Region“ and the “KmsKeyId“ for a replica secret.

type SecretReplicaRegionArgs

type SecretReplicaRegionArgs struct {
	// The ARN, key ID, or alias of the KMS key to encrypt the secret. If you don't include this field, Secrets Manager uses “aws/secretsmanager“.
	KmsKeyId pulumi.StringPtrInput `pulumi:"kmsKeyId"`
	// A string that represents a “Region“, for example "us-east-1".
	Region pulumi.StringInput `pulumi:"region"`
}

Specifies a “Region“ and the “KmsKeyId“ for a replica secret.

func (SecretReplicaRegionArgs) ElementType

func (SecretReplicaRegionArgs) ElementType() reflect.Type

func (SecretReplicaRegionArgs) ToSecretReplicaRegionOutput

func (i SecretReplicaRegionArgs) ToSecretReplicaRegionOutput() SecretReplicaRegionOutput

func (SecretReplicaRegionArgs) ToSecretReplicaRegionOutputWithContext

func (i SecretReplicaRegionArgs) ToSecretReplicaRegionOutputWithContext(ctx context.Context) SecretReplicaRegionOutput

type SecretReplicaRegionArray

type SecretReplicaRegionArray []SecretReplicaRegionInput

func (SecretReplicaRegionArray) ElementType

func (SecretReplicaRegionArray) ElementType() reflect.Type

func (SecretReplicaRegionArray) ToSecretReplicaRegionArrayOutput

func (i SecretReplicaRegionArray) ToSecretReplicaRegionArrayOutput() SecretReplicaRegionArrayOutput

func (SecretReplicaRegionArray) ToSecretReplicaRegionArrayOutputWithContext

func (i SecretReplicaRegionArray) ToSecretReplicaRegionArrayOutputWithContext(ctx context.Context) SecretReplicaRegionArrayOutput

type SecretReplicaRegionArrayInput

type SecretReplicaRegionArrayInput interface {
	pulumi.Input

	ToSecretReplicaRegionArrayOutput() SecretReplicaRegionArrayOutput
	ToSecretReplicaRegionArrayOutputWithContext(context.Context) SecretReplicaRegionArrayOutput
}

SecretReplicaRegionArrayInput is an input type that accepts SecretReplicaRegionArray and SecretReplicaRegionArrayOutput values. You can construct a concrete instance of `SecretReplicaRegionArrayInput` via:

SecretReplicaRegionArray{ SecretReplicaRegionArgs{...} }

type SecretReplicaRegionArrayOutput

type SecretReplicaRegionArrayOutput struct{ *pulumi.OutputState }

func (SecretReplicaRegionArrayOutput) ElementType

func (SecretReplicaRegionArrayOutput) Index

func (SecretReplicaRegionArrayOutput) ToSecretReplicaRegionArrayOutput

func (o SecretReplicaRegionArrayOutput) ToSecretReplicaRegionArrayOutput() SecretReplicaRegionArrayOutput

func (SecretReplicaRegionArrayOutput) ToSecretReplicaRegionArrayOutputWithContext

func (o SecretReplicaRegionArrayOutput) ToSecretReplicaRegionArrayOutputWithContext(ctx context.Context) SecretReplicaRegionArrayOutput

type SecretReplicaRegionInput

type SecretReplicaRegionInput interface {
	pulumi.Input

	ToSecretReplicaRegionOutput() SecretReplicaRegionOutput
	ToSecretReplicaRegionOutputWithContext(context.Context) SecretReplicaRegionOutput
}

SecretReplicaRegionInput is an input type that accepts SecretReplicaRegionArgs and SecretReplicaRegionOutput values. You can construct a concrete instance of `SecretReplicaRegionInput` via:

SecretReplicaRegionArgs{...}

type SecretReplicaRegionOutput

type SecretReplicaRegionOutput struct{ *pulumi.OutputState }

Specifies a “Region“ and the “KmsKeyId“ for a replica secret.

func (SecretReplicaRegionOutput) ElementType

func (SecretReplicaRegionOutput) ElementType() reflect.Type

func (SecretReplicaRegionOutput) KmsKeyId

The ARN, key ID, or alias of the KMS key to encrypt the secret. If you don't include this field, Secrets Manager uses “aws/secretsmanager“.

func (SecretReplicaRegionOutput) Region

A string that represents a “Region“, for example "us-east-1".

func (SecretReplicaRegionOutput) ToSecretReplicaRegionOutput

func (o SecretReplicaRegionOutput) ToSecretReplicaRegionOutput() SecretReplicaRegionOutput

func (SecretReplicaRegionOutput) ToSecretReplicaRegionOutputWithContext

func (o SecretReplicaRegionOutput) ToSecretReplicaRegionOutputWithContext(ctx context.Context) SecretReplicaRegionOutput

type SecretState

type SecretState struct {
}

func (SecretState) ElementType

func (SecretState) ElementType() reflect.Type

type SecretTag

type SecretTag struct {
	// The key identifier, or name, of the tag.
	Key string `pulumi:"key"`
	// The string value associated with the key of the tag.
	Value string `pulumi:"value"`
}

A structure that contains information about a tag.

Jump to

Keyboard shortcuts

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