Copyright | (c) 2013-2018 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
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:
- secretsmanager:UpdateSecretVersionStage
Related operations
- To get the list of staging labels that are currently associated with a version of a secret, use
and examine theDescribeSecret
SecretVersionsToStages
response value.
- updateSecretVersionStage :: Text -> Text -> UpdateSecretVersionStage
- data UpdateSecretVersionStage
- usvsRemoveFromVersionId :: Lens' UpdateSecretVersionStage (Maybe Text)
- usvsMoveToVersionId :: Lens' UpdateSecretVersionStage (Maybe Text)
- usvsSecretId :: Lens' UpdateSecretVersionStage Text
- usvsVersionStage :: Lens' UpdateSecretVersionStage Text
- updateSecretVersionStageResponse :: Int -> UpdateSecretVersionStageResponse
- data UpdateSecretVersionStageResponse
- usvsrsARN :: Lens' UpdateSecretVersionStageResponse (Maybe Text)
- usvsrsName :: Lens' UpdateSecretVersionStageResponse (Maybe Text)
- usvsrsResponseStatus :: Lens' UpdateSecretVersionStageResponse Int
Creating a Request
updateSecretVersionStage Source #
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 theMoveToVersionId
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.
data UpdateSecretVersionStage Source #
See: updateSecretVersionStage
smart constructor.
Request Lenses
usvsRemoveFromVersionId :: Lens' UpdateSecretVersionStage (Maybe Text) Source #
(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 :: Lens' UpdateSecretVersionStage (Maybe Text) Source #
(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 :: Lens' UpdateSecretVersionStage Text Source #
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 :: Lens' UpdateSecretVersionStage Text Source #
The list of staging labels to add to this version.
Destructuring the Response
updateSecretVersionStageResponse Source #
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.
data UpdateSecretVersionStageResponse Source #
See: updateSecretVersionStageResponse
smart constructor.
Response Lenses
usvsrsARN :: Lens' UpdateSecretVersionStageResponse (Maybe Text) Source #
The ARN of the secret with the staging labels that were modified.
usvsrsName :: Lens' UpdateSecretVersionStageResponse (Maybe Text) Source #
The friendly name of the secret with the staging labels that were modified.
usvsrsResponseStatus :: Lens' UpdateSecretVersionStageResponse Int Source #
- - | The response status code.