scaleway_async.secret.v1beta1 package
Submodules
scaleway_async.secret.v1beta1.api module
- class scaleway_async.secret.v1beta1.api.SecretV1Beta1API(client: Client, *, bypass_validation: bool = False)
Bases:
APIThis 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: str | None = 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:
AccessSecretVersionResponseUsage:
result = await api.access_secret_version( secret_id="example", revision="example", )
- async access_secret_version_by_path(*, secret_path: str, secret_name: str, revision: str, region: str | None = None, project_id: str | None = None) AccessSecretVersionResponse
Access a secret’s version using the secret’s name and path. Access sensitive data in a secret’s version specified by the region, secret_name, secret_path and revision parameters. :param secret_path: Secret’s path. :param secret_name: Secret’s name. :param revision: The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either: - an integer (the revision number) - “latest” (the latest revision) - “latest_enabled” (the latest enabled revision). :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project to target. :return:
AccessSecretVersionResponseUsage:
result = await api.access_secret_version_by_path( secret_path="example", secret_name="example", revision="example", )
- async add_secret_owner(*, secret_id: str, region: str | None = None, product: Product | None = None) None
Allow a product to use the secret. :param secret_id: ID of the secret. :param region: Region to target. If none is passed will use default region from the config. :param product: See Product enum for description of values.
Usage:
result = await api.add_secret_owner( secret_id="example", )
- async browse_secrets(*, prefix: str, region: str | None = None, project_id: str | None = None, order_by: BrowseSecretsRequestOrderBy | None = None, page: int | None = None, page_size: int | None = None, tags: List[str] | None = None, type_: SecretType | None = None) BrowseSecretsResponse
Browse secrets. Retrieve the list of secrets and folders for the given prefix. You must specify either the organization_id or the project_id and the region. :param prefix: Filter secrets and folders for a given prefix (default /). :param region: Region to target. If none is passed will use default region from the config. :param project_id: Filter by Project ID (optional). :param order_by: :param page: :param page_size: :param tags: Filter secrets by tags. :param type_: Filter by secret type (optional). :return:
BrowseSecretsResponseUsage:
result = await api.browse_secrets( prefix="example", )
- async create_secret(*, name: str, protected: bool, region: str | None = None, project_id: str | None = None, tags: List[str] | None = None, description: str | None = None, type_: SecretType | None = None, path: str | None = None, ephemeral_policy: EphemeralPolicy | None = None, key_id: str | None = None) Secret
Create a secret. Create a secret in a given region specified by the region parameter. :param name: Name of the secret. :param protected: A protected secret cannot be deleted. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project containing the secret. :param tags: List of the secret’s tags. :param description: Description of the secret. :param type_: (Optional.) See the Secret.Type enum for a description of values. If not specified, the type is Opaque. :param path: (Optional.) Location of the secret in the directory structure. If not specified, the path is /. :param ephemeral_policy: (Optional.) Policy that defines whether/when a secret’s versions expire. By default, the policy is applied to all the secret’s versions. :param key_id: (Optional.) The Scaleway Key Manager key ID will be used to encrypt and decrypt secret versions. If not specified, Secret Manager will use a Key Manager internal key. :return:
SecretUsage:
result = await api.create_secret( name="example", protected=False, )
- async create_secret_version(*, secret_id: str, data: str, region: str | None = None, description: str | None = None, disable_previous: bool | None = None, data_crc32: int | None = None) SecretVersion
Create a version. Create a version of a given secret specified by the region and secret_id parameters. :param secret_id: ID of the secret. :param data: The base64-encoded secret payload of the version. :param region: Region to target. If none is passed will use default region from the config. :param description: Description of the version. :param disable_previous: (Optional.) If there is no previous version or if the previous version was already disabled, does nothing. :param data_crc32: If specified, Secret Manager will verify the integrity of the data received against the given CRC32 checksum. An error is returned if the CRC32 does not match. If, however, the CRC32 matches, it will be stored and returned along with the SecretVersion on future access requests. :return:
SecretVersionUsage:
result = await api.create_secret_version( secret_id="example", data="example", )
- async delete_secret(*, secret_id: str, region: str | None = None) None
Delete a secret. Delete a given secret specified by the region and secret_id parameters. :param secret_id: ID of the secret. :param region: Region to target. If none is passed will use default region from the config.
Usage:
result = await api.delete_secret( secret_id="example", )
- async delete_secret_version(*, secret_id: str, revision: str, region: str | None = None) None
Delete a version. Delete a secret’s version and the sensitive data contained in it. Deleting a version is permanent and cannot be undone. :param secret_id: ID of the secret. :param revision: The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either: - a number (the revision number) - “latest” (the latest revision) - “latest_enabled” (the latest enabled revision). :param region: Region to target. If none is passed will use default region from the config.
Usage:
result = await api.delete_secret_version( secret_id="example", revision="example", )
- async disable_secret_version(*, secret_id: str, revision: str, region: str | None = 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:
SecretVersionUsage:
result = await api.disable_secret_version( secret_id="example", revision="example", )
- async enable_secret_version(*, secret_id: str, revision: str, region: str | None = 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:
SecretVersionUsage:
result = await api.enable_secret_version( secret_id="example", revision="example", )
- async get_secret(*, secret_id: str, region: str | None = 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:
SecretUsage:
result = await api.get_secret( secret_id="example", )
- async get_secret_version(*, secret_id: str, revision: str, region: str | None = 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:
SecretVersionUsage:
result = await api.get_secret_version( secret_id="example", revision="example", )
- async list_secret_types(*, region: str | None = None, project_id: str | None = None, page: int | None = None, page_size: int | None = None) ListSecretTypesResponse
List secret types. List all secret types created within a given Project. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project to target. :param page: :param page_size: :return:
ListSecretTypesResponseUsage:
result = await api.list_secret_types()
- async list_secret_types_all(*, region: str | None = None, project_id: str | None = None, page: int | None = None, page_size: int | None = None) List[SecretType]
List secret types. List all secret types created within a given Project. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project to target. :param page: :param page_size: :return:
List[SecretType]Usage:
result = await api.list_secret_types_all()
- async list_secret_versions(*, secret_id: str, region: str | None = None, page: int | None = None, page_size: int | None = None, status: List[SecretVersionStatus] | None = 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:
ListSecretVersionsResponseUsage:
result = await api.list_secret_versions( secret_id="example", )
- async list_secret_versions_all(*, secret_id: str, region: str | None = None, page: int | None = None, page_size: int | None = None, status: List[SecretVersionStatus] | None = None) List[SecretVersion]
List versions of a secret using the secret’s ID. Retrieve the list of a given secret’s versions specified by the secret_id and region parameters. :param secret_id: ID of the secret. :param region: Region to target. If none is passed will use default region from the config. :param page: :param page_size: :param status: Filter results by status. :return:
List[SecretVersion]Usage:
result = await api.list_secret_versions_all( secret_id="example", )
- async list_secrets(*, scheduled_for_deletion: bool, region: str | None = None, organization_id: str | None = None, project_id: str | None = None, order_by: ListSecretsRequestOrderBy | None = None, page: int | None = None, page_size: int | None = None, tags: List[str] | None = None, name: str | None = None, path: str | None = None, ephemeral: bool | None = None, type_: SecretType | None = None) ListSecretsResponse
List secrets. Retrieve the list of secrets created within an Organization and/or Project. You must specify either the organization_id or the project_id and the region. :param scheduled_for_deletion: Filter by whether the secret was scheduled for deletion / not scheduled for deletion. By default, it will display only not scheduled for deletion secrets. :param region: Region to target. If none is passed will use default region from the config. :param organization_id: Filter by Organization ID (optional). :param project_id: Filter by Project ID (optional). :param order_by: :param page: :param page_size: :param tags: List of tags to filter on (optional). :param name: Filter by secret name (optional). :param path: Filter by exact path (optional). :param ephemeral: Filter by ephemeral / not ephemeral (optional). :param type_: Filter by secret type (optional). :return:
ListSecretsResponseUsage:
result = await api.list_secrets( scheduled_for_deletion=False, )
- async list_secrets_all(*, scheduled_for_deletion: bool, region: str | None = None, organization_id: str | None = None, project_id: str | None = None, order_by: ListSecretsRequestOrderBy | None = None, page: int | None = None, page_size: int | None = None, tags: List[str] | None = None, name: str | None = None, path: str | None = None, ephemeral: bool | None = None, type_: SecretType | None = None) List[Secret]
List secrets. Retrieve the list of secrets created within an Organization and/or Project. You must specify either the organization_id or the project_id and the region. :param scheduled_for_deletion: Filter by whether the secret was scheduled for deletion / not scheduled for deletion. By default, it will display only not scheduled for deletion secrets. :param region: Region to target. If none is passed will use default region from the config. :param organization_id: Filter by Organization ID (optional). :param project_id: Filter by Project ID (optional). :param order_by: :param page: :param page_size: :param tags: List of tags to filter on (optional). :param name: Filter by secret name (optional). :param path: Filter by exact path (optional). :param ephemeral: Filter by ephemeral / not ephemeral (optional). :param type_: Filter by secret type (optional). :return:
List[Secret]Usage:
result = await api.list_secrets_all( scheduled_for_deletion=False, )
- async list_tags(*, region: str | None = None, project_id: str | None = None, page: int | None = None, page_size: int | None = None) ListTagsResponse
List tags. List all tags associated with secrets within a given Project. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project to target. :param page: :param page_size: :return:
ListTagsResponseUsage:
result = await api.list_tags()
- async list_tags_all(*, region: str | None = None, project_id: str | None = None, page: int | None = None, page_size: int | None = None) List[str]
List tags. List all tags associated with secrets within a given Project. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project to target. :param page: :param page_size: :return:
List[str]Usage:
result = await api.list_tags_all()
- async protect_secret(*, secret_id: str, region: str | None = None) Secret
Enable secret protection. Enable secret protection for a given secret specified by the secret_id parameter. Enabling secret protection means that your secret can be read and modified, but it cannot be deleted. :param secret_id: ID of the secret to enable secret protection for. :param region: Region to target. If none is passed will use default region from the config. :return:
SecretUsage:
result = await api.protect_secret( secret_id="example", )
- async restore_secret(*, secret_id: str, region: str | None = None) Secret
Restore a secret. Restore a secret and all its versions scheduled for deletion specified by the region and secret_id parameters. :param secret_id: :param region: Region to target. If none is passed will use default region from the config. :return:
SecretUsage:
result = await api.restore_secret( secret_id="example", )
- async restore_secret_version(*, secret_id: str, revision: str, region: str | None = None) SecretVersion
Restore a version. Restore a secret’s version specified by the region, secret_id and revision parameters. :param secret_id: :param revision: :param region: Region to target. If none is passed will use default region from the config. :return:
SecretVersionUsage:
result = await api.restore_secret_version( secret_id="example", revision="example", )
- async unprotect_secret(*, secret_id: str, region: str | None = None) Secret
Disable secret protection. Disable secret protection for a given secret specified by the secret_id parameter. Disabling secret protection means that your secret can be read, modified and deleted. :param secret_id: ID of the secret to disable secret protection for. :param region: Region to target. If none is passed will use default region from the config. :return:
SecretUsage:
result = await api.unprotect_secret( secret_id="example", )
- async update_secret(*, secret_id: str, region: str | None = None, name: str | None = None, tags: List[str] | None = None, description: str | None = None, path: str | None = None, ephemeral_policy: EphemeralPolicy | None = 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:
SecretUsage:
result = await api.update_secret( secret_id="example", )
- async update_secret_version(*, secret_id: str, revision: str, region: str | None = None, description: str | None = None, ephemeral_properties: EphemeralProperties | None = 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:
SecretVersionUsage:
result = await api.update_secret_version( secret_id="example", revision="example", )
scaleway_async.secret.v1beta1.marshalling module
- scaleway_async.secret.v1beta1.marshalling.marshal_AddSecretOwnerRequest(request: AddSecretOwnerRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.secret.v1beta1.marshalling.marshal_CreateSecretRequest(request: CreateSecretRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.secret.v1beta1.marshalling.marshal_CreateSecretVersionRequest(request: CreateSecretVersionRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.secret.v1beta1.marshalling.marshal_EphemeralPolicy(request: EphemeralPolicy, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.secret.v1beta1.marshalling.marshal_EphemeralProperties(request: EphemeralProperties, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.secret.v1beta1.marshalling.marshal_UpdateSecretRequest(request: UpdateSecretRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.secret.v1beta1.marshalling.marshal_UpdateSecretVersionRequest(request: UpdateSecretVersionRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.secret.v1beta1.marshalling.unmarshal_AccessSecretVersionResponse(data: Any) AccessSecretVersionResponse
- scaleway_async.secret.v1beta1.marshalling.unmarshal_BrowseSecretsResponse(data: Any) BrowseSecretsResponse
- scaleway_async.secret.v1beta1.marshalling.unmarshal_BrowseSecretsResponseItem(data: Any) BrowseSecretsResponseItem
- scaleway_async.secret.v1beta1.marshalling.unmarshal_BrowseSecretsResponseItemFolderDetails(data: Any) BrowseSecretsResponseItemFolderDetails
- scaleway_async.secret.v1beta1.marshalling.unmarshal_BrowseSecretsResponseItemSecretDetails(data: Any) BrowseSecretsResponseItemSecretDetails
- scaleway_async.secret.v1beta1.marshalling.unmarshal_EphemeralPolicy(data: Any) EphemeralPolicy
- scaleway_async.secret.v1beta1.marshalling.unmarshal_EphemeralProperties(data: Any) EphemeralProperties
- scaleway_async.secret.v1beta1.marshalling.unmarshal_ListSecretTypesResponse(data: Any) ListSecretTypesResponse
- scaleway_async.secret.v1beta1.marshalling.unmarshal_ListSecretVersionsResponse(data: Any) ListSecretVersionsResponse
- scaleway_async.secret.v1beta1.marshalling.unmarshal_ListSecretsResponse(data: Any) ListSecretsResponse
- scaleway_async.secret.v1beta1.marshalling.unmarshal_ListTagsResponse(data: Any) ListTagsResponse
- scaleway_async.secret.v1beta1.marshalling.unmarshal_SecretVersion(data: Any) SecretVersion
scaleway_async.secret.v1beta1.types module
- class scaleway_async.secret.v1beta1.types.AccessSecretVersionByPathRequest(secret_path: 'str', secret_name: 'str', revision: 'str', region: 'Optional[ScwRegion]' = None, project_id: 'Optional[str]' = None)
Bases:
object- project_id: str | None = None
ID of the Project to target.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- revision: str
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
an integer (the revision number)
“latest” (the latest revision)
“latest_enabled” (the latest enabled revision).
- secret_name: str
Secret’s name.
- secret_path: str
Secret’s path.
- class scaleway_async.secret.v1beta1.types.AccessSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- region: str | None = None
Region to target. If none is passed will use default region from the config.
- revision: str
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
a number (the revision number)
“latest” (the latest revision)
“latest_enabled” (the latest enabled revision).
- secret_id: str
ID of the secret.
- class scaleway_async.secret.v1beta1.types.AccessSecretVersionResponse(secret_id: 'str', revision: 'int', data: 'str', type_: 'SecretType', data_crc32: 'Optional[int]' = 0)
Bases:
object- data: str
The base64-encoded secret payload of the version.
- data_crc32: int | None = 0
This field is only available if a CRC32 was supplied during the creation of the version.
- revision: int
The first version of the secret is numbered 1, and all subsequent revisions augment by 1.
- secret_id: str
ID of the secret.
- type_: SecretType
See the Secret.Type enum for a description of values.
- class scaleway_async.secret.v1beta1.types.AddSecretOwnerRequest(secret_id: 'str', region: 'Optional[ScwRegion]' = None, product: 'Optional[Product]' = <Product.UNKNOWN_PRODUCT: 'unknown_product'>)
Bases:
object- region: str | None = None
Region to target. If none is passed will use default region from the config.
- secret_id: str
ID of the secret.
- class scaleway_async.secret.v1beta1.types.BasicCredentials(username: 'str', password: 'str')
Bases:
object- password: str
The password associated with the credentials.
- username: str
The username or identifier associated with the credentials.
- class scaleway_async.secret.v1beta1.types.BrowseSecretsRequest(prefix: 'str', region: 'Optional[ScwRegion]' = None, project_id: 'Optional[str]' = None, order_by: 'Optional[BrowseSecretsRequestOrderBy]' = <BrowseSecretsRequestOrderBy.NAME_ASC: 'name_asc'>, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0, tags: 'Optional[List[str]]' = <factory>, type_: 'Optional[SecretType]' = <SecretType.UNKNOWN_TYPE: 'unknown_type'>)
Bases:
object- order_by: BrowseSecretsRequestOrderBy | None = 'name_asc'
- page: int | None = 0
- page_size: int | None = 0
- prefix: str
Filter secrets and folders for a given prefix (default /).
- project_id: str | None = None
Filter by Project ID (optional).
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- tags: List[str] | None
Filter secrets by tags.
- type_: SecretType | None = 'unknown_type'
Filter by secret type (optional).
- class scaleway_async.secret.v1beta1.types.BrowseSecretsRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- NAME_ASC = 'name_asc'
- NAME_DESC = 'name_desc'
- UPDATED_AT_ASC = 'updated_at_asc'
- UPDATED_AT_DESC = 'updated_at_desc'
- class scaleway_async.secret.v1beta1.types.BrowseSecretsResponse(items: 'List[BrowseSecretsResponseItem]', current_path: 'str', total_count: 'int')
Bases:
object- current_path: str
Current path for the given prefix.
- items: List[BrowseSecretsResponseItem]
Repeated item of type secret or folder, sorted by the request parameter.
- total_count: int
Count of all secrets and folders matching the requested criteria.
- class scaleway_async.secret.v1beta1.types.BrowseSecretsResponseItem(name: 'str', created_at: 'Optional[datetime]' = None, updated_at: 'Optional[datetime]' = None, secret: 'Optional[BrowseSecretsResponseItemSecretDetails]' = None, folder: 'Optional[BrowseSecretsResponseItemFolderDetails]' = None)
Bases:
object- created_at: datetime | None = None
- folder: BrowseSecretsResponseItemFolderDetails | None = None
- name: str
- secret: BrowseSecretsResponseItemSecretDetails | None = None
- updated_at: datetime | None = None
- class scaleway_async.secret.v1beta1.types.BrowseSecretsResponseItemFolderDetails
Bases:
object
- class scaleway_async.secret.v1beta1.types.BrowseSecretsResponseItemSecretDetails(id: 'str', tags: 'List[str]', version_count: 'int', protected: 'bool', type_: 'SecretType', ephemeral_policy: 'Optional[EphemeralPolicy]' = None)
Bases:
object- ephemeral_policy: EphemeralPolicy | None = None
- id: str
- protected: bool
- tags: List[str]
- type_: SecretType
- version_count: int
- class scaleway_async.secret.v1beta1.types.CreateSecretRequest(name: 'str', protected: 'bool', region: 'Optional[ScwRegion]' = None, project_id: 'Optional[str]' = None, tags: 'Optional[List[str]]' = <factory>, description: 'Optional[str]' = None, type_: 'Optional[SecretType]' = <SecretType.UNKNOWN_TYPE: 'unknown_type'>, path: 'Optional[str]' = None, ephemeral_policy: 'Optional[EphemeralPolicy]' = None, key_id: 'Optional[str]' = None)
Bases:
object- description: str | None = None
Description of the secret.
- ephemeral_policy: EphemeralPolicy | None = None
(Optional.) Policy that defines whether/when a secret’s versions expire. By default, the policy is applied to all the secret’s versions.
- key_id: str | None = None
(Optional.) The Scaleway Key Manager key ID will be used to encrypt and decrypt secret versions. If not specified, Secret Manager will use a Key Manager internal key.
- name: str
Name of the secret.
- path: str | None = None
(Optional.) Location of the secret in the directory structure. If not specified, the path is /.
- project_id: str | None = None
ID of the Project containing the secret.
- protected: bool
A protected secret cannot be deleted.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- tags: List[str] | None
List of the secret’s tags.
- type_: SecretType | None = 'unknown_type'
(Optional.) See the Secret.Type enum for a description of values. If not specified, the type is Opaque.
- class scaleway_async.secret.v1beta1.types.CreateSecretVersionRequest(secret_id: 'str', data: 'str', region: 'Optional[ScwRegion]' = None, description: 'Optional[str]' = None, disable_previous: 'Optional[bool]' = False, data_crc32: 'Optional[int]' = 0)
Bases:
object- data: str
The base64-encoded secret payload of the version.
- data_crc32: int | None = 0
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: str | None = None
Description of the version.
- disable_previous: bool | None = False
(Optional.) If there is no previous version or if the previous version was already disabled, does nothing.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- secret_id: str
ID of the secret.
- class scaleway_async.secret.v1beta1.types.DatabaseCredentials(engine: 'str', username: 'str', password: 'str', host: 'str', dbname: 'str', port: 'str')
Bases:
object- dbname: str
The name of the database to connect to.
- engine: str
Supported database engines are: ‘postgres’, ‘mysql’, ‘other’.
- host: str
The hostname or resolvable DNS name of the database server.
- password: str
The password used to authenticate to the database server.
- port: str
The port must be an integer ranging from 0 to 65535.
- username: str
The username used to authenticate to the database server.
- class scaleway_async.secret.v1beta1.types.DeleteSecretRequest(secret_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- region: str | None = None
Region to target. If none is passed will use default region from the config.
- secret_id: str
ID of the secret.
- class scaleway_async.secret.v1beta1.types.DeleteSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- region: str | None = None
Region to target. If none is passed will use default region from the config.
- revision: str
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
a number (the revision number)
“latest” (the latest revision)
“latest_enabled” (the latest enabled revision).
- secret_id: str
ID of the secret.
- class scaleway_async.secret.v1beta1.types.DisableSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- region: str | None = None
Region to target. If none is passed will use default region from the config.
- revision: str
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
a number (the revision number)
“latest” (the latest revision)
“latest_enabled” (the latest enabled revision).
- secret_id: str
ID of the secret.
- class scaleway_async.secret.v1beta1.types.EnableSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- region: str | None = None
Region to target. If none is passed will use default region from the config.
- revision: str
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
a number (the revision number)
“latest” (the latest revision)
“latest_enabled” (the latest enabled revision).
- secret_id: str
ID of the secret.
- class scaleway_async.secret.v1beta1.types.EphemeralPolicy(action: 'EphemeralPolicyAction', time_to_live: 'Optional[str]' = None, expires_once_accessed: 'Optional[bool]' = False)
Bases:
object- action: EphemeralPolicyAction
See the EphemeralPolicy.Action enum for a description of values.
- expires_once_accessed: bool | None = False
Returns true if the version expires after a single user access.
- time_to_live: str | None = None
Time frame, from one second and up to one year, during which the secret’s versions are valid.
- class scaleway_async.secret.v1beta1.types.EphemeralPolicyAction(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- DELETE = 'delete'
- DISABLE = 'disable'
- UNKNOWN_ACTION = 'unknown_action'
- class scaleway_async.secret.v1beta1.types.EphemeralProperties(action: 'EphemeralPolicyAction', expires_at: 'Optional[datetime]' = None, expires_once_accessed: 'Optional[bool]' = False)
Bases:
object- action: EphemeralPolicyAction
See EphemeralPolicy.Action enum for a description of values.
- expires_at: datetime | None = None
(Optional.) If not specified, the version does not have an expiration date.
- expires_once_accessed: bool | None = False
(Optional.) If not specified, the version can be accessed an unlimited amount of times.
- class scaleway_async.secret.v1beta1.types.GetSecretRequest(secret_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- region: str | None = None
Region to target. If none is passed will use default region from the config.
- secret_id: str
ID of the secret.
- class scaleway_async.secret.v1beta1.types.GetSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- region: str | None = None
Region to target. If none is passed will use default region from the config.
- revision: str
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
a number (the revision number)
“latest” (the latest revision)
“latest_enabled” (the latest enabled revision).
- secret_id: str
ID of the secret.
- class scaleway_async.secret.v1beta1.types.ListSecretTypesRequest(region: 'Optional[ScwRegion]' = None, project_id: 'Optional[str]' = None, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0)
Bases:
object- page: int | None = 0
- page_size: int | None = 0
- project_id: str | None = None
ID of the Project to target.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.secret.v1beta1.types.ListSecretTypesResponse(types: 'List[SecretType]', total_count: 'int')
Bases:
object- total_count: int
Count of all secret types matching the requested criteria.
- types: List[SecretType]
List of secret types.
- class scaleway_async.secret.v1beta1.types.ListSecretVersionsRequest(secret_id: 'str', region: 'Optional[ScwRegion]' = None, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0, status: 'Optional[List[SecretVersionStatus]]' = <factory>)
Bases:
object- page: int | None = 0
- page_size: int | None = 0
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- secret_id: str
ID of the secret.
- status: List[SecretVersionStatus] | None
Filter results by status.
- class scaleway_async.secret.v1beta1.types.ListSecretVersionsResponse(versions: 'List[SecretVersion]', total_count: 'int')
Bases:
object- total_count: int
Number of versions.
- versions: List[SecretVersion]
Single page of versions.
- class scaleway_async.secret.v1beta1.types.ListSecretsRequest(scheduled_for_deletion: 'bool', region: 'Optional[ScwRegion]' = None, organization_id: 'Optional[str]' = None, project_id: 'Optional[str]' = None, order_by: 'Optional[ListSecretsRequestOrderBy]' = <ListSecretsRequestOrderBy.NAME_ASC: 'name_asc'>, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0, tags: 'Optional[List[str]]' = <factory>, name: 'Optional[str]' = None, path: 'Optional[str]' = None, ephemeral: 'Optional[bool]' = False, type_: 'Optional[SecretType]' = <SecretType.UNKNOWN_TYPE: 'unknown_type'>)
Bases:
object- ephemeral: bool | None = False
Filter by ephemeral / not ephemeral (optional).
- name: str | None = None
Filter by secret name (optional).
- order_by: ListSecretsRequestOrderBy | None = 'name_asc'
- organization_id: str | None = None
Filter by Organization ID (optional).
- page: int | None = 0
- page_size: int | None = 0
- path: str | None = None
Filter by exact path (optional).
- project_id: str | None = None
Filter by Project ID (optional).
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- scheduled_for_deletion: bool
Filter by whether the secret was scheduled for deletion / not scheduled for deletion. By default, it will display only not scheduled for deletion secrets.
- tags: List[str] | None
List of tags to filter on (optional).
- type_: SecretType | None = 'unknown_type'
Filter by secret type (optional).
- class scaleway_async.secret.v1beta1.types.ListSecretsRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- NAME_ASC = 'name_asc'
- NAME_DESC = 'name_desc'
- UPDATED_AT_ASC = 'updated_at_asc'
- UPDATED_AT_DESC = 'updated_at_desc'
- class scaleway_async.secret.v1beta1.types.ListSecretsResponse(secrets: 'List[Secret]', total_count: 'int')
Bases:
object- total_count: int
Count of all secrets matching the requested criteria.
- class scaleway_async.secret.v1beta1.types.ListTagsRequest(region: 'Optional[ScwRegion]' = None, project_id: 'Optional[str]' = None, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0)
Bases:
object- page: int | None = 0
- page_size: int | None = 0
- project_id: str | None = None
ID of the Project to target.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.secret.v1beta1.types.ListTagsResponse(tags: 'List[str]', total_count: 'int')
Bases:
object- tags: List[str]
List of tags.
- total_count: int
Count of all tags matching the requested criteria.
- class scaleway_async.secret.v1beta1.types.Product(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- EDGE_SERVICES = 'edge_services'
- UNKNOWN_PRODUCT = 'unknown_product'
- class scaleway_async.secret.v1beta1.types.ProtectSecretRequest(secret_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- region: str | None = None
Region to target. If none is passed will use default region from the config.
- secret_id: str
ID of the secret to enable secret protection for.
- class scaleway_async.secret.v1beta1.types.RestoreSecretRequest(secret_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- region: str | None = None
Region to target. If none is passed will use default region from the config.
- secret_id: str
- class scaleway_async.secret.v1beta1.types.RestoreSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- region: str | None = None
Region to target. If none is passed will use default region from the config.
- revision: str
- secret_id: str
- class scaleway_async.secret.v1beta1.types.SSHKey(ssh_private_key: 'str')
Bases:
object- ssh_private_key: str
The private SSH key.
- class scaleway_async.secret.v1beta1.types.Secret(id: 'str', project_id: 'str', name: 'str', status: 'SecretStatus', tags: 'List[str]', version_count: 'int', managed: 'bool', protected: 'bool', type_: 'SecretType', path: 'str', used_by: 'List[Product]', region: 'ScwRegion', created_at: 'Optional[datetime]' = None, updated_at: 'Optional[datetime]' = None, description: 'Optional[str]' = None, ephemeral_policy: 'Optional[EphemeralPolicy]' = None, deletion_requested_at: 'Optional[datetime]' = None, key_id: 'Optional[str]' = None)
Bases:
object- created_at: datetime | None = None
Date and time of the secret’s creation.
- deletion_requested_at: datetime | None = None
Returns the time at which deletion was requested.
- description: str | None = None
Updated description of the secret.
- ephemeral_policy: EphemeralPolicy | None = None
(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.
- key_id: str | None = None
(Optional.) The Scaleway Key Manager key ID used to encrypt and decrypt secret versions.
- managed: bool
Returns true for secrets that are managed by another product.
- name: str
Name of the secret.
- path: str
Location of the secret in the directory structure.
- project_id: str
ID of the Project containing the secret.
- protected: bool
Returns true for protected secrets that cannot be deleted.
- region: str
Region of the secret.
- status: SecretStatus
ready: the secret can be read, modified and deleted.
locked: no action can be performed on the secret. This status can only be applied and removed by Scaleway.
- tags: List[str]
List of the secret’s tags.
- type_: SecretType
See the Secret.Type enum for a description of values.
- updated_at: datetime | None = None
Last update of the secret.
- version_count: int
Number of versions for this secret.
- class scaleway_async.secret.v1beta1.types.SecretStatus(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- LOCKED = 'locked'
- READY = 'ready'
- UNKNOWN_STATUS = 'unknown_status'
- class scaleway_async.secret.v1beta1.types.SecretType(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- BASIC_CREDENTIALS = 'basic_credentials'
- CERTIFICATE = 'certificate'
- DATABASE_CREDENTIALS = 'database_credentials'
- KEY_VALUE = 'key_value'
- OPAQUE = 'opaque'
- SSH_KEY = 'ssh_key'
- UNKNOWN_TYPE = 'unknown_type'
- class scaleway_async.secret.v1beta1.types.SecretVersion(revision: 'int', secret_id: 'str', status: 'SecretVersionStatus', latest: 'bool', created_at: 'Optional[datetime]' = None, updated_at: 'Optional[datetime]' = None, deleted_at: 'Optional[datetime]' = None, description: 'Optional[str]' = None, ephemeral_properties: 'Optional[EphemeralProperties]' = None, deletion_requested_at: 'Optional[datetime]' = None)
Bases:
object- created_at: datetime | None = None
Date and time of the version’s creation.
- deleted_at: datetime | None = None
Date and time of the version’s deletion.
- deletion_requested_at: datetime | None = None
Returns the time at which deletion was requested.
- description: str | None = None
Description of the version.
- ephemeral_properties: EphemeralProperties | None = None
Returns the version’s expiration date, whether it expires after being accessed once, and the action to perform (disable or delete) once the version expires.
- latest: bool
Returns true if the version is the latest.
- revision: int
The first version of the secret is numbered 1, and all subsequent revisions augment by 1.
- secret_id: str
ID of the secret.
- status: SecretVersionStatus
unknown_status: the version is in an invalid state.
enabled: the version is accessible.
disabled: the version is not accessible but can be enabled.
scheduled_for_deletion: the version is scheduled for deletion. It will be deleted in 7 days.
deleted: the version is permanently deleted. It is not possible to recover it.
- updated_at: datetime | None = None
Last update of the version.
- class scaleway_async.secret.v1beta1.types.SecretVersionStatus(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- DELETED = 'deleted'
- DISABLED = 'disabled'
- ENABLED = 'enabled'
- SCHEDULED_FOR_DELETION = 'scheduled_for_deletion'
- UNKNOWN_STATUS = 'unknown_status'
- class scaleway_async.secret.v1beta1.types.UnprotectSecretRequest(secret_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- region: str | None = None
Region to target. If none is passed will use default region from the config.
- secret_id: str
ID of the secret to disable secret protection for.
- class scaleway_async.secret.v1beta1.types.UpdateSecretRequest(secret_id: 'str', region: 'Optional[ScwRegion]' = None, name: 'Optional[str]' = None, tags: 'Optional[List[str]]' = <factory>, description: 'Optional[str]' = None, path: 'Optional[str]' = None, ephemeral_policy: 'Optional[EphemeralPolicy]' = None)
Bases:
object- description: str | None = None
Description of the secret.
- ephemeral_policy: EphemeralPolicy | None = None
(Optional.) Policy that defines whether/when a secret’s versions expire.
- name: str | None = None
Secret’s updated name (optional).
- path: str | None = None
(Optional.) Location of the folder in the directory structure. If not specified, the path is /.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- secret_id: str
ID of the secret.
- tags: List[str] | None
Secret’s updated list of tags (optional).
- class scaleway_async.secret.v1beta1.types.UpdateSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[ScwRegion]' = None, description: 'Optional[str]' = None, ephemeral_properties: 'Optional[EphemeralProperties]' = None)
Bases:
object- description: str | None = None
Description of the version.
- ephemeral_properties: EphemeralProperties | None = None
(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: str | None = None
Region to target. If none is passed will use default region from the config.
- revision: str
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
a number (the revision number)
“latest” (the latest revision)
“latest_enabled” (the latest enabled revision).
- secret_id: str
ID of the secret.
Module contents
- class scaleway_async.secret.v1beta1.AccessSecretVersionByPathRequest(secret_path: 'str', secret_name: 'str', revision: 'str', region: 'Optional[ScwRegion]' = None, project_id: 'Optional[str]' = None)
Bases:
object- project_id: str | None = None
ID of the Project to target.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- revision: str
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
an integer (the revision number)
“latest” (the latest revision)
“latest_enabled” (the latest enabled revision).
- secret_name: str
Secret’s name.
- secret_path: str
Secret’s path.
- class scaleway_async.secret.v1beta1.AccessSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- region: str | None = None
Region to target. If none is passed will use default region from the config.
- revision: str
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
a number (the revision number)
“latest” (the latest revision)
“latest_enabled” (the latest enabled revision).
- secret_id: str
ID of the secret.
- class scaleway_async.secret.v1beta1.AccessSecretVersionResponse(secret_id: 'str', revision: 'int', data: 'str', type_: 'SecretType', data_crc32: 'Optional[int]' = 0)
Bases:
object- data: str
The base64-encoded secret payload of the version.
- data_crc32: int | None = 0
This field is only available if a CRC32 was supplied during the creation of the version.
- revision: int
The first version of the secret is numbered 1, and all subsequent revisions augment by 1.
- secret_id: str
ID of the secret.
- type_: SecretType
See the Secret.Type enum for a description of values.
- class scaleway_async.secret.v1beta1.AddSecretOwnerRequest(secret_id: 'str', region: 'Optional[ScwRegion]' = None, product: 'Optional[Product]' = <Product.UNKNOWN_PRODUCT: 'unknown_product'>)
Bases:
object- region: str | None = None
Region to target. If none is passed will use default region from the config.
- secret_id: str
ID of the secret.
- class scaleway_async.secret.v1beta1.BasicCredentials(username: 'str', password: 'str')
Bases:
object- password: str
The password associated with the credentials.
- username: str
The username or identifier associated with the credentials.
- class scaleway_async.secret.v1beta1.BrowseSecretsRequest(prefix: 'str', region: 'Optional[ScwRegion]' = None, project_id: 'Optional[str]' = None, order_by: 'Optional[BrowseSecretsRequestOrderBy]' = <BrowseSecretsRequestOrderBy.NAME_ASC: 'name_asc'>, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0, tags: 'Optional[List[str]]' = <factory>, type_: 'Optional[SecretType]' = <SecretType.UNKNOWN_TYPE: 'unknown_type'>)
Bases:
object- order_by: BrowseSecretsRequestOrderBy | None = 'name_asc'
- page: int | None = 0
- page_size: int | None = 0
- prefix: str
Filter secrets and folders for a given prefix (default /).
- project_id: str | None = None
Filter by Project ID (optional).
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- tags: List[str] | None
Filter secrets by tags.
- type_: SecretType | None = 'unknown_type'
Filter by secret type (optional).
- class scaleway_async.secret.v1beta1.BrowseSecretsRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- NAME_ASC = 'name_asc'
- NAME_DESC = 'name_desc'
- UPDATED_AT_ASC = 'updated_at_asc'
- UPDATED_AT_DESC = 'updated_at_desc'
- class scaleway_async.secret.v1beta1.BrowseSecretsResponse(items: 'List[BrowseSecretsResponseItem]', current_path: 'str', total_count: 'int')
Bases:
object- current_path: str
Current path for the given prefix.
- items: List[BrowseSecretsResponseItem]
Repeated item of type secret or folder, sorted by the request parameter.
- total_count: int
Count of all secrets and folders matching the requested criteria.
- class scaleway_async.secret.v1beta1.BrowseSecretsResponseItem(name: 'str', created_at: 'Optional[datetime]' = None, updated_at: 'Optional[datetime]' = None, secret: 'Optional[BrowseSecretsResponseItemSecretDetails]' = None, folder: 'Optional[BrowseSecretsResponseItemFolderDetails]' = None)
Bases:
object- created_at: datetime | None = None
- folder: BrowseSecretsResponseItemFolderDetails | None = None
- name: str
- secret: BrowseSecretsResponseItemSecretDetails | None = None
- updated_at: datetime | None = None
- class scaleway_async.secret.v1beta1.BrowseSecretsResponseItemFolderDetails
Bases:
object
- class scaleway_async.secret.v1beta1.BrowseSecretsResponseItemSecretDetails(id: 'str', tags: 'List[str]', version_count: 'int', protected: 'bool', type_: 'SecretType', ephemeral_policy: 'Optional[EphemeralPolicy]' = None)
Bases:
object- ephemeral_policy: EphemeralPolicy | None = None
- id: str
- protected: bool
- tags: List[str]
- type_: SecretType
- version_count: int
- class scaleway_async.secret.v1beta1.CreateSecretRequest(name: 'str', protected: 'bool', region: 'Optional[ScwRegion]' = None, project_id: 'Optional[str]' = None, tags: 'Optional[List[str]]' = <factory>, description: 'Optional[str]' = None, type_: 'Optional[SecretType]' = <SecretType.UNKNOWN_TYPE: 'unknown_type'>, path: 'Optional[str]' = None, ephemeral_policy: 'Optional[EphemeralPolicy]' = None, key_id: 'Optional[str]' = None)
Bases:
object- description: str | None = None
Description of the secret.
- ephemeral_policy: EphemeralPolicy | None = None
(Optional.) Policy that defines whether/when a secret’s versions expire. By default, the policy is applied to all the secret’s versions.
- key_id: str | None = None
(Optional.) The Scaleway Key Manager key ID will be used to encrypt and decrypt secret versions. If not specified, Secret Manager will use a Key Manager internal key.
- name: str
Name of the secret.
- path: str | None = None
(Optional.) Location of the secret in the directory structure. If not specified, the path is /.
- project_id: str | None = None
ID of the Project containing the secret.
- protected: bool
A protected secret cannot be deleted.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- tags: List[str] | None
List of the secret’s tags.
- type_: SecretType | None = 'unknown_type'
(Optional.) See the Secret.Type enum for a description of values. If not specified, the type is Opaque.
- class scaleway_async.secret.v1beta1.CreateSecretVersionRequest(secret_id: 'str', data: 'str', region: 'Optional[ScwRegion]' = None, description: 'Optional[str]' = None, disable_previous: 'Optional[bool]' = False, data_crc32: 'Optional[int]' = 0)
Bases:
object- data: str
The base64-encoded secret payload of the version.
- data_crc32: int | None = 0
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: str | None = None
Description of the version.
- disable_previous: bool | None = False
(Optional.) If there is no previous version or if the previous version was already disabled, does nothing.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- secret_id: str
ID of the secret.
- class scaleway_async.secret.v1beta1.DatabaseCredentials(engine: 'str', username: 'str', password: 'str', host: 'str', dbname: 'str', port: 'str')
Bases:
object- dbname: str
The name of the database to connect to.
- engine: str
Supported database engines are: ‘postgres’, ‘mysql’, ‘other’.
- host: str
The hostname or resolvable DNS name of the database server.
- password: str
The password used to authenticate to the database server.
- port: str
The port must be an integer ranging from 0 to 65535.
- username: str
The username used to authenticate to the database server.
- class scaleway_async.secret.v1beta1.DeleteSecretRequest(secret_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- region: str | None = None
Region to target. If none is passed will use default region from the config.
- secret_id: str
ID of the secret.
- class scaleway_async.secret.v1beta1.DeleteSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- region: str | None = None
Region to target. If none is passed will use default region from the config.
- revision: str
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
a number (the revision number)
“latest” (the latest revision)
“latest_enabled” (the latest enabled revision).
- secret_id: str
ID of the secret.
- class scaleway_async.secret.v1beta1.DisableSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- region: str | None = None
Region to target. If none is passed will use default region from the config.
- revision: str
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
a number (the revision number)
“latest” (the latest revision)
“latest_enabled” (the latest enabled revision).
- secret_id: str
ID of the secret.
- class scaleway_async.secret.v1beta1.EnableSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- region: str | None = None
Region to target. If none is passed will use default region from the config.
- revision: str
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
a number (the revision number)
“latest” (the latest revision)
“latest_enabled” (the latest enabled revision).
- secret_id: str
ID of the secret.
- class scaleway_async.secret.v1beta1.EphemeralPolicy(action: 'EphemeralPolicyAction', time_to_live: 'Optional[str]' = None, expires_once_accessed: 'Optional[bool]' = False)
Bases:
object- action: EphemeralPolicyAction
See the EphemeralPolicy.Action enum for a description of values.
- expires_once_accessed: bool | None = False
Returns true if the version expires after a single user access.
- time_to_live: str | None = None
Time frame, from one second and up to one year, during which the secret’s versions are valid.
- class scaleway_async.secret.v1beta1.EphemeralPolicyAction(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- DELETE = 'delete'
- DISABLE = 'disable'
- UNKNOWN_ACTION = 'unknown_action'
- class scaleway_async.secret.v1beta1.EphemeralProperties(action: 'EphemeralPolicyAction', expires_at: 'Optional[datetime]' = None, expires_once_accessed: 'Optional[bool]' = False)
Bases:
object- action: EphemeralPolicyAction
See EphemeralPolicy.Action enum for a description of values.
- expires_at: datetime | None = None
(Optional.) If not specified, the version does not have an expiration date.
- expires_once_accessed: bool | None = False
(Optional.) If not specified, the version can be accessed an unlimited amount of times.
- class scaleway_async.secret.v1beta1.GetSecretRequest(secret_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- region: str | None = None
Region to target. If none is passed will use default region from the config.
- secret_id: str
ID of the secret.
- class scaleway_async.secret.v1beta1.GetSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- region: str | None = None
Region to target. If none is passed will use default region from the config.
- revision: str
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
a number (the revision number)
“latest” (the latest revision)
“latest_enabled” (the latest enabled revision).
- secret_id: str
ID of the secret.
- class scaleway_async.secret.v1beta1.ListSecretTypesRequest(region: 'Optional[ScwRegion]' = None, project_id: 'Optional[str]' = None, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0)
Bases:
object- page: int | None = 0
- page_size: int | None = 0
- project_id: str | None = None
ID of the Project to target.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.secret.v1beta1.ListSecretTypesResponse(types: 'List[SecretType]', total_count: 'int')
Bases:
object- total_count: int
Count of all secret types matching the requested criteria.
- types: List[SecretType]
List of secret types.
- class scaleway_async.secret.v1beta1.ListSecretVersionsRequest(secret_id: 'str', region: 'Optional[ScwRegion]' = None, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0, status: 'Optional[List[SecretVersionStatus]]' = <factory>)
Bases:
object- page: int | None = 0
- page_size: int | None = 0
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- secret_id: str
ID of the secret.
- status: List[SecretVersionStatus] | None
Filter results by status.
- class scaleway_async.secret.v1beta1.ListSecretVersionsResponse(versions: 'List[SecretVersion]', total_count: 'int')
Bases:
object- total_count: int
Number of versions.
- versions: List[SecretVersion]
Single page of versions.
- class scaleway_async.secret.v1beta1.ListSecretsRequest(scheduled_for_deletion: 'bool', region: 'Optional[ScwRegion]' = None, organization_id: 'Optional[str]' = None, project_id: 'Optional[str]' = None, order_by: 'Optional[ListSecretsRequestOrderBy]' = <ListSecretsRequestOrderBy.NAME_ASC: 'name_asc'>, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0, tags: 'Optional[List[str]]' = <factory>, name: 'Optional[str]' = None, path: 'Optional[str]' = None, ephemeral: 'Optional[bool]' = False, type_: 'Optional[SecretType]' = <SecretType.UNKNOWN_TYPE: 'unknown_type'>)
Bases:
object- ephemeral: bool | None = False
Filter by ephemeral / not ephemeral (optional).
- name: str | None = None
Filter by secret name (optional).
- order_by: ListSecretsRequestOrderBy | None = 'name_asc'
- organization_id: str | None = None
Filter by Organization ID (optional).
- page: int | None = 0
- page_size: int | None = 0
- path: str | None = None
Filter by exact path (optional).
- project_id: str | None = None
Filter by Project ID (optional).
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- scheduled_for_deletion: bool
Filter by whether the secret was scheduled for deletion / not scheduled for deletion. By default, it will display only not scheduled for deletion secrets.
- tags: List[str] | None
List of tags to filter on (optional).
- type_: SecretType | None = 'unknown_type'
Filter by secret type (optional).
- class scaleway_async.secret.v1beta1.ListSecretsRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- NAME_ASC = 'name_asc'
- NAME_DESC = 'name_desc'
- UPDATED_AT_ASC = 'updated_at_asc'
- UPDATED_AT_DESC = 'updated_at_desc'
- class scaleway_async.secret.v1beta1.ListSecretsResponse(secrets: 'List[Secret]', total_count: 'int')
Bases:
object- total_count: int
Count of all secrets matching the requested criteria.
- class scaleway_async.secret.v1beta1.ListTagsRequest(region: 'Optional[ScwRegion]' = None, project_id: 'Optional[str]' = None, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0)
Bases:
object- page: int | None = 0
- page_size: int | None = 0
- project_id: str | None = None
ID of the Project to target.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.secret.v1beta1.ListTagsResponse(tags: 'List[str]', total_count: 'int')
Bases:
object- tags: List[str]
List of tags.
- total_count: int
Count of all tags matching the requested criteria.
- class scaleway_async.secret.v1beta1.Product(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- EDGE_SERVICES = 'edge_services'
- UNKNOWN_PRODUCT = 'unknown_product'
- class scaleway_async.secret.v1beta1.ProtectSecretRequest(secret_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- region: str | None = None
Region to target. If none is passed will use default region from the config.
- secret_id: str
ID of the secret to enable secret protection for.
- class scaleway_async.secret.v1beta1.RestoreSecretRequest(secret_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- region: str | None = None
Region to target. If none is passed will use default region from the config.
- secret_id: str
- class scaleway_async.secret.v1beta1.RestoreSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- region: str | None = None
Region to target. If none is passed will use default region from the config.
- revision: str
- secret_id: str
- class scaleway_async.secret.v1beta1.SSHKey(ssh_private_key: 'str')
Bases:
object- ssh_private_key: str
The private SSH key.
- class scaleway_async.secret.v1beta1.Secret(id: 'str', project_id: 'str', name: 'str', status: 'SecretStatus', tags: 'List[str]', version_count: 'int', managed: 'bool', protected: 'bool', type_: 'SecretType', path: 'str', used_by: 'List[Product]', region: 'ScwRegion', created_at: 'Optional[datetime]' = None, updated_at: 'Optional[datetime]' = None, description: 'Optional[str]' = None, ephemeral_policy: 'Optional[EphemeralPolicy]' = None, deletion_requested_at: 'Optional[datetime]' = None, key_id: 'Optional[str]' = None)
Bases:
object- created_at: datetime | None = None
Date and time of the secret’s creation.
- deletion_requested_at: datetime | None = None
Returns the time at which deletion was requested.
- description: str | None = None
Updated description of the secret.
- ephemeral_policy: EphemeralPolicy | None = None
(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.
- key_id: str | None = None
(Optional.) The Scaleway Key Manager key ID used to encrypt and decrypt secret versions.
- managed: bool
Returns true for secrets that are managed by another product.
- name: str
Name of the secret.
- path: str
Location of the secret in the directory structure.
- project_id: str
ID of the Project containing the secret.
- protected: bool
Returns true for protected secrets that cannot be deleted.
- region: str
Region of the secret.
- status: SecretStatus
ready: the secret can be read, modified and deleted.
locked: no action can be performed on the secret. This status can only be applied and removed by Scaleway.
- tags: List[str]
List of the secret’s tags.
- type_: SecretType
See the Secret.Type enum for a description of values.
- updated_at: datetime | None = None
Last update of the secret.
- version_count: int
Number of versions for this secret.
- class scaleway_async.secret.v1beta1.SecretStatus(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- LOCKED = 'locked'
- READY = 'ready'
- UNKNOWN_STATUS = 'unknown_status'
- class scaleway_async.secret.v1beta1.SecretType(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- BASIC_CREDENTIALS = 'basic_credentials'
- CERTIFICATE = 'certificate'
- DATABASE_CREDENTIALS = 'database_credentials'
- KEY_VALUE = 'key_value'
- OPAQUE = 'opaque'
- SSH_KEY = 'ssh_key'
- UNKNOWN_TYPE = 'unknown_type'
- class scaleway_async.secret.v1beta1.SecretV1Beta1API(client: Client, *, bypass_validation: bool = False)
Bases:
APIThis 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: str | None = 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:
AccessSecretVersionResponseUsage:
result = await api.access_secret_version( secret_id="example", revision="example", )
- async access_secret_version_by_path(*, secret_path: str, secret_name: str, revision: str, region: str | None = None, project_id: str | None = None) AccessSecretVersionResponse
Access a secret’s version using the secret’s name and path. Access sensitive data in a secret’s version specified by the region, secret_name, secret_path and revision parameters. :param secret_path: Secret’s path. :param secret_name: Secret’s name. :param revision: The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either: - an integer (the revision number) - “latest” (the latest revision) - “latest_enabled” (the latest enabled revision). :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project to target. :return:
AccessSecretVersionResponseUsage:
result = await api.access_secret_version_by_path( secret_path="example", secret_name="example", revision="example", )
- async add_secret_owner(*, secret_id: str, region: str | None = None, product: Product | None = None) None
Allow a product to use the secret. :param secret_id: ID of the secret. :param region: Region to target. If none is passed will use default region from the config. :param product: See Product enum for description of values.
Usage:
result = await api.add_secret_owner( secret_id="example", )
- async browse_secrets(*, prefix: str, region: str | None = None, project_id: str | None = None, order_by: BrowseSecretsRequestOrderBy | None = None, page: int | None = None, page_size: int | None = None, tags: List[str] | None = None, type_: SecretType | None = None) BrowseSecretsResponse
Browse secrets. Retrieve the list of secrets and folders for the given prefix. You must specify either the organization_id or the project_id and the region. :param prefix: Filter secrets and folders for a given prefix (default /). :param region: Region to target. If none is passed will use default region from the config. :param project_id: Filter by Project ID (optional). :param order_by: :param page: :param page_size: :param tags: Filter secrets by tags. :param type_: Filter by secret type (optional). :return:
BrowseSecretsResponseUsage:
result = await api.browse_secrets( prefix="example", )
- async create_secret(*, name: str, protected: bool, region: str | None = None, project_id: str | None = None, tags: List[str] | None = None, description: str | None = None, type_: SecretType | None = None, path: str | None = None, ephemeral_policy: EphemeralPolicy | None = None, key_id: str | None = None) Secret
Create a secret. Create a secret in a given region specified by the region parameter. :param name: Name of the secret. :param protected: A protected secret cannot be deleted. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project containing the secret. :param tags: List of the secret’s tags. :param description: Description of the secret. :param type_: (Optional.) See the Secret.Type enum for a description of values. If not specified, the type is Opaque. :param path: (Optional.) Location of the secret in the directory structure. If not specified, the path is /. :param ephemeral_policy: (Optional.) Policy that defines whether/when a secret’s versions expire. By default, the policy is applied to all the secret’s versions. :param key_id: (Optional.) The Scaleway Key Manager key ID will be used to encrypt and decrypt secret versions. If not specified, Secret Manager will use a Key Manager internal key. :return:
SecretUsage:
result = await api.create_secret( name="example", protected=False, )
- async create_secret_version(*, secret_id: str, data: str, region: str | None = None, description: str | None = None, disable_previous: bool | None = None, data_crc32: int | None = None) SecretVersion
Create a version. Create a version of a given secret specified by the region and secret_id parameters. :param secret_id: ID of the secret. :param data: The base64-encoded secret payload of the version. :param region: Region to target. If none is passed will use default region from the config. :param description: Description of the version. :param disable_previous: (Optional.) If there is no previous version or if the previous version was already disabled, does nothing. :param data_crc32: If specified, Secret Manager will verify the integrity of the data received against the given CRC32 checksum. An error is returned if the CRC32 does not match. If, however, the CRC32 matches, it will be stored and returned along with the SecretVersion on future access requests. :return:
SecretVersionUsage:
result = await api.create_secret_version( secret_id="example", data="example", )
- async delete_secret(*, secret_id: str, region: str | None = None) None
Delete a secret. Delete a given secret specified by the region and secret_id parameters. :param secret_id: ID of the secret. :param region: Region to target. If none is passed will use default region from the config.
Usage:
result = await api.delete_secret( secret_id="example", )
- async delete_secret_version(*, secret_id: str, revision: str, region: str | None = None) None
Delete a version. Delete a secret’s version and the sensitive data contained in it. Deleting a version is permanent and cannot be undone. :param secret_id: ID of the secret. :param revision: The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either: - a number (the revision number) - “latest” (the latest revision) - “latest_enabled” (the latest enabled revision). :param region: Region to target. If none is passed will use default region from the config.
Usage:
result = await api.delete_secret_version( secret_id="example", revision="example", )
- async disable_secret_version(*, secret_id: str, revision: str, region: str | None = 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:
SecretVersionUsage:
result = await api.disable_secret_version( secret_id="example", revision="example", )
- async enable_secret_version(*, secret_id: str, revision: str, region: str | None = 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:
SecretVersionUsage:
result = await api.enable_secret_version( secret_id="example", revision="example", )
- async get_secret(*, secret_id: str, region: str | None = 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:
SecretUsage:
result = await api.get_secret( secret_id="example", )
- async get_secret_version(*, secret_id: str, revision: str, region: str | None = 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:
SecretVersionUsage:
result = await api.get_secret_version( secret_id="example", revision="example", )
- async list_secret_types(*, region: str | None = None, project_id: str | None = None, page: int | None = None, page_size: int | None = None) ListSecretTypesResponse
List secret types. List all secret types created within a given Project. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project to target. :param page: :param page_size: :return:
ListSecretTypesResponseUsage:
result = await api.list_secret_types()
- async list_secret_types_all(*, region: str | None = None, project_id: str | None = None, page: int | None = None, page_size: int | None = None) List[SecretType]
List secret types. List all secret types created within a given Project. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project to target. :param page: :param page_size: :return:
List[SecretType]Usage:
result = await api.list_secret_types_all()
- async list_secret_versions(*, secret_id: str, region: str | None = None, page: int | None = None, page_size: int | None = None, status: List[SecretVersionStatus] | None = 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:
ListSecretVersionsResponseUsage:
result = await api.list_secret_versions( secret_id="example", )
- async list_secret_versions_all(*, secret_id: str, region: str | None = None, page: int | None = None, page_size: int | None = None, status: List[SecretVersionStatus] | None = None) List[SecretVersion]
List versions of a secret using the secret’s ID. Retrieve the list of a given secret’s versions specified by the secret_id and region parameters. :param secret_id: ID of the secret. :param region: Region to target. If none is passed will use default region from the config. :param page: :param page_size: :param status: Filter results by status. :return:
List[SecretVersion]Usage:
result = await api.list_secret_versions_all( secret_id="example", )
- async list_secrets(*, scheduled_for_deletion: bool, region: str | None = None, organization_id: str | None = None, project_id: str | None = None, order_by: ListSecretsRequestOrderBy | None = None, page: int | None = None, page_size: int | None = None, tags: List[str] | None = None, name: str | None = None, path: str | None = None, ephemeral: bool | None = None, type_: SecretType | None = None) ListSecretsResponse
List secrets. Retrieve the list of secrets created within an Organization and/or Project. You must specify either the organization_id or the project_id and the region. :param scheduled_for_deletion: Filter by whether the secret was scheduled for deletion / not scheduled for deletion. By default, it will display only not scheduled for deletion secrets. :param region: Region to target. If none is passed will use default region from the config. :param organization_id: Filter by Organization ID (optional). :param project_id: Filter by Project ID (optional). :param order_by: :param page: :param page_size: :param tags: List of tags to filter on (optional). :param name: Filter by secret name (optional). :param path: Filter by exact path (optional). :param ephemeral: Filter by ephemeral / not ephemeral (optional). :param type_: Filter by secret type (optional). :return:
ListSecretsResponseUsage:
result = await api.list_secrets( scheduled_for_deletion=False, )
- async list_secrets_all(*, scheduled_for_deletion: bool, region: str | None = None, organization_id: str | None = None, project_id: str | None = None, order_by: ListSecretsRequestOrderBy | None = None, page: int | None = None, page_size: int | None = None, tags: List[str] | None = None, name: str | None = None, path: str | None = None, ephemeral: bool | None = None, type_: SecretType | None = None) List[Secret]
List secrets. Retrieve the list of secrets created within an Organization and/or Project. You must specify either the organization_id or the project_id and the region. :param scheduled_for_deletion: Filter by whether the secret was scheduled for deletion / not scheduled for deletion. By default, it will display only not scheduled for deletion secrets. :param region: Region to target. If none is passed will use default region from the config. :param organization_id: Filter by Organization ID (optional). :param project_id: Filter by Project ID (optional). :param order_by: :param page: :param page_size: :param tags: List of tags to filter on (optional). :param name: Filter by secret name (optional). :param path: Filter by exact path (optional). :param ephemeral: Filter by ephemeral / not ephemeral (optional). :param type_: Filter by secret type (optional). :return:
List[Secret]Usage:
result = await api.list_secrets_all( scheduled_for_deletion=False, )
- async list_tags(*, region: str | None = None, project_id: str | None = None, page: int | None = None, page_size: int | None = None) ListTagsResponse
List tags. List all tags associated with secrets within a given Project. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project to target. :param page: :param page_size: :return:
ListTagsResponseUsage:
result = await api.list_tags()
- async list_tags_all(*, region: str | None = None, project_id: str | None = None, page: int | None = None, page_size: int | None = None) List[str]
List tags. List all tags associated with secrets within a given Project. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Project to target. :param page: :param page_size: :return:
List[str]Usage:
result = await api.list_tags_all()
- async protect_secret(*, secret_id: str, region: str | None = None) Secret
Enable secret protection. Enable secret protection for a given secret specified by the secret_id parameter. Enabling secret protection means that your secret can be read and modified, but it cannot be deleted. :param secret_id: ID of the secret to enable secret protection for. :param region: Region to target. If none is passed will use default region from the config. :return:
SecretUsage:
result = await api.protect_secret( secret_id="example", )
- async restore_secret(*, secret_id: str, region: str | None = None) Secret
Restore a secret. Restore a secret and all its versions scheduled for deletion specified by the region and secret_id parameters. :param secret_id: :param region: Region to target. If none is passed will use default region from the config. :return:
SecretUsage:
result = await api.restore_secret( secret_id="example", )
- async restore_secret_version(*, secret_id: str, revision: str, region: str | None = None) SecretVersion
Restore a version. Restore a secret’s version specified by the region, secret_id and revision parameters. :param secret_id: :param revision: :param region: Region to target. If none is passed will use default region from the config. :return:
SecretVersionUsage:
result = await api.restore_secret_version( secret_id="example", revision="example", )
- async unprotect_secret(*, secret_id: str, region: str | None = None) Secret
Disable secret protection. Disable secret protection for a given secret specified by the secret_id parameter. Disabling secret protection means that your secret can be read, modified and deleted. :param secret_id: ID of the secret to disable secret protection for. :param region: Region to target. If none is passed will use default region from the config. :return:
SecretUsage:
result = await api.unprotect_secret( secret_id="example", )
- async update_secret(*, secret_id: str, region: str | None = None, name: str | None = None, tags: List[str] | None = None, description: str | None = None, path: str | None = None, ephemeral_policy: EphemeralPolicy | None = 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:
SecretUsage:
result = await api.update_secret( secret_id="example", )
- async update_secret_version(*, secret_id: str, revision: str, region: str | None = None, description: str | None = None, ephemeral_properties: EphemeralProperties | None = 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:
SecretVersionUsage:
result = await api.update_secret_version( secret_id="example", revision="example", )
- class scaleway_async.secret.v1beta1.SecretVersion(revision: 'int', secret_id: 'str', status: 'SecretVersionStatus', latest: 'bool', created_at: 'Optional[datetime]' = None, updated_at: 'Optional[datetime]' = None, deleted_at: 'Optional[datetime]' = None, description: 'Optional[str]' = None, ephemeral_properties: 'Optional[EphemeralProperties]' = None, deletion_requested_at: 'Optional[datetime]' = None)
Bases:
object- created_at: datetime | None = None
Date and time of the version’s creation.
- deleted_at: datetime | None = None
Date and time of the version’s deletion.
- deletion_requested_at: datetime | None = None
Returns the time at which deletion was requested.
- description: str | None = None
Description of the version.
- ephemeral_properties: EphemeralProperties | None = None
Returns the version’s expiration date, whether it expires after being accessed once, and the action to perform (disable or delete) once the version expires.
- latest: bool
Returns true if the version is the latest.
- revision: int
The first version of the secret is numbered 1, and all subsequent revisions augment by 1.
- secret_id: str
ID of the secret.
- status: SecretVersionStatus
unknown_status: the version is in an invalid state.
enabled: the version is accessible.
disabled: the version is not accessible but can be enabled.
scheduled_for_deletion: the version is scheduled for deletion. It will be deleted in 7 days.
deleted: the version is permanently deleted. It is not possible to recover it.
- updated_at: datetime | None = None
Last update of the version.
- class scaleway_async.secret.v1beta1.SecretVersionStatus(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- DELETED = 'deleted'
- DISABLED = 'disabled'
- ENABLED = 'enabled'
- SCHEDULED_FOR_DELETION = 'scheduled_for_deletion'
- UNKNOWN_STATUS = 'unknown_status'
- class scaleway_async.secret.v1beta1.UnprotectSecretRequest(secret_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- region: str | None = None
Region to target. If none is passed will use default region from the config.
- secret_id: str
ID of the secret to disable secret protection for.
- class scaleway_async.secret.v1beta1.UpdateSecretRequest(secret_id: 'str', region: 'Optional[ScwRegion]' = None, name: 'Optional[str]' = None, tags: 'Optional[List[str]]' = <factory>, description: 'Optional[str]' = None, path: 'Optional[str]' = None, ephemeral_policy: 'Optional[EphemeralPolicy]' = None)
Bases:
object- description: str | None = None
Description of the secret.
- ephemeral_policy: EphemeralPolicy | None = None
(Optional.) Policy that defines whether/when a secret’s versions expire.
- name: str | None = None
Secret’s updated name (optional).
- path: str | None = None
(Optional.) Location of the folder in the directory structure. If not specified, the path is /.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- secret_id: str
ID of the secret.
- tags: List[str] | None
Secret’s updated list of tags (optional).
- class scaleway_async.secret.v1beta1.UpdateSecretVersionRequest(secret_id: 'str', revision: 'str', region: 'Optional[ScwRegion]' = None, description: 'Optional[str]' = None, ephemeral_properties: 'Optional[EphemeralProperties]' = None)
Bases:
object- description: str | None = None
Description of the version.
- ephemeral_properties: EphemeralProperties | None = None
(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: str | None = None
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.