scaleway_async.secret.v1alpha1 package
Submodules
scaleway_async.secret.v1alpha1.api module
- class scaleway_async.secret.v1alpha1.api.SecretV1Alpha1API(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_name(*, 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. Access sensitive data in a secret’s version specified by the region, secret_name, revision and project_id parameters.
This method is deprecated.
Scaleway recommends that you use the ListSecrets request with the name filter to specify the secret version desired, then use the AccessSecretVersion request. :param secret_name: Name 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 project_id: (Optional.) If not specified, Secret Manager will look for the secret version in all Projects. :return:
AccessSecretVersionResponse
:deprecatedUsage:
result = await api.access_secret_version_by_name( secret_name="example", revision="example", )
- async add_secret_owner(*, secret_id: str, region: Optional[str] = None, product_name: 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_name: (Deprecated: use product field) Name of the product to add. :param product: See Product enum for description of values.
Usage:
result = await api.add_secret_owner( secret_id="example", )
- async create_folder(*, name: str, region: Optional[str] = None, project_id: Optional[str] = None, path: Optional[str] = None) Folder
Create folder. :param name: Name of the folder. :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 folder. :param path: (Optional.) Location of the folder in the directory structure. If not specified, the path is /. :return:
Folder
Usage:
result = await api.create_folder( name="example", )
- async create_secret(*, name: str, is_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. You must specify the region to create a secret. :param name: Name of the secret. :param is_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 Secret.Type enum for 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", is_protected=False, )
- async create_secret_version(*, secret_id: str, data: str, region: Optional[str] = None, description: Optional[str] = None, disable_previous: Optional[bool] = None, password_generation: Optional[PasswordGenerationParams] = 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 password_generation: (Optional.) If specified, a random password will be generated. The data and data_crc32 fields must be empty. By default, the generator will use upper and lower case letters, and digits. This behavior can be tuned using the generation parameters. :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_folder(*, folder_id: str, region: Optional[str] = None) None
Delete a given folder specified by the region and folder_id parameters. :param folder_id: ID of the folder. :param region: Region to target. If none is passed will use default region from the config.
Usage:
result = await api.delete_folder( folder_id="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 destroy_secret_version(*, secret_id: str, revision: str, region: Optional[str] = None) SecretVersion
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. :return:
SecretVersion
Usage:
result = await api.destroy_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 generate_password(*, secret_id: str, length: int, region: Optional[str] = None, description: Optional[str] = None, disable_previous: Optional[bool] = None, no_lowercase_letters: Optional[bool] = None, no_uppercase_letters: Optional[bool] = None, no_digits: Optional[bool] = None, additional_chars: Optional[str] = None) SecretVersion
Generate a password in a new version. Generate a password for the given secret specified by the region and secret_id parameters. This will also create a new version of the secret that will store the password. :param secret_id: ID of the secret. :param length: Length of the password to generate (between 1 and 1024 characters). :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: This has no effect if there is no previous version or if the previous version was already disabled. :param no_lowercase_letters: (Optional.) Exclude lower case letters by default in the password character set. :param no_uppercase_letters: (Optional.) Exclude upper case letters by default in the password character set. :param no_digits: (Optional.) Exclude digits by default in the password character set. :param additional_chars: (Optional.) Additional ASCII characters to be included in the password character set. :return:
SecretVersion
Usage:
result = await api.generate_password( secret_id="example", length=1, )
- 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_by_name(*, secret_name: str, region: Optional[str] = None, project_id: Optional[str] = None) Secret
Get metadata using the secret’s name. Retrieve the metadata of a secret specified by the region and secret_name parameters.
GetSecretByName usage is now deprecated.
Scaleway recommends that you use the ListSecrets request with the name filter. :param secret_name: Name of the secret. :param region: Region to target. If none is passed will use default region from the config. :param project_id: (Optional.) If not specified, Secret Manager will look for the secret in all Projects. :return:
Secret
:deprecatedUsage:
result = await api.get_secret_by_name( secret_name="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 get_secret_version_by_name(*, secret_name: str, revision: str, region: Optional[str] = None, project_id: Optional[str] = None) SecretVersion
Get metadata of a secret’s version using the secret’s name. Retrieve the metadata of a secret’s given version specified by the region, secret_name, revision and project_id parameters.
This method is deprecated.
Scaleway recommends that you use the ListSecrets request with the name filter to specify the secret version desired, then use the GetSecretVersion request. :param secret_name: Name 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 project_id: (Optional.) If not specified, Secret Manager will look for the secret version in all Projects. :return:
SecretVersion
:deprecatedUsage:
result = await api.get_secret_version_by_name( secret_name="example", revision="example", )
- async list_folders(*, region: Optional[str] = None, project_id: Optional[str] = None, path: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListFoldersRequestOrderBy] = None) ListFoldersResponse
List folders. Retrieve the list of folders created within a Project. :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 path: Filter by path (optional). :param page: :param page_size: :param order_by: :return:
ListFoldersResponse
Usage:
result = await api.list_folders()
- async list_folders_all(*, region: Optional[str] = None, project_id: Optional[str] = None, path: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListFoldersRequestOrderBy] = None) List[Folder]
List folders. Retrieve the list of folders created within a Project. :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 path: Filter by path (optional). :param page: :param page_size: :param order_by: :return:
List[Folder]
Usage:
result = await api.list_folders_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_secret_versions_by_name(*, secret_name: str, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, status: Optional[List[SecretVersionStatus]] = None, project_id: Optional[str] = None) ListSecretVersionsResponse
List versions of a secret using the secret’s name. Retrieve the list of a given secret’s versions specified by the secret_name,`region` and project_id parameters.
This method is deprecated.
Scaleway recommends that you use the ListSecrets request with the name filter to specify the secret version desired, then use the ListSecretVersions request. :param secret_name: Name 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. :param project_id: (Optional.) If not specified, Secret Manager will look for the secret in all Projects. :return:
ListSecretVersionsResponse
:deprecatedUsage:
result = await api.list_secret_versions_by_name( secret_name="example", )
- async list_secret_versions_by_name_all(*, secret_name: str, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, status: Optional[List[SecretVersionStatus]] = None, project_id: Optional[str] = None) List[SecretVersion]
List versions of a secret using the secret’s name. Retrieve the list of a given secret’s versions specified by the secret_name,`region` and project_id parameters.
This method is deprecated.
Scaleway recommends that you use the ListSecrets request with the name filter to specify the secret version desired, then use the ListSecretVersions request. :param secret_name: Name 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. :param project_id: (Optional.) If not specified, Secret Manager will look for the secret in all Projects. :return:
List[SecretVersion]
:deprecatedUsage:
result = await api.list_secret_versions_by_name_all( secret_name="example", )
- async list_secrets(*, 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, is_managed: Optional[bool] = None, path: Optional[str] = None, is_ephemeral: Optional[bool] = 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 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 is_managed: Filter by managed / not managed (optional). :param path: Filter by path (optional). :param is_ephemeral: Filter by ephemeral / not ephemeral (optional). :return:
ListSecretsResponse
Usage:
result = await api.list_secrets()
- async list_secrets_all(*, 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, is_managed: Optional[bool] = None, path: Optional[str] = None, is_ephemeral: Optional[bool] = 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 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 is_managed: Filter by managed / not managed (optional). :param path: Filter by path (optional). :param is_ephemeral: Filter by ephemeral / not ephemeral (optional). :return:
List[Secret]
Usage:
result = await api.list_secrets_all()
- 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: (Optional.) If not specified, Secret Manager will look for tags in all Projects. :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: (Optional.) If not specified, Secret Manager will look for tags in all Projects. :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
Protect a secret. Protect a given secret specified by the secret_id parameter. A protected secret can be read and modified but cannot be deleted. :param secret_id: ID of the secret to protect. :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 unprotect_secret(*, secret_id: str, region: Optional[str] = None) Secret
Unprotect a secret. Unprotect a given secret specified by the secret_id parameter. An unprotected secret can be read, modified and deleted. :param secret_id: ID of the secret to unprotect. :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.v1alpha1.marshalling module
- scaleway_async.secret.v1alpha1.marshalling.marshal_AddSecretOwnerRequest(request: AddSecretOwnerRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.secret.v1alpha1.marshalling.marshal_CreateFolderRequest(request: CreateFolderRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.secret.v1alpha1.marshalling.marshal_CreateSecretRequest(request: CreateSecretRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.secret.v1alpha1.marshalling.marshal_CreateSecretVersionRequest(request: CreateSecretVersionRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.secret.v1alpha1.marshalling.marshal_EphemeralPolicy(request: EphemeralPolicy, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.secret.v1alpha1.marshalling.marshal_EphemeralProperties(request: EphemeralProperties, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.secret.v1alpha1.marshalling.marshal_GeneratePasswordRequest(request: GeneratePasswordRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.secret.v1alpha1.marshalling.marshal_PasswordGenerationParams(request: PasswordGenerationParams, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.secret.v1alpha1.marshalling.marshal_UpdateSecretRequest(request: UpdateSecretRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.secret.v1alpha1.marshalling.marshal_UpdateSecretVersionRequest(request: UpdateSecretVersionRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.secret.v1alpha1.marshalling.unmarshal_AccessSecretVersionResponse(data: Any) AccessSecretVersionResponse
- scaleway_async.secret.v1alpha1.marshalling.unmarshal_EphemeralPolicy(data: Any) EphemeralPolicy
- scaleway_async.secret.v1alpha1.marshalling.unmarshal_EphemeralProperties(data: Any) EphemeralProperties
- scaleway_async.secret.v1alpha1.marshalling.unmarshal_ListFoldersResponse(data: Any) ListFoldersResponse
- scaleway_async.secret.v1alpha1.marshalling.unmarshal_ListSecretVersionsResponse(data: Any) ListSecretVersionsResponse
- scaleway_async.secret.v1alpha1.marshalling.unmarshal_ListSecretsResponse(data: Any) ListSecretsResponse
- scaleway_async.secret.v1alpha1.marshalling.unmarshal_ListTagsResponse(data: Any) ListTagsResponse
- scaleway_async.secret.v1alpha1.marshalling.unmarshal_SecretVersion(data: Any) SecretVersion
scaleway_async.secret.v1alpha1.types module
- class scaleway_async.secret.v1alpha1.types.AccessSecretVersionByNameRequest(secret_name: 'str', revision: 'str', region: 'Optional[Region]', project_id: 'Optional[str]')
Bases:
object
- project_id: Optional[str]
(Optional.) If not specified, Secret Manager will look for the secret version in all Projects.
- 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_name: str
Name of the secret.
- class scaleway_async.secret.v1alpha1.types.AccessSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[Region]')
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.v1alpha1.types.AccessSecretVersionResponse(secret_id: 'str', revision: 'int', data: 'str', 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.
- class scaleway_async.secret.v1alpha1.types.AddSecretOwnerRequest(secret_id: 'str', region: 'Optional[Region]', product_name: 'Optional[str]', product: 'Optional[Product]')
Bases:
object
- product_name: Optional[str]
(Deprecated: use product field) Name of the product to add.
- 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.v1alpha1.types.CreateFolderRequest(name: 'str', region: 'Optional[Region]', project_id: 'Optional[str]', path: 'Optional[str]')
Bases:
object
- name: str
Name of the folder.
- path: Optional[str]
(Optional.) Location of the folder in the directory structure. If not specified, the path is /.
- project_id: Optional[str]
ID of the Project containing the folder.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway_async.secret.v1alpha1.types.CreateSecretRequest(name: 'str', is_protected: 'bool', region: 'Optional[Region]', 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.
- is_protected: bool
A protected secret cannot be deleted.
- 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.
- 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 Secret.Type enum for description of values. If not specified, the type is Opaque.
- class scaleway_async.secret.v1alpha1.types.CreateSecretVersionRequest(secret_id: 'str', data: 'str', region: 'Optional[Region]', description: 'Optional[str]', disable_previous: 'Optional[bool]', password_generation: 'Optional[PasswordGenerationParams]', 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.
- password_generation: Optional[PasswordGenerationParams]
(Optional.) If specified, a random password will be generated. The data and data_crc32 fields must be empty. By default, the generator will use upper and lower case letters, and digits. This behavior can be tuned using the generation parameters.
- 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.v1alpha1.types.DeleteFolderRequest(folder_id: 'str', region: 'Optional[Region]')
Bases:
object
- folder_id: str
ID of the folder.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway_async.secret.v1alpha1.types.DeleteSecretRequest(secret_id: 'str', region: 'Optional[Region]')
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.v1alpha1.types.DestroySecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[Region]')
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.v1alpha1.types.DisableSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[Region]')
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.v1alpha1.types.EnableSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[Region]')
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.v1alpha1.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.v1alpha1.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.v1alpha1.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.v1alpha1.types.Folder(id: 'str', project_id: 'str', name: 'str', path: 'str', region: 'Region', created_at: 'Optional[datetime]')
Bases:
object
- created_at: Optional[datetime]
Date and time of the folder’s creation.
- id: str
ID of the folder.
- name: str
Name of the folder.
- path: str
Location of the folder in the directory structure.
- project_id: str
ID of the Project containing the folder.
- region: str
Region of the folder.
- class scaleway_async.secret.v1alpha1.types.GeneratePasswordRequest(secret_id: 'str', length: 'int', region: 'Optional[Region]', description: 'Optional[str]', disable_previous: 'Optional[bool]', no_lowercase_letters: 'Optional[bool]', no_uppercase_letters: 'Optional[bool]', no_digits: 'Optional[bool]', additional_chars: 'Optional[str]')
Bases:
object
- additional_chars: Optional[str]
(Optional.) Additional ASCII characters to be included in the password character set.
- description: Optional[str]
Description of the version.
- disable_previous: Optional[bool]
This has no effect if there is no previous version or if the previous version was already disabled.
- length: int
Length of the password to generate (between 1 and 1024 characters).
- no_digits: Optional[bool]
(Optional.) Exclude digits by default in the password character set.
- no_lowercase_letters: Optional[bool]
(Optional.) Exclude lower case letters by default in the password character set.
- no_uppercase_letters: Optional[bool]
(Optional.) Exclude upper case letters by default in the password character set.
- 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.v1alpha1.types.GetSecretByNameRequest(secret_name: 'str', region: 'Optional[Region]', project_id: 'Optional[str]')
Bases:
object
- project_id: Optional[str]
(Optional.) If not specified, Secret Manager will look for the secret in all Projects.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- secret_name: str
Name of the secret.
- class scaleway_async.secret.v1alpha1.types.GetSecretRequest(secret_id: 'str', region: 'Optional[Region]')
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.v1alpha1.types.GetSecretVersionByNameRequest(secret_name: 'str', revision: 'str', region: 'Optional[Region]', project_id: 'Optional[str]')
Bases:
object
- project_id: Optional[str]
(Optional.) If not specified, Secret Manager will look for the secret version in all Projects.
- 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_name: str
Name of the secret.
- class scaleway_async.secret.v1alpha1.types.GetSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[Region]')
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.v1alpha1.types.ListFoldersRequest(region: 'Optional[Region]', project_id: 'Optional[str]', path: 'Optional[str]', page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListFoldersRequestOrderBy]')
Bases:
object
- order_by: Optional[ListFoldersRequestOrderBy]
- page: Optional[int]
- page_size: Optional[int]
- path: Optional[str]
Filter by 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.
- class scaleway_async.secret.v1alpha1.types.ListFoldersRequestOrderBy(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'
- class scaleway_async.secret.v1alpha1.types.ListFoldersResponse(folders: 'List[Folder]', total_count: 'int')
Bases:
object
- total_count: int
Count of all folders matching the requested criteria.
- class scaleway_async.secret.v1alpha1.types.ListSecretVersionsByNameRequest(secret_name: 'str', region: 'Optional[Region]', page: 'Optional[int]', page_size: 'Optional[int]', status: 'Optional[List[SecretVersionStatus]]', project_id: 'Optional[str]')
Bases:
object
- page: Optional[int]
- page_size: Optional[int]
- project_id: Optional[str]
(Optional.) If not specified, Secret Manager will look for the secret in all Projects.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- secret_name: str
Name of the secret.
- status: Optional[List[SecretVersionStatus]]
Filter results by status.
- class scaleway_async.secret.v1alpha1.types.ListSecretVersionsRequest(secret_id: 'str', region: 'Optional[Region]', 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.v1alpha1.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.v1alpha1.types.ListSecretsRequest(region: 'Optional[Region]', 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]', is_managed: 'Optional[bool]', path: 'Optional[str]', is_ephemeral: 'Optional[bool]')
Bases:
object
- is_ephemeral: Optional[bool]
Filter by ephemeral / not ephemeral (optional).
- is_managed: Optional[bool]
Filter by managed / not managed (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 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.
- tags: Optional[List[str]]
List of tags to filter on (optional).
- class scaleway_async.secret.v1alpha1.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.v1alpha1.types.ListSecretsResponse(secrets: 'List[Secret]', total_count: 'int')
Bases:
object
- total_count: int
Count of all secrets matching the requested criteria.
- class scaleway_async.secret.v1alpha1.types.ListTagsRequest(region: 'Optional[Region]', project_id: 'Optional[str]', page: 'Optional[int]', page_size: 'Optional[int]')
Bases:
object
- page: Optional[int]
- page_size: Optional[int]
- project_id: Optional[str]
(Optional.) If not specified, Secret Manager will look for tags in all Projects.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway_async.secret.v1alpha1.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.v1alpha1.types.PasswordGenerationParams(length: 'int', no_lowercase_letters: 'bool', no_uppercase_letters: 'bool', no_digits: 'bool', additional_chars: 'str')
Bases:
object
- additional_chars: str
Additional ascii characters to be included in the alphabet.
- length: int
Length of the password to generate (between 1 and 1024).
- no_digits: bool
Do not include digits by default in the alphabet.
- no_lowercase_letters: bool
Do not include lower case letters by default in the alphabet.
- no_uppercase_letters: bool
Do not include upper case letters by default in the alphabet.
- class scaleway_async.secret.v1alpha1.types.Product(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- EDGE_SERVICES = 'edge_services'
- UNKNOWN = 'unknown'
- class scaleway_async.secret.v1alpha1.types.ProtectSecretRequest(secret_id: 'str', region: 'Optional[Region]')
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 protect.
- class scaleway_async.secret.v1alpha1.types.Secret(id: 'str', project_id: 'str', name: 'str', status: 'SecretStatus', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', tags: 'List[str]', version_count: 'int', is_managed: 'bool', is_protected: 'bool', type_: 'SecretType', path: 'str', region: 'Region', description: 'Optional[str]', ephemeral_policy: 'Optional[EphemeralPolicy]')
Bases:
object
- created_at: Optional[datetime]
Date and time of the secret’s creation.
- 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.
- is_managed: bool
Returns true for secrets that are managed by another product.
- is_protected: bool
Returns true for protected secrets that cannot be deleted.
- 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.
- 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 Secret.Type enum for description of values.
- updated_at: Optional[datetime]
Last update of the secret.
- version_count: int
Number of versions for this secret.
- class scaleway_async.secret.v1alpha1.types.SecretStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- LOCKED = 'locked'
- READY = 'ready'
- class scaleway_async.secret.v1alpha1.types.SecretType(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CERTIFICATE = 'certificate'
- KEY_VALUE = 'key_value'
- OPAQUE = 'opaque'
- UNKNOWN_SECRET_TYPE = 'unknown_secret_type'
- class scaleway_async.secret.v1alpha1.types.SecretVersion(revision: 'int', secret_id: 'str', status: 'SecretVersionStatus', is_latest: 'bool', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', description: 'Optional[str]', ephemeral_properties: 'Optional[EphemeralProperties]')
Bases:
object
- created_at: Optional[datetime]
Date and time of the version’s creation.
- 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.
- is_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: the version is in an invalid state.
enabled: the version is accessible.
disabled: the version is not accessible but can be enabled.
destroyed: 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.v1alpha1.types.SecretVersionStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- DESTROYED = 'destroyed'
- DISABLED = 'disabled'
- ENABLED = 'enabled'
- UNKNOWN = 'unknown'
- class scaleway_async.secret.v1alpha1.types.UnprotectSecretRequest(secret_id: 'str', region: 'Optional[Region]')
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 unprotect.
- class scaleway_async.secret.v1alpha1.types.UpdateSecretRequest(secret_id: 'str', region: 'Optional[Region]', 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.v1alpha1.types.UpdateSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[Region]', 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.v1alpha1.AccessSecretVersionByNameRequest(secret_name: 'str', revision: 'str', region: 'Optional[Region]', project_id: 'Optional[str]')
Bases:
object
- project_id: Optional[str]
(Optional.) If not specified, Secret Manager will look for the secret version in all Projects.
- 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_name: str
Name of the secret.
- class scaleway_async.secret.v1alpha1.AccessSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[Region]')
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.v1alpha1.AccessSecretVersionResponse(secret_id: 'str', revision: 'int', data: 'str', 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.
- class scaleway_async.secret.v1alpha1.AddSecretOwnerRequest(secret_id: 'str', region: 'Optional[Region]', product_name: 'Optional[str]', product: 'Optional[Product]')
Bases:
object
- product_name: Optional[str]
(Deprecated: use product field) Name of the product to add.
- 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.v1alpha1.CreateFolderRequest(name: 'str', region: 'Optional[Region]', project_id: 'Optional[str]', path: 'Optional[str]')
Bases:
object
- name: str
Name of the folder.
- path: Optional[str]
(Optional.) Location of the folder in the directory structure. If not specified, the path is /.
- project_id: Optional[str]
ID of the Project containing the folder.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway_async.secret.v1alpha1.CreateSecretRequest(name: 'str', is_protected: 'bool', region: 'Optional[Region]', 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.
- is_protected: bool
A protected secret cannot be deleted.
- 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.
- 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 Secret.Type enum for description of values. If not specified, the type is Opaque.
- class scaleway_async.secret.v1alpha1.CreateSecretVersionRequest(secret_id: 'str', data: 'str', region: 'Optional[Region]', description: 'Optional[str]', disable_previous: 'Optional[bool]', password_generation: 'Optional[PasswordGenerationParams]', 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.
- password_generation: Optional[PasswordGenerationParams]
(Optional.) If specified, a random password will be generated. The data and data_crc32 fields must be empty. By default, the generator will use upper and lower case letters, and digits. This behavior can be tuned using the generation parameters.
- 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.v1alpha1.DeleteFolderRequest(folder_id: 'str', region: 'Optional[Region]')
Bases:
object
- folder_id: str
ID of the folder.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway_async.secret.v1alpha1.DeleteSecretRequest(secret_id: 'str', region: 'Optional[Region]')
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.v1alpha1.DestroySecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[Region]')
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.v1alpha1.DisableSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[Region]')
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.v1alpha1.EnableSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[Region]')
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.v1alpha1.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.v1alpha1.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.v1alpha1.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.v1alpha1.Folder(id: 'str', project_id: 'str', name: 'str', path: 'str', region: 'Region', created_at: 'Optional[datetime]')
Bases:
object
- created_at: Optional[datetime]
Date and time of the folder’s creation.
- id: str
ID of the folder.
- name: str
Name of the folder.
- path: str
Location of the folder in the directory structure.
- project_id: str
ID of the Project containing the folder.
- region: str
Region of the folder.
- class scaleway_async.secret.v1alpha1.GeneratePasswordRequest(secret_id: 'str', length: 'int', region: 'Optional[Region]', description: 'Optional[str]', disable_previous: 'Optional[bool]', no_lowercase_letters: 'Optional[bool]', no_uppercase_letters: 'Optional[bool]', no_digits: 'Optional[bool]', additional_chars: 'Optional[str]')
Bases:
object
- additional_chars: Optional[str]
(Optional.) Additional ASCII characters to be included in the password character set.
- description: Optional[str]
Description of the version.
- disable_previous: Optional[bool]
This has no effect if there is no previous version or if the previous version was already disabled.
- length: int
Length of the password to generate (between 1 and 1024 characters).
- no_digits: Optional[bool]
(Optional.) Exclude digits by default in the password character set.
- no_lowercase_letters: Optional[bool]
(Optional.) Exclude lower case letters by default in the password character set.
- no_uppercase_letters: Optional[bool]
(Optional.) Exclude upper case letters by default in the password character set.
- 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.v1alpha1.GetSecretByNameRequest(secret_name: 'str', region: 'Optional[Region]', project_id: 'Optional[str]')
Bases:
object
- project_id: Optional[str]
(Optional.) If not specified, Secret Manager will look for the secret in all Projects.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- secret_name: str
Name of the secret.
- class scaleway_async.secret.v1alpha1.GetSecretRequest(secret_id: 'str', region: 'Optional[Region]')
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.v1alpha1.GetSecretVersionByNameRequest(secret_name: 'str', revision: 'str', region: 'Optional[Region]', project_id: 'Optional[str]')
Bases:
object
- project_id: Optional[str]
(Optional.) If not specified, Secret Manager will look for the secret version in all Projects.
- 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_name: str
Name of the secret.
- class scaleway_async.secret.v1alpha1.GetSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[Region]')
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.v1alpha1.ListFoldersRequest(region: 'Optional[Region]', project_id: 'Optional[str]', path: 'Optional[str]', page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListFoldersRequestOrderBy]')
Bases:
object
- order_by: Optional[ListFoldersRequestOrderBy]
- page: Optional[int]
- page_size: Optional[int]
- path: Optional[str]
Filter by 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.
- class scaleway_async.secret.v1alpha1.ListFoldersRequestOrderBy(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'
- class scaleway_async.secret.v1alpha1.ListFoldersResponse(folders: 'List[Folder]', total_count: 'int')
Bases:
object
- total_count: int
Count of all folders matching the requested criteria.
- class scaleway_async.secret.v1alpha1.ListSecretVersionsByNameRequest(secret_name: 'str', region: 'Optional[Region]', page: 'Optional[int]', page_size: 'Optional[int]', status: 'Optional[List[SecretVersionStatus]]', project_id: 'Optional[str]')
Bases:
object
- page: Optional[int]
- page_size: Optional[int]
- project_id: Optional[str]
(Optional.) If not specified, Secret Manager will look for the secret in all Projects.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- secret_name: str
Name of the secret.
- status: Optional[List[SecretVersionStatus]]
Filter results by status.
- class scaleway_async.secret.v1alpha1.ListSecretVersionsRequest(secret_id: 'str', region: 'Optional[Region]', 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.v1alpha1.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.v1alpha1.ListSecretsRequest(region: 'Optional[Region]', 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]', is_managed: 'Optional[bool]', path: 'Optional[str]', is_ephemeral: 'Optional[bool]')
Bases:
object
- is_ephemeral: Optional[bool]
Filter by ephemeral / not ephemeral (optional).
- is_managed: Optional[bool]
Filter by managed / not managed (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 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.
- tags: Optional[List[str]]
List of tags to filter on (optional).
- class scaleway_async.secret.v1alpha1.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.v1alpha1.ListSecretsResponse(secrets: 'List[Secret]', total_count: 'int')
Bases:
object
- total_count: int
Count of all secrets matching the requested criteria.
- class scaleway_async.secret.v1alpha1.ListTagsRequest(region: 'Optional[Region]', project_id: 'Optional[str]', page: 'Optional[int]', page_size: 'Optional[int]')
Bases:
object
- page: Optional[int]
- page_size: Optional[int]
- project_id: Optional[str]
(Optional.) If not specified, Secret Manager will look for tags in all Projects.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway_async.secret.v1alpha1.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.v1alpha1.PasswordGenerationParams(length: 'int', no_lowercase_letters: 'bool', no_uppercase_letters: 'bool', no_digits: 'bool', additional_chars: 'str')
Bases:
object
- additional_chars: str
Additional ascii characters to be included in the alphabet.
- length: int
Length of the password to generate (between 1 and 1024).
- no_digits: bool
Do not include digits by default in the alphabet.
- no_lowercase_letters: bool
Do not include lower case letters by default in the alphabet.
- no_uppercase_letters: bool
Do not include upper case letters by default in the alphabet.
- class scaleway_async.secret.v1alpha1.Product(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- EDGE_SERVICES = 'edge_services'
- UNKNOWN = 'unknown'
- class scaleway_async.secret.v1alpha1.ProtectSecretRequest(secret_id: 'str', region: 'Optional[Region]')
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 protect.
- class scaleway_async.secret.v1alpha1.Secret(id: 'str', project_id: 'str', name: 'str', status: 'SecretStatus', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', tags: 'List[str]', version_count: 'int', is_managed: 'bool', is_protected: 'bool', type_: 'SecretType', path: 'str', region: 'Region', description: 'Optional[str]', ephemeral_policy: 'Optional[EphemeralPolicy]')
Bases:
object
- created_at: Optional[datetime]
Date and time of the secret’s creation.
- 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.
- is_managed: bool
Returns true for secrets that are managed by another product.
- is_protected: bool
Returns true for protected secrets that cannot be deleted.
- 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.
- 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 Secret.Type enum for description of values.
- updated_at: Optional[datetime]
Last update of the secret.
- version_count: int
Number of versions for this secret.
- class scaleway_async.secret.v1alpha1.SecretStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- LOCKED = 'locked'
- READY = 'ready'
- class scaleway_async.secret.v1alpha1.SecretType(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CERTIFICATE = 'certificate'
- KEY_VALUE = 'key_value'
- OPAQUE = 'opaque'
- UNKNOWN_SECRET_TYPE = 'unknown_secret_type'
- class scaleway_async.secret.v1alpha1.SecretV1Alpha1API(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_name(*, 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. Access sensitive data in a secret’s version specified by the region, secret_name, revision and project_id parameters.
This method is deprecated.
Scaleway recommends that you use the ListSecrets request with the name filter to specify the secret version desired, then use the AccessSecretVersion request. :param secret_name: Name 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 project_id: (Optional.) If not specified, Secret Manager will look for the secret version in all Projects. :return:
AccessSecretVersionResponse
:deprecatedUsage:
result = await api.access_secret_version_by_name( secret_name="example", revision="example", )
- async add_secret_owner(*, secret_id: str, region: Optional[str] = None, product_name: 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_name: (Deprecated: use product field) Name of the product to add. :param product: See Product enum for description of values.
Usage:
result = await api.add_secret_owner( secret_id="example", )
- async create_folder(*, name: str, region: Optional[str] = None, project_id: Optional[str] = None, path: Optional[str] = None) Folder
Create folder. :param name: Name of the folder. :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 folder. :param path: (Optional.) Location of the folder in the directory structure. If not specified, the path is /. :return:
Folder
Usage:
result = await api.create_folder( name="example", )
- async create_secret(*, name: str, is_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. You must specify the region to create a secret. :param name: Name of the secret. :param is_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 Secret.Type enum for 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", is_protected=False, )
- async create_secret_version(*, secret_id: str, data: str, region: Optional[str] = None, description: Optional[str] = None, disable_previous: Optional[bool] = None, password_generation: Optional[PasswordGenerationParams] = 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 password_generation: (Optional.) If specified, a random password will be generated. The data and data_crc32 fields must be empty. By default, the generator will use upper and lower case letters, and digits. This behavior can be tuned using the generation parameters. :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_folder(*, folder_id: str, region: Optional[str] = None) None
Delete a given folder specified by the region and folder_id parameters. :param folder_id: ID of the folder. :param region: Region to target. If none is passed will use default region from the config.
Usage:
result = await api.delete_folder( folder_id="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 destroy_secret_version(*, secret_id: str, revision: str, region: Optional[str] = None) SecretVersion
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. :return:
SecretVersion
Usage:
result = await api.destroy_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 generate_password(*, secret_id: str, length: int, region: Optional[str] = None, description: Optional[str] = None, disable_previous: Optional[bool] = None, no_lowercase_letters: Optional[bool] = None, no_uppercase_letters: Optional[bool] = None, no_digits: Optional[bool] = None, additional_chars: Optional[str] = None) SecretVersion
Generate a password in a new version. Generate a password for the given secret specified by the region and secret_id parameters. This will also create a new version of the secret that will store the password. :param secret_id: ID of the secret. :param length: Length of the password to generate (between 1 and 1024 characters). :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: This has no effect if there is no previous version or if the previous version was already disabled. :param no_lowercase_letters: (Optional.) Exclude lower case letters by default in the password character set. :param no_uppercase_letters: (Optional.) Exclude upper case letters by default in the password character set. :param no_digits: (Optional.) Exclude digits by default in the password character set. :param additional_chars: (Optional.) Additional ASCII characters to be included in the password character set. :return:
SecretVersion
Usage:
result = await api.generate_password( secret_id="example", length=1, )
- 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_by_name(*, secret_name: str, region: Optional[str] = None, project_id: Optional[str] = None) Secret
Get metadata using the secret’s name. Retrieve the metadata of a secret specified by the region and secret_name parameters.
GetSecretByName usage is now deprecated.
Scaleway recommends that you use the ListSecrets request with the name filter. :param secret_name: Name of the secret. :param region: Region to target. If none is passed will use default region from the config. :param project_id: (Optional.) If not specified, Secret Manager will look for the secret in all Projects. :return:
Secret
:deprecatedUsage:
result = await api.get_secret_by_name( secret_name="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 get_secret_version_by_name(*, secret_name: str, revision: str, region: Optional[str] = None, project_id: Optional[str] = None) SecretVersion
Get metadata of a secret’s version using the secret’s name. Retrieve the metadata of a secret’s given version specified by the region, secret_name, revision and project_id parameters.
This method is deprecated.
Scaleway recommends that you use the ListSecrets request with the name filter to specify the secret version desired, then use the GetSecretVersion request. :param secret_name: Name 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 project_id: (Optional.) If not specified, Secret Manager will look for the secret version in all Projects. :return:
SecretVersion
:deprecatedUsage:
result = await api.get_secret_version_by_name( secret_name="example", revision="example", )
- async list_folders(*, region: Optional[str] = None, project_id: Optional[str] = None, path: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListFoldersRequestOrderBy] = None) ListFoldersResponse
List folders. Retrieve the list of folders created within a Project. :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 path: Filter by path (optional). :param page: :param page_size: :param order_by: :return:
ListFoldersResponse
Usage:
result = await api.list_folders()
- async list_folders_all(*, region: Optional[str] = None, project_id: Optional[str] = None, path: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListFoldersRequestOrderBy] = None) List[Folder]
List folders. Retrieve the list of folders created within a Project. :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 path: Filter by path (optional). :param page: :param page_size: :param order_by: :return:
List[Folder]
Usage:
result = await api.list_folders_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_secret_versions_by_name(*, secret_name: str, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, status: Optional[List[SecretVersionStatus]] = None, project_id: Optional[str] = None) ListSecretVersionsResponse
List versions of a secret using the secret’s name. Retrieve the list of a given secret’s versions specified by the secret_name,`region` and project_id parameters.
This method is deprecated.
Scaleway recommends that you use the ListSecrets request with the name filter to specify the secret version desired, then use the ListSecretVersions request. :param secret_name: Name 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. :param project_id: (Optional.) If not specified, Secret Manager will look for the secret in all Projects. :return:
ListSecretVersionsResponse
:deprecatedUsage:
result = await api.list_secret_versions_by_name( secret_name="example", )
- async list_secret_versions_by_name_all(*, secret_name: str, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, status: Optional[List[SecretVersionStatus]] = None, project_id: Optional[str] = None) List[SecretVersion]
List versions of a secret using the secret’s name. Retrieve the list of a given secret’s versions specified by the secret_name,`region` and project_id parameters.
This method is deprecated.
Scaleway recommends that you use the ListSecrets request with the name filter to specify the secret version desired, then use the ListSecretVersions request. :param secret_name: Name 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. :param project_id: (Optional.) If not specified, Secret Manager will look for the secret in all Projects. :return:
List[SecretVersion]
:deprecatedUsage:
result = await api.list_secret_versions_by_name_all( secret_name="example", )
- async list_secrets(*, 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, is_managed: Optional[bool] = None, path: Optional[str] = None, is_ephemeral: Optional[bool] = 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 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 is_managed: Filter by managed / not managed (optional). :param path: Filter by path (optional). :param is_ephemeral: Filter by ephemeral / not ephemeral (optional). :return:
ListSecretsResponse
Usage:
result = await api.list_secrets()
- async list_secrets_all(*, 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, is_managed: Optional[bool] = None, path: Optional[str] = None, is_ephemeral: Optional[bool] = 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 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 is_managed: Filter by managed / not managed (optional). :param path: Filter by path (optional). :param is_ephemeral: Filter by ephemeral / not ephemeral (optional). :return:
List[Secret]
Usage:
result = await api.list_secrets_all()
- 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: (Optional.) If not specified, Secret Manager will look for tags in all Projects. :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: (Optional.) If not specified, Secret Manager will look for tags in all Projects. :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
Protect a secret. Protect a given secret specified by the secret_id parameter. A protected secret can be read and modified but cannot be deleted. :param secret_id: ID of the secret to protect. :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 unprotect_secret(*, secret_id: str, region: Optional[str] = None) Secret
Unprotect a secret. Unprotect a given secret specified by the secret_id parameter. An unprotected secret can be read, modified and deleted. :param secret_id: ID of the secret to unprotect. :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.v1alpha1.SecretVersion(revision: 'int', secret_id: 'str', status: 'SecretVersionStatus', is_latest: 'bool', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', description: 'Optional[str]', ephemeral_properties: 'Optional[EphemeralProperties]')
Bases:
object
- created_at: Optional[datetime]
Date and time of the version’s creation.
- 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.
- is_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: the version is in an invalid state.
enabled: the version is accessible.
disabled: the version is not accessible but can be enabled.
destroyed: 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.v1alpha1.SecretVersionStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- DESTROYED = 'destroyed'
- DISABLED = 'disabled'
- ENABLED = 'enabled'
- UNKNOWN = 'unknown'
- class scaleway_async.secret.v1alpha1.UnprotectSecretRequest(secret_id: 'str', region: 'Optional[Region]')
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 unprotect.
- class scaleway_async.secret.v1alpha1.UpdateSecretRequest(secret_id: 'str', region: 'Optional[Region]', 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.v1alpha1.UpdateSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[Region]', 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.