SecretsManagerSecret

A Secrets Manager Secret resource.

Like all Resources, this class configures itself across multiple Environments.

For more information see the official documentation.

Example Usage

1
import launchflow as lf
2
3
# Automatically configures a SecretsManager Secret in your AWS account
4
secret = lf.aws.SecretsManagerSecret("my-secret")
5
# Get the latest version of the secret
6
value = secret.version()

Utility Methods

version

1
SecretsManagerSecret.version(version_id: Optional[str] = None) -> str

Get the secret version from the Secrets Manager.

Args:

  • verison_id (Optional[str]): The version of the secret to get. If not provided, the latest version is returned.

Returns:

  • The value associated with the secret version.

Example Usage

1
import launchflow as lf
2
3
secret = lf.aws.SecertsManager("my-secret")
4
value = secret.version()

add_version

1
SecretsManagerSecret.add_version(payload: str)

Adds a new version of the secret to the Secrets Manager.

Args:

  • payload (str): The value to add to the secret.

Example Usage

1
import launchflow as lf
2
3
secret = lf.aws.SecertsManager("my-secret")
4
secret.add_version("my-new-value")