amazonka-secretsmanager-1.6.1: Amazon Secrets Manager SDK.

Copyright (c) 2013-2018 Brendan Hay Mozilla Public License, v. 2.0. Brendan Hay auto-generated non-portable (GHC extensions) None Haskell2010

Description

Modifies the staging labels attached to a version of a secret. Staging labels are used to track a version as it progresses through the secret rotation process. You can attach a staging label to only one version of a secret at a time. If a staging label to be added is already attached to another version, then it is moved--removed from the other version first and then attached to this one. For more information about staging labels, see Staging Labels in the AWS Secrets Manager User Guide .

The staging labels that you specify in the VersionStage parameter are added to the existing list of staging labels--they don't replace it.

You can move the AWSCURRENT staging label to this version by including it in this call.

If this action results in the last label being removed from a version, then the version is considered to be deprecated and can be deleted by Secrets Manager.

Minimum permissions

To run this command, you must have the following permissions:

Related operations

• To get the list of staging labels that are currently associated with a version of a secret, use DescribeSecret  and examine the SecretVersionsToStages response value.
Synopsis

# Creating a Request

Arguments

 :: Text usvsSecretId -> Text usvsVersionStage -> UpdateSecretVersionStage

Creates a value of UpdateSecretVersionStage with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

• usvsRemoveFromVersionId - (Optional) Specifies the secret version ID of the version that the staging labels are to be removed from. If you want to move a label to a new version, you do not have to explicitly remove it with this parameter. Adding a label using the MoveToVersionId parameter automatically removes it from the old version. However, if you do include both the MoveTo and RemoveFrom parameters, then the move is successful only if the staging labels are actually present on the RemoveFrom version. If a staging label was on a different version than RemoveFrom, then the request fails.
• usvsMoveToVersionId - (Optional) The secret version ID that you want to add the staging labels to. If any of the staging labels are already attached to a different version of the secret, then they are removed from that version before adding them to this version.
• usvsSecretId - Specifies the secret with the version whose list of staging labels you want to modify. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret.
• usvsVersionStage - The list of staging labels to add to this version.

See: updateSecretVersionStage smart constructor.

Instances

# Request Lenses

(Optional) Specifies the secret version ID of the version that the staging labels are to be removed from. If you want to move a label to a new version, you do not have to explicitly remove it with this parameter. Adding a label using the MoveToVersionId parameter automatically removes it from the old version. However, if you do include both the MoveTo and RemoveFrom parameters, then the move is successful only if the staging labels are actually present on the RemoveFrom version. If a staging label was on a different version than RemoveFrom, then the request fails.

(Optional) The secret version ID that you want to add the staging labels to. If any of the staging labels are already attached to a different version of the secret, then they are removed from that version before adding them to this version.

Specifies the secret with the version whose list of staging labels you want to modify. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret.

The list of staging labels to add to this version.

# Destructuring the Response

Arguments

 :: Int usvsrsResponseStatus -> UpdateSecretVersionStageResponse

Creates a value of UpdateSecretVersionStageResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

• usvsrsARN - The ARN of the secret with the staging labels that were modified.
• usvsrsName - The friendly name of the secret with the staging labels that were modified.
• usvsrsResponseStatus - -- | The response status code.

See: updateSecretVersionStageResponse smart constructor.

Instances