Skip to content

Plugin

botcity.plugins.aws.secretsmanager.plugin.BotSecretsManagerPlugin

secrets_client property readonly

Returns the aws client instance.

Returns:

Type Description
secretsmanager_instance

The aws client instance.

__init__(self, region_name='us-east-1', use_credentials_file=True, access_key_id=None, secret_access_key=None) special

BotSecretsManagerPlugin

Parameters:

Name Type Description Default
region_name str

Default region when creating new connections.

'us-east-1'
use_credentials_file bool

If set to True will make authentication via AWS credentials file.

True
access_key_id str

AWS access key ID.

None
secret_access_key str

AWS secret access key.

None

create_secret(self, secret_name, secret_value, description, **kwargs)

Creates a new secret.

See documentation

Parameters:

Name Type Description Default
secret_name str

The name of the new secret.

required
secret_value str or Dict

The secret value, can be dict or string.

required
description str

The description of the secret.

required

Returns:

Type Description
secret

Returns the secret info.

delete_secret(self, secret_name, without_recovery=False, **kwargs)

Deletes a secret and all of its versions.

See documentation

Parameters:

Name Type Description Default
secret_name str

The ARN or name of the secret.

required
without_recovery bool

Delete the secret without any recovery window.

False

Returns:

Type Description
secret

Returns the secret info or None if secret not exists.

describe_secret(self, secret_name, **kwargs)

Retrieves the details of a secret.

See documentation

Parameters:

Name Type Description Default
secret_name str

The ARN or name of the secret.

required

Returns:

Type Description
secret_info

Return the dict with the secret info or None if secret not exists.

get_secret_value(self, secret_name, **kwargs)

Retrieves the secret value.

See documentation

Parameters:

Name Type Description Default
secret_name str

The ARN or name of the secret to retrieve.

required

Returns:

Type Description
value

The secret value or None if secret not exists.

list_secrets(self, **kwargs)

Lists the secrets that are stored by Secrets Manager.

See documentation

Returns:

Type Description
secrets

The list of secrets.

update_secret(self, secret_name, secret_value, description=None, **kwargs)

Modifies the details of a secret, including metadata and the secret value.

See documentation

Parameters:

Name Type Description Default
secret_name str

The ARN or name of the secret

required
secret_value str or Dict

The new secret value.

required
description str

The new description of the secret.

None

Returns:

Type Description
secret

Return the secret info or None if secret not exists.

Back to top