scaleway_async.mongodb.v1alpha1 package

Submodules

scaleway_async.mongodb.v1alpha1.api module

class scaleway_async.mongodb.v1alpha1.api.MongodbV1Alpha1API(client: Client, *, bypass_validation: bool = False)

Bases: API

This API allows you to manage your Managed Databases for MongoDB®.

async create_endpoint(*, instance_id: str, endpoint: EndpointSpec, region: Optional[str] = None) Endpoint

Create a new Instance endpoint. Create a new endpoint for a MongoDB® Database Instance. You can add public_network or private_network specifications to the body of the request. :param instance_id: UUID of the Database Instance. :param endpoint: EndpointSpec used to expose your Database Instance. :param region: Region to target. If none is passed will use default region from the config. :return: Endpoint

Usage:

result = await api.create_endpoint(
    instance_id="example",
    endpoint=EndpointSpec(),
)
async create_instance(*, version: str, node_number: int, node_type: str, user_name: str, password: str, region: Optional[str] = None, project_id: Optional[str] = None, name: Optional[str] = None, tags: Optional[List[str]] = None, volume: Optional[CreateInstanceRequestVolumeDetails] = None, endpoints: Optional[List[EndpointSpec]] = None) Instance

Create a MongoDB® Database Instance. Create a new MongoDB® Database Instance. :param version: Version of the MongoDB® engine. :param node_number: Number of node to use for the Database Instance. :param node_type: Type of node to use for the Database Instance. :param user_name: Username created when the Database Instance is created. :param password: Password of the initial user. :param region: Region to target. If none is passed will use default region from the config. :param project_id: The Project ID on which the Database Instance will be created. :param name: Name of the Database Instance. :param tags: Tags to apply to the Database Instance. :param volume: Instance volume information. :param endpoints: One or multiple EndpointSpec used to expose your Database Instance. :return: Instance

Usage:

result = await api.create_instance(
    version="example",
    node_number=1,
    node_type="example",
    user_name="example",
    password="example",
)
async create_snapshot(*, instance_id: str, name: str, region: Optional[str] = None, expires_at: Optional[datetime] = None) Snapshot

Create a Database Instance snapshot. Create a new snapshot of a Database Instance. You must define the name and instance_id parameters in the request. :param instance_id: UUID of the Database Instance to snapshot. :param name: Name of the snapshot. :param region: Region to target. If none is passed will use default region from the config. :param expires_at: Expiration date of the snapshot (must follow the ISO 8601 format). :return: Snapshot

Usage:

result = await api.create_snapshot(
    instance_id="example",
    name="example",
)
async create_user(*, instance_id: str, name: str, password: str, region: Optional[str] = None) User

Create an user on a Database Instance. Create an user on a Database Instance. You must define the name, password of the user and instance_id parameters in the request. :param instance_id: UUID of the Database Instance the user belongs to. :param name: Name of the database user. :param password: Password of the database user. :param region: Region to target. If none is passed will use default region from the config. :return: User

Usage:

result = await api.create_user(
    instance_id="example",
    name="example",
    password="example",
)
async delete_endpoint(*, endpoint_id: str, region: Optional[str] = None) None

Delete a Database Instance endpoint. Delete the endpoint of a Database Instance. You must specify the endpoint_id parameter of the endpoint you want to delete. Note that you might need to update any environment configurations that point to the deleted endpoint. :param endpoint_id: UUID of the Endpoint to delete. :param region: Region to target. If none is passed will use default region from the config.

Usage:

result = await api.delete_endpoint(
    endpoint_id="example",
)
async delete_instance(*, instance_id: str, region: Optional[str] = None) Instance

Delete a MongoDB® Database Instance. Delete a given MongoDB® Database Instance, specified by the region and instance_id parameters. Deleting a MongoDB® Database Instance is permanent, and cannot be undone. Note that upon deletion all your data will be lost. :param instance_id: UUID of the Database Instance to delete. :param region: Region to target. If none is passed will use default region from the config. :return: Instance

Usage:

result = await api.delete_instance(
    instance_id="example",
)
async delete_snapshot(*, snapshot_id: str, region: Optional[str] = None) Snapshot

Delete a Database Instance snapshot. Delete a given snapshot of a Database Instance. You must specify, in the endpoint, the snapshot_id parameter of the snapshot you want to delete. :param snapshot_id: UUID of the snapshot. :param region: Region to target. If none is passed will use default region from the config. :return: Snapshot

Usage:

result = await api.delete_snapshot(
    snapshot_id="example",
)
async delete_user(*, instance_id: str, name: str, region: Optional[str] = None) None

Delete a user on a Database Instance. Delete an existing user on a Database Instance. :param instance_id: UUID of the Database Instance the user belongs to. :param name: Name of the database user. :param region: Region to target. If none is passed will use default region from the config.

Usage:

result = await api.delete_user(
    instance_id="example",
    name="example",
)
async get_instance(*, instance_id: str, region: Optional[str] = None) Instance

Get a MongoDB® Database Instance. Retrieve information about a given MongoDB® Database Instance, specified by the region and instance_id parameters. Its full details, including name, status, IP address and port, are returned in the response object. :param instance_id: UUID of the Database Instance. :param region: Region to target. If none is passed will use default region from the config. :return: Instance

Usage:

result = await api.get_instance(
    instance_id="example",
)
async get_instance_certificate(*, instance_id: str, region: Optional[str] = None) ScwFile

Get the certificate of a Database Instance. Retrieve the certificate of a given Database Instance, specified by the instance_id parameter. :param instance_id: UUID of the Database Instance. :param region: Region to target. If none is passed will use default region from the config. :return: ScwFile

Usage:

result = await api.get_instance_certificate(
    instance_id="example",
)
async get_snapshot(*, snapshot_id: str, region: Optional[str] = None) Snapshot

Get a Database Instance snapshot. Retrieve information about a given snapshot of a Database Instance. You must specify, in the endpoint, the snapshot_id parameter of the snapshot you want to retrieve. :param snapshot_id: UUID of the snapshot. :param region: Region to target. If none is passed will use default region from the config. :return: Snapshot

Usage:

result = await api.get_snapshot(
    snapshot_id="example",
)
async list_instances(*, region: Optional[str] = None, tags: Optional[List[str]] = None, name: Optional[str] = None, order_by: Optional[ListInstancesRequestOrderBy] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None) ListInstancesResponse

List MongoDB® Database Instances. List all MongoDB® Database Instances in the specified region. By default, the MongoDB® Database Instances returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. You can define additional parameters for your query, such as tags and name. For the name parameter, the value you include will be checked against the whole name string to see if it includes the string you put in the parameter. :param region: Region to target. If none is passed will use default region from the config. :param tags: List Database Instances that have a given tag. :param name: Lists Database Instances that match a name pattern. :param order_by: Criteria to use when ordering Database Instance listings. :param organization_id: Organization ID of the Database Instance. :param project_id: Project ID. :param page: :param page_size: :return: ListInstancesResponse

Usage:

result = await api.list_instances()
async list_instances_all(*, region: Optional[str] = None, tags: Optional[List[str]] = None, name: Optional[str] = None, order_by: Optional[ListInstancesRequestOrderBy] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None) List[Instance]

List MongoDB® Database Instances. List all MongoDB® Database Instances in the specified region. By default, the MongoDB® Database Instances returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. You can define additional parameters for your query, such as tags and name. For the name parameter, the value you include will be checked against the whole name string to see if it includes the string you put in the parameter. :param region: Region to target. If none is passed will use default region from the config. :param tags: List Database Instances that have a given tag. :param name: Lists Database Instances that match a name pattern. :param order_by: Criteria to use when ordering Database Instance listings. :param organization_id: Organization ID of the Database Instance. :param project_id: Project ID. :param page: :param page_size: :return: List[Instance]

Usage:

result = await api.list_instances_all()
async list_node_types(*, region: Optional[str] = None, include_disabled_types: Optional[bool] = None, page: Optional[int] = None, page_size: Optional[int] = None) ListNodeTypesResponse

List available node types. :param region: Region to target. If none is passed will use default region from the config. :param include_disabled_types: Defines whether or not to include disabled types. :param page: :param page_size: :return: ListNodeTypesResponse

Usage:

result = await api.list_node_types()
async list_node_types_all(*, region: Optional[str] = None, include_disabled_types: Optional[bool] = None, page: Optional[int] = None, page_size: Optional[int] = None) List[NodeType]

List available node types. :param region: Region to target. If none is passed will use default region from the config. :param include_disabled_types: Defines whether or not to include disabled types. :param page: :param page_size: :return: List[NodeType]

Usage:

result = await api.list_node_types_all()
async list_snapshots(*, region: Optional[str] = None, instance_id: Optional[str] = None, name: Optional[str] = None, order_by: Optional[ListSnapshotsRequestOrderBy] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None) ListSnapshotsResponse

List snapshots. List snapshots. You can include the instance_id or project_id in your query to get the list of snapshots for specific Database Instances and/or Projects. By default, the details returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. :param region: Region to target. If none is passed will use default region from the config. :param instance_id: Instance ID the snapshots belongs to. :param name: Lists database snapshots that match a name pattern. :param order_by: Criteria to use when ordering snapshot listings. :param organization_id: Organization ID the snapshots belongs to. :param project_id: Project ID to list the snapshots of. :param page: :param page_size: :return: ListSnapshotsResponse

Usage:

result = await api.list_snapshots()
async list_snapshots_all(*, region: Optional[str] = None, instance_id: Optional[str] = None, name: Optional[str] = None, order_by: Optional[ListSnapshotsRequestOrderBy] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None) List[Snapshot]

List snapshots. List snapshots. You can include the instance_id or project_id in your query to get the list of snapshots for specific Database Instances and/or Projects. By default, the details returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. :param region: Region to target. If none is passed will use default region from the config. :param instance_id: Instance ID the snapshots belongs to. :param name: Lists database snapshots that match a name pattern. :param order_by: Criteria to use when ordering snapshot listings. :param organization_id: Organization ID the snapshots belongs to. :param project_id: Project ID to list the snapshots of. :param page: :param page_size: :return: List[Snapshot]

Usage:

result = await api.list_snapshots_all()
async list_users(*, instance_id: str, region: Optional[str] = None, name: Optional[str] = None, order_by: Optional[ListUsersRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None) ListUsersResponse

List users of a Database Instance. List all users of a given Database Instance. :param instance_id: UUID of the Database Instance. :param region: Region to target. If none is passed will use default region from the config. :param name: Name of the user. :param order_by: Criteria to use when requesting user listing. :param page: :param page_size: :return: ListUsersResponse

Usage:

result = await api.list_users(
    instance_id="example",
)
async list_users_all(*, instance_id: str, region: Optional[str] = None, name: Optional[str] = None, order_by: Optional[ListUsersRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None) List[User]

List users of a Database Instance. List all users of a given Database Instance. :param instance_id: UUID of the Database Instance. :param region: Region to target. If none is passed will use default region from the config. :param name: Name of the user. :param order_by: Criteria to use when requesting user listing. :param page: :param page_size: :return: List[User]

Usage:

result = await api.list_users_all(
    instance_id="example",
)
async list_versions(*, region: Optional[str] = None, version: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None) ListVersionsResponse

List available MongoDB® versions. :param region: Region to target. If none is passed will use default region from the config. :param version: :param page: :param page_size: :return: ListVersionsResponse

Usage:

result = await api.list_versions()
async list_versions_all(*, region: Optional[str] = None, version: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None) List[Version]

List available MongoDB® versions. :param region: Region to target. If none is passed will use default region from the config. :param version: :param page: :param page_size: :return: List[Version]

Usage:

result = await api.list_versions_all()
async restore_snapshot(*, snapshot_id: str, instance_name: str, node_type: str, node_number: int, volume: RestoreSnapshotRequestVolumeDetails, region: Optional[str] = None) Instance

Restore a Database Instance snapshot. Restore a given snapshot of a Database Instance. You must specify, in the endpoint, the snapshot_id parameter of the snapshot you want to restore, the instance_name of the new Database Instance, node_type of the new Database Instance and node_number of the new Database Instance. :param snapshot_id: UUID of the snapshot. :param instance_name: Name of the new Database Instance. :param node_type: Node type to use for the new Database Instance. :param node_number: Number of nodes to use for the new Database Instance. :param volume: Instance volume information. :param region: Region to target. If none is passed will use default region from the config. :return: Instance

Usage:

result = await api.restore_snapshot(
    snapshot_id="example",
    instance_name="example",
    node_type="example",
    node_number=1,
    volume=RestoreSnapshotRequestVolumeDetails(),
)
async set_user_role(*, instance_id: str, user_name: str, region: Optional[str] = None, roles: Optional[List[UserRole]] = None) User
Parameters:
  • instance_id – UUID of the Database Instance the user belongs to.

  • user_name – Name of the database user.

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

  • roles – List of roles assigned to the user, along with the corresponding database where each role is granted.

Returns:

User

Usage:

result = await api.set_user_role(
    instance_id="example",
    user_name="example",
)
async update_instance(*, instance_id: str, region: Optional[str] = None, name: Optional[str] = None, tags: Optional[List[str]] = None) Instance

Update a MongoDB® Database Instance. Update the parameters of a MongoDB® Database Instance. :param instance_id: UUID of the Database Instance to update. :param region: Region to target. If none is passed will use default region from the config. :param name: Name of the Database Instance. :param tags: Tags of a Database Instance. :return: Instance

Usage:

result = await api.update_instance(
    instance_id="example",
)
async update_snapshot(*, snapshot_id: str, region: Optional[str] = None, name: Optional[str] = None, expires_at: Optional[datetime] = None) Snapshot

Update a Database Instance snapshot. Update the parameters of a snapshot of a Database Instance. You can update the name and expires_at parameters. :param snapshot_id: UUID of the Snapshot. :param region: Region to target. If none is passed will use default region from the config. :param name: Name of the snapshot. :param expires_at: Expiration date of the snapshot (must follow the ISO 8601 format). :return: Snapshot

Usage:

result = await api.update_snapshot(
    snapshot_id="example",
)
async update_user(*, instance_id: str, name: str, region: Optional[str] = None, password: Optional[str] = None) User

Update a user on a Database Instance. Update the parameters of a user on a Database Instance. You can update the password parameter, but you cannot change the name of the user. :param instance_id: UUID of the Database Instance the user belongs to. :param name: Name of the database user. :param region: Region to target. If none is passed will use default region from the config. :param password: Password of the database user. :return: User

Usage:

result = await api.update_user(
    instance_id="example",
    name="example",
)
async upgrade_instance(*, instance_id: str, region: Optional[str] = None, volume_size: Optional[int] = None) Instance

Upgrade a Database Instance. Upgrade your current Database Instance specifications like volume size. :param instance_id: UUID of the Database Instance you want to upgrade. :param region: Region to target. If none is passed will use default region from the config. :param volume_size: Increase your Block Storage volume size. One-Of (‘upgrade_target’): at most one of ‘volume_size’ could be set. :return: Instance

Usage:

result = await api.upgrade_instance(
    instance_id="example",
)
async wait_for_instance(*, instance_id: str, region: Optional[str] = None, options: Optional[WaitForOptions[Instance, Union[bool, Awaitable[bool]]]] = None) Instance

Get a MongoDB® Database Instance. Retrieve information about a given MongoDB® Database Instance, specified by the region and instance_id parameters. Its full details, including name, status, IP address and port, are returned in the response object. :param instance_id: UUID of the Database Instance. :param region: Region to target. If none is passed will use default region from the config. :return: Instance

Usage:

result = await api.get_instance(
    instance_id="example",
)
async wait_for_snapshot(*, snapshot_id: str, region: Optional[str] = None, options: Optional[WaitForOptions[Snapshot, Union[bool, Awaitable[bool]]]] = None) Snapshot

Get a Database Instance snapshot. Retrieve information about a given snapshot of a Database Instance. You must specify, in the endpoint, the snapshot_id parameter of the snapshot you want to retrieve. :param snapshot_id: UUID of the snapshot. :param region: Region to target. If none is passed will use default region from the config. :return: Snapshot

Usage:

result = await api.get_snapshot(
    snapshot_id="example",
)

scaleway_async.mongodb.v1alpha1.content module

scaleway_async.mongodb.v1alpha1.content.INSTANCE_TRANSIENT_STATUSES: List[InstanceStatus] = [<InstanceStatus.PROVISIONING: 'provisioning'>, <InstanceStatus.CONFIGURING: 'configuring'>, <InstanceStatus.DELETING: 'deleting'>, <InstanceStatus.INITIALIZING: 'initializing'>, <InstanceStatus.SNAPSHOTTING: 'snapshotting'>]

Lists transient statutes of the enum InstanceStatus.

scaleway_async.mongodb.v1alpha1.content.SNAPSHOT_TRANSIENT_STATUSES: List[SnapshotStatus] = [<SnapshotStatus.CREATING: 'creating'>, <SnapshotStatus.RESTORING: 'restoring'>, <SnapshotStatus.DELETING: 'deleting'>]

Lists transient statutes of the enum SnapshotStatus.

scaleway_async.mongodb.v1alpha1.marshalling module

scaleway_async.mongodb.v1alpha1.marshalling.marshal_CreateEndpointRequest(request: CreateEndpointRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway_async.mongodb.v1alpha1.marshalling.marshal_CreateInstanceRequest(request: CreateInstanceRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway_async.mongodb.v1alpha1.marshalling.marshal_CreateInstanceRequestVolumeDetails(request: CreateInstanceRequestVolumeDetails, defaults: ProfileDefaults) Dict[str, Any]
scaleway_async.mongodb.v1alpha1.marshalling.marshal_CreateSnapshotRequest(request: CreateSnapshotRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway_async.mongodb.v1alpha1.marshalling.marshal_CreateUserRequest(request: CreateUserRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway_async.mongodb.v1alpha1.marshalling.marshal_EndpointSpec(request: EndpointSpec, defaults: ProfileDefaults) Dict[str, Any]
scaleway_async.mongodb.v1alpha1.marshalling.marshal_EndpointSpecPrivateNetworkDetails(request: EndpointSpecPrivateNetworkDetails, defaults: ProfileDefaults) Dict[str, Any]
scaleway_async.mongodb.v1alpha1.marshalling.marshal_EndpointSpecPublicDetails(request: EndpointSpecPublicDetails, defaults: ProfileDefaults) Dict[str, Any]
scaleway_async.mongodb.v1alpha1.marshalling.marshal_RestoreSnapshotRequest(request: RestoreSnapshotRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway_async.mongodb.v1alpha1.marshalling.marshal_RestoreSnapshotRequestVolumeDetails(request: RestoreSnapshotRequestVolumeDetails, defaults: ProfileDefaults) Dict[str, Any]
scaleway_async.mongodb.v1alpha1.marshalling.marshal_SetUserRoleRequest(request: SetUserRoleRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway_async.mongodb.v1alpha1.marshalling.marshal_UpdateInstanceRequest(request: UpdateInstanceRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway_async.mongodb.v1alpha1.marshalling.marshal_UpdateSnapshotRequest(request: UpdateSnapshotRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway_async.mongodb.v1alpha1.marshalling.marshal_UpdateUserRequest(request: UpdateUserRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway_async.mongodb.v1alpha1.marshalling.marshal_UpgradeInstanceRequest(request: UpgradeInstanceRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway_async.mongodb.v1alpha1.marshalling.marshal_UserRole(request: UserRole, defaults: ProfileDefaults) Dict[str, Any]
scaleway_async.mongodb.v1alpha1.marshalling.unmarshal_Endpoint(data: Any) Endpoint
scaleway_async.mongodb.v1alpha1.marshalling.unmarshal_EndpointPrivateNetworkDetails(data: Any) EndpointPrivateNetworkDetails
scaleway_async.mongodb.v1alpha1.marshalling.unmarshal_EndpointPublicDetails(data: Any) EndpointPublicDetails
scaleway_async.mongodb.v1alpha1.marshalling.unmarshal_Instance(data: Any) Instance
scaleway_async.mongodb.v1alpha1.marshalling.unmarshal_InstanceSetting(data: Any) InstanceSetting
scaleway_async.mongodb.v1alpha1.marshalling.unmarshal_ListInstancesResponse(data: Any) ListInstancesResponse
scaleway_async.mongodb.v1alpha1.marshalling.unmarshal_ListNodeTypesResponse(data: Any) ListNodeTypesResponse
scaleway_async.mongodb.v1alpha1.marshalling.unmarshal_ListSnapshotsResponse(data: Any) ListSnapshotsResponse
scaleway_async.mongodb.v1alpha1.marshalling.unmarshal_ListUsersResponse(data: Any) ListUsersResponse
scaleway_async.mongodb.v1alpha1.marshalling.unmarshal_ListVersionsResponse(data: Any) ListVersionsResponse
scaleway_async.mongodb.v1alpha1.marshalling.unmarshal_NodeType(data: Any) NodeType
scaleway_async.mongodb.v1alpha1.marshalling.unmarshal_NodeTypeVolumeType(data: Any) NodeTypeVolumeType
scaleway_async.mongodb.v1alpha1.marshalling.unmarshal_Setting(data: Any) Setting
scaleway_async.mongodb.v1alpha1.marshalling.unmarshal_Snapshot(data: Any) Snapshot
scaleway_async.mongodb.v1alpha1.marshalling.unmarshal_SnapshotVolumeType(data: Any) SnapshotVolumeType
scaleway_async.mongodb.v1alpha1.marshalling.unmarshal_User(data: Any) User
scaleway_async.mongodb.v1alpha1.marshalling.unmarshal_UserRole(data: Any) UserRole
scaleway_async.mongodb.v1alpha1.marshalling.unmarshal_Version(data: Any) Version
scaleway_async.mongodb.v1alpha1.marshalling.unmarshal_Volume(data: Any) Volume

scaleway_async.mongodb.v1alpha1.types module

class scaleway_async.mongodb.v1alpha1.types.CreateEndpointRequest(instance_id: 'str', endpoint: 'EndpointSpec', region: 'Optional[ScwRegion]')

Bases: object

endpoint: EndpointSpec

EndpointSpec used to expose your Database Instance.

instance_id: str

UUID of the Database Instance.

region: Optional[str]

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

class scaleway_async.mongodb.v1alpha1.types.CreateInstanceRequest(version: 'str', node_number: 'int', node_type: 'str', user_name: 'str', password: 'str', region: 'Optional[ScwRegion]', project_id: 'Optional[str]', name: 'Optional[str]', tags: 'Optional[List[str]]', volume: 'Optional[CreateInstanceRequestVolumeDetails]', endpoints: 'Optional[List[EndpointSpec]]')

Bases: object

endpoints: Optional[List[EndpointSpec]]

One or multiple EndpointSpec used to expose your Database Instance.

name: Optional[str]

Name of the Database Instance.

node_number: int

Number of node to use for the Database Instance.

node_type: str

Type of node to use for the Database Instance.

password: str

Password of the initial user.

project_id: Optional[str]

The Project ID on which the Database Instance will be created.

region: Optional[str]

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

tags: Optional[List[str]]

Tags to apply to the Database Instance.

user_name: str

Username created when the Database Instance is created.

version: str

Version of the MongoDB® engine.

volume: Optional[CreateInstanceRequestVolumeDetails]

Instance volume information.

class scaleway_async.mongodb.v1alpha1.types.CreateInstanceRequestVolumeDetails(volume_size: 'int', volume_type: 'VolumeType')

Bases: object

volume_size: int

Volume size.

volume_type: VolumeType

Type of volume where data is stored.

class scaleway_async.mongodb.v1alpha1.types.CreateSnapshotRequest(instance_id: 'str', name: 'str', region: 'Optional[ScwRegion]', expires_at: 'Optional[datetime]')

Bases: object

expires_at: Optional[datetime]

Expiration date of the snapshot (must follow the ISO 8601 format).

instance_id: str

UUID of the Database Instance to snapshot.

name: str

Name of the snapshot.

region: Optional[str]

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

class scaleway_async.mongodb.v1alpha1.types.CreateUserRequest(instance_id: 'str', name: 'str', password: 'str', region: 'Optional[ScwRegion]')

Bases: object

instance_id: str

UUID of the Database Instance the user belongs to.

name: str

Name of the database user.

password: str

Password of the database user.

region: Optional[str]

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

class scaleway_async.mongodb.v1alpha1.types.DeleteEndpointRequest(endpoint_id: 'str', region: 'Optional[ScwRegion]')

Bases: object

endpoint_id: str

UUID of the Endpoint to delete.

region: Optional[str]

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

class scaleway_async.mongodb.v1alpha1.types.DeleteInstanceRequest(instance_id: 'str', region: 'Optional[ScwRegion]')

Bases: object

instance_id: str

UUID of the Database Instance to delete.

region: Optional[str]

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

class scaleway_async.mongodb.v1alpha1.types.DeleteSnapshotRequest(snapshot_id: 'str', region: 'Optional[ScwRegion]')

Bases: object

region: Optional[str]

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

snapshot_id: str

UUID of the snapshot.

class scaleway_async.mongodb.v1alpha1.types.DeleteUserRequest(instance_id: 'str', name: 'str', region: 'Optional[ScwRegion]')

Bases: object

instance_id: str

UUID of the Database Instance the user belongs to.

name: str

Name of the database user.

region: Optional[str]

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

class scaleway_async.mongodb.v1alpha1.types.Endpoint(id: 'str', ips: 'List[str]', dns_records: 'List[str]', port: 'int', private_network: 'Optional[EndpointPrivateNetworkDetails]', public: 'Optional[EndpointPublicDetails]')

Bases: object

dns_records: List[str]

List of DNS records of the endpoint.

id: str

UUID of the endpoint.

ips: List[str]

List of IPv4 addresses of the endpoint.

port: int

TCP port of the endpoint.

private_network: Optional[EndpointPrivateNetworkDetails]
public: Optional[EndpointPublicDetails]
class scaleway_async.mongodb.v1alpha1.types.EndpointPrivateNetworkDetails(private_network_id: str)

Bases: object

Private Network details.

private_network_id: str

UUID of the Private Network.

class scaleway_async.mongodb.v1alpha1.types.EndpointPublicDetails

Bases: object

class scaleway_async.mongodb.v1alpha1.types.EndpointSpec(public: 'Optional[EndpointSpecPublicDetails]', private_network: 'Optional[EndpointSpecPrivateNetworkDetails]')

Bases: object

private_network: Optional[EndpointSpecPrivateNetworkDetails]
public: Optional[EndpointSpecPublicDetails]
class scaleway_async.mongodb.v1alpha1.types.EndpointSpecPrivateNetworkDetails(private_network_id: 'str')

Bases: object

private_network_id: str

UUID of the Private Network.

class scaleway_async.mongodb.v1alpha1.types.EndpointSpecPublicDetails

Bases: object

class scaleway_async.mongodb.v1alpha1.types.GetInstanceCertificateRequest(instance_id: 'str', region: 'Optional[ScwRegion]')

Bases: object

instance_id: str

UUID of the Database Instance.

region: Optional[str]

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

class scaleway_async.mongodb.v1alpha1.types.GetInstanceRequest(instance_id: 'str', region: 'Optional[ScwRegion]')

Bases: object

instance_id: str

UUID of the Database Instance.

region: Optional[str]

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

class scaleway_async.mongodb.v1alpha1.types.GetSnapshotRequest(snapshot_id: 'str', region: 'Optional[ScwRegion]')

Bases: object

region: Optional[str]

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

snapshot_id: str

UUID of the snapshot.

class scaleway_async.mongodb.v1alpha1.types.Instance(id: 'str', name: 'str', project_id: 'str', status: 'InstanceStatus', version: 'str', tags: 'List[str]', settings: 'List[InstanceSetting]', node_number: 'int', node_type: 'str', endpoints: 'List[Endpoint]', region: 'ScwRegion', volume: 'Optional[Volume]', created_at: 'Optional[datetime]')

Bases: object

created_at: Optional[datetime]

Creation date (must follow the ISO 8601 format).

endpoints: List[Endpoint]

List of Database Instance endpoints.

id: str

UUID of the Database Instance.

name: str

Name of the Database Instance.

node_number: int

Number of node in the Database Instance.

node_type: str

Node type of the Database Instance.

project_id: str

Project ID the Database Instance belongs to.

region: str

Region the Database Instance is in.

settings: List[InstanceSetting]

Advanced settings of the Database Instance.

status: InstanceStatus

Status of the Database Instance.

tags: List[str]

List of tags applied to the Database Instance.

version: str

MongoDB® engine version of the Database Instance.

volume: Optional[Volume]

Volumes of the Database Instance.

class scaleway_async.mongodb.v1alpha1.types.InstanceSetting(name: 'str', value: 'str')

Bases: object

name: str

Name of the settings.

value: str

Value of the settings.

class scaleway_async.mongodb.v1alpha1.types.InstanceStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

CONFIGURING = 'configuring'
DELETING = 'deleting'
ERROR = 'error'
INITIALIZING = 'initializing'
LOCKED = 'locked'
PROVISIONING = 'provisioning'
READY = 'ready'
SNAPSHOTTING = 'snapshotting'
UNKNOWN_STATUS = 'unknown_status'
class scaleway_async.mongodb.v1alpha1.types.ListInstancesRequest(region: 'Optional[ScwRegion]', tags: 'Optional[List[str]]', name: 'Optional[str]', order_by: 'Optional[ListInstancesRequestOrderBy]', organization_id: 'Optional[str]', project_id: 'Optional[str]', page: 'Optional[int]', page_size: 'Optional[int]')

Bases: object

name: Optional[str]

Lists Database Instances that match a name pattern.

order_by: Optional[ListInstancesRequestOrderBy]

Criteria to use when ordering Database Instance listings.

organization_id: Optional[str]

Organization ID of the Database Instance.

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

Project ID.

region: Optional[str]

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

tags: Optional[List[str]]

List Database Instances that have a given tag.

class scaleway_async.mongodb.v1alpha1.types.ListInstancesRequestOrderBy(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'
STATUS_ASC = 'status_asc'
STATUS_DESC = 'status_desc'
class scaleway_async.mongodb.v1alpha1.types.ListInstancesResponse(instances: 'List[Instance]', total_count: 'int')

Bases: object

instances: List[Instance]

List of all Database Instances available in an Organization or Project.

total_count: int

Total count of Database Instances available in an Organization or Project.

class scaleway_async.mongodb.v1alpha1.types.ListNodeTypesRequest(region: 'Optional[ScwRegion]', include_disabled_types: 'Optional[bool]', page: 'Optional[int]', page_size: 'Optional[int]')

Bases: object

include_disabled_types: Optional[bool]

Defines whether or not to include disabled types.

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

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

class scaleway_async.mongodb.v1alpha1.types.ListNodeTypesResponse(node_types: 'List[NodeType]', total_count: 'int')

Bases: object

node_types: List[NodeType]

Types of the node.

total_count: int

Total count of node-types available.

class scaleway_async.mongodb.v1alpha1.types.ListSnapshotsRequest(region: 'Optional[ScwRegion]', instance_id: 'Optional[str]', name: 'Optional[str]', order_by: 'Optional[ListSnapshotsRequestOrderBy]', organization_id: 'Optional[str]', project_id: 'Optional[str]', page: 'Optional[int]', page_size: 'Optional[int]')

Bases: object

instance_id: Optional[str]

Instance ID the snapshots belongs to.

name: Optional[str]

Lists database snapshots that match a name pattern.

order_by: Optional[ListSnapshotsRequestOrderBy]

Criteria to use when ordering snapshot listings.

organization_id: Optional[str]

Organization ID the snapshots belongs to.

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

Project ID to list the snapshots of.

region: Optional[str]

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

class scaleway_async.mongodb.v1alpha1.types.ListSnapshotsRequestOrderBy(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'
EXPIRES_AT_ASC = 'expires_at_asc'
EXPIRES_AT_DESC = 'expires_at_desc'
NAME_ASC = 'name_asc'
NAME_DESC = 'name_desc'
class scaleway_async.mongodb.v1alpha1.types.ListSnapshotsResponse(snapshots: 'List[Snapshot]', total_count: 'int')

Bases: object

snapshots: List[Snapshot]

List of all database snapshots available in an Organization or Project.

total_count: int

Total count of database snapshots available in a Organization or Project.

class scaleway_async.mongodb.v1alpha1.types.ListUsersRequest(instance_id: 'str', region: 'Optional[ScwRegion]', name: 'Optional[str]', order_by: 'Optional[ListUsersRequestOrderBy]', page: 'Optional[int]', page_size: 'Optional[int]')

Bases: object

instance_id: str

UUID of the Database Instance.

name: Optional[str]

Name of the user.

order_by: Optional[ListUsersRequestOrderBy]

Criteria to use when requesting user listing.

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

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

class scaleway_async.mongodb.v1alpha1.types.ListUsersRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

NAME_ASC = 'name_asc'
NAME_DESC = 'name_desc'
class scaleway_async.mongodb.v1alpha1.types.ListUsersResponse(users: 'List[User]', total_count: 'int')

Bases: object

total_count: int

Total count of users present on a Database Instance.

users: List[User]

List of users in a Database Instance.

class scaleway_async.mongodb.v1alpha1.types.ListVersionsRequest(region: 'Optional[ScwRegion]', version: 'Optional[str]', page: 'Optional[int]', page_size: 'Optional[int]')

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.

version: Optional[str]
class scaleway_async.mongodb.v1alpha1.types.ListVersionsResponse(versions: 'List[Version]', total_count: 'int')

Bases: object

total_count: int

Total count of MongoDB® engine version available.

versions: List[Version]

Available MongoDB® engine version.

class scaleway_async.mongodb.v1alpha1.types.NodeType(name: 'str', stock_status: 'NodeTypeStock', description: 'str', vcpus: 'int', memory: 'int', available_volume_types: 'List[NodeTypeVolumeType]', disabled: 'bool', beta: 'bool', instance_range: 'str')

Bases: object

available_volume_types: List[NodeTypeVolumeType]

Available storage options for the node type.

beta: bool

The node type is currently in beta.

description: str

Current specs of the offer.

disabled: bool

The node type is currently disabled.

instance_range: str

Instance range associated with the node type offer.

memory: int

Quantity of RAM.

name: str

Node type name identifier.

stock_status: NodeTypeStock

Current stock status for the node type.

vcpus: int

Number of virtual CPUs.

class scaleway_async.mongodb.v1alpha1.types.NodeTypeStock(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

AVAILABLE = 'available'
LOW_STOCK = 'low_stock'
OUT_OF_STOCK = 'out_of_stock'
UNKNOWN_STOCK = 'unknown_stock'
class scaleway_async.mongodb.v1alpha1.types.NodeTypeVolumeType(type_: 'VolumeType', description: 'str', min_size: 'int', max_size: 'int', chunk_size: 'int')

Bases: object

chunk_size: int

Minimum increment level for a Block Storage volume size.

description: str

The description of the volume.

max_size: int

Maximum size required for the volume.

min_size: int

Mimimum size required for the volume.

type_: VolumeType

Volume Type.

class scaleway_async.mongodb.v1alpha1.types.RestoreSnapshotRequest(snapshot_id: 'str', instance_name: 'str', node_type: 'str', node_number: 'int', volume: 'RestoreSnapshotRequestVolumeDetails', region: 'Optional[ScwRegion]')

Bases: object

instance_name: str

Name of the new Database Instance.

node_number: int

Number of nodes to use for the new Database Instance.

node_type: str

Node type to use for the new Database Instance.

region: Optional[str]

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

snapshot_id: str

UUID of the snapshot.

volume: RestoreSnapshotRequestVolumeDetails

Instance volume information.

class scaleway_async.mongodb.v1alpha1.types.RestoreSnapshotRequestVolumeDetails(volume_type: 'VolumeType')

Bases: object

volume_type: VolumeType

Type of volume where data is stored.

class scaleway_async.mongodb.v1alpha1.types.SetUserRoleRequest(instance_id: 'str', user_name: 'str', region: 'Optional[ScwRegion]', roles: 'Optional[List[UserRole]]')

Bases: object

instance_id: str

UUID of the Database Instance the user belongs to.

region: Optional[str]

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

roles: Optional[List[UserRole]]

List of roles assigned to the user, along with the corresponding database where each role is granted.

user_name: str

Name of the database user.

class scaleway_async.mongodb.v1alpha1.types.Setting(name: 'str', default_value: 'str', hot_configurable: 'bool', description: 'str', property_type: 'SettingPropertyType', unit: 'Optional[str]', string_constraint: 'Optional[str]', int_min: 'Optional[int]', int_max: 'Optional[int]', float_min: 'Optional[float]', float_max: 'Optional[float]')

Bases: object

default_value: str

Value set when not specified.

description: str

Setting description.

float_max: Optional[float]

Maximum value for float types.

float_min: Optional[float]

Minimum value for float types.

hot_configurable: bool

Setting can be applied without restarting.

int_max: Optional[int]

Maximum value for int types.

int_min: Optional[int]

Minimum value for int types.

name: str

Setting name from the database engine.

property_type: SettingPropertyType

Setting type.

string_constraint: Optional[str]

Validation regex for string type settings.

unit: Optional[str]

Setting base unit.

class scaleway_async.mongodb.v1alpha1.types.SettingPropertyType(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

BOOLEAN = 'boolean'
FLOAT = 'float'
INT = 'int'
STRING = 'string'
class scaleway_async.mongodb.v1alpha1.types.Snapshot(id: 'str', instance_id: 'str', name: 'str', status: 'SnapshotStatus', size: 'int', instance_name: 'str', node_type: 'str', region: 'ScwRegion', expires_at: 'Optional[datetime]', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', volume_type: 'Optional[SnapshotVolumeType]')

Bases: object

created_at: Optional[datetime]

Creation date (must follow the ISO 8601 format).

expires_at: Optional[datetime]

Expiration date (must follow the ISO 8601 format).

id: str

UUID of the snapshot.

instance_id: str

UUID of the Database Instance.

instance_name: str

Name of the Database Instance of the snapshot.

name: str

Name of the snapshot.

node_type: str

Source node type.

region: str

Region of the snapshot.

size: int

Size of the snapshot.

status: SnapshotStatus

Status of the snapshot.

updated_at: Optional[datetime]

Updated date (must follow the ISO 8601 format).

volume_type: Optional[SnapshotVolumeType]

Type of volume where data is stored - sbs_5k or sbs_15k.

class scaleway_async.mongodb.v1alpha1.types.SnapshotStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

CREATING = 'creating'
DELETING = 'deleting'
ERROR = 'error'
LOCKED = 'locked'
READY = 'ready'
RESTORING = 'restoring'
UNKNOWN_STATUS = 'unknown_status'
class scaleway_async.mongodb.v1alpha1.types.SnapshotVolumeType(type_: 'VolumeType')

Bases: object

type_: VolumeType
class scaleway_async.mongodb.v1alpha1.types.UpdateInstanceRequest(instance_id: 'str', region: 'Optional[ScwRegion]', name: 'Optional[str]', tags: 'Optional[List[str]]')

Bases: object

instance_id: str

UUID of the Database Instance to update.

name: Optional[str]

Name of the Database Instance.

region: Optional[str]

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

tags: Optional[List[str]]

Tags of a Database Instance.

class scaleway_async.mongodb.v1alpha1.types.UpdateSnapshotRequest(snapshot_id: 'str', region: 'Optional[ScwRegion]', name: 'Optional[str]', expires_at: 'Optional[datetime]')

Bases: object

expires_at: Optional[datetime]

Expiration date of the snapshot (must follow the ISO 8601 format).

name: Optional[str]

Name of the snapshot.

region: Optional[str]

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

snapshot_id: str

UUID of the Snapshot.

class scaleway_async.mongodb.v1alpha1.types.UpdateUserRequest(instance_id: 'str', name: 'str', region: 'Optional[ScwRegion]', password: 'Optional[str]')

Bases: object

instance_id: str

UUID of the Database Instance the user belongs to.

name: str

Name of the database user.

password: Optional[str]

Password of the database user.

region: Optional[str]

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

class scaleway_async.mongodb.v1alpha1.types.UpgradeInstanceRequest(instance_id: 'str', region: 'Optional[ScwRegion]', volume_size: 'Optional[int]')

Bases: object

instance_id: str

UUID of the Database Instance you want to upgrade.

region: Optional[str]

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

volume_size: Optional[int]
class scaleway_async.mongodb.v1alpha1.types.User(name: 'str', roles: 'List[UserRole]')

Bases: object

name: str

Name of the user (Length must be between 1 and 63 characters. First character must be an alphabet character (a-zA-Z). Only a-zA-Z0-9_$- characters are accepted).

roles: List[UserRole]

List of roles assigned to the user, along with the corresponding database where each role is granted.

class scaleway_async.mongodb.v1alpha1.types.UserRole(role: 'UserRoleRole', database: 'Optional[str]', any_database: 'Optional[bool]')

Bases: object

any_database: Optional[bool]
database: Optional[str]
role: UserRoleRole
class scaleway_async.mongodb.v1alpha1.types.UserRoleRole(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

DB_ADMIN = 'db_admin'
READ = 'read'
READ_WRITE = 'read_write'
SYNC = 'sync'
UNKNOWN_ROLE = 'unknown_role'
class scaleway_async.mongodb.v1alpha1.types.Version(version: 'str', available_settings: 'List[Setting]', end_of_life_at: 'Optional[datetime]')

Bases: object

available_settings: List[Setting]

Instance settings available to be updated.

end_of_life_at: Optional[datetime]

Date of End of Life.

version: str

MongoDB® engine version.

class scaleway_async.mongodb.v1alpha1.types.Volume(type_: 'VolumeType', size: 'int')

Bases: object

size: int

Volume size.

type_: VolumeType

Type of volume where data is stored.

class scaleway_async.mongodb.v1alpha1.types.VolumeType(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

SBS_15K = 'sbs_15k'
SBS_5K = 'sbs_5k'
UNKNOWN_TYPE = 'unknown_type'

Module contents

class scaleway_async.mongodb.v1alpha1.CreateEndpointRequest(instance_id: 'str', endpoint: 'EndpointSpec', region: 'Optional[ScwRegion]')

Bases: object

endpoint: EndpointSpec

EndpointSpec used to expose your Database Instance.

instance_id: str

UUID of the Database Instance.

region: Optional[str]

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

class scaleway_async.mongodb.v1alpha1.CreateInstanceRequest(version: 'str', node_number: 'int', node_type: 'str', user_name: 'str', password: 'str', region: 'Optional[ScwRegion]', project_id: 'Optional[str]', name: 'Optional[str]', tags: 'Optional[List[str]]', volume: 'Optional[CreateInstanceRequestVolumeDetails]', endpoints: 'Optional[List[EndpointSpec]]')

Bases: object

endpoints: Optional[List[EndpointSpec]]

One or multiple EndpointSpec used to expose your Database Instance.

name: Optional[str]

Name of the Database Instance.

node_number: int

Number of node to use for the Database Instance.

node_type: str

Type of node to use for the Database Instance.

password: str

Password of the initial user.

project_id: Optional[str]

The Project ID on which the Database Instance will be created.

region: Optional[str]

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

tags: Optional[List[str]]

Tags to apply to the Database Instance.

user_name: str

Username created when the Database Instance is created.

version: str

Version of the MongoDB® engine.

volume: Optional[CreateInstanceRequestVolumeDetails]

Instance volume information.

class scaleway_async.mongodb.v1alpha1.CreateInstanceRequestVolumeDetails(volume_size: 'int', volume_type: 'VolumeType')

Bases: object

volume_size: int

Volume size.

volume_type: VolumeType

Type of volume where data is stored.

class scaleway_async.mongodb.v1alpha1.CreateSnapshotRequest(instance_id: 'str', name: 'str', region: 'Optional[ScwRegion]', expires_at: 'Optional[datetime]')

Bases: object

expires_at: Optional[datetime]

Expiration date of the snapshot (must follow the ISO 8601 format).

instance_id: str

UUID of the Database Instance to snapshot.

name: str

Name of the snapshot.

region: Optional[str]

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

class scaleway_async.mongodb.v1alpha1.CreateUserRequest(instance_id: 'str', name: 'str', password: 'str', region: 'Optional[ScwRegion]')

Bases: object

instance_id: str

UUID of the Database Instance the user belongs to.

name: str

Name of the database user.

password: str

Password of the database user.

region: Optional[str]

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

class scaleway_async.mongodb.v1alpha1.DeleteEndpointRequest(endpoint_id: 'str', region: 'Optional[ScwRegion]')

Bases: object

endpoint_id: str

UUID of the Endpoint to delete.

region: Optional[str]

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

class scaleway_async.mongodb.v1alpha1.DeleteInstanceRequest(instance_id: 'str', region: 'Optional[ScwRegion]')

Bases: object

instance_id: str

UUID of the Database Instance to delete.

region: Optional[str]

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

class scaleway_async.mongodb.v1alpha1.DeleteSnapshotRequest(snapshot_id: 'str', region: 'Optional[ScwRegion]')

Bases: object

region: Optional[str]

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

snapshot_id: str

UUID of the snapshot.

class scaleway_async.mongodb.v1alpha1.DeleteUserRequest(instance_id: 'str', name: 'str', region: 'Optional[ScwRegion]')

Bases: object

instance_id: str

UUID of the Database Instance the user belongs to.

name: str

Name of the database user.

region: Optional[str]

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

class scaleway_async.mongodb.v1alpha1.Endpoint(id: 'str', ips: 'List[str]', dns_records: 'List[str]', port: 'int', private_network: 'Optional[EndpointPrivateNetworkDetails]', public: 'Optional[EndpointPublicDetails]')

Bases: object

dns_records: List[str]

List of DNS records of the endpoint.

id: str

UUID of the endpoint.

ips: List[str]

List of IPv4 addresses of the endpoint.

port: int

TCP port of the endpoint.

private_network: Optional[EndpointPrivateNetworkDetails]
public: Optional[EndpointPublicDetails]
class scaleway_async.mongodb.v1alpha1.EndpointPrivateNetworkDetails(private_network_id: str)

Bases: object

Private Network details.

private_network_id: str

UUID of the Private Network.

class scaleway_async.mongodb.v1alpha1.EndpointPublicDetails

Bases: object

class scaleway_async.mongodb.v1alpha1.EndpointSpec(public: 'Optional[EndpointSpecPublicDetails]', private_network: 'Optional[EndpointSpecPrivateNetworkDetails]')

Bases: object

private_network: Optional[EndpointSpecPrivateNetworkDetails]
public: Optional[EndpointSpecPublicDetails]
class scaleway_async.mongodb.v1alpha1.EndpointSpecPrivateNetworkDetails(private_network_id: 'str')

Bases: object

private_network_id: str

UUID of the Private Network.

class scaleway_async.mongodb.v1alpha1.EndpointSpecPublicDetails

Bases: object

class scaleway_async.mongodb.v1alpha1.GetInstanceCertificateRequest(instance_id: 'str', region: 'Optional[ScwRegion]')

Bases: object

instance_id: str

UUID of the Database Instance.

region: Optional[str]

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

class scaleway_async.mongodb.v1alpha1.GetInstanceRequest(instance_id: 'str', region: 'Optional[ScwRegion]')

Bases: object

instance_id: str

UUID of the Database Instance.

region: Optional[str]

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

class scaleway_async.mongodb.v1alpha1.GetSnapshotRequest(snapshot_id: 'str', region: 'Optional[ScwRegion]')

Bases: object

region: Optional[str]

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

snapshot_id: str

UUID of the snapshot.

class scaleway_async.mongodb.v1alpha1.Instance(id: 'str', name: 'str', project_id: 'str', status: 'InstanceStatus', version: 'str', tags: 'List[str]', settings: 'List[InstanceSetting]', node_number: 'int', node_type: 'str', endpoints: 'List[Endpoint]', region: 'ScwRegion', volume: 'Optional[Volume]', created_at: 'Optional[datetime]')

Bases: object

created_at: Optional[datetime]

Creation date (must follow the ISO 8601 format).

endpoints: List[Endpoint]

List of Database Instance endpoints.

id: str

UUID of the Database Instance.

name: str

Name of the Database Instance.

node_number: int

Number of node in the Database Instance.

node_type: str

Node type of the Database Instance.

project_id: str

Project ID the Database Instance belongs to.

region: str

Region the Database Instance is in.

settings: List[InstanceSetting]

Advanced settings of the Database Instance.

status: InstanceStatus

Status of the Database Instance.

tags: List[str]

List of tags applied to the Database Instance.

version: str

MongoDB® engine version of the Database Instance.

volume: Optional[Volume]

Volumes of the Database Instance.

class scaleway_async.mongodb.v1alpha1.InstanceSetting(name: 'str', value: 'str')

Bases: object

name: str

Name of the settings.

value: str

Value of the settings.

class scaleway_async.mongodb.v1alpha1.InstanceStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

CONFIGURING = 'configuring'
DELETING = 'deleting'
ERROR = 'error'
INITIALIZING = 'initializing'
LOCKED = 'locked'
PROVISIONING = 'provisioning'
READY = 'ready'
SNAPSHOTTING = 'snapshotting'
UNKNOWN_STATUS = 'unknown_status'
class scaleway_async.mongodb.v1alpha1.ListInstancesRequest(region: 'Optional[ScwRegion]', tags: 'Optional[List[str]]', name: 'Optional[str]', order_by: 'Optional[ListInstancesRequestOrderBy]', organization_id: 'Optional[str]', project_id: 'Optional[str]', page: 'Optional[int]', page_size: 'Optional[int]')

Bases: object

name: Optional[str]

Lists Database Instances that match a name pattern.

order_by: Optional[ListInstancesRequestOrderBy]

Criteria to use when ordering Database Instance listings.

organization_id: Optional[str]

Organization ID of the Database Instance.

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

Project ID.

region: Optional[str]

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

tags: Optional[List[str]]

List Database Instances that have a given tag.

class scaleway_async.mongodb.v1alpha1.ListInstancesRequestOrderBy(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'
STATUS_ASC = 'status_asc'
STATUS_DESC = 'status_desc'
class scaleway_async.mongodb.v1alpha1.ListInstancesResponse(instances: 'List[Instance]', total_count: 'int')

Bases: object

instances: List[Instance]

List of all Database Instances available in an Organization or Project.

total_count: int

Total count of Database Instances available in an Organization or Project.

class scaleway_async.mongodb.v1alpha1.ListNodeTypesRequest(region: 'Optional[ScwRegion]', include_disabled_types: 'Optional[bool]', page: 'Optional[int]', page_size: 'Optional[int]')

Bases: object

include_disabled_types: Optional[bool]

Defines whether or not to include disabled types.

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

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

class scaleway_async.mongodb.v1alpha1.ListNodeTypesResponse(node_types: 'List[NodeType]', total_count: 'int')

Bases: object

node_types: List[NodeType]

Types of the node.

total_count: int

Total count of node-types available.

class scaleway_async.mongodb.v1alpha1.ListSnapshotsRequest(region: 'Optional[ScwRegion]', instance_id: 'Optional[str]', name: 'Optional[str]', order_by: 'Optional[ListSnapshotsRequestOrderBy]', organization_id: 'Optional[str]', project_id: 'Optional[str]', page: 'Optional[int]', page_size: 'Optional[int]')

Bases: object

instance_id: Optional[str]

Instance ID the snapshots belongs to.

name: Optional[str]

Lists database snapshots that match a name pattern.

order_by: Optional[ListSnapshotsRequestOrderBy]

Criteria to use when ordering snapshot listings.

organization_id: Optional[str]

Organization ID the snapshots belongs to.

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

Project ID to list the snapshots of.

region: Optional[str]

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

class scaleway_async.mongodb.v1alpha1.ListSnapshotsRequestOrderBy(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'
EXPIRES_AT_ASC = 'expires_at_asc'
EXPIRES_AT_DESC = 'expires_at_desc'
NAME_ASC = 'name_asc'
NAME_DESC = 'name_desc'
class scaleway_async.mongodb.v1alpha1.ListSnapshotsResponse(snapshots: 'List[Snapshot]', total_count: 'int')

Bases: object

snapshots: List[Snapshot]

List of all database snapshots available in an Organization or Project.

total_count: int

Total count of database snapshots available in a Organization or Project.

class scaleway_async.mongodb.v1alpha1.ListUsersRequest(instance_id: 'str', region: 'Optional[ScwRegion]', name: 'Optional[str]', order_by: 'Optional[ListUsersRequestOrderBy]', page: 'Optional[int]', page_size: 'Optional[int]')

Bases: object

instance_id: str

UUID of the Database Instance.

name: Optional[str]

Name of the user.

order_by: Optional[ListUsersRequestOrderBy]

Criteria to use when requesting user listing.

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

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

class scaleway_async.mongodb.v1alpha1.ListUsersRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

NAME_ASC = 'name_asc'
NAME_DESC = 'name_desc'
class scaleway_async.mongodb.v1alpha1.ListUsersResponse(users: 'List[User]', total_count: 'int')

Bases: object

total_count: int

Total count of users present on a Database Instance.

users: List[User]

List of users in a Database Instance.

class scaleway_async.mongodb.v1alpha1.ListVersionsRequest(region: 'Optional[ScwRegion]', version: 'Optional[str]', page: 'Optional[int]', page_size: 'Optional[int]')

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.

version: Optional[str]
class scaleway_async.mongodb.v1alpha1.ListVersionsResponse(versions: 'List[Version]', total_count: 'int')

Bases: object

total_count: int

Total count of MongoDB® engine version available.

versions: List[Version]

Available MongoDB® engine version.

class scaleway_async.mongodb.v1alpha1.MongodbV1Alpha1API(client: Client, *, bypass_validation: bool = False)

Bases: API

This API allows you to manage your Managed Databases for MongoDB®.

async create_endpoint(*, instance_id: str, endpoint: EndpointSpec, region: Optional[str] = None) Endpoint

Create a new Instance endpoint. Create a new endpoint for a MongoDB® Database Instance. You can add public_network or private_network specifications to the body of the request. :param instance_id: UUID of the Database Instance. :param endpoint: EndpointSpec used to expose your Database Instance. :param region: Region to target. If none is passed will use default region from the config. :return: Endpoint

Usage:

result = await api.create_endpoint(
    instance_id="example",
    endpoint=EndpointSpec(),
)
async create_instance(*, version: str, node_number: int, node_type: str, user_name: str, password: str, region: Optional[str] = None, project_id: Optional[str] = None, name: Optional[str] = None, tags: Optional[List[str]] = None, volume: Optional[CreateInstanceRequestVolumeDetails] = None, endpoints: Optional[List[EndpointSpec]] = None) Instance

Create a MongoDB® Database Instance. Create a new MongoDB® Database Instance. :param version: Version of the MongoDB® engine. :param node_number: Number of node to use for the Database Instance. :param node_type: Type of node to use for the Database Instance. :param user_name: Username created when the Database Instance is created. :param password: Password of the initial user. :param region: Region to target. If none is passed will use default region from the config. :param project_id: The Project ID on which the Database Instance will be created. :param name: Name of the Database Instance. :param tags: Tags to apply to the Database Instance. :param volume: Instance volume information. :param endpoints: One or multiple EndpointSpec used to expose your Database Instance. :return: Instance

Usage:

result = await api.create_instance(
    version="example",
    node_number=1,
    node_type="example",
    user_name="example",
    password="example",
)
async create_snapshot(*, instance_id: str, name: str, region: Optional[str] = None, expires_at: Optional[datetime] = None) Snapshot

Create a Database Instance snapshot. Create a new snapshot of a Database Instance. You must define the name and instance_id parameters in the request. :param instance_id: UUID of the Database Instance to snapshot. :param name: Name of the snapshot. :param region: Region to target. If none is passed will use default region from the config. :param expires_at: Expiration date of the snapshot (must follow the ISO 8601 format). :return: Snapshot

Usage:

result = await api.create_snapshot(
    instance_id="example",
    name="example",
)
async create_user(*, instance_id: str, name: str, password: str, region: Optional[str] = None) User

Create an user on a Database Instance. Create an user on a Database Instance. You must define the name, password of the user and instance_id parameters in the request. :param instance_id: UUID of the Database Instance the user belongs to. :param name: Name of the database user. :param password: Password of the database user. :param region: Region to target. If none is passed will use default region from the config. :return: User

Usage:

result = await api.create_user(
    instance_id="example",
    name="example",
    password="example",
)
async delete_endpoint(*, endpoint_id: str, region: Optional[str] = None) None

Delete a Database Instance endpoint. Delete the endpoint of a Database Instance. You must specify the endpoint_id parameter of the endpoint you want to delete. Note that you might need to update any environment configurations that point to the deleted endpoint. :param endpoint_id: UUID of the Endpoint to delete. :param region: Region to target. If none is passed will use default region from the config.

Usage:

result = await api.delete_endpoint(
    endpoint_id="example",
)
async delete_instance(*, instance_id: str, region: Optional[str] = None) Instance

Delete a MongoDB® Database Instance. Delete a given MongoDB® Database Instance, specified by the region and instance_id parameters. Deleting a MongoDB® Database Instance is permanent, and cannot be undone. Note that upon deletion all your data will be lost. :param instance_id: UUID of the Database Instance to delete. :param region: Region to target. If none is passed will use default region from the config. :return: Instance

Usage:

result = await api.delete_instance(
    instance_id="example",
)
async delete_snapshot(*, snapshot_id: str, region: Optional[str] = None) Snapshot

Delete a Database Instance snapshot. Delete a given snapshot of a Database Instance. You must specify, in the endpoint, the snapshot_id parameter of the snapshot you want to delete. :param snapshot_id: UUID of the snapshot. :param region: Region to target. If none is passed will use default region from the config. :return: Snapshot

Usage:

result = await api.delete_snapshot(
    snapshot_id="example",
)
async delete_user(*, instance_id: str, name: str, region: Optional[str] = None) None

Delete a user on a Database Instance. Delete an existing user on a Database Instance. :param instance_id: UUID of the Database Instance the user belongs to. :param name: Name of the database user. :param region: Region to target. If none is passed will use default region from the config.

Usage:

result = await api.delete_user(
    instance_id="example",
    name="example",
)
async get_instance(*, instance_id: str, region: Optional[str] = None) Instance

Get a MongoDB® Database Instance. Retrieve information about a given MongoDB® Database Instance, specified by the region and instance_id parameters. Its full details, including name, status, IP address and port, are returned in the response object. :param instance_id: UUID of the Database Instance. :param region: Region to target. If none is passed will use default region from the config. :return: Instance

Usage:

result = await api.get_instance(
    instance_id="example",
)
async get_instance_certificate(*, instance_id: str, region: Optional[str] = None) ScwFile

Get the certificate of a Database Instance. Retrieve the certificate of a given Database Instance, specified by the instance_id parameter. :param instance_id: UUID of the Database Instance. :param region: Region to target. If none is passed will use default region from the config. :return: ScwFile

Usage:

result = await api.get_instance_certificate(
    instance_id="example",
)
async get_snapshot(*, snapshot_id: str, region: Optional[str] = None) Snapshot

Get a Database Instance snapshot. Retrieve information about a given snapshot of a Database Instance. You must specify, in the endpoint, the snapshot_id parameter of the snapshot you want to retrieve. :param snapshot_id: UUID of the snapshot. :param region: Region to target. If none is passed will use default region from the config. :return: Snapshot

Usage:

result = await api.get_snapshot(
    snapshot_id="example",
)
async list_instances(*, region: Optional[str] = None, tags: Optional[List[str]] = None, name: Optional[str] = None, order_by: Optional[ListInstancesRequestOrderBy] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None) ListInstancesResponse

List MongoDB® Database Instances. List all MongoDB® Database Instances in the specified region. By default, the MongoDB® Database Instances returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. You can define additional parameters for your query, such as tags and name. For the name parameter, the value you include will be checked against the whole name string to see if it includes the string you put in the parameter. :param region: Region to target. If none is passed will use default region from the config. :param tags: List Database Instances that have a given tag. :param name: Lists Database Instances that match a name pattern. :param order_by: Criteria to use when ordering Database Instance listings. :param organization_id: Organization ID of the Database Instance. :param project_id: Project ID. :param page: :param page_size: :return: ListInstancesResponse

Usage:

result = await api.list_instances()
async list_instances_all(*, region: Optional[str] = None, tags: Optional[List[str]] = None, name: Optional[str] = None, order_by: Optional[ListInstancesRequestOrderBy] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None) List[Instance]

List MongoDB® Database Instances. List all MongoDB® Database Instances in the specified region. By default, the MongoDB® Database Instances returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. You can define additional parameters for your query, such as tags and name. For the name parameter, the value you include will be checked against the whole name string to see if it includes the string you put in the parameter. :param region: Region to target. If none is passed will use default region from the config. :param tags: List Database Instances that have a given tag. :param name: Lists Database Instances that match a name pattern. :param order_by: Criteria to use when ordering Database Instance listings. :param organization_id: Organization ID of the Database Instance. :param project_id: Project ID. :param page: :param page_size: :return: List[Instance]

Usage:

result = await api.list_instances_all()
async list_node_types(*, region: Optional[str] = None, include_disabled_types: Optional[bool] = None, page: Optional[int] = None, page_size: Optional[int] = None) ListNodeTypesResponse

List available node types. :param region: Region to target. If none is passed will use default region from the config. :param include_disabled_types: Defines whether or not to include disabled types. :param page: :param page_size: :return: ListNodeTypesResponse

Usage:

result = await api.list_node_types()
async list_node_types_all(*, region: Optional[str] = None, include_disabled_types: Optional[bool] = None, page: Optional[int] = None, page_size: Optional[int] = None) List[NodeType]

List available node types. :param region: Region to target. If none is passed will use default region from the config. :param include_disabled_types: Defines whether or not to include disabled types. :param page: :param page_size: :return: List[NodeType]

Usage:

result = await api.list_node_types_all()
async list_snapshots(*, region: Optional[str] = None, instance_id: Optional[str] = None, name: Optional[str] = None, order_by: Optional[ListSnapshotsRequestOrderBy] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None) ListSnapshotsResponse

List snapshots. List snapshots. You can include the instance_id or project_id in your query to get the list of snapshots for specific Database Instances and/or Projects. By default, the details returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. :param region: Region to target. If none is passed will use default region from the config. :param instance_id: Instance ID the snapshots belongs to. :param name: Lists database snapshots that match a name pattern. :param order_by: Criteria to use when ordering snapshot listings. :param organization_id: Organization ID the snapshots belongs to. :param project_id: Project ID to list the snapshots of. :param page: :param page_size: :return: ListSnapshotsResponse

Usage:

result = await api.list_snapshots()
async list_snapshots_all(*, region: Optional[str] = None, instance_id: Optional[str] = None, name: Optional[str] = None, order_by: Optional[ListSnapshotsRequestOrderBy] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None) List[Snapshot]

List snapshots. List snapshots. You can include the instance_id or project_id in your query to get the list of snapshots for specific Database Instances and/or Projects. By default, the details returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. :param region: Region to target. If none is passed will use default region from the config. :param instance_id: Instance ID the snapshots belongs to. :param name: Lists database snapshots that match a name pattern. :param order_by: Criteria to use when ordering snapshot listings. :param organization_id: Organization ID the snapshots belongs to. :param project_id: Project ID to list the snapshots of. :param page: :param page_size: :return: List[Snapshot]

Usage:

result = await api.list_snapshots_all()
async list_users(*, instance_id: str, region: Optional[str] = None, name: Optional[str] = None, order_by: Optional[ListUsersRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None) ListUsersResponse

List users of a Database Instance. List all users of a given Database Instance. :param instance_id: UUID of the Database Instance. :param region: Region to target. If none is passed will use default region from the config. :param name: Name of the user. :param order_by: Criteria to use when requesting user listing. :param page: :param page_size: :return: ListUsersResponse

Usage:

result = await api.list_users(
    instance_id="example",
)
async list_users_all(*, instance_id: str, region: Optional[str] = None, name: Optional[str] = None, order_by: Optional[ListUsersRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None) List[User]

List users of a Database Instance. List all users of a given Database Instance. :param instance_id: UUID of the Database Instance. :param region: Region to target. If none is passed will use default region from the config. :param name: Name of the user. :param order_by: Criteria to use when requesting user listing. :param page: :param page_size: :return: List[User]

Usage:

result = await api.list_users_all(
    instance_id="example",
)
async list_versions(*, region: Optional[str] = None, version: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None) ListVersionsResponse

List available MongoDB® versions. :param region: Region to target. If none is passed will use default region from the config. :param version: :param page: :param page_size: :return: ListVersionsResponse

Usage:

result = await api.list_versions()
async list_versions_all(*, region: Optional[str] = None, version: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None) List[Version]

List available MongoDB® versions. :param region: Region to target. If none is passed will use default region from the config. :param version: :param page: :param page_size: :return: List[Version]

Usage:

result = await api.list_versions_all()
async restore_snapshot(*, snapshot_id: str, instance_name: str, node_type: str, node_number: int, volume: RestoreSnapshotRequestVolumeDetails, region: Optional[str] = None) Instance

Restore a Database Instance snapshot. Restore a given snapshot of a Database Instance. You must specify, in the endpoint, the snapshot_id parameter of the snapshot you want to restore, the instance_name of the new Database Instance, node_type of the new Database Instance and node_number of the new Database Instance. :param snapshot_id: UUID of the snapshot. :param instance_name: Name of the new Database Instance. :param node_type: Node type to use for the new Database Instance. :param node_number: Number of nodes to use for the new Database Instance. :param volume: Instance volume information. :param region: Region to target. If none is passed will use default region from the config. :return: Instance

Usage:

result = await api.restore_snapshot(
    snapshot_id="example",
    instance_name="example",
    node_type="example",
    node_number=1,
    volume=RestoreSnapshotRequestVolumeDetails(),
)
async set_user_role(*, instance_id: str, user_name: str, region: Optional[str] = None, roles: Optional[List[UserRole]] = None) User
Parameters:
  • instance_id – UUID of the Database Instance the user belongs to.

  • user_name – Name of the database user.

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

  • roles – List of roles assigned to the user, along with the corresponding database where each role is granted.

Returns:

User

Usage:

result = await api.set_user_role(
    instance_id="example",
    user_name="example",
)
async update_instance(*, instance_id: str, region: Optional[str] = None, name: Optional[str] = None, tags: Optional[List[str]] = None) Instance

Update a MongoDB® Database Instance. Update the parameters of a MongoDB® Database Instance. :param instance_id: UUID of the Database Instance to update. :param region: Region to target. If none is passed will use default region from the config. :param name: Name of the Database Instance. :param tags: Tags of a Database Instance. :return: Instance

Usage:

result = await api.update_instance(
    instance_id="example",
)
async update_snapshot(*, snapshot_id: str, region: Optional[str] = None, name: Optional[str] = None, expires_at: Optional[datetime] = None) Snapshot

Update a Database Instance snapshot. Update the parameters of a snapshot of a Database Instance. You can update the name and expires_at parameters. :param snapshot_id: UUID of the Snapshot. :param region: Region to target. If none is passed will use default region from the config. :param name: Name of the snapshot. :param expires_at: Expiration date of the snapshot (must follow the ISO 8601 format). :return: Snapshot

Usage:

result = await api.update_snapshot(
    snapshot_id="example",
)
async update_user(*, instance_id: str, name: str, region: Optional[str] = None, password: Optional[str] = None) User

Update a user on a Database Instance. Update the parameters of a user on a Database Instance. You can update the password parameter, but you cannot change the name of the user. :param instance_id: UUID of the Database Instance the user belongs to. :param name: Name of the database user. :param region: Region to target. If none is passed will use default region from the config. :param password: Password of the database user. :return: User

Usage:

result = await api.update_user(
    instance_id="example",
    name="example",
)
async upgrade_instance(*, instance_id: str, region: Optional[str] = None, volume_size: Optional[int] = None) Instance

Upgrade a Database Instance. Upgrade your current Database Instance specifications like volume size. :param instance_id: UUID of the Database Instance you want to upgrade. :param region: Region to target. If none is passed will use default region from the config. :param volume_size: Increase your Block Storage volume size. One-Of (‘upgrade_target’): at most one of ‘volume_size’ could be set. :return: Instance

Usage:

result = await api.upgrade_instance(
    instance_id="example",
)
async wait_for_instance(*, instance_id: str, region: Optional[str] = None, options: Optional[WaitForOptions[Instance, Union[bool, Awaitable[bool]]]] = None) Instance

Get a MongoDB® Database Instance. Retrieve information about a given MongoDB® Database Instance, specified by the region and instance_id parameters. Its full details, including name, status, IP address and port, are returned in the response object. :param instance_id: UUID of the Database Instance. :param region: Region to target. If none is passed will use default region from the config. :return: Instance

Usage:

result = await api.get_instance(
    instance_id="example",
)
async wait_for_snapshot(*, snapshot_id: str, region: Optional[str] = None, options: Optional[WaitForOptions[Snapshot, Union[bool, Awaitable[bool]]]] = None) Snapshot

Get a Database Instance snapshot. Retrieve information about a given snapshot of a Database Instance. You must specify, in the endpoint, the snapshot_id parameter of the snapshot you want to retrieve. :param snapshot_id: UUID of the snapshot. :param region: Region to target. If none is passed will use default region from the config. :return: Snapshot

Usage:

result = await api.get_snapshot(
    snapshot_id="example",
)
class scaleway_async.mongodb.v1alpha1.NodeType(name: 'str', stock_status: 'NodeTypeStock', description: 'str', vcpus: 'int', memory: 'int', available_volume_types: 'List[NodeTypeVolumeType]', disabled: 'bool', beta: 'bool', instance_range: 'str')

Bases: object

available_volume_types: List[NodeTypeVolumeType]

Available storage options for the node type.

beta: bool

The node type is currently in beta.

description: str

Current specs of the offer.

disabled: bool

The node type is currently disabled.

instance_range: str

Instance range associated with the node type offer.

memory: int

Quantity of RAM.

name: str

Node type name identifier.

stock_status: NodeTypeStock

Current stock status for the node type.

vcpus: int

Number of virtual CPUs.

class scaleway_async.mongodb.v1alpha1.NodeTypeStock(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

AVAILABLE = 'available'
LOW_STOCK = 'low_stock'
OUT_OF_STOCK = 'out_of_stock'
UNKNOWN_STOCK = 'unknown_stock'
class scaleway_async.mongodb.v1alpha1.NodeTypeVolumeType(type_: 'VolumeType', description: 'str', min_size: 'int', max_size: 'int', chunk_size: 'int')

Bases: object

chunk_size: int

Minimum increment level for a Block Storage volume size.

description: str

The description of the volume.

max_size: int

Maximum size required for the volume.

min_size: int

Mimimum size required for the volume.

type_: VolumeType

Volume Type.

class scaleway_async.mongodb.v1alpha1.RestoreSnapshotRequest(snapshot_id: 'str', instance_name: 'str', node_type: 'str', node_number: 'int', volume: 'RestoreSnapshotRequestVolumeDetails', region: 'Optional[ScwRegion]')

Bases: object

instance_name: str

Name of the new Database Instance.

node_number: int

Number of nodes to use for the new Database Instance.

node_type: str

Node type to use for the new Database Instance.

region: Optional[str]

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

snapshot_id: str

UUID of the snapshot.

volume: RestoreSnapshotRequestVolumeDetails

Instance volume information.

class scaleway_async.mongodb.v1alpha1.RestoreSnapshotRequestVolumeDetails(volume_type: 'VolumeType')

Bases: object

volume_type: VolumeType

Type of volume where data is stored.

class scaleway_async.mongodb.v1alpha1.SetUserRoleRequest(instance_id: 'str', user_name: 'str', region: 'Optional[ScwRegion]', roles: 'Optional[List[UserRole]]')

Bases: object

instance_id: str

UUID of the Database Instance the user belongs to.

region: Optional[str]

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

roles: Optional[List[UserRole]]

List of roles assigned to the user, along with the corresponding database where each role is granted.

user_name: str

Name of the database user.

class scaleway_async.mongodb.v1alpha1.Setting(name: 'str', default_value: 'str', hot_configurable: 'bool', description: 'str', property_type: 'SettingPropertyType', unit: 'Optional[str]', string_constraint: 'Optional[str]', int_min: 'Optional[int]', int_max: 'Optional[int]', float_min: 'Optional[float]', float_max: 'Optional[float]')

Bases: object

default_value: str

Value set when not specified.

description: str

Setting description.

float_max: Optional[float]

Maximum value for float types.

float_min: Optional[float]

Minimum value for float types.

hot_configurable: bool

Setting can be applied without restarting.

int_max: Optional[int]

Maximum value for int types.

int_min: Optional[int]

Minimum value for int types.

name: str

Setting name from the database engine.

property_type: SettingPropertyType

Setting type.

string_constraint: Optional[str]

Validation regex for string type settings.

unit: Optional[str]

Setting base unit.

class scaleway_async.mongodb.v1alpha1.SettingPropertyType(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

BOOLEAN = 'boolean'
FLOAT = 'float'
INT = 'int'
STRING = 'string'
class scaleway_async.mongodb.v1alpha1.Snapshot(id: 'str', instance_id: 'str', name: 'str', status: 'SnapshotStatus', size: 'int', instance_name: 'str', node_type: 'str', region: 'ScwRegion', expires_at: 'Optional[datetime]', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', volume_type: 'Optional[SnapshotVolumeType]')

Bases: object

created_at: Optional[datetime]

Creation date (must follow the ISO 8601 format).

expires_at: Optional[datetime]

Expiration date (must follow the ISO 8601 format).

id: str

UUID of the snapshot.

instance_id: str

UUID of the Database Instance.

instance_name: str

Name of the Database Instance of the snapshot.

name: str

Name of the snapshot.

node_type: str

Source node type.

region: str

Region of the snapshot.

size: int

Size of the snapshot.

status: SnapshotStatus

Status of the snapshot.

updated_at: Optional[datetime]

Updated date (must follow the ISO 8601 format).

volume_type: Optional[SnapshotVolumeType]

Type of volume where data is stored - sbs_5k or sbs_15k.

class scaleway_async.mongodb.v1alpha1.SnapshotStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

CREATING = 'creating'
DELETING = 'deleting'
ERROR = 'error'
LOCKED = 'locked'
READY = 'ready'
RESTORING = 'restoring'
UNKNOWN_STATUS = 'unknown_status'
class scaleway_async.mongodb.v1alpha1.SnapshotVolumeType(type_: 'VolumeType')

Bases: object

type_: VolumeType
class scaleway_async.mongodb.v1alpha1.UpdateInstanceRequest(instance_id: 'str', region: 'Optional[ScwRegion]', name: 'Optional[str]', tags: 'Optional[List[str]]')

Bases: object

instance_id: str

UUID of the Database Instance to update.

name: Optional[str]

Name of the Database Instance.

region: Optional[str]

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

tags: Optional[List[str]]

Tags of a Database Instance.

class scaleway_async.mongodb.v1alpha1.UpdateSnapshotRequest(snapshot_id: 'str', region: 'Optional[ScwRegion]', name: 'Optional[str]', expires_at: 'Optional[datetime]')

Bases: object

expires_at: Optional[datetime]

Expiration date of the snapshot (must follow the ISO 8601 format).

name: Optional[str]

Name of the snapshot.

region: Optional[str]

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

snapshot_id: str

UUID of the Snapshot.

class scaleway_async.mongodb.v1alpha1.UpdateUserRequest(instance_id: 'str', name: 'str', region: 'Optional[ScwRegion]', password: 'Optional[str]')

Bases: object

instance_id: str

UUID of the Database Instance the user belongs to.

name: str

Name of the database user.

password: Optional[str]

Password of the database user.

region: Optional[str]

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

class scaleway_async.mongodb.v1alpha1.UpgradeInstanceRequest(instance_id: 'str', region: 'Optional[ScwRegion]', volume_size: 'Optional[int]')

Bases: object

instance_id: str

UUID of the Database Instance you want to upgrade.

region: Optional[str]

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

volume_size: Optional[int]
class scaleway_async.mongodb.v1alpha1.User(name: 'str', roles: 'List[UserRole]')

Bases: object

name: str

Name of the user (Length must be between 1 and 63 characters. First character must be an alphabet character (a-zA-Z). Only a-zA-Z0-9_$- characters are accepted).

roles: List[UserRole]

List of roles assigned to the user, along with the corresponding database where each role is granted.

class scaleway_async.mongodb.v1alpha1.UserRole(role: 'UserRoleRole', database: 'Optional[str]', any_database: 'Optional[bool]')

Bases: object

any_database: Optional[bool]
database: Optional[str]
role: UserRoleRole
class scaleway_async.mongodb.v1alpha1.UserRoleRole(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

DB_ADMIN = 'db_admin'
READ = 'read'
READ_WRITE = 'read_write'
SYNC = 'sync'
UNKNOWN_ROLE = 'unknown_role'
class scaleway_async.mongodb.v1alpha1.Version(version: 'str', available_settings: 'List[Setting]', end_of_life_at: 'Optional[datetime]')

Bases: object

available_settings: List[Setting]

Instance settings available to be updated.

end_of_life_at: Optional[datetime]

Date of End of Life.

version: str

MongoDB® engine version.

class scaleway_async.mongodb.v1alpha1.Volume(type_: 'VolumeType', size: 'int')

Bases: object

size: int

Volume size.

type_: VolumeType

Type of volume where data is stored.

class scaleway_async.mongodb.v1alpha1.VolumeType(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

SBS_15K = 'sbs_15k'
SBS_5K = 'sbs_5k'
UNKNOWN_TYPE = 'unknown_type'