scaleway_async.secret.v1beta1 package

Submodules

scaleway_async.secret.v1beta1.api module

class scaleway_async.secret.v1beta1.api.SecretV1Beta1API(client: Client, *, bypass_validation: bool = False)

Bases: API

This API allows you to manage your Secret Manager services, for storing, accessing and sharing sensitive data such as passwords, API keys and certificates.

async access_secret_version(*, secret_id: str, revision: str, region: Optional[str] = None) AccessSecretVersionResponse

Access a secret’s version using the secret’s ID. Access sensitive data in a secret’s version specified by the region, secret_id and revision parameters. :param secret_id: ID of the secret. :param revision: The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either: - a number (the revision number) - “latest” (the latest revision) - “latest_enabled” (the latest enabled revision). :param region: Region to target. If none is passed will use default region from the config. :return: AccessSecretVersionResponse

Usage:

result = await api.access_secret_version(
    secret_id="example",
    revision="example",
)
async access_secret_version_by_path(*, secret_path: str, secret_name: str, revision: str, region: Optional[str] = None, project_id: Optional[str] = None) AccessSecretVersionResponse

Access a secret’s version using the secret’s name and path. Access sensitive data in a secret’s version specified by the region, secret_name, secret_path and revision parameters. :param secret_path: Secret’s path. :param secret_name: Secret’s name. :param revision: The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either: - an integer (the revision number) - “latest” (the latest revision) - “latest_enabled” (the latest enabled revision). :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project to target. :return: AccessSecretVersionResponse

Usage:

result = await api.access_secret_version_by_path(
    secret_path="example",
    secret_name="example",
    revision="example",
)
async add_secret_owner(*, secret_id: str, region: Optional[str] = None, product: Optional[Product] = None) None

Allow a product to use the secret. :param secret_id: ID of the secret. :param region: Region to target. If none is passed will use default region from the config. :param product: See Product enum for description of values.

Usage:

result = await api.add_secret_owner(
    secret_id="example",
)
async browse_secrets(*, prefix: str, region: Optional[str] = None, project_id: Optional[str] = None, order_by: Optional[BrowseSecretsRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, tags: Optional[List[str]] = None, type_: Optional[SecretType] = None) BrowseSecretsResponse

Browse secrets. Retrieve the list of secrets and folders for the given prefix. You must specify either the organization_id or the project_id and the region. :param prefix: Filter secrets and folders for a given prefix (default /). :param region: Region to target. If none is passed will use default region from the config. :param project_id: Filter by Project ID (optional). :param order_by: :param page: :param page_size: :param tags: Filter secrets by tags. :param type_: Filter by secret type (optional). :return: BrowseSecretsResponse

Usage:

result = await api.browse_secrets(
    prefix="example",
)
async create_secret(*, name: str, protected: bool, region: Optional[str] = None, project_id: Optional[str] = None, tags: Optional[List[str]] = None, description: Optional[str] = None, type_: Optional[SecretType] = None, path: Optional[str] = None, ephemeral_policy: Optional[EphemeralPolicy] = None) Secret

Create a secret. Create a secret in a given region specified by the region parameter. :param name: Name of the secret. :param protected: A protected secret cannot be deleted. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project containing the secret. :param tags: List of the secret’s tags. :param description: Description of the secret. :param type_: (Optional.) See the Secret.Type enum for a description of values. If not specified, the type is Opaque. :param path: (Optional.) Location of the secret in the directory structure. If not specified, the path is /. :param ephemeral_policy: (Optional.) Policy that defines whether/when a secret’s versions expire. By default, the policy is applied to all the secret’s versions. :return: Secret

Usage:

result = await api.create_secret(
    name="example",
    protected=False,
)
async create_secret_version(*, secret_id: str, data: str, region: Optional[str] = None, description: Optional[str] = None, disable_previous: Optional[bool] = None, data_crc32: Optional[int] = None) SecretVersion

Create a version. Create a version of a given secret specified by the region and secret_id parameters. :param secret_id: ID of the secret. :param data: The base64-encoded secret payload of the version. :param region: Region to target. If none is passed will use default region from the config. :param description: Description of the version. :param disable_previous: (Optional.) If there is no previous version or if the previous version was already disabled, does nothing. :param data_crc32: If specified, Secret Manager will verify the integrity of the data received against the given CRC32 checksum. An error is returned if the CRC32 does not match. If, however, the CRC32 matches, it will be stored and returned along with the SecretVersion on future access requests. :return: SecretVersion

Usage:

result = await api.create_secret_version(
    secret_id="example",
    data="example",
)
async delete_secret(*, secret_id: str, region: Optional[str] = None) None

Delete a secret. Delete a given secret specified by the region and secret_id parameters. :param secret_id: ID of the secret. :param region: Region to target. If none is passed will use default region from the config.

Usage:

result = await api.delete_secret(
    secret_id="example",
)
async delete_secret_version(*, secret_id: str, revision: str, region: Optional[str] = None) None

Delete a version. Delete a secret’s version and the sensitive data contained in it. Deleting a version is permanent and cannot be undone. :param secret_id: ID of the secret. :param revision: The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either: - a number (the revision number) - “latest” (the latest revision) - “latest_enabled” (the latest enabled revision). :param region: Region to target. If none is passed will use default region from the config.

Usage:

result = await api.delete_secret_version(
    secret_id="example",
    revision="example",
)
async disable_secret_version(*, secret_id: str, revision: str, region: Optional[str] = None) SecretVersion

Disable a version. Make a specific version inaccessible. You must specify the region, secret_id and revision parameters. :param secret_id: ID of the secret. :param revision: The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either: - a number (the revision number) - “latest” (the latest revision) - “latest_enabled” (the latest enabled revision). :param region: Region to target. If none is passed will use default region from the config. :return: SecretVersion

Usage:

result = await api.disable_secret_version(
    secret_id="example",
    revision="example",
)
async enable_secret_version(*, secret_id: str, revision: str, region: Optional[str] = None) SecretVersion

Enable a version. Make a specific version accessible. You must specify the region, secret_id and revision parameters. :param secret_id: ID of the secret. :param revision: The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either: - a number (the revision number) - “latest” (the latest revision) - “latest_enabled” (the latest enabled revision). :param region: Region to target. If none is passed will use default region from the config. :return: SecretVersion

Usage:

result = await api.enable_secret_version(
    secret_id="example",
    revision="example",
)
async get_secret(*, secret_id: str, region: Optional[str] = None) Secret

Get metadata using the secret’s ID. Retrieve the metadata of a secret specified by the region and secret_id parameters. :param secret_id: ID of the secret. :param region: Region to target. If none is passed will use default region from the config. :return: Secret

Usage:

result = await api.get_secret(
    secret_id="example",
)
async get_secret_version(*, secret_id: str, revision: str, region: Optional[str] = None) SecretVersion

Get metadata of a secret’s version using the secret’s ID. Retrieve the metadata of a secret’s given version specified by the region, secret_id and revision parameters. :param secret_id: ID of the secret. :param revision: The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either: - a number (the revision number) - “latest” (the latest revision) - “latest_enabled” (the latest enabled revision). :param region: Region to target. If none is passed will use default region from the config. :return: SecretVersion

Usage:

result = await api.get_secret_version(
    secret_id="example",
    revision="example",
)
async list_secret_types(*, region: Optional[str] = None, project_id: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None) ListSecretTypesResponse

List secret types. List all secret types created within a given Project. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project to target. :param page: :param page_size: :return: ListSecretTypesResponse

Usage:

result = await api.list_secret_types()
async list_secret_types_all(*, region: Optional[str] = None, project_id: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None) List[SecretType]

List secret types. List all secret types created within a given Project. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project to target. :param page: :param page_size: :return: List[SecretType]

Usage:

result = await api.list_secret_types_all()
async list_secret_versions(*, secret_id: str, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, status: Optional[List[SecretVersionStatus]] = None) ListSecretVersionsResponse

List versions of a secret using the secret’s ID. Retrieve the list of a given secret’s versions specified by the secret_id and region parameters. :param secret_id: ID of the secret. :param region: Region to target. If none is passed will use default region from the config. :param page: :param page_size: :param status: Filter results by status. :return: ListSecretVersionsResponse

Usage:

result = await api.list_secret_versions(
    secret_id="example",
)
async list_secret_versions_all(*, secret_id: str, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, status: Optional[List[SecretVersionStatus]] = None) List[SecretVersion]

List versions of a secret using the secret’s ID. Retrieve the list of a given secret’s versions specified by the secret_id and region parameters. :param secret_id: ID of the secret. :param region: Region to target. If none is passed will use default region from the config. :param page: :param page_size: :param status: Filter results by status. :return: List[SecretVersion]

Usage:

result = await api.list_secret_versions_all(
    secret_id="example",
)
async list_secrets(*, scheduled_for_deletion: bool, region: Optional[str] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None, order_by: Optional[ListSecretsRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, tags: Optional[List[str]] = None, name: Optional[str] = None, path: Optional[str] = None, ephemeral: Optional[bool] = None, type_: Optional[SecretType] = None) ListSecretsResponse

List secrets. Retrieve the list of secrets created within an Organization and/or Project. You must specify either the organization_id or the project_id and the region. :param scheduled_for_deletion: Filter by whether the secret was scheduled for deletion / not scheduled for deletion. By default, it will display only not scheduled for deletion secrets. :param region: Region to target. If none is passed will use default region from the config. :param organization_id: Filter by Organization ID (optional). :param project_id: Filter by Project ID (optional). :param order_by: :param page: :param page_size: :param tags: List of tags to filter on (optional). :param name: Filter by secret name (optional). :param path: Filter by exact path (optional). :param ephemeral: Filter by ephemeral / not ephemeral (optional). :param type_: Filter by secret type (optional). :return: ListSecretsResponse

Usage:

result = await api.list_secrets(
    scheduled_for_deletion=False,
)
async list_secrets_all(*, scheduled_for_deletion: bool, region: Optional[str] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None, order_by: Optional[ListSecretsRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, tags: Optional[List[str]] = None, name: Optional[str] = None, path: Optional[str] = None, ephemeral: Optional[bool] = None, type_: Optional[SecretType] = None) List[Secret]

List secrets. Retrieve the list of secrets created within an Organization and/or Project. You must specify either the organization_id or the project_id and the region. :param scheduled_for_deletion: Filter by whether the secret was scheduled for deletion / not scheduled for deletion. By default, it will display only not scheduled for deletion secrets. :param region: Region to target. If none is passed will use default region from the config. :param organization_id: Filter by Organization ID (optional). :param project_id: Filter by Project ID (optional). :param order_by: :param page: :param page_size: :param tags: List of tags to filter on (optional). :param name: Filter by secret name (optional). :param path: Filter by exact path (optional). :param ephemeral: Filter by ephemeral / not ephemeral (optional). :param type_: Filter by secret type (optional). :return: List[Secret]

Usage:

result = await api.list_secrets_all(
    scheduled_for_deletion=False,
)
async list_tags(*, region: Optional[str] = None, project_id: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None) ListTagsResponse

List tags. List all tags associated with secrets within a given Project. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project to target. :param page: :param page_size: :return: ListTagsResponse

Usage:

result = await api.list_tags()
async list_tags_all(*, region: Optional[str] = None, project_id: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None) List[str]

List tags. List all tags associated with secrets within a given Project. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project to target. :param page: :param page_size: :return: List[str]

Usage:

result = await api.list_tags_all()
async protect_secret(*, secret_id: str, region: Optional[str] = None) Secret

Enable secret protection. Enable secret protection for a given secret specified by the secret_id parameter. Enabling secret protection means that your secret can be read and modified, but it cannot be deleted. :param secret_id: ID of the secret to enable secret protection for. :param region: Region to target. If none is passed will use default region from the config. :return: Secret

Usage:

result = await api.protect_secret(
    secret_id="example",
)
async restore_secret(*, secret_id: str, region: Optional[str] = None) Secret

Restore a secret. Restore a secret and all its versions scheduled for deletion specified by the region and secret_id parameters. :param secret_id: :param region: Region to target. If none is passed will use default region from the config. :return: Secret

Usage:

result = await api.restore_secret(
    secret_id="example",
)
async restore_secret_version(*, secret_id: str, revision: str, region: Optional[str] = None) SecretVersion

Restore a version. Restore a secret’s version specified by the region, secret_id and revision parameters. :param secret_id: :param revision: :param region: Region to target. If none is passed will use default region from the config. :return: SecretVersion

Usage:

result = await api.restore_secret_version(
    secret_id="example",
    revision="example",
)
async unprotect_secret(*, secret_id: str, region: Optional[str] = None) Secret

Disable secret protection. Disable secret protection for a given secret specified by the secret_id parameter. Disabling secret protection means that your secret can be read, modified and deleted. :param secret_id: ID of the secret to disable secret protection for. :param region: Region to target. If none is passed will use default region from the config. :return: Secret

Usage:

result = await api.unprotect_secret(
    secret_id="example",
)
async update_secret(*, secret_id: str, region: Optional[str] = None, name: Optional[str] = None, tags: Optional[List[str]] = None, description: Optional[str] = None, path: Optional[str] = None, ephemeral_policy: Optional[EphemeralPolicy] = None) Secret

Update metadata of a secret. Edit a secret’s metadata such as name, tag(s), description and ephemeral policy. The secret to update is specified by the secret_id and region parameters. :param secret_id: ID of the secret. :param region: Region to target. If none is passed will use default region from the config. :param name: Secret’s updated name (optional). :param tags: Secret’s updated list of tags (optional). :param description: Description of the secret. :param path: (Optional.) Location of the folder in the directory structure. If not specified, the path is /. :param ephemeral_policy: (Optional.) Policy that defines whether/when a secret’s versions expire. :return: Secret

Usage:

result = await api.update_secret(
    secret_id="example",
)
async update_secret_version(*, secret_id: str, revision: str, region: Optional[str] = None, description: Optional[str] = None, ephemeral_properties: Optional[EphemeralProperties] = None) SecretVersion

Update metadata of a version. Edit the metadata of a secret’s given version, specified by the region, secret_id and revision parameters. :param secret_id: ID of the secret. :param revision: The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either: - a number (the revision number) - “latest” (the latest revision) - “latest_enabled” (the latest enabled revision). :param region: Region to target. If none is passed will use default region from the config. :param description: Description of the version. :param ephemeral_properties: (Optional.) Properties that defines the version’s expiration date, whether it expires after being accessed once, and the action to perform (disable or delete) once the version expires. :return: SecretVersion

Usage:

result = await api.update_secret_version(
    secret_id="example",
    revision="example",
)

scaleway_async.secret.v1beta1.marshalling module

scaleway_async.secret.v1beta1.marshalling.marshal_AddSecretOwnerRequest(request: AddSecretOwnerRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway_async.secret.v1beta1.marshalling.marshal_CreateSecretRequest(request: CreateSecretRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway_async.secret.v1beta1.marshalling.marshal_CreateSecretVersionRequest(request: CreateSecretVersionRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway_async.secret.v1beta1.marshalling.marshal_EphemeralPolicy(request: EphemeralPolicy, defaults: ProfileDefaults) Dict[str, Any]
scaleway_async.secret.v1beta1.marshalling.marshal_EphemeralProperties(request: EphemeralProperties, defaults: ProfileDefaults) Dict[str, Any]
scaleway_async.secret.v1beta1.marshalling.marshal_UpdateSecretRequest(request: UpdateSecretRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway_async.secret.v1beta1.marshalling.marshal_UpdateSecretVersionRequest(request: UpdateSecretVersionRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway_async.secret.v1beta1.marshalling.unmarshal_AccessSecretVersionResponse(data: Any) AccessSecretVersionResponse
scaleway_async.secret.v1beta1.marshalling.unmarshal_BrowseSecretsResponse(data: Any) BrowseSecretsResponse
scaleway_async.secret.v1beta1.marshalling.unmarshal_BrowseSecretsResponseItem(data: Any) BrowseSecretsResponseItem
scaleway_async.secret.v1beta1.marshalling.unmarshal_BrowseSecretsResponseItemFolderDetails(data: Any) BrowseSecretsResponseItemFolderDetails
scaleway_async.secret.v1beta1.marshalling.unmarshal_BrowseSecretsResponseItemSecretDetails(data: Any) BrowseSecretsResponseItemSecretDetails
scaleway_async.secret.v1beta1.marshalling.unmarshal_EphemeralPolicy(data: Any) EphemeralPolicy
scaleway_async.secret.v1beta1.marshalling.unmarshal_EphemeralProperties(data: Any) EphemeralProperties
scaleway_async.secret.v1beta1.marshalling.unmarshal_ListSecretTypesResponse(data: Any) ListSecretTypesResponse
scaleway_async.secret.v1beta1.marshalling.unmarshal_ListSecretVersionsResponse(data: Any) ListSecretVersionsResponse
scaleway_async.secret.v1beta1.marshalling.unmarshal_ListSecretsResponse(data: Any) ListSecretsResponse
scaleway_async.secret.v1beta1.marshalling.unmarshal_ListTagsResponse(data: Any) ListTagsResponse
scaleway_async.secret.v1beta1.marshalling.unmarshal_Secret(data: Any) Secret
scaleway_async.secret.v1beta1.marshalling.unmarshal_SecretVersion(data: Any) SecretVersion

scaleway_async.secret.v1beta1.types module

class scaleway_async.secret.v1beta1.types.AccessSecretVersionByPathRequest(secret_path: 'str', secret_name: 'str', revision: 'str', region: 'Optional[ScwRegion]', project_id: 'Optional[str]')

Bases: object

project_id: Optional[str]

ID of the Project to target.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

revision: str

The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:

  • an integer (the revision number)

  • “latest” (the latest revision)

  • “latest_enabled” (the latest enabled revision).

secret_name: str

Secret’s name.

secret_path: str

Secret’s path.

class scaleway_async.secret.v1beta1.types.AccessSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[ScwRegion]')

Bases: object

region: Optional[str]

Region to target. If none is passed will use default region from the config.

revision: str

The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:

  • a number (the revision number)

  • “latest” (the latest revision)

  • “latest_enabled” (the latest enabled revision).

secret_id: str

ID of the secret.

class scaleway_async.secret.v1beta1.types.AccessSecretVersionResponse(secret_id: 'str', revision: 'int', data: 'str', type_: 'SecretType', data_crc32: 'Optional[int]')

Bases: object

data: str

The base64-encoded secret payload of the version.

data_crc32: Optional[int]

This field is only available if a CRC32 was supplied during the creation of the version.

revision: int

The first version of the secret is numbered 1, and all subsequent revisions augment by 1.

secret_id: str

ID of the secret.

type_: SecretType

See the Secret.Type enum for a description of values.

class scaleway_async.secret.v1beta1.types.AddSecretOwnerRequest(secret_id: 'str', region: 'Optional[ScwRegion]', product: 'Optional[Product]')

Bases: object

product: Optional[Product]

See Product enum for description of values.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

secret_id: str

ID of the secret.

class scaleway_async.secret.v1beta1.types.BasicCredentials(username: 'str', password: 'str')

Bases: object

password: str

The password associated with the credentials.

username: str

The username or identifier associated with the credentials.

class scaleway_async.secret.v1beta1.types.BrowseSecretsRequest(prefix: 'str', region: 'Optional[ScwRegion]', project_id: 'Optional[str]', order_by: 'Optional[BrowseSecretsRequestOrderBy]', page: 'Optional[int]', page_size: 'Optional[int]', tags: 'Optional[List[str]]', type_: 'Optional[SecretType]')

Bases: object

order_by: Optional[BrowseSecretsRequestOrderBy]
page: Optional[int]
page_size: Optional[int]
prefix: str

Filter secrets and folders for a given prefix (default /).

project_id: Optional[str]

Filter by Project ID (optional).

region: Optional[str]

Region to target. If none is passed will use default region from the config.

tags: Optional[List[str]]

Filter secrets by tags.

type_: Optional[SecretType]

Filter by secret type (optional).

class scaleway_async.secret.v1beta1.types.BrowseSecretsRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

CREATED_AT_ASC = 'created_at_asc'
CREATED_AT_DESC = 'created_at_desc'
NAME_ASC = 'name_asc'
NAME_DESC = 'name_desc'
UPDATED_AT_ASC = 'updated_at_asc'
UPDATED_AT_DESC = 'updated_at_desc'
class scaleway_async.secret.v1beta1.types.BrowseSecretsResponse(items: 'List[BrowseSecretsResponseItem]', current_path: 'str', total_count: 'int')

Bases: object

current_path: str

Current path for the given prefix.

items: List[BrowseSecretsResponseItem]

Repeated item of type secret or folder, sorted by the request parameter.

total_count: int

Count of all secrets and folders matching the requested criteria.

class scaleway_async.secret.v1beta1.types.BrowseSecretsResponseItem(name: 'str', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', secret: 'Optional[BrowseSecretsResponseItemSecretDetails]', folder: 'Optional[BrowseSecretsResponseItemFolderDetails]')

Bases: object

created_at: Optional[datetime]
folder: Optional[BrowseSecretsResponseItemFolderDetails]
name: str
secret: Optional[BrowseSecretsResponseItemSecretDetails]
updated_at: Optional[datetime]
class scaleway_async.secret.v1beta1.types.BrowseSecretsResponseItemFolderDetails

Bases: object

class scaleway_async.secret.v1beta1.types.BrowseSecretsResponseItemSecretDetails(id: 'str', tags: 'List[str]', version_count: 'int', protected: 'bool', type_: 'SecretType', ephemeral_policy: 'Optional[EphemeralPolicy]')

Bases: object

ephemeral_policy: Optional[EphemeralPolicy]
id: str
protected: bool
tags: List[str]
type_: SecretType
version_count: int
class scaleway_async.secret.v1beta1.types.CreateSecretRequest(name: 'str', protected: 'bool', region: 'Optional[ScwRegion]', project_id: 'Optional[str]', tags: 'Optional[List[str]]', description: 'Optional[str]', type_: 'Optional[SecretType]', path: 'Optional[str]', ephemeral_policy: 'Optional[EphemeralPolicy]')

Bases: object

description: Optional[str]

Description of the secret.

ephemeral_policy: Optional[EphemeralPolicy]

(Optional.) Policy that defines whether/when a secret’s versions expire. By default, the policy is applied to all the secret’s versions.

name: str

Name of the secret.

path: Optional[str]

(Optional.) Location of the secret in the directory structure. If not specified, the path is /.

project_id: Optional[str]

ID of the Project containing the secret.

protected: bool

A protected secret cannot be deleted.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

tags: Optional[List[str]]

List of the secret’s tags.

type_: Optional[SecretType]

(Optional.) See the Secret.Type enum for a description of values. If not specified, the type is Opaque.

class scaleway_async.secret.v1beta1.types.CreateSecretVersionRequest(secret_id: 'str', data: 'str', region: 'Optional[ScwRegion]', description: 'Optional[str]', disable_previous: 'Optional[bool]', data_crc32: 'Optional[int]')

Bases: object

data: str

The base64-encoded secret payload of the version.

data_crc32: Optional[int]

If specified, Secret Manager will verify the integrity of the data received against the given CRC32 checksum. An error is returned if the CRC32 does not match. If, however, the CRC32 matches, it will be stored and returned along with the SecretVersion on future access requests.

description: Optional[str]

Description of the version.

disable_previous: Optional[bool]

(Optional.) If there is no previous version or if the previous version was already disabled, does nothing.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

secret_id: str

ID of the secret.

class scaleway_async.secret.v1beta1.types.DatabaseCredentials(engine: 'str', username: 'str', password: 'str', host: 'str', dbname: 'str', port: 'str')

Bases: object

dbname: str

The name of the database to connect to.

engine: str

Supported database engines are: ‘postgres’, ‘mysql’, ‘other’.

host: str

The hostname or resolvable DNS name of the database server.

password: str

The password used to authenticate to the database server.

port: str

The port must be an integer ranging from 0 to 65535.

username: str

The username used to authenticate to the database server.

class scaleway_async.secret.v1beta1.types.DeleteSecretRequest(secret_id: 'str', region: 'Optional[ScwRegion]')

Bases: object

region: Optional[str]

Region to target. If none is passed will use default region from the config.

secret_id: str

ID of the secret.

class scaleway_async.secret.v1beta1.types.DeleteSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[ScwRegion]')

Bases: object

region: Optional[str]

Region to target. If none is passed will use default region from the config.

revision: str

The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:

  • a number (the revision number)

  • “latest” (the latest revision)

  • “latest_enabled” (the latest enabled revision).

secret_id: str

ID of the secret.

class scaleway_async.secret.v1beta1.types.DisableSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[ScwRegion]')

Bases: object

region: Optional[str]

Region to target. If none is passed will use default region from the config.

revision: str

The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:

  • a number (the revision number)

  • “latest” (the latest revision)

  • “latest_enabled” (the latest enabled revision).

secret_id: str

ID of the secret.

class scaleway_async.secret.v1beta1.types.EnableSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[ScwRegion]')

Bases: object

region: Optional[str]

Region to target. If none is passed will use default region from the config.

revision: str

The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:

  • a number (the revision number)

  • “latest” (the latest revision)

  • “latest_enabled” (the latest enabled revision).

secret_id: str

ID of the secret.

class scaleway_async.secret.v1beta1.types.EphemeralPolicy(action: 'EphemeralPolicyAction', time_to_live: 'Optional[str]', expires_once_accessed: 'Optional[bool]')

Bases: object

action: EphemeralPolicyAction

See the EphemeralPolicy.Action enum for a description of values.

expires_once_accessed: Optional[bool]

Returns true if the version expires after a single user access.

time_to_live: Optional[str]

Time frame, from one second and up to one year, during which the secret’s versions are valid.

class scaleway_async.secret.v1beta1.types.EphemeralPolicyAction(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

DELETE = 'delete'
DISABLE = 'disable'
UNKNOWN_ACTION = 'unknown_action'
class scaleway_async.secret.v1beta1.types.EphemeralProperties(action: 'EphemeralPolicyAction', expires_at: 'Optional[datetime]', expires_once_accessed: 'Optional[bool]')

Bases: object

action: EphemeralPolicyAction

See EphemeralPolicy.Action enum for a description of values.

expires_at: Optional[datetime]

(Optional.) If not specified, the version does not have an expiration date.

expires_once_accessed: Optional[bool]

(Optional.) If not specified, the version can be accessed an unlimited amount of times.

class scaleway_async.secret.v1beta1.types.GetSecretRequest(secret_id: 'str', region: 'Optional[ScwRegion]')

Bases: object

region: Optional[str]

Region to target. If none is passed will use default region from the config.

secret_id: str

ID of the secret.

class scaleway_async.secret.v1beta1.types.GetSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[ScwRegion]')

Bases: object

region: Optional[str]

Region to target. If none is passed will use default region from the config.

revision: str

The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:

  • a number (the revision number)

  • “latest” (the latest revision)

  • “latest_enabled” (the latest enabled revision).

secret_id: str

ID of the secret.

class scaleway_async.secret.v1beta1.types.ListSecretTypesRequest(region: 'Optional[ScwRegion]', project_id: 'Optional[str]', page: 'Optional[int]', page_size: 'Optional[int]')

Bases: object

page: Optional[int]
page_size: Optional[int]
project_id: Optional[str]

ID of the Project to target.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway_async.secret.v1beta1.types.ListSecretTypesResponse(types: 'List[SecretType]', total_count: 'int')

Bases: object

total_count: int

Count of all secret types matching the requested criteria.

types: List[SecretType]

List of secret types.

class scaleway_async.secret.v1beta1.types.ListSecretVersionsRequest(secret_id: 'str', region: 'Optional[ScwRegion]', page: 'Optional[int]', page_size: 'Optional[int]', status: 'Optional[List[SecretVersionStatus]]')

Bases: object

page: Optional[int]
page_size: Optional[int]
region: Optional[str]

Region to target. If none is passed will use default region from the config.

secret_id: str

ID of the secret.

status: Optional[List[SecretVersionStatus]]

Filter results by status.

class scaleway_async.secret.v1beta1.types.ListSecretVersionsResponse(versions: 'List[SecretVersion]', total_count: 'int')

Bases: object

total_count: int

Number of versions.

versions: List[SecretVersion]

Single page of versions.

class scaleway_async.secret.v1beta1.types.ListSecretsRequest(scheduled_for_deletion: 'bool', region: 'Optional[ScwRegion]', organization_id: 'Optional[str]', project_id: 'Optional[str]', order_by: 'Optional[ListSecretsRequestOrderBy]', page: 'Optional[int]', page_size: 'Optional[int]', tags: 'Optional[List[str]]', name: 'Optional[str]', path: 'Optional[str]', ephemeral: 'Optional[bool]', type_: 'Optional[SecretType]')

Bases: object

ephemeral: Optional[bool]

Filter by ephemeral / not ephemeral (optional).

name: Optional[str]

Filter by secret name (optional).

order_by: Optional[ListSecretsRequestOrderBy]
organization_id: Optional[str]

Filter by Organization ID (optional).

page: Optional[int]
page_size: Optional[int]
path: Optional[str]

Filter by exact path (optional).

project_id: Optional[str]

Filter by Project ID (optional).

region: Optional[str]

Region to target. If none is passed will use default region from the config.

scheduled_for_deletion: bool

Filter by whether the secret was scheduled for deletion / not scheduled for deletion. By default, it will display only not scheduled for deletion secrets.

tags: Optional[List[str]]

List of tags to filter on (optional).

type_: Optional[SecretType]

Filter by secret type (optional).

class scaleway_async.secret.v1beta1.types.ListSecretsRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

CREATED_AT_ASC = 'created_at_asc'
CREATED_AT_DESC = 'created_at_desc'
NAME_ASC = 'name_asc'
NAME_DESC = 'name_desc'
UPDATED_AT_ASC = 'updated_at_asc'
UPDATED_AT_DESC = 'updated_at_desc'
class scaleway_async.secret.v1beta1.types.ListSecretsResponse(secrets: 'List[Secret]', total_count: 'int')

Bases: object

secrets: List[Secret]

Single page of secrets matching the requested criteria.

total_count: int

Count of all secrets matching the requested criteria.

class scaleway_async.secret.v1beta1.types.ListTagsRequest(region: 'Optional[ScwRegion]', project_id: 'Optional[str]', page: 'Optional[int]', page_size: 'Optional[int]')

Bases: object

page: Optional[int]
page_size: Optional[int]
project_id: Optional[str]

ID of the Project to target.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway_async.secret.v1beta1.types.ListTagsResponse(tags: 'List[str]', total_count: 'int')

Bases: object

tags: List[str]

List of tags.

total_count: int

Count of all tags matching the requested criteria.

class scaleway_async.secret.v1beta1.types.Product(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

EDGE_SERVICES = 'edge_services'
UNKNOWN_PRODUCT = 'unknown_product'
class scaleway_async.secret.v1beta1.types.ProtectSecretRequest(secret_id: 'str', region: 'Optional[ScwRegion]')

Bases: object

region: Optional[str]

Region to target. If none is passed will use default region from the config.

secret_id: str

ID of the secret to enable secret protection for.

class scaleway_async.secret.v1beta1.types.RestoreSecretRequest(secret_id: 'str', region: 'Optional[ScwRegion]')

Bases: object

region: Optional[str]

Region to target. If none is passed will use default region from the config.

secret_id: str
class scaleway_async.secret.v1beta1.types.RestoreSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[ScwRegion]')

Bases: object

region: Optional[str]

Region to target. If none is passed will use default region from the config.

revision: str
secret_id: str
class scaleway_async.secret.v1beta1.types.SSHKey(ssh_private_key: 'str')

Bases: object

ssh_private_key: str

The private SSH key.

class scaleway_async.secret.v1beta1.types.Secret(id: 'str', project_id: 'str', name: 'str', status: 'SecretStatus', tags: 'List[str]', version_count: 'int', managed: 'bool', protected: 'bool', type_: 'SecretType', path: 'str', used_by: 'List[Product]', region: 'ScwRegion', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', description: 'Optional[str]', ephemeral_policy: 'Optional[EphemeralPolicy]', deletion_requested_at: 'Optional[datetime]')

Bases: object

created_at: Optional[datetime]

Date and time of the secret’s creation.

deletion_requested_at: Optional[datetime]

Returns the time at which deletion was requested.

description: Optional[str]

Updated description of the secret.

ephemeral_policy: Optional[EphemeralPolicy]

(Optional.) Policy that defines whether/when a secret’s versions expire. By default, the policy is applied to all the secret’s versions.

id: str

ID of the secret.

managed: bool

Returns true for secrets that are managed by another product.

name: str

Name of the secret.

path: str

Location of the secret in the directory structure.

project_id: str

ID of the Project containing the secret.

protected: bool

Returns true for protected secrets that cannot be deleted.

region: str

Region of the secret.

status: SecretStatus
  • ready: the secret can be read, modified and deleted.

  • locked: no action can be performed on the secret. This status can only be applied and removed by Scaleway.

tags: List[str]

List of the secret’s tags.

type_: SecretType

See the Secret.Type enum for a description of values.

updated_at: Optional[datetime]

Last update of the secret.

used_by: List[Product]

List of Scaleway resources that can access and manage the secret.

version_count: int

Number of versions for this secret.

class scaleway_async.secret.v1beta1.types.SecretStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

LOCKED = 'locked'
READY = 'ready'
UNKNOWN_STATUS = 'unknown_status'
class scaleway_async.secret.v1beta1.types.SecretType(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

BASIC_CREDENTIALS = 'basic_credentials'
CERTIFICATE = 'certificate'
DATABASE_CREDENTIALS = 'database_credentials'
KEY_VALUE = 'key_value'
OPAQUE = 'opaque'
SSH_KEY = 'ssh_key'
UNKNOWN_TYPE = 'unknown_type'
class scaleway_async.secret.v1beta1.types.SecretVersion(revision: 'int', secret_id: 'str', status: 'SecretVersionStatus', latest: 'bool', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', deleted_at: 'Optional[datetime]', description: 'Optional[str]', ephemeral_properties: 'Optional[EphemeralProperties]', deletion_requested_at: 'Optional[datetime]')

Bases: object

created_at: Optional[datetime]

Date and time of the version’s creation.

deleted_at: Optional[datetime]

Date and time of the version’s deletion.

deletion_requested_at: Optional[datetime]

Returns the time at which deletion was requested.

description: Optional[str]

Description of the version.

ephemeral_properties: Optional[EphemeralProperties]

Returns the version’s expiration date, whether it expires after being accessed once, and the action to perform (disable or delete) once the version expires.

latest: bool

Returns true if the version is the latest.

revision: int

The first version of the secret is numbered 1, and all subsequent revisions augment by 1.

secret_id: str

ID of the secret.

status: SecretVersionStatus
  • unknown_status: the version is in an invalid state.

  • enabled: the version is accessible.

  • disabled: the version is not accessible but can be enabled.

  • scheduled_for_deletion: the version is scheduled for deletion. It will be deleted in 7 days.

  • deleted: the version is permanently deleted. It is not possible to recover it.

updated_at: Optional[datetime]

Last update of the version.

class scaleway_async.secret.v1beta1.types.SecretVersionStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

DELETED = 'deleted'
DISABLED = 'disabled'
ENABLED = 'enabled'
SCHEDULED_FOR_DELETION = 'scheduled_for_deletion'
UNKNOWN_STATUS = 'unknown_status'
class scaleway_async.secret.v1beta1.types.UnprotectSecretRequest(secret_id: 'str', region: 'Optional[ScwRegion]')

Bases: object

region: Optional[str]

Region to target. If none is passed will use default region from the config.

secret_id: str

ID of the secret to disable secret protection for.

class scaleway_async.secret.v1beta1.types.UpdateSecretRequest(secret_id: 'str', region: 'Optional[ScwRegion]', name: 'Optional[str]', tags: 'Optional[List[str]]', description: 'Optional[str]', path: 'Optional[str]', ephemeral_policy: 'Optional[EphemeralPolicy]')

Bases: object

description: Optional[str]

Description of the secret.

ephemeral_policy: Optional[EphemeralPolicy]

(Optional.) Policy that defines whether/when a secret’s versions expire.

name: Optional[str]

Secret’s updated name (optional).

path: Optional[str]

(Optional.) Location of the folder in the directory structure. If not specified, the path is /.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

secret_id: str

ID of the secret.

tags: Optional[List[str]]

Secret’s updated list of tags (optional).

class scaleway_async.secret.v1beta1.types.UpdateSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[ScwRegion]', description: 'Optional[str]', ephemeral_properties: 'Optional[EphemeralProperties]')

Bases: object

description: Optional[str]

Description of the version.

ephemeral_properties: Optional[EphemeralProperties]

(Optional.) Properties that defines the version’s expiration date, whether it expires after being accessed once, and the action to perform (disable or delete) once the version expires.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

revision: str

The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:

  • a number (the revision number)

  • “latest” (the latest revision)

  • “latest_enabled” (the latest enabled revision).

secret_id: str

ID of the secret.

Module contents

class scaleway_async.secret.v1beta1.AccessSecretVersionByPathRequest(secret_path: 'str', secret_name: 'str', revision: 'str', region: 'Optional[ScwRegion]', project_id: 'Optional[str]')

Bases: object

project_id: Optional[str]

ID of the Project to target.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

revision: str

The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:

  • an integer (the revision number)

  • “latest” (the latest revision)

  • “latest_enabled” (the latest enabled revision).

secret_name: str

Secret’s name.

secret_path: str

Secret’s path.

class scaleway_async.secret.v1beta1.AccessSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[ScwRegion]')

Bases: object

region: Optional[str]

Region to target. If none is passed will use default region from the config.

revision: str

The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:

  • a number (the revision number)

  • “latest” (the latest revision)

  • “latest_enabled” (the latest enabled revision).

secret_id: str

ID of the secret.

class scaleway_async.secret.v1beta1.AccessSecretVersionResponse(secret_id: 'str', revision: 'int', data: 'str', type_: 'SecretType', data_crc32: 'Optional[int]')

Bases: object

data: str

The base64-encoded secret payload of the version.

data_crc32: Optional[int]

This field is only available if a CRC32 was supplied during the creation of the version.

revision: int

The first version of the secret is numbered 1, and all subsequent revisions augment by 1.

secret_id: str

ID of the secret.

type_: SecretType

See the Secret.Type enum for a description of values.

class scaleway_async.secret.v1beta1.AddSecretOwnerRequest(secret_id: 'str', region: 'Optional[ScwRegion]', product: 'Optional[Product]')

Bases: object

product: Optional[Product]

See Product enum for description of values.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

secret_id: str

ID of the secret.

class scaleway_async.secret.v1beta1.BasicCredentials(username: 'str', password: 'str')

Bases: object

password: str

The password associated with the credentials.

username: str

The username or identifier associated with the credentials.

class scaleway_async.secret.v1beta1.BrowseSecretsRequest(prefix: 'str', region: 'Optional[ScwRegion]', project_id: 'Optional[str]', order_by: 'Optional[BrowseSecretsRequestOrderBy]', page: 'Optional[int]', page_size: 'Optional[int]', tags: 'Optional[List[str]]', type_: 'Optional[SecretType]')

Bases: object

order_by: Optional[BrowseSecretsRequestOrderBy]
page: Optional[int]
page_size: Optional[int]
prefix: str

Filter secrets and folders for a given prefix (default /).

project_id: Optional[str]

Filter by Project ID (optional).

region: Optional[str]

Region to target. If none is passed will use default region from the config.

tags: Optional[List[str]]

Filter secrets by tags.

type_: Optional[SecretType]

Filter by secret type (optional).

class scaleway_async.secret.v1beta1.BrowseSecretsRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

CREATED_AT_ASC = 'created_at_asc'
CREATED_AT_DESC = 'created_at_desc'
NAME_ASC = 'name_asc'
NAME_DESC = 'name_desc'
UPDATED_AT_ASC = 'updated_at_asc'
UPDATED_AT_DESC = 'updated_at_desc'
class scaleway_async.secret.v1beta1.BrowseSecretsResponse(items: 'List[BrowseSecretsResponseItem]', current_path: 'str', total_count: 'int')

Bases: object

current_path: str

Current path for the given prefix.

items: List[BrowseSecretsResponseItem]

Repeated item of type secret or folder, sorted by the request parameter.

total_count: int

Count of all secrets and folders matching the requested criteria.

class scaleway_async.secret.v1beta1.BrowseSecretsResponseItem(name: 'str', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', secret: 'Optional[BrowseSecretsResponseItemSecretDetails]', folder: 'Optional[BrowseSecretsResponseItemFolderDetails]')

Bases: object

created_at: Optional[datetime]
folder: Optional[BrowseSecretsResponseItemFolderDetails]
name: str
secret: Optional[BrowseSecretsResponseItemSecretDetails]
updated_at: Optional[datetime]
class scaleway_async.secret.v1beta1.BrowseSecretsResponseItemFolderDetails

Bases: object

class scaleway_async.secret.v1beta1.BrowseSecretsResponseItemSecretDetails(id: 'str', tags: 'List[str]', version_count: 'int', protected: 'bool', type_: 'SecretType', ephemeral_policy: 'Optional[EphemeralPolicy]')

Bases: object

ephemeral_policy: Optional[EphemeralPolicy]
id: str
protected: bool
tags: List[str]
type_: SecretType
version_count: int
class scaleway_async.secret.v1beta1.CreateSecretRequest(name: 'str', protected: 'bool', region: 'Optional[ScwRegion]', project_id: 'Optional[str]', tags: 'Optional[List[str]]', description: 'Optional[str]', type_: 'Optional[SecretType]', path: 'Optional[str]', ephemeral_policy: 'Optional[EphemeralPolicy]')

Bases: object

description: Optional[str]

Description of the secret.

ephemeral_policy: Optional[EphemeralPolicy]

(Optional.) Policy that defines whether/when a secret’s versions expire. By default, the policy is applied to all the secret’s versions.

name: str

Name of the secret.

path: Optional[str]

(Optional.) Location of the secret in the directory structure. If not specified, the path is /.

project_id: Optional[str]

ID of the Project containing the secret.

protected: bool

A protected secret cannot be deleted.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

tags: Optional[List[str]]

List of the secret’s tags.

type_: Optional[SecretType]

(Optional.) See the Secret.Type enum for a description of values. If not specified, the type is Opaque.

class scaleway_async.secret.v1beta1.CreateSecretVersionRequest(secret_id: 'str', data: 'str', region: 'Optional[ScwRegion]', description: 'Optional[str]', disable_previous: 'Optional[bool]', data_crc32: 'Optional[int]')

Bases: object

data: str

The base64-encoded secret payload of the version.

data_crc32: Optional[int]

If specified, Secret Manager will verify the integrity of the data received against the given CRC32 checksum. An error is returned if the CRC32 does not match. If, however, the CRC32 matches, it will be stored and returned along with the SecretVersion on future access requests.

description: Optional[str]

Description of the version.

disable_previous: Optional[bool]

(Optional.) If there is no previous version or if the previous version was already disabled, does nothing.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

secret_id: str

ID of the secret.

class scaleway_async.secret.v1beta1.DatabaseCredentials(engine: 'str', username: 'str', password: 'str', host: 'str', dbname: 'str', port: 'str')

Bases: object

dbname: str

The name of the database to connect to.

engine: str

Supported database engines are: ‘postgres’, ‘mysql’, ‘other’.

host: str

The hostname or resolvable DNS name of the database server.

password: str

The password used to authenticate to the database server.

port: str

The port must be an integer ranging from 0 to 65535.

username: str

The username used to authenticate to the database server.

class scaleway_async.secret.v1beta1.DeleteSecretRequest(secret_id: 'str', region: 'Optional[ScwRegion]')

Bases: object

region: Optional[str]

Region to target. If none is passed will use default region from the config.

secret_id: str

ID of the secret.

class scaleway_async.secret.v1beta1.DeleteSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[ScwRegion]')

Bases: object

region: Optional[str]

Region to target. If none is passed will use default region from the config.

revision: str

The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:

  • a number (the revision number)

  • “latest” (the latest revision)

  • “latest_enabled” (the latest enabled revision).

secret_id: str

ID of the secret.

class scaleway_async.secret.v1beta1.DisableSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[ScwRegion]')

Bases: object

region: Optional[str]

Region to target. If none is passed will use default region from the config.

revision: str

The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:

  • a number (the revision number)

  • “latest” (the latest revision)

  • “latest_enabled” (the latest enabled revision).

secret_id: str

ID of the secret.

class scaleway_async.secret.v1beta1.EnableSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[ScwRegion]')

Bases: object

region: Optional[str]

Region to target. If none is passed will use default region from the config.

revision: str

The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:

  • a number (the revision number)

  • “latest” (the latest revision)

  • “latest_enabled” (the latest enabled revision).

secret_id: str

ID of the secret.

class scaleway_async.secret.v1beta1.EphemeralPolicy(action: 'EphemeralPolicyAction', time_to_live: 'Optional[str]', expires_once_accessed: 'Optional[bool]')

Bases: object

action: EphemeralPolicyAction

See the EphemeralPolicy.Action enum for a description of values.

expires_once_accessed: Optional[bool]

Returns true if the version expires after a single user access.

time_to_live: Optional[str]

Time frame, from one second and up to one year, during which the secret’s versions are valid.

class scaleway_async.secret.v1beta1.EphemeralPolicyAction(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

DELETE = 'delete'
DISABLE = 'disable'
UNKNOWN_ACTION = 'unknown_action'
class scaleway_async.secret.v1beta1.EphemeralProperties(action: 'EphemeralPolicyAction', expires_at: 'Optional[datetime]', expires_once_accessed: 'Optional[bool]')

Bases: object

action: EphemeralPolicyAction

See EphemeralPolicy.Action enum for a description of values.

expires_at: Optional[datetime]

(Optional.) If not specified, the version does not have an expiration date.

expires_once_accessed: Optional[bool]

(Optional.) If not specified, the version can be accessed an unlimited amount of times.

class scaleway_async.secret.v1beta1.GetSecretRequest(secret_id: 'str', region: 'Optional[ScwRegion]')

Bases: object

region: Optional[str]

Region to target. If none is passed will use default region from the config.

secret_id: str

ID of the secret.

class scaleway_async.secret.v1beta1.GetSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[ScwRegion]')

Bases: object

region: Optional[str]

Region to target. If none is passed will use default region from the config.

revision: str

The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:

  • a number (the revision number)

  • “latest” (the latest revision)

  • “latest_enabled” (the latest enabled revision).

secret_id: str

ID of the secret.

class scaleway_async.secret.v1beta1.ListSecretTypesRequest(region: 'Optional[ScwRegion]', project_id: 'Optional[str]', page: 'Optional[int]', page_size: 'Optional[int]')

Bases: object

page: Optional[int]
page_size: Optional[int]
project_id: Optional[str]

ID of the Project to target.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway_async.secret.v1beta1.ListSecretTypesResponse(types: 'List[SecretType]', total_count: 'int')

Bases: object

total_count: int

Count of all secret types matching the requested criteria.

types: List[SecretType]

List of secret types.

class scaleway_async.secret.v1beta1.ListSecretVersionsRequest(secret_id: 'str', region: 'Optional[ScwRegion]', page: 'Optional[int]', page_size: 'Optional[int]', status: 'Optional[List[SecretVersionStatus]]')

Bases: object

page: Optional[int]
page_size: Optional[int]
region: Optional[str]

Region to target. If none is passed will use default region from the config.

secret_id: str

ID of the secret.

status: Optional[List[SecretVersionStatus]]

Filter results by status.

class scaleway_async.secret.v1beta1.ListSecretVersionsResponse(versions: 'List[SecretVersion]', total_count: 'int')

Bases: object

total_count: int

Number of versions.

versions: List[SecretVersion]

Single page of versions.

class scaleway_async.secret.v1beta1.ListSecretsRequest(scheduled_for_deletion: 'bool', region: 'Optional[ScwRegion]', organization_id: 'Optional[str]', project_id: 'Optional[str]', order_by: 'Optional[ListSecretsRequestOrderBy]', page: 'Optional[int]', page_size: 'Optional[int]', tags: 'Optional[List[str]]', name: 'Optional[str]', path: 'Optional[str]', ephemeral: 'Optional[bool]', type_: 'Optional[SecretType]')

Bases: object

ephemeral: Optional[bool]

Filter by ephemeral / not ephemeral (optional).

name: Optional[str]

Filter by secret name (optional).

order_by: Optional[ListSecretsRequestOrderBy]
organization_id: Optional[str]

Filter by Organization ID (optional).

page: Optional[int]
page_size: Optional[int]
path: Optional[str]

Filter by exact path (optional).

project_id: Optional[str]

Filter by Project ID (optional).

region: Optional[str]

Region to target. If none is passed will use default region from the config.

scheduled_for_deletion: bool

Filter by whether the secret was scheduled for deletion / not scheduled for deletion. By default, it will display only not scheduled for deletion secrets.

tags: Optional[List[str]]

List of tags to filter on (optional).

type_: Optional[SecretType]

Filter by secret type (optional).

class scaleway_async.secret.v1beta1.ListSecretsRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

CREATED_AT_ASC = 'created_at_asc'
CREATED_AT_DESC = 'created_at_desc'
NAME_ASC = 'name_asc'
NAME_DESC = 'name_desc'
UPDATED_AT_ASC = 'updated_at_asc'
UPDATED_AT_DESC = 'updated_at_desc'
class scaleway_async.secret.v1beta1.ListSecretsResponse(secrets: 'List[Secret]', total_count: 'int')

Bases: object

secrets: List[Secret]

Single page of secrets matching the requested criteria.

total_count: int

Count of all secrets matching the requested criteria.

class scaleway_async.secret.v1beta1.ListTagsRequest(region: 'Optional[ScwRegion]', project_id: 'Optional[str]', page: 'Optional[int]', page_size: 'Optional[int]')

Bases: object

page: Optional[int]
page_size: Optional[int]
project_id: Optional[str]

ID of the Project to target.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway_async.secret.v1beta1.ListTagsResponse(tags: 'List[str]', total_count: 'int')

Bases: object

tags: List[str]

List of tags.

total_count: int

Count of all tags matching the requested criteria.

class scaleway_async.secret.v1beta1.Product(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

EDGE_SERVICES = 'edge_services'
UNKNOWN_PRODUCT = 'unknown_product'
class scaleway_async.secret.v1beta1.ProtectSecretRequest(secret_id: 'str', region: 'Optional[ScwRegion]')

Bases: object

region: Optional[str]

Region to target. If none is passed will use default region from the config.

secret_id: str

ID of the secret to enable secret protection for.

class scaleway_async.secret.v1beta1.RestoreSecretRequest(secret_id: 'str', region: 'Optional[ScwRegion]')

Bases: object

region: Optional[str]

Region to target. If none is passed will use default region from the config.

secret_id: str
class scaleway_async.secret.v1beta1.RestoreSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[ScwRegion]')

Bases: object

region: Optional[str]

Region to target. If none is passed will use default region from the config.

revision: str
secret_id: str
class scaleway_async.secret.v1beta1.SSHKey(ssh_private_key: 'str')

Bases: object

ssh_private_key: str

The private SSH key.

class scaleway_async.secret.v1beta1.Secret(id: 'str', project_id: 'str', name: 'str', status: 'SecretStatus', tags: 'List[str]', version_count: 'int', managed: 'bool', protected: 'bool', type_: 'SecretType', path: 'str', used_by: 'List[Product]', region: 'ScwRegion', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', description: 'Optional[str]', ephemeral_policy: 'Optional[EphemeralPolicy]', deletion_requested_at: 'Optional[datetime]')

Bases: object

created_at: Optional[datetime]

Date and time of the secret’s creation.

deletion_requested_at: Optional[datetime]

Returns the time at which deletion was requested.

description: Optional[str]

Updated description of the secret.

ephemeral_policy: Optional[EphemeralPolicy]

(Optional.) Policy that defines whether/when a secret’s versions expire. By default, the policy is applied to all the secret’s versions.

id: str

ID of the secret.

managed: bool

Returns true for secrets that are managed by another product.

name: str

Name of the secret.

path: str

Location of the secret in the directory structure.

project_id: str

ID of the Project containing the secret.

protected: bool

Returns true for protected secrets that cannot be deleted.

region: str

Region of the secret.

status: SecretStatus
  • ready: the secret can be read, modified and deleted.

  • locked: no action can be performed on the secret. This status can only be applied and removed by Scaleway.

tags: List[str]

List of the secret’s tags.

type_: SecretType

See the Secret.Type enum for a description of values.

updated_at: Optional[datetime]

Last update of the secret.

used_by: List[Product]

List of Scaleway resources that can access and manage the secret.

version_count: int

Number of versions for this secret.

class scaleway_async.secret.v1beta1.SecretStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

LOCKED = 'locked'
READY = 'ready'
UNKNOWN_STATUS = 'unknown_status'
class scaleway_async.secret.v1beta1.SecretType(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

BASIC_CREDENTIALS = 'basic_credentials'
CERTIFICATE = 'certificate'
DATABASE_CREDENTIALS = 'database_credentials'
KEY_VALUE = 'key_value'
OPAQUE = 'opaque'
SSH_KEY = 'ssh_key'
UNKNOWN_TYPE = 'unknown_type'
class scaleway_async.secret.v1beta1.SecretV1Beta1API(client: Client, *, bypass_validation: bool = False)

Bases: API

This API allows you to manage your Secret Manager services, for storing, accessing and sharing sensitive data such as passwords, API keys and certificates.

async access_secret_version(*, secret_id: str, revision: str, region: Optional[str] = None) AccessSecretVersionResponse

Access a secret’s version using the secret’s ID. Access sensitive data in a secret’s version specified by the region, secret_id and revision parameters. :param secret_id: ID of the secret. :param revision: The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either: - a number (the revision number) - “latest” (the latest revision) - “latest_enabled” (the latest enabled revision). :param region: Region to target. If none is passed will use default region from the config. :return: AccessSecretVersionResponse

Usage:

result = await api.access_secret_version(
    secret_id="example",
    revision="example",
)
async access_secret_version_by_path(*, secret_path: str, secret_name: str, revision: str, region: Optional[str] = None, project_id: Optional[str] = None) AccessSecretVersionResponse

Access a secret’s version using the secret’s name and path. Access sensitive data in a secret’s version specified by the region, secret_name, secret_path and revision parameters. :param secret_path: Secret’s path. :param secret_name: Secret’s name. :param revision: The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either: - an integer (the revision number) - “latest” (the latest revision) - “latest_enabled” (the latest enabled revision). :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project to target. :return: AccessSecretVersionResponse

Usage:

result = await api.access_secret_version_by_path(
    secret_path="example",
    secret_name="example",
    revision="example",
)
async add_secret_owner(*, secret_id: str, region: Optional[str] = None, product: Optional[Product] = None) None

Allow a product to use the secret. :param secret_id: ID of the secret. :param region: Region to target. If none is passed will use default region from the config. :param product: See Product enum for description of values.

Usage:

result = await api.add_secret_owner(
    secret_id="example",
)
async browse_secrets(*, prefix: str, region: Optional[str] = None, project_id: Optional[str] = None, order_by: Optional[BrowseSecretsRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, tags: Optional[List[str]] = None, type_: Optional[SecretType] = None) BrowseSecretsResponse

Browse secrets. Retrieve the list of secrets and folders for the given prefix. You must specify either the organization_id or the project_id and the region. :param prefix: Filter secrets and folders for a given prefix (default /). :param region: Region to target. If none is passed will use default region from the config. :param project_id: Filter by Project ID (optional). :param order_by: :param page: :param page_size: :param tags: Filter secrets by tags. :param type_: Filter by secret type (optional). :return: BrowseSecretsResponse

Usage:

result = await api.browse_secrets(
    prefix="example",
)
async create_secret(*, name: str, protected: bool, region: Optional[str] = None, project_id: Optional[str] = None, tags: Optional[List[str]] = None, description: Optional[str] = None, type_: Optional[SecretType] = None, path: Optional[str] = None, ephemeral_policy: Optional[EphemeralPolicy] = None) Secret

Create a secret. Create a secret in a given region specified by the region parameter. :param name: Name of the secret. :param protected: A protected secret cannot be deleted. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project containing the secret. :param tags: List of the secret’s tags. :param description: Description of the secret. :param type_: (Optional.) See the Secret.Type enum for a description of values. If not specified, the type is Opaque. :param path: (Optional.) Location of the secret in the directory structure. If not specified, the path is /. :param ephemeral_policy: (Optional.) Policy that defines whether/when a secret’s versions expire. By default, the policy is applied to all the secret’s versions. :return: Secret

Usage:

result = await api.create_secret(
    name="example",
    protected=False,
)
async create_secret_version(*, secret_id: str, data: str, region: Optional[str] = None, description: Optional[str] = None, disable_previous: Optional[bool] = None, data_crc32: Optional[int] = None) SecretVersion

Create a version. Create a version of a given secret specified by the region and secret_id parameters. :param secret_id: ID of the secret. :param data: The base64-encoded secret payload of the version. :param region: Region to target. If none is passed will use default region from the config. :param description: Description of the version. :param disable_previous: (Optional.) If there is no previous version or if the previous version was already disabled, does nothing. :param data_crc32: If specified, Secret Manager will verify the integrity of the data received against the given CRC32 checksum. An error is returned if the CRC32 does not match. If, however, the CRC32 matches, it will be stored and returned along with the SecretVersion on future access requests. :return: SecretVersion

Usage:

result = await api.create_secret_version(
    secret_id="example",
    data="example",
)
async delete_secret(*, secret_id: str, region: Optional[str] = None) None

Delete a secret. Delete a given secret specified by the region and secret_id parameters. :param secret_id: ID of the secret. :param region: Region to target. If none is passed will use default region from the config.

Usage:

result = await api.delete_secret(
    secret_id="example",
)
async delete_secret_version(*, secret_id: str, revision: str, region: Optional[str] = None) None

Delete a version. Delete a secret’s version and the sensitive data contained in it. Deleting a version is permanent and cannot be undone. :param secret_id: ID of the secret. :param revision: The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either: - a number (the revision number) - “latest” (the latest revision) - “latest_enabled” (the latest enabled revision). :param region: Region to target. If none is passed will use default region from the config.

Usage:

result = await api.delete_secret_version(
    secret_id="example",
    revision="example",
)
async disable_secret_version(*, secret_id: str, revision: str, region: Optional[str] = None) SecretVersion

Disable a version. Make a specific version inaccessible. You must specify the region, secret_id and revision parameters. :param secret_id: ID of the secret. :param revision: The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either: - a number (the revision number) - “latest” (the latest revision) - “latest_enabled” (the latest enabled revision). :param region: Region to target. If none is passed will use default region from the config. :return: SecretVersion

Usage:

result = await api.disable_secret_version(
    secret_id="example",
    revision="example",
)
async enable_secret_version(*, secret_id: str, revision: str, region: Optional[str] = None) SecretVersion

Enable a version. Make a specific version accessible. You must specify the region, secret_id and revision parameters. :param secret_id: ID of the secret. :param revision: The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either: - a number (the revision number) - “latest” (the latest revision) - “latest_enabled” (the latest enabled revision). :param region: Region to target. If none is passed will use default region from the config. :return: SecretVersion

Usage:

result = await api.enable_secret_version(
    secret_id="example",
    revision="example",
)
async get_secret(*, secret_id: str, region: Optional[str] = None) Secret

Get metadata using the secret’s ID. Retrieve the metadata of a secret specified by the region and secret_id parameters. :param secret_id: ID of the secret. :param region: Region to target. If none is passed will use default region from the config. :return: Secret

Usage:

result = await api.get_secret(
    secret_id="example",
)
async get_secret_version(*, secret_id: str, revision: str, region: Optional[str] = None) SecretVersion

Get metadata of a secret’s version using the secret’s ID. Retrieve the metadata of a secret’s given version specified by the region, secret_id and revision parameters. :param secret_id: ID of the secret. :param revision: The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either: - a number (the revision number) - “latest” (the latest revision) - “latest_enabled” (the latest enabled revision). :param region: Region to target. If none is passed will use default region from the config. :return: SecretVersion

Usage:

result = await api.get_secret_version(
    secret_id="example",
    revision="example",
)
async list_secret_types(*, region: Optional[str] = None, project_id: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None) ListSecretTypesResponse

List secret types. List all secret types created within a given Project. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project to target. :param page: :param page_size: :return: ListSecretTypesResponse

Usage:

result = await api.list_secret_types()
async list_secret_types_all(*, region: Optional[str] = None, project_id: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None) List[SecretType]

List secret types. List all secret types created within a given Project. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project to target. :param page: :param page_size: :return: List[SecretType]

Usage:

result = await api.list_secret_types_all()
async list_secret_versions(*, secret_id: str, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, status: Optional[List[SecretVersionStatus]] = None) ListSecretVersionsResponse

List versions of a secret using the secret’s ID. Retrieve the list of a given secret’s versions specified by the secret_id and region parameters. :param secret_id: ID of the secret. :param region: Region to target. If none is passed will use default region from the config. :param page: :param page_size: :param status: Filter results by status. :return: ListSecretVersionsResponse

Usage:

result = await api.list_secret_versions(
    secret_id="example",
)
async list_secret_versions_all(*, secret_id: str, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, status: Optional[List[SecretVersionStatus]] = None) List[SecretVersion]

List versions of a secret using the secret’s ID. Retrieve the list of a given secret’s versions specified by the secret_id and region parameters. :param secret_id: ID of the secret. :param region: Region to target. If none is passed will use default region from the config. :param page: :param page_size: :param status: Filter results by status. :return: List[SecretVersion]

Usage:

result = await api.list_secret_versions_all(
    secret_id="example",
)
async list_secrets(*, scheduled_for_deletion: bool, region: Optional[str] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None, order_by: Optional[ListSecretsRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, tags: Optional[List[str]] = None, name: Optional[str] = None, path: Optional[str] = None, ephemeral: Optional[bool] = None, type_: Optional[SecretType] = None) ListSecretsResponse

List secrets. Retrieve the list of secrets created within an Organization and/or Project. You must specify either the organization_id or the project_id and the region. :param scheduled_for_deletion: Filter by whether the secret was scheduled for deletion / not scheduled for deletion. By default, it will display only not scheduled for deletion secrets. :param region: Region to target. If none is passed will use default region from the config. :param organization_id: Filter by Organization ID (optional). :param project_id: Filter by Project ID (optional). :param order_by: :param page: :param page_size: :param tags: List of tags to filter on (optional). :param name: Filter by secret name (optional). :param path: Filter by exact path (optional). :param ephemeral: Filter by ephemeral / not ephemeral (optional). :param type_: Filter by secret type (optional). :return: ListSecretsResponse

Usage:

result = await api.list_secrets(
    scheduled_for_deletion=False,
)
async list_secrets_all(*, scheduled_for_deletion: bool, region: Optional[str] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None, order_by: Optional[ListSecretsRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, tags: Optional[List[str]] = None, name: Optional[str] = None, path: Optional[str] = None, ephemeral: Optional[bool] = None, type_: Optional[SecretType] = None) List[Secret]

List secrets. Retrieve the list of secrets created within an Organization and/or Project. You must specify either the organization_id or the project_id and the region. :param scheduled_for_deletion: Filter by whether the secret was scheduled for deletion / not scheduled for deletion. By default, it will display only not scheduled for deletion secrets. :param region: Region to target. If none is passed will use default region from the config. :param organization_id: Filter by Organization ID (optional). :param project_id: Filter by Project ID (optional). :param order_by: :param page: :param page_size: :param tags: List of tags to filter on (optional). :param name: Filter by secret name (optional). :param path: Filter by exact path (optional). :param ephemeral: Filter by ephemeral / not ephemeral (optional). :param type_: Filter by secret type (optional). :return: List[Secret]

Usage:

result = await api.list_secrets_all(
    scheduled_for_deletion=False,
)
async list_tags(*, region: Optional[str] = None, project_id: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None) ListTagsResponse

List tags. List all tags associated with secrets within a given Project. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project to target. :param page: :param page_size: :return: ListTagsResponse

Usage:

result = await api.list_tags()
async list_tags_all(*, region: Optional[str] = None, project_id: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None) List[str]

List tags. List all tags associated with secrets within a given Project. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project to target. :param page: :param page_size: :return: List[str]

Usage:

result = await api.list_tags_all()
async protect_secret(*, secret_id: str, region: Optional[str] = None) Secret

Enable secret protection. Enable secret protection for a given secret specified by the secret_id parameter. Enabling secret protection means that your secret can be read and modified, but it cannot be deleted. :param secret_id: ID of the secret to enable secret protection for. :param region: Region to target. If none is passed will use default region from the config. :return: Secret

Usage:

result = await api.protect_secret(
    secret_id="example",
)
async restore_secret(*, secret_id: str, region: Optional[str] = None) Secret

Restore a secret. Restore a secret and all its versions scheduled for deletion specified by the region and secret_id parameters. :param secret_id: :param region: Region to target. If none is passed will use default region from the config. :return: Secret

Usage:

result = await api.restore_secret(
    secret_id="example",
)
async restore_secret_version(*, secret_id: str, revision: str, region: Optional[str] = None) SecretVersion

Restore a version. Restore a secret’s version specified by the region, secret_id and revision parameters. :param secret_id: :param revision: :param region: Region to target. If none is passed will use default region from the config. :return: SecretVersion

Usage:

result = await api.restore_secret_version(
    secret_id="example",
    revision="example",
)
async unprotect_secret(*, secret_id: str, region: Optional[str] = None) Secret

Disable secret protection. Disable secret protection for a given secret specified by the secret_id parameter. Disabling secret protection means that your secret can be read, modified and deleted. :param secret_id: ID of the secret to disable secret protection for. :param region: Region to target. If none is passed will use default region from the config. :return: Secret

Usage:

result = await api.unprotect_secret(
    secret_id="example",
)
async update_secret(*, secret_id: str, region: Optional[str] = None, name: Optional[str] = None, tags: Optional[List[str]] = None, description: Optional[str] = None, path: Optional[str] = None, ephemeral_policy: Optional[EphemeralPolicy] = None) Secret

Update metadata of a secret. Edit a secret’s metadata such as name, tag(s), description and ephemeral policy. The secret to update is specified by the secret_id and region parameters. :param secret_id: ID of the secret. :param region: Region to target. If none is passed will use default region from the config. :param name: Secret’s updated name (optional). :param tags: Secret’s updated list of tags (optional). :param description: Description of the secret. :param path: (Optional.) Location of the folder in the directory structure. If not specified, the path is /. :param ephemeral_policy: (Optional.) Policy that defines whether/when a secret’s versions expire. :return: Secret

Usage:

result = await api.update_secret(
    secret_id="example",
)
async update_secret_version(*, secret_id: str, revision: str, region: Optional[str] = None, description: Optional[str] = None, ephemeral_properties: Optional[EphemeralProperties] = None) SecretVersion

Update metadata of a version. Edit the metadata of a secret’s given version, specified by the region, secret_id and revision parameters. :param secret_id: ID of the secret. :param revision: The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either: - a number (the revision number) - “latest” (the latest revision) - “latest_enabled” (the latest enabled revision). :param region: Region to target. If none is passed will use default region from the config. :param description: Description of the version. :param ephemeral_properties: (Optional.) Properties that defines the version’s expiration date, whether it expires after being accessed once, and the action to perform (disable or delete) once the version expires. :return: SecretVersion

Usage:

result = await api.update_secret_version(
    secret_id="example",
    revision="example",
)
class scaleway_async.secret.v1beta1.SecretVersion(revision: 'int', secret_id: 'str', status: 'SecretVersionStatus', latest: 'bool', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', deleted_at: 'Optional[datetime]', description: 'Optional[str]', ephemeral_properties: 'Optional[EphemeralProperties]', deletion_requested_at: 'Optional[datetime]')

Bases: object

created_at: Optional[datetime]

Date and time of the version’s creation.

deleted_at: Optional[datetime]

Date and time of the version’s deletion.

deletion_requested_at: Optional[datetime]

Returns the time at which deletion was requested.

description: Optional[str]

Description of the version.

ephemeral_properties: Optional[EphemeralProperties]

Returns the version’s expiration date, whether it expires after being accessed once, and the action to perform (disable or delete) once the version expires.

latest: bool

Returns true if the version is the latest.

revision: int

The first version of the secret is numbered 1, and all subsequent revisions augment by 1.

secret_id: str

ID of the secret.

status: SecretVersionStatus
  • unknown_status: the version is in an invalid state.

  • enabled: the version is accessible.

  • disabled: the version is not accessible but can be enabled.

  • scheduled_for_deletion: the version is scheduled for deletion. It will be deleted in 7 days.

  • deleted: the version is permanently deleted. It is not possible to recover it.

updated_at: Optional[datetime]

Last update of the version.

class scaleway_async.secret.v1beta1.SecretVersionStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

DELETED = 'deleted'
DISABLED = 'disabled'
ENABLED = 'enabled'
SCHEDULED_FOR_DELETION = 'scheduled_for_deletion'
UNKNOWN_STATUS = 'unknown_status'
class scaleway_async.secret.v1beta1.UnprotectSecretRequest(secret_id: 'str', region: 'Optional[ScwRegion]')

Bases: object

region: Optional[str]

Region to target. If none is passed will use default region from the config.

secret_id: str

ID of the secret to disable secret protection for.

class scaleway_async.secret.v1beta1.UpdateSecretRequest(secret_id: 'str', region: 'Optional[ScwRegion]', name: 'Optional[str]', tags: 'Optional[List[str]]', description: 'Optional[str]', path: 'Optional[str]', ephemeral_policy: 'Optional[EphemeralPolicy]')

Bases: object

description: Optional[str]

Description of the secret.

ephemeral_policy: Optional[EphemeralPolicy]

(Optional.) Policy that defines whether/when a secret’s versions expire.

name: Optional[str]

Secret’s updated name (optional).

path: Optional[str]

(Optional.) Location of the folder in the directory structure. If not specified, the path is /.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

secret_id: str

ID of the secret.

tags: Optional[List[str]]

Secret’s updated list of tags (optional).

class scaleway_async.secret.v1beta1.UpdateSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[ScwRegion]', description: 'Optional[str]', ephemeral_properties: 'Optional[EphemeralProperties]')

Bases: object

description: Optional[str]

Description of the version.

ephemeral_properties: Optional[EphemeralProperties]

(Optional.) Properties that defines the version’s expiration date, whether it expires after being accessed once, and the action to perform (disable or delete) once the version expires.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

revision: str

The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:

  • a number (the revision number)

  • “latest” (the latest revision)

  • “latest_enabled” (the latest enabled revision).

secret_id: str

ID of the secret.