View source: R/secretsmanager_operations.R
secretsmanager_create_secret | R Documentation |
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. The secret also includes the connection information to access a database or other service, which Secrets Manager doesn't encrypt. A secret in Secrets Manager consists of both the protected secret data and the important information needed to manage the secret.
See https://www.paws-r-sdk.com/docs/secretsmanager_create_secret/ for full documentation.
secretsmanager_create_secret(
Name,
ClientRequestToken = NULL,
Description = NULL,
KmsKeyId = NULL,
SecretBinary = NULL,
SecretString = NULL,
Tags = NULL,
AddReplicaRegions = NULL,
ForceOverwriteReplicaSecret = NULL
)
Name |
[required] 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. |
ClientRequestToken |
If you include If you use the Amazon Web Services CLI or one of the Amazon Web Services SDKs to call this operation, then you can leave this parameter empty. The CLI or SDK generates a random UUID for you and includes it as the value for this parameter in the request. If you generate a raw HTTP request to the Secrets Manager service
endpoint, then you must generate a This value helps ensure idempotency. Secrets Manager uses this value to prevent the accidental creation of duplicate versions if there are failures and retries during a rotation. We recommend that you generate a UUID-type value to ensure uniqueness of your versions within the specified secret.
This value becomes the |
Description |
The description of the secret. |
KmsKeyId |
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
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
If the secret is in a different Amazon Web Services account from the
credentials calling the API, then you can't use |
SecretBinary |
The binary data to encrypt and store in the new version of the secret. We recommend that you store your binary data in a file and then pass the contents of the file as a parameter. Either This parameter is not available in the Secrets Manager console. Sensitive: This field contains sensitive information, so the service does not include it in CloudTrail log entries. If you create your own log entries, you must also avoid logging the information in this field. |
SecretString |
The text data to encrypt and store in this new version of the secret. We recommend you use a JSON structure of key/value pairs for your secret value. Either If you create a secret by using the Secrets Manager console then Secrets
Manager puts the protected secret text in only the Sensitive: This field contains sensitive information, so the service does not include it in CloudTrail log entries. If you create your own log entries, you must also avoid logging the information in this field. |
Tags |
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:
Secrets Manager tag key names are case sensitive. A tag with the key "ABC" is a different tag from one with key "abc". 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 For information about how to format a JSON parameter for the various command line tool environments, see Using JSON for Parameters. 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. For tag quotas and naming restrictions, see Service quotas for Tagging in the Amazon Web Services General Reference guide. |
AddReplicaRegions |
A list of Regions and KMS keys to replicate secrets. |
ForceOverwriteReplicaSecret |
Specifies whether to overwrite a secret with the same name in the destination Region. By default, secrets aren't overwritten. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.