Module aws_lambda_powertools.utilities.data_classes.secrets_manager_event
Expand source code
from aws_lambda_powertools.shared.types import Literal
from aws_lambda_powertools.utilities.data_classes.common import DictWrapper
class SecretsManagerEvent(DictWrapper):
@property
def secret_id(self) -> str:
"""SecretId: The secret ARN or identifier"""
return self["SecretId"]
@property
def client_request_token(self) -> str:
"""ClientRequestToken: The ClientRequestToken associated with the secret version"""
return self["ClientRequestToken"]
@property
def version_id(self) -> str:
"""Alias to ClientRequestToken to get token associated to version"""
return self["ClientRequestToken"]
@property
def step(self) -> Literal["createSecret", "setSecret", "testSecret", "finishSecret"]:
"""Step: The rotation step (one of createSecret, setSecret, testSecret, or finishSecret)"""
return self["Step"]
Classes
class SecretsManagerEvent (data: Dict[str, Any], json_deserializer: Optional[Callable] = None)
-
Provides a single read only access to a wrapper dict
Parameters
data
:Dict[str, Any]
- Lambda Event Source Event payload
json_deserializer
:Callable
, optional- function to deserialize
str
,bytes
,bytearray
containing a JSON document to a Pythonobj
, by default json.loads
Expand source code
class SecretsManagerEvent(DictWrapper): @property def secret_id(self) -> str: """SecretId: The secret ARN or identifier""" return self["SecretId"] @property def client_request_token(self) -> str: """ClientRequestToken: The ClientRequestToken associated with the secret version""" return self["ClientRequestToken"] @property def version_id(self) -> str: """Alias to ClientRequestToken to get token associated to version""" return self["ClientRequestToken"] @property def step(self) -> Literal["createSecret", "setSecret", "testSecret", "finishSecret"]: """Step: The rotation step (one of createSecret, setSecret, testSecret, or finishSecret)""" return self["Step"]
Ancestors
- DictWrapper
- collections.abc.Mapping
- collections.abc.Collection
- collections.abc.Sized
- collections.abc.Iterable
- collections.abc.Container
Instance variables
var client_request_token : str
-
ClientRequestToken: The ClientRequestToken associated with the secret version
Expand source code
@property def client_request_token(self) -> str: """ClientRequestToken: The ClientRequestToken associated with the secret version""" return self["ClientRequestToken"]
var secret_id : str
-
SecretId: The secret ARN or identifier
Expand source code
@property def secret_id(self) -> str: """SecretId: The secret ARN or identifier""" return self["SecretId"]
var step : Literal['createSecret', 'setSecret', 'testSecret', 'finishSecret']
-
Step: The rotation step (one of createSecret, setSecret, testSecret, or finishSecret)
Expand source code
@property def step(self) -> Literal["createSecret", "setSecret", "testSecret", "finishSecret"]: """Step: The rotation step (one of createSecret, setSecret, testSecret, or finishSecret)""" return self["Step"]
var version_id : str
-
Alias to ClientRequestToken to get token associated to version
Expand source code
@property def version_id(self) -> str: """Alias to ClientRequestToken to get token associated to version""" return self["ClientRequestToken"]
Inherited members