amazonka-secretsmanager-1.6.0: Amazon Secrets Manager SDK.

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.SecretsManager.UpdateSecretVersionStage

Contents

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:

  • secretsmanager:UpdateSecretVersionStage

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

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 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.

data UpdateSecretVersionStage Source #

See: updateSecretVersionStage smart constructor.

Instances

Eq UpdateSecretVersionStage Source # 
Data UpdateSecretVersionStage Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UpdateSecretVersionStage -> c UpdateSecretVersionStage #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UpdateSecretVersionStage #

toConstr :: UpdateSecretVersionStage -> Constr #

dataTypeOf :: UpdateSecretVersionStage -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c UpdateSecretVersionStage) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UpdateSecretVersionStage) #

gmapT :: (forall b. Data b => b -> b) -> UpdateSecretVersionStage -> UpdateSecretVersionStage #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UpdateSecretVersionStage -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UpdateSecretVersionStage -> r #

gmapQ :: (forall d. Data d => d -> u) -> UpdateSecretVersionStage -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> UpdateSecretVersionStage -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> UpdateSecretVersionStage -> m UpdateSecretVersionStage #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UpdateSecretVersionStage -> m UpdateSecretVersionStage #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UpdateSecretVersionStage -> m UpdateSecretVersionStage #

Read UpdateSecretVersionStage Source # 
Show UpdateSecretVersionStage Source # 
Generic UpdateSecretVersionStage Source # 
Hashable UpdateSecretVersionStage Source # 
ToJSON UpdateSecretVersionStage Source # 
NFData UpdateSecretVersionStage Source # 
AWSRequest UpdateSecretVersionStage Source # 
ToHeaders UpdateSecretVersionStage Source # 
ToPath UpdateSecretVersionStage Source # 
ToQuery UpdateSecretVersionStage Source # 
type Rep UpdateSecretVersionStage Source # 
type Rep UpdateSecretVersionStage = D1 * (MetaData "UpdateSecretVersionStage" "Network.AWS.SecretsManager.UpdateSecretVersionStage" "amazonka-secretsmanager-1.6.0-K7nD2j5oEj0GsgMw0kPUxD" False) (C1 * (MetaCons "UpdateSecretVersionStage'" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_usvsRemoveFromVersionId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) (S1 * (MetaSel (Just Symbol "_usvsMoveToVersionId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_usvsSecretId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)) (S1 * (MetaSel (Just Symbol "_usvsVersionStage") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)))))
type Rs UpdateSecretVersionStage Source # 

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.

Instances

Eq UpdateSecretVersionStageResponse Source # 
Data UpdateSecretVersionStageResponse Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UpdateSecretVersionStageResponse -> c UpdateSecretVersionStageResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UpdateSecretVersionStageResponse #

toConstr :: UpdateSecretVersionStageResponse -> Constr #

dataTypeOf :: UpdateSecretVersionStageResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c UpdateSecretVersionStageResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UpdateSecretVersionStageResponse) #

gmapT :: (forall b. Data b => b -> b) -> UpdateSecretVersionStageResponse -> UpdateSecretVersionStageResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UpdateSecretVersionStageResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UpdateSecretVersionStageResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> UpdateSecretVersionStageResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> UpdateSecretVersionStageResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> UpdateSecretVersionStageResponse -> m UpdateSecretVersionStageResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UpdateSecretVersionStageResponse -> m UpdateSecretVersionStageResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UpdateSecretVersionStageResponse -> m UpdateSecretVersionStageResponse #

Read UpdateSecretVersionStageResponse Source # 
Show UpdateSecretVersionStageResponse Source # 
Generic UpdateSecretVersionStageResponse Source # 
NFData UpdateSecretVersionStageResponse Source # 
type Rep UpdateSecretVersionStageResponse Source # 
type Rep UpdateSecretVersionStageResponse = D1 * (MetaData "UpdateSecretVersionStageResponse" "Network.AWS.SecretsManager.UpdateSecretVersionStage" "amazonka-secretsmanager-1.6.0-K7nD2j5oEj0GsgMw0kPUxD" False) (C1 * (MetaCons "UpdateSecretVersionStageResponse'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_usvsrsARN") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) ((:*:) * (S1 * (MetaSel (Just Symbol "_usvsrsName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) (S1 * (MetaSel (Just Symbol "_usvsrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Int)))))

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.