scaleway.instance.v1 package

Submodules

scaleway.instance.v1.api module

class scaleway.instance.v1.api.InstanceV1API(client: Client, *, bypass_validation: bool = False)

Bases: API

This API allows you to manage your CPU and GPU Instances.

apply_block_migration(*, validation_key: str, zone: str | None = None, volume_id: str | None = None, snapshot_id: str | None = None) None

Migrate a volume and/or snapshots to SBS (Scaleway Block Storage). To be used, the call to this endpoint must be preceded by a call to the [Get a volume or snapshot’s migration plan](#path-volumes-get-a-volume-or-snapshots-migration-plan) endpoint. To migrate all resources mentioned in the migration plan, the validation_key returned in the plan must be provided. :param validation_key: A value to be retrieved from a call to the [Get a volume or snapshot’s migration plan](#path-volumes-get-a-volume-or-snapshots-migration-plan) endpoint, to confirm that the volume and/or snapshots specified in said plan should be migrated. :param zone: Zone to target. If none is passed will use default zone from the config. :param volume_id: The volume to migrate, along with potentially other resources, according to the migration plan generated with a call to the [Get a volume or snapshot’s migration plan](#path-volumes-get-a-volume-or-snapshots-migration-plan) endpoint. One-Of (‘resource’): at most one of ‘volume_id’, ‘snapshot_id’ could be set. :param snapshot_id: The snapshot to migrate, along with potentially other resources, according to the migration plan generated with a call to the [Get a volume or snapshot’s migration plan](#path-volumes-get-a-volume-or-snapshots-migration-plan) endpoint. One-Of (‘resource’): at most one of ‘volume_id’, ‘snapshot_id’ could be set.

Usage:

result = api.apply_block_migration(
    validation_key="example",
)
attach_server_file_system(*, server_id: str, filesystem_id: str, zone: str | None = None) AttachServerFileSystemResponse

Attach a filesystem volume to an Instance. :param server_id: :param filesystem_id: :param zone: Zone to target. If none is passed will use default zone from the config. :return: AttachServerFileSystemResponse

Usage:

result = api.attach_server_file_system(
    server_id="example",
    filesystem_id="example",
)
attach_server_volume(*, server_id: str, volume_id: str, zone: str | None = None, volume_type: AttachServerVolumeRequestVolumeType | None = None, boot: bool | None = None) AttachServerVolumeResponse

Attach a volume to an Instance. :param server_id: :param volume_id: :param zone: Zone to target. If none is passed will use default zone from the config. :param volume_type: :param boot: :return: AttachServerVolumeResponse

Usage:

result = api.attach_server_volume(
    server_id="example",
    volume_id="example",
)
check_block_migration_organization_quotas(*, zone: str | None = None, organization: str | None = None) None
Parameters:
  • zone – Zone to target. If none is passed will use default zone from the config.

  • organization

Usage:

result = api.check_block_migration_organization_quotas()
create_image(*, root_volume: str, arch: Arch, zone: str | None = None, name: str | None = None, extra_volumes: Dict[str, VolumeTemplate] | None = None, organization: str | None = None, project: str | None = None, tags: List[str] | None = None, public: bool | None = None) CreateImageResponse

Create an Instance image. Create an Instance image from the specified snapshot ID. :param root_volume: UUID of the snapshot. :param arch: Architecture of the image. :param zone: Zone to target. If none is passed will use default zone from the config. :param name: Name of the image. :param extra_volumes: Additional volumes of the image. :param organization: Organization ID of the image. One-Of (‘project_identifier’): at most one of ‘project’, ‘organization’ could be set. :param project: Project ID of the image. One-Of (‘project_identifier’): at most one of ‘project’, ‘organization’ could be set. :param tags: Tags of the image. :param public: True to create a public image. :return: CreateImageResponse

Usage:

result = api.create_image(
    root_volume="example",
    arch=Arch.unknown_arch,
)
create_ip(*, zone: str | None = None, organization: str | None = None, project: str | None = None, tags: List[str] | None = None, server: str | None = None, type_: IpType | None = None) CreateIpResponse

Reserve a flexible IP. Reserve a flexible IP and attach it to the specified Instance. :param zone: Zone to target. If none is passed will use default zone from the config. :param organization: Organization ID in which the IP is reserved. One-Of (‘project_identifier’): at most one of ‘project’, ‘organization’ could be set. :param project: Project ID in which the IP is reserved. One-Of (‘project_identifier’): at most one of ‘project’, ‘organization’ could be set. :param tags: Tags of the IP. :param server: UUID of the Instance you want to attach the IP to. :param type_: IP type to reserve (either ‘routed_ipv4’ or ‘routed_ipv6’). :return: CreateIpResponse

Usage:

result = api.create_ip()
create_placement_group(*, zone: str | None = None, name: str | None = None, organization: str | None = None, project: str | None = None, tags: List[str] | None = None, policy_mode: PlacementGroupPolicyMode | None = None, policy_type: PlacementGroupPolicyType | None = None) CreatePlacementGroupResponse

Create a placement group. Create a new placement group in a specified Availability Zone. :param zone: Zone to target. If none is passed will use default zone from the config. :param name: Name of the placement group. :param organization: Organization ID of the placement group. One-Of (‘project_identifier’): at most one of ‘project’, ‘organization’ could be set. :param project: Project ID of the placement group. One-Of (‘project_identifier’): at most one of ‘project’, ‘organization’ could be set. :param tags: Tags of the placement group. :param policy_mode: Operating mode of the placement group. :param policy_type: Policy type of the placement group. :return: CreatePlacementGroupResponse

Usage:

result = api.create_placement_group()
create_private_nic(*, server_id: str, private_network_id: str, zone: str | None = None, tags: List[str] | None = None, ip_ids: List[str] | None = None, ipam_ip_ids: List[str] | None = None) CreatePrivateNICResponse

Create a private NIC connecting an Instance to a Private Network. :param server_id: UUID of the Instance the private NIC will be attached to. :param private_network_id: UUID of the private network where the private NIC will be attached. :param zone: Zone to target. If none is passed will use default zone from the config. :param tags: Private NIC tags. :param ip_ids: Ip_ids defined from IPAM. :param ipam_ip_ids: UUID of IPAM ips, to be attached to the instance in the requested private network. :return: CreatePrivateNICResponse

Usage:

result = api.create_private_nic(
    server_id="example",
    private_network_id="example",
)
create_security_group(*, description: str, stateful: bool, zone: str | None = None, name: str | None = None, organization: str | None = None, project: str | None = None, tags: List[str] | None = None, organization_default: bool | None = None, project_default: bool | None = None, inbound_default_policy: SecurityGroupPolicy | None = None, outbound_default_policy: SecurityGroupPolicy | None = None, enable_default_security: bool | None = None) CreateSecurityGroupResponse

Create a security group. Create a security group with a specified name and description. :param description: Description of the security group. :param stateful: Whether the security group is stateful or not. :param zone: Zone to target. If none is passed will use default zone from the config. :param name: Name of the security group. :param organization: Organization ID the security group belongs to. One-Of (‘project_identifier’): at most one of ‘project’, ‘organization’ could be set. :param project: Project ID the security group belong to. One-Of (‘project_identifier’): at most one of ‘project’, ‘organization’ could be set. :param tags: Tags of the security group. :param organization_default: Defines whether this security group becomes the default security group for new Instances. One-Of (‘default_identifier’): at most one of ‘organization_default’, ‘project_default’ could be set. :param project_default: Whether this security group becomes the default security group for new Instances. One-Of (‘default_identifier’): at most one of ‘organization_default’, ‘project_default’ could be set. :param inbound_default_policy: Default policy for inbound rules. :param outbound_default_policy: Default policy for outbound rules. :param enable_default_security: True to block SMTP on IPv4 and IPv6. This feature is read only, please open a support ticket if you need to make it configurable. :return: CreateSecurityGroupResponse

Usage:

result = api.create_security_group(
    description="example",
    stateful=false,
)
create_security_group_rule(*, security_group_id: str, protocol: SecurityGroupRuleProtocol, direction: SecurityGroupRuleDirection, action: SecurityGroupRuleAction, ip_range: str, position: int, editable: bool, zone: str | None = None, dest_port_from: int | None = None, dest_port_to: int | None = None) CreateSecurityGroupRuleResponse

Create rule. Create a rule in the specified security group ID. :param security_group_id: UUID of the security group. :param protocol: :param direction: :param action: :param ip_range: :param position: Position of this rule in the security group rules list. :param editable: Indicates if this rule is editable (will be ignored). :param zone: Zone to target. If none is passed will use default zone from the config. :param dest_port_from: Beginning of the range of ports to apply this rule to (inclusive). :param dest_port_to: End of the range of ports to apply this rule to (inclusive). :return: CreateSecurityGroupRuleResponse

Usage:

result = api.create_security_group_rule(
    security_group_id="example",
    protocol=SecurityGroupRuleProtocol.unknown_protocol,
    direction=SecurityGroupRuleDirection.unknown_direction,
    action=SecurityGroupRuleAction.unknown_action,
    ip_range="example",
    position=1,
    editable=False,
)
create_snapshot(*, zone: str | None = None, name: str | None = None, volume_id: str | None = None, tags: List[str] | None = None, organization: str | None = None, project: str | None = None, volume_type: SnapshotVolumeType | None = None, bucket: str | None = None, key: str | None = None, size: int | None = None) CreateSnapshotResponse

Create a snapshot from a specified volume or from a QCOW2 file. Create a snapshot from a specified volume or from a QCOW2 file in a specified Availability Zone. :param zone: Zone to target. If none is passed will use default zone from the config. :param name: Name of the snapshot. :param volume_id: UUID of the volume. :param tags: Tags of the snapshot. :param organization: Organization ID of the snapshot. One-Of (‘project_identifier’): at most one of ‘project’, ‘organization’ could be set. :param project: Project ID of the snapshot. One-Of (‘project_identifier’): at most one of ‘project’, ‘organization’ could be set. :param volume_type: Overrides the volume_type of the snapshot. If omitted, the volume type of the original volume will be used. :param bucket: Bucket name for snapshot imports. :param key: Object key for snapshot imports. :param size: Imported snapshot size, must be a multiple of 512. :return: CreateSnapshotResponse

Usage:

result = api.create_snapshot()
create_volume(*, zone: str | None = None, name: str | None = None, organization: str | None = None, project: str | None = None, tags: List[str] | None = None, volume_type: VolumeVolumeType | None = None, size: int | None = None, base_snapshot: str | None = None) CreateVolumeResponse

Create a volume. Create a volume of a specified type in an Availability Zone. :param zone: Zone to target. If none is passed will use default zone from the config. :param name: Volume name. :param organization: Volume Organization ID. One-Of (‘project_identifier’): at most one of ‘project’, ‘organization’ could be set. :param project: Volume Project ID. One-Of (‘project_identifier’): at most one of ‘project’, ‘organization’ could be set. :param tags: Volume tags. :param volume_type: Volume type. :param size: Volume disk size, must be a multiple of 512. One-Of (‘from’): at most one of ‘size’, ‘base_snapshot’ could be set. :param base_snapshot: ID of the snapshot on which this volume will be based. One-Of (‘from’): at most one of ‘size’, ‘base_snapshot’ could be set. :return: CreateVolumeResponse

Usage:

result = api.create_volume()
delete_image(*, image_id: str, zone: str | None = None) None

Delete an Instance image. Delete the image with the specified ID. :param image_id: UUID of the image you want to delete. :param zone: Zone to target. If none is passed will use default zone from the config.

Usage:

result = api.delete_image(
    image_id="example",
)
delete_ip(*, ip: str, zone: str | None = None) None

Delete a flexible IP. Delete the IP with the specified ID. :param ip: ID or address of the IP to delete. :param zone: Zone to target. If none is passed will use default zone from the config.

Usage:

result = api.delete_ip(
    ip="example",
)
delete_placement_group(*, placement_group_id: str, zone: str | None = None) None

Delete the specified placement group. :param placement_group_id: UUID of the placement group you want to delete. :param zone: Zone to target. If none is passed will use default zone from the config.

Usage:

result = api.delete_placement_group(
    placement_group_id="example",
)
delete_private_nic(*, server_id: str, private_nic_id: str, zone: str | None = None) None

Delete a private NIC. :param server_id: Instance to which the private NIC is attached. :param private_nic_id: Private NIC unique ID. :param zone: Zone to target. If none is passed will use default zone from the config.

Usage:

result = api.delete_private_nic(
    server_id="example",
    private_nic_id="example",
)
delete_security_group(*, security_group_id: str, zone: str | None = None) None

Delete a security group. Delete a security group with the specified ID. :param security_group_id: UUID of the security group you want to delete. :param zone: Zone to target. If none is passed will use default zone from the config.

Usage:

result = api.delete_security_group(
    security_group_id="example",
)
delete_security_group_rule(*, security_group_id: str, security_group_rule_id: str, zone: str | None = None) None

Delete rule. Delete a security group rule with the specified ID. :param security_group_id: :param security_group_rule_id: :param zone: Zone to target. If none is passed will use default zone from the config.

Usage:

result = api.delete_security_group_rule(
    security_group_id="example",
    security_group_rule_id="example",
)
delete_server(*, server_id: str, zone: str | None = None) None

Delete an Instance. Delete the Instance with the specified ID. :param server_id: :param zone: Zone to target. If none is passed will use default zone from the config.

Usage:

result = api.delete_server(
    server_id="example",
)
delete_server_user_data(*, server_id: str, key: str, zone: str | None = None) None

Delete user data. Delete the specified key from an Instance’s user data. :param server_id: UUID of the Instance. :param key: Key of the user data to delete. :param zone: Zone to target. If none is passed will use default zone from the config.

Usage:

result = api.delete_server_user_data(
    server_id="example",
    key="example",
)
delete_snapshot(*, snapshot_id: str, zone: str | None = None) None

Delete a snapshot. Delete the snapshot with the specified ID. :param snapshot_id: UUID of the snapshot you want to delete. :param zone: Zone to target. If none is passed will use default zone from the config.

Usage:

result = api.delete_snapshot(
    snapshot_id="example",
)
delete_volume(*, volume_id: str, zone: str | None = None) None

Delete a volume. Delete the volume with the specified ID. :param volume_id: UUID of the volume you want to delete. :param zone: Zone to target. If none is passed will use default zone from the config.

Usage:

result = api.delete_volume(
    volume_id="example",
)
detach_server_file_system(*, server_id: str, filesystem_id: str, zone: str | None = None) DetachServerFileSystemResponse

Detach a filesystem volume from an Instance. :param server_id: :param filesystem_id: :param zone: Zone to target. If none is passed will use default zone from the config. :return: DetachServerFileSystemResponse

Usage:

result = api.detach_server_file_system(
    server_id="example",
    filesystem_id="example",
)
detach_server_volume(*, server_id: str, volume_id: str, zone: str | None = None) DetachServerVolumeResponse

Detach a volume from an Instance. :param server_id: :param volume_id: :param zone: Zone to target. If none is passed will use default zone from the config. :return: DetachServerVolumeResponse

Usage:

result = api.detach_server_volume(
    server_id="example",
    volume_id="example",
)
export_snapshot(*, bucket: str, key: str, snapshot_id: str, zone: str | None = None) ExportSnapshotResponse

Export a snapshot. Export a snapshot to a specified Object Storage bucket in the same region. :param bucket: Object Storage bucket name. :param key: Object key. :param snapshot_id: Snapshot ID. :param zone: Zone to target. If none is passed will use default zone from the config. :return: ExportSnapshotResponse

Usage:

result = api.export_snapshot(
    bucket="example",
    key="example",
    snapshot_id="example",
)
get_dashboard(*, zone: str | None = None, organization: str | None = None, project: str | None = None) GetDashboardResponse
Parameters:
  • zone – Zone to target. If none is passed will use default zone from the config.

  • organization

  • project

Returns:

GetDashboardResponse

Usage:

result = api.get_dashboard()
get_image(*, image_id: str, zone: str | None = None) GetImageResponse

Get an Instance image. Get details of an image with the specified ID. :param image_id: UUID of the image you want to get. :param zone: Zone to target. If none is passed will use default zone from the config. :return: GetImageResponse

Usage:

result = api.get_image(
    image_id="example",
)
get_ip(*, ip: str, zone: str | None = None) GetIpResponse

Get a flexible IP. Get details of an IP with the specified ID or address. :param ip: IP ID or address to get. :param zone: Zone to target. If none is passed will use default zone from the config. :return: GetIpResponse

Usage:

result = api.get_ip(
    ip="example",
)
get_placement_group(*, placement_group_id: str, zone: str | None = None) GetPlacementGroupResponse

Get a placement group. Get the specified placement group. :param placement_group_id: UUID of the placement group you want to get. :param zone: Zone to target. If none is passed will use default zone from the config. :return: GetPlacementGroupResponse

Usage:

result = api.get_placement_group(
    placement_group_id="example",
)
get_placement_group_servers(*, placement_group_id: str, zone: str | None = None) GetPlacementGroupServersResponse

Get placement group servers. Get all Instances belonging to the specified placement group. :param placement_group_id: UUID of the placement group you want to get. :param zone: Zone to target. If none is passed will use default zone from the config. :return: GetPlacementGroupServersResponse

Usage:

result = api.get_placement_group_servers(
    placement_group_id="example",
)
get_private_nic(*, server_id: str, private_nic_id: str, zone: str | None = None) GetPrivateNICResponse

Get a private NIC. Get private NIC properties. :param server_id: Instance to which the private NIC is attached. :param private_nic_id: Private NIC unique ID. :param zone: Zone to target. If none is passed will use default zone from the config. :return: GetPrivateNICResponse

Usage:

result = api.get_private_nic(
    server_id="example",
    private_nic_id="example",
)
get_security_group(*, security_group_id: str, zone: str | None = None) GetSecurityGroupResponse

Get a security group. Get the details of a security group with the specified ID. :param security_group_id: UUID of the security group you want to get. :param zone: Zone to target. If none is passed will use default zone from the config. :return: GetSecurityGroupResponse

Usage:

result = api.get_security_group(
    security_group_id="example",
)
get_security_group_rule(*, security_group_id: str, security_group_rule_id: str, zone: str | None = None) GetSecurityGroupRuleResponse

Get rule. Get details of a security group rule with the specified ID. :param security_group_id: :param security_group_rule_id: :param zone: Zone to target. If none is passed will use default zone from the config. :return: GetSecurityGroupRuleResponse

Usage:

result = api.get_security_group_rule(
    security_group_id="example",
    security_group_rule_id="example",
)
get_server(*, server_id: str, zone: str | None = None) GetServerResponse

Get an Instance. Get the details of a specified Instance. :param server_id: UUID of the Instance you want to get. :param zone: Zone to target. If none is passed will use default zone from the config. :return: GetServerResponse

Usage:

result = api.get_server(
    server_id="example",
)
get_server_compatible_types(*, server_id: str, zone: str | None = None) ServerCompatibleTypes

Get Instance compatible types. Get compatible commercial types that can be used to update the Instance. The compatibility of an Instance offer is based on: * the CPU architecture * the OS type * the required l_ssd storage size * the required scratch storage size If the specified Instance offer is flagged as end of service, the best compatible offer is the first returned. :param server_id: UUID of the Instance you want to get. :param zone: Zone to target. If none is passed will use default zone from the config. :return: ServerCompatibleTypes

Usage:

result = api.get_server_compatible_types(
    server_id="example",
)
get_server_types_availability(*, zone: str | None = None, per_page: int | None = None, page: int | None = None) GetServerTypesAvailabilityResponse

Get availability. Get availability for all Instance types. :param zone: Zone to target. If none is passed will use default zone from the config. :param per_page: A positive integer lower or equal to 100 to select the number of items to return. :param page: A positive integer to choose the page to return. :return: GetServerTypesAvailabilityResponse

Usage:

result = api.get_server_types_availability()
get_snapshot(*, snapshot_id: str, zone: str | None = None) GetSnapshotResponse

Get a snapshot. Get details of a snapshot with the specified ID. :param snapshot_id: UUID of the snapshot you want to get. :param zone: Zone to target. If none is passed will use default zone from the config. :return: GetSnapshotResponse

Usage:

result = api.get_snapshot(
    snapshot_id="example",
)
get_volume(*, volume_id: str, zone: str | None = None) GetVolumeResponse

Get a volume. Get details of a volume with the specified ID. :param volume_id: UUID of the volume you want to get. :param zone: Zone to target. If none is passed will use default zone from the config. :return: GetVolumeResponse

Usage:

result = api.get_volume(
    volume_id="example",
)
list_default_security_group_rules(*, zone: str | None = None) ListSecurityGroupRulesResponse

Get default rules. Lists the default rules applied to all the security groups. :param zone: Zone to target. If none is passed will use default zone from the config. :return: ListSecurityGroupRulesResponse

Usage:

result = api.list_default_security_group_rules()
list_images(*, zone: str | None = None, organization: str | None = None, per_page: int | None = None, page: int | None = None, name: str | None = None, public: bool | None = None, arch: str | None = None, project: str | None = None, tags: str | None = None) ListImagesResponse

List Instance images. List all existing Instance images. :param zone: Zone to target. If none is passed will use default zone from the config. :param organization: :param per_page: :param page: :param name: :param public: :param arch: :param project: :param tags: :return: ListImagesResponse

Usage:

result = api.list_images()
list_images_all(*, zone: str | None = None, organization: str | None = None, per_page: int | None = None, page: int | None = None, name: str | None = None, public: bool | None = None, arch: str | None = None, project: str | None = None, tags: str | None = None) List[Image]

List Instance images. List all existing Instance images. :param zone: Zone to target. If none is passed will use default zone from the config. :param organization: :param per_page: :param page: :param name: :param public: :param arch: :param project: :param tags: :return: List[Image]

Usage:

result = api.list_images_all()
list_ips(*, zone: str | None = None, project: str | None = None, organization: str | None = None, tags: List[str] | None = None, name: str | None = None, per_page: int | None = None, page: int | None = None, type_: str | None = None) ListIpsResponse

List all flexible IPs. List all flexible IPs in a specified zone. :param zone: Zone to target. If none is passed will use default zone from the config. :param project: Project ID in which the IPs are reserved. :param organization: Organization ID in which the IPs are reserved. :param tags: Filter IPs with these exact tags (to filter with several tags, use commas to separate them). :param name: Filter on the IP address (Works as a LIKE operation on the IP address). :param per_page: A positive integer lower or equal to 100 to select the number of items to return. :param page: A positive integer to choose the page to return. :param type_: Filter on the IP Mobility IP type (whose value should be either ‘routed_ipv4’ or ‘routed_ipv6’). :return: ListIpsResponse

Usage:

result = api.list_ips()
list_ips_all(*, zone: str | None = None, project: str | None = None, organization: str | None = None, tags: List[str] | None = None, name: str | None = None, per_page: int | None = None, page: int | None = None, type_: str | None = None) List[Ip]

List all flexible IPs. List all flexible IPs in a specified zone. :param zone: Zone to target. If none is passed will use default zone from the config. :param project: Project ID in which the IPs are reserved. :param organization: Organization ID in which the IPs are reserved. :param tags: Filter IPs with these exact tags (to filter with several tags, use commas to separate them). :param name: Filter on the IP address (Works as a LIKE operation on the IP address). :param per_page: A positive integer lower or equal to 100 to select the number of items to return. :param page: A positive integer to choose the page to return. :param type_: Filter on the IP Mobility IP type (whose value should be either ‘routed_ipv4’ or ‘routed_ipv6’). :return: List[Ip]

Usage:

result = api.list_ips_all()
list_placement_groups(*, zone: str | None = None, per_page: int | None = None, page: int | None = None, organization: str | None = None, project: str | None = None, tags: List[str] | None = None, name: str | None = None) ListPlacementGroupsResponse

List placement groups. List all placement groups in a specified Availability Zone. :param zone: Zone to target. If none is passed will use default zone from the config. :param per_page: A positive integer lower or equal to 100 to select the number of items to return. :param page: A positive integer to choose the page to return. :param organization: List only placement groups of this Organization ID. :param project: List only placement groups of this Project ID. :param tags: List placement groups with these exact tags (to filter with several tags, use commas to separate them). :param name: Filter placement groups by name (for eg. “cluster1” will return “cluster100” and “cluster1” but not “foo”). :return: ListPlacementGroupsResponse

Usage:

result = api.list_placement_groups()
list_placement_groups_all(*, zone: str | None = None, per_page: int | None = None, page: int | None = None, organization: str | None = None, project: str | None = None, tags: List[str] | None = None, name: str | None = None) List[PlacementGroup]

List placement groups. List all placement groups in a specified Availability Zone. :param zone: Zone to target. If none is passed will use default zone from the config. :param per_page: A positive integer lower or equal to 100 to select the number of items to return. :param page: A positive integer to choose the page to return. :param organization: List only placement groups of this Organization ID. :param project: List only placement groups of this Project ID. :param tags: List placement groups with these exact tags (to filter with several tags, use commas to separate them). :param name: Filter placement groups by name (for eg. “cluster1” will return “cluster100” and “cluster1” but not “foo”). :return: List[PlacementGroup]

Usage:

result = api.list_placement_groups_all()
list_private_ni_cs(*, server_id: str, zone: str | None = None, tags: List[str] | None = None, per_page: int | None = None, page: int | None = None) ListPrivateNICsResponse

List all private NICs. List all private NICs of a specified Instance. :param server_id: Instance to which the private NIC is attached. :param zone: Zone to target. If none is passed will use default zone from the config. :param tags: Private NIC tags. :param per_page: A positive integer lower or equal to 100 to select the number of items to return. :param page: A positive integer to choose the page to return. :return: ListPrivateNICsResponse

Usage:

result = api.list_private_ni_cs(
    server_id="example",
)
list_private_ni_cs_all(*, server_id: str, zone: str | None = None, tags: List[str] | None = None, per_page: int | None = None, page: int | None = None) List[PrivateNIC]

List all private NICs. List all private NICs of a specified Instance. :param server_id: Instance to which the private NIC is attached. :param zone: Zone to target. If none is passed will use default zone from the config. :param tags: Private NIC tags. :param per_page: A positive integer lower or equal to 100 to select the number of items to return. :param page: A positive integer to choose the page to return. :return: List[PrivateNIC]

Usage:

result = api.list_private_ni_cs_all(
    server_id="example",
)
list_security_group_rules(*, security_group_id: str, zone: str | None = None, per_page: int | None = None, page: int | None = None) ListSecurityGroupRulesResponse

List rules. List the rules of the a specified security group ID. :param security_group_id: UUID of the security group. :param zone: Zone to target. If none is passed will use default zone from the config. :param per_page: A positive integer lower or equal to 100 to select the number of items to return. :param page: A positive integer to choose the page to return. :return: ListSecurityGroupRulesResponse

Usage:

result = api.list_security_group_rules(
    security_group_id="example",
)
list_security_group_rules_all(*, security_group_id: str, zone: str | None = None, per_page: int | None = None, page: int | None = None) List[SecurityGroupRule]

List rules. List the rules of the a specified security group ID. :param security_group_id: UUID of the security group. :param zone: Zone to target. If none is passed will use default zone from the config. :param per_page: A positive integer lower or equal to 100 to select the number of items to return. :param page: A positive integer to choose the page to return. :return: List[SecurityGroupRule]

Usage:

result = api.list_security_group_rules_all(
    security_group_id="example",
)
list_security_groups(*, zone: str | None = None, name: str | None = None, organization: str | None = None, project: str | None = None, tags: List[str] | None = None, project_default: bool | None = None, per_page: int | None = None, page: int | None = None) ListSecurityGroupsResponse

List security groups. List all existing security groups. :param zone: Zone to target. If none is passed will use default zone from the config. :param name: Name of the security group. :param organization: Security group Organization ID. :param project: Security group Project ID. :param tags: List security groups with these exact tags (to filter with several tags, use commas to separate them). :param project_default: Filter security groups with this value for project_default. :param per_page: A positive integer lower or equal to 100 to select the number of items to return. :param page: A positive integer to choose the page to return. :return: ListSecurityGroupsResponse

Usage:

result = api.list_security_groups()
list_security_groups_all(*, zone: str | None = None, name: str | None = None, organization: str | None = None, project: str | None = None, tags: List[str] | None = None, project_default: bool | None = None, per_page: int | None = None, page: int | None = None) List[SecurityGroup]

List security groups. List all existing security groups. :param zone: Zone to target. If none is passed will use default zone from the config. :param name: Name of the security group. :param organization: Security group Organization ID. :param project: Security group Project ID. :param tags: List security groups with these exact tags (to filter with several tags, use commas to separate them). :param project_default: Filter security groups with this value for project_default. :param per_page: A positive integer lower or equal to 100 to select the number of items to return. :param page: A positive integer to choose the page to return. :return: List[SecurityGroup]

Usage:

result = api.list_security_groups_all()
list_server_actions(*, server_id: str, zone: str | None = None) ListServerActionsResponse

List Instance actions. List all actions (e.g. power on, power off, reboot) that can currently be performed on an Instance. :param server_id: :param zone: Zone to target. If none is passed will use default zone from the config. :return: ListServerActionsResponse

Usage:

result = api.list_server_actions(
    server_id="example",
)
list_server_user_data(*, server_id: str, zone: str | None = None) ListServerUserDataResponse

List user data. List all user data keys registered on a specified Instance. :param server_id: UUID of the Instance. :param zone: Zone to target. If none is passed will use default zone from the config. :return: ListServerUserDataResponse

Usage:

result = api.list_server_user_data(
    server_id="example",
)
list_servers(*, zone: str | None = None, per_page: int | None = None, page: int | None = None, organization: str | None = None, project: str | None = None, name: str | None = None, private_ip: str | None = None, without_ip: bool | None = None, with_ip: str | None = None, commercial_type: str | None = None, state: ServerState | None = None, tags: List[str] | None = None, private_network: str | None = None, order: ListServersRequestOrder | None = None, private_networks: List[str] | None = None, private_nic_mac_address: str | None = None, servers: List[str] | None = None) ListServersResponse

List all Instances. List all Instances in a specified Availability Zone, e.g. fr-par-1. :param zone: Zone to target. If none is passed will use default zone from the config. :param per_page: A positive integer lower or equal to 100 to select the number of items to return. :param page: A positive integer to choose the page to return. :param organization: List only Instances of this Organization ID. :param project: List only Instances of this Project ID. :param name: Filter Instances by name (eg. “server1” will return “server100” and “server1” but not “foo”). :param private_ip: List Instances by private_ip. :param without_ip: List Instances that are not attached to a public IP. :param with_ip: List Instances by IP (both private_ip and public_ip are supported). :param commercial_type: List Instances of this commercial type. :param state: List Instances in this state. :param tags: List Instances with these exact tags (to filter with several tags, use commas to separate them). :param private_network: List Instances in this Private Network. :param order: Define the order of the returned servers. :param private_networks: List Instances from the given Private Networks (use commas to separate them). :param private_nic_mac_address: List Instances associated with the given private NIC MAC address. :param servers: List Instances from these server ids (use commas to separate them). :return: ListServersResponse

Usage:

result = api.list_servers()
list_servers_all(*, zone: str | None = None, per_page: int | None = None, page: int | None = None, organization: str | None = None, project: str | None = None, name: str | None = None, private_ip: str | None = None, without_ip: bool | None = None, with_ip: str | None = None, commercial_type: str | None = None, state: ServerState | None = None, tags: List[str] | None = None, private_network: str | None = None, order: ListServersRequestOrder | None = None, private_networks: List[str] | None = None, private_nic_mac_address: str | None = None, servers: List[str] | None = None) List[Server]

List all Instances. List all Instances in a specified Availability Zone, e.g. fr-par-1. :param zone: Zone to target. If none is passed will use default zone from the config. :param per_page: A positive integer lower or equal to 100 to select the number of items to return. :param page: A positive integer to choose the page to return. :param organization: List only Instances of this Organization ID. :param project: List only Instances of this Project ID. :param name: Filter Instances by name (eg. “server1” will return “server100” and “server1” but not “foo”). :param private_ip: List Instances by private_ip. :param without_ip: List Instances that are not attached to a public IP. :param with_ip: List Instances by IP (both private_ip and public_ip are supported). :param commercial_type: List Instances of this commercial type. :param state: List Instances in this state. :param tags: List Instances with these exact tags (to filter with several tags, use commas to separate them). :param private_network: List Instances in this Private Network. :param order: Define the order of the returned servers. :param private_networks: List Instances from the given Private Networks (use commas to separate them). :param private_nic_mac_address: List Instances associated with the given private NIC MAC address. :param servers: List Instances from these server ids (use commas to separate them). :return: List[Server]

Usage:

result = api.list_servers_all()
list_servers_types(*, zone: str | None = None, per_page: int | None = None, page: int | None = None) ListServersTypesResponse

List Instance types. List available Instance types and their technical details. :param zone: Zone to target. If none is passed will use default zone from the config. :param per_page: :param page: :return: ListServersTypesResponse

Usage:

result = api.list_servers_types()
list_snapshots(*, zone: str | None = None, organization: str | None = None, project: str | None = None, per_page: int | None = None, page: int | None = None, name: str | None = None, tags: str | None = None, base_volume_id: str | None = None) ListSnapshotsResponse

List snapshots. List all snapshots of an Organization in a specified Availability Zone. :param zone: Zone to target. If none is passed will use default zone from the config. :param organization: List snapshots only for this Organization ID. :param project: List snapshots only for this Project ID. :param per_page: Number of snapshots returned per page (positive integer lower or equal to 100). :param page: Page to be returned. :param name: List snapshots of the requested name. :param tags: List snapshots that have the requested tag. :param base_volume_id: List snapshots originating only from this volume. :return: ListSnapshotsResponse

Usage:

result = api.list_snapshots()
list_snapshots_all(*, zone: str | None = None, organization: str | None = None, project: str | None = None, per_page: int | None = None, page: int | None = None, name: str | None = None, tags: str | None = None, base_volume_id: str | None = None) List[Snapshot]

List snapshots. List all snapshots of an Organization in a specified Availability Zone. :param zone: Zone to target. If none is passed will use default zone from the config. :param organization: List snapshots only for this Organization ID. :param project: List snapshots only for this Project ID. :param per_page: Number of snapshots returned per page (positive integer lower or equal to 100). :param page: Page to be returned. :param name: List snapshots of the requested name. :param tags: List snapshots that have the requested tag. :param base_volume_id: List snapshots originating only from this volume. :return: List[Snapshot]

Usage:

result = api.list_snapshots_all()
list_volumes(*, zone: str | None = None, volume_type: VolumeVolumeType | None = None, per_page: int | None = None, page: int | None = None, organization: str | None = None, project: str | None = None, tags: List[str] | None = None, name: str | None = None) ListVolumesResponse

List volumes. List volumes in the specified Availability Zone. You can filter the output by volume type. :param zone: Zone to target. If none is passed will use default zone from the config. :param volume_type: Filter by volume type. :param per_page: A positive integer lower or equal to 100 to select the number of items to return. :param page: A positive integer to choose the page to return. :param organization: Filter volume by Organization ID. :param project: Filter volume by Project ID. :param tags: Filter volumes with these exact tags (to filter with several tags, use commas to separate them). :param name: Filter volume by name (for eg. “vol” will return “myvolume” but not “data”). :return: ListVolumesResponse

Usage:

result = api.list_volumes()
list_volumes_all(*, zone: str | None = None, volume_type: VolumeVolumeType | None = None, per_page: int | None = None, page: int | None = None, organization: str | None = None, project: str | None = None, tags: List[str] | None = None, name: str | None = None) List[Volume]

List volumes. List volumes in the specified Availability Zone. You can filter the output by volume type. :param zone: Zone to target. If none is passed will use default zone from the config. :param volume_type: Filter by volume type. :param per_page: A positive integer lower or equal to 100 to select the number of items to return. :param page: A positive integer to choose the page to return. :param organization: Filter volume by Organization ID. :param project: Filter volume by Project ID. :param tags: Filter volumes with these exact tags (to filter with several tags, use commas to separate them). :param name: Filter volume by name (for eg. “vol” will return “myvolume” but not “data”). :return: List[Volume]

Usage:

result = api.list_volumes_all()
list_volumes_types(*, zone: str | None = None, per_page: int | None = None, page: int | None = None) ListVolumesTypesResponse

List volume types. List all volume types and their technical details. :param zone: Zone to target. If none is passed will use default zone from the config. :param per_page: :param page: :return: ListVolumesTypesResponse

Usage:

result = api.list_volumes_types()
plan_block_migration(*, zone: str | None = None, volume_id: str | None = None, snapshot_id: str | None = None) MigrationPlan

Get a volume or snapshot’s migration plan. Given a volume or snapshot, returns the migration plan but does not perform the actual migration. To perform the migration, you have to call the [Migrate a volume and/or snapshots to SBS](#path-volumes-migrate-a-volume-andor-snapshots-to-sbs-scaleway-block-storage) endpoint afterward. The endpoint returns the resources that should be migrated together: - the volume and any snapshots created from the volume, if the call was made to plan a volume migration. - the base volume of the snapshot (if the volume is not deleted) and its related snapshots, if the call was made to plan a snapshot migration. The endpoint also returns the validation_key, which must be provided to the [Migrate a volume and/or snapshots to SBS](#path-volumes-migrate-a-volume-andor-snapshots-to-sbs-scaleway-block-storage) endpoint to confirm that all resources listed in the plan should be migrated. :param zone: Zone to target. If none is passed will use default zone from the config. :param volume_id: The volume for which the migration plan will be generated. One-Of (‘resource’): at most one of ‘volume_id’, ‘snapshot_id’ could be set. :param snapshot_id: The snapshot for which the migration plan will be generated. One-Of (‘resource’): at most one of ‘volume_id’, ‘snapshot_id’ could be set. :return: MigrationPlan

Usage:

result = api.plan_block_migration()
server_action(*, server_id: str, zone: str | None = None, action: ServerAction | None = None, name: str | None = None, volumes: Dict[str, ServerActionRequestVolumeBackupTemplate] | None = None, disable_ipv6: bool | None = None) ServerActionResponse

Perform action. Perform an action on an Instance. Available actions are: * poweron: Start a stopped Instance. * poweroff: Fully stop the Instance and release the hypervisor slot. * stop_in_place: Stop the Instance, but keep the slot on the hypervisor. * reboot: Stop the instance and restart it. * backup: Create an image with all the volumes of an Instance. * terminate: Delete the Instance along with its attached local volumes. * enable_routed_ip: Migrate the Instance to the new network stack.

The terminate action will result in the deletion of l_ssd and scratch volumes types, sbs_volume volumes will only be detached. If you want to preserve your l_ssd volumes, you should stop your Instance, detach the volumes to be preserved, then delete your Instance.

The backup action can be done with: * No volumes key in the body: an image is created with snapshots of all the server volumes, except for the scratch volumes types. * volumes key in the body with a dictionary as value, in this dictionary volumes UUID as keys and empty dictionaries as values : an image is created with the snapshots of the volumes in volumes key. scratch volumes types can’t be shapshotted. :param server_id: UUID of the Instance. :param zone: Zone to target. If none is passed will use default zone from the config. :param action: Action to perform on the Instance. :param name: Name of the backup you want to create. This field should only be specified when performing a backup action. :param volumes: For each volume UUID, the snapshot parameters of the volume. This field should only be specified when performing a backup action. :param disable_ipv6: Disable IPv6 on the Instance while performing migration to routed IPs. This field should only be specified when performing a enable_routed_ip action. :return: ServerActionResponse

Usage:

result = api.server_action(
    server_id="example",
)
set_placement_group(*, placement_group_id: str, name: str, zone: str | None = None, organization: str | None = None, policy_mode: PlacementGroupPolicyMode | None = None, policy_type: PlacementGroupPolicyType | None = None, project: str | None = None, tags: List[str] | None = None) SetPlacementGroupResponse

Set placement group. Set all parameters of the specified placement group. :param placement_group_id: :param name: :param zone: Zone to target. If none is passed will use default zone from the config. :param organization: :param policy_mode: :param policy_type: :param project: :param tags: :return: SetPlacementGroupResponse

Usage:

result = api.set_placement_group(
    placement_group_id="example",
    name="example",
)
set_placement_group_servers(*, placement_group_id: str, servers: List[str], zone: str | None = None) SetPlacementGroupServersResponse

Set placement group servers. Set all Instances belonging to the specified placement group. :param placement_group_id: UUID of the placement group you want to set. :param servers: An array of the Instances’ UUIDs you want to configure. :param zone: Zone to target. If none is passed will use default zone from the config. :return: SetPlacementGroupServersResponse

Usage:

result = api.set_placement_group_servers(
    placement_group_id="example",
    servers=[],
)
set_security_group_rules(*, security_group_id: str, zone: str | None = None, rules: List[SetSecurityGroupRulesRequestRule] | None = None) SetSecurityGroupRulesResponse

Update all the rules of a security group. Replaces the existing rules of the security group with the rules provided. This endpoint supports the update of existing rules, creation of new rules and deletion of existing rules when they are not passed in the request. :param security_group_id: UUID of the security group to update the rules on. :param zone: Zone to target. If none is passed will use default zone from the config. :param rules: List of rules to update in the security group. :return: SetSecurityGroupRulesResponse

Usage:

result = api.set_security_group_rules(
    security_group_id="example",
)
update_image(*, image_id: str, zone: str | None = None, name: str | None = None, arch: Arch | None = None, extra_volumes: Dict[str, VolumeImageUpdateTemplate] | None = None, tags: List[str] | None = None, public: bool | None = None) UpdateImageResponse

Update image. Update the properties of an image. :param image_id: UUID of the image. :param zone: Zone to target. If none is passed will use default zone from the config. :param name: Name of the image. :param arch: Architecture of the image. :param extra_volumes: Additional snapshots of the image, with extra_volumeKey being the position of the snapshot in the image. :param tags: Tags of the image. :param public: True to set the image as public. :return: UpdateImageResponse

Usage:

result = api.update_image(
    image_id="example",
)
update_ip(*, ip: str, zone: str | None = None, reverse: str | None = None, type_: IpType | None = None, tags: List[str] | None = None, server: str | None = None) UpdateIpResponse

Update a flexible IP. Update a flexible IP in the specified zone with the specified ID. :param ip: IP ID or IP address. :param zone: Zone to target. If none is passed will use default zone from the config. :param reverse: Reverse domain name. :param type_: Should have no effect. :param tags: An array of keywords you want to tag this IP with. :param server: :return: UpdateIpResponse

Usage:

result = api.update_ip(
    ip="example",
)
update_placement_group(*, placement_group_id: str, zone: str | None = None, name: str | None = None, tags: List[str] | None = None, policy_mode: PlacementGroupPolicyMode | None = None, policy_type: PlacementGroupPolicyType | None = None) UpdatePlacementGroupResponse

Update a placement group. Update one or more parameter of the specified placement group. :param placement_group_id: UUID of the placement group. :param zone: Zone to target. If none is passed will use default zone from the config. :param name: Name of the placement group. :param tags: Tags of the placement group. :param policy_mode: Operating mode of the placement group. :param policy_type: Policy type of the placement group. :return: UpdatePlacementGroupResponse

Usage:

result = api.update_placement_group(
    placement_group_id="example",
)
update_placement_group_servers(*, placement_group_id: str, servers: List[str], zone: str | None = None) UpdatePlacementGroupServersResponse

Update placement group servers. Update all Instances belonging to the specified placement group. :param placement_group_id: UUID of the placement group you want to update. :param servers: An array of the Instances’ UUIDs you want to configure. :param zone: Zone to target. If none is passed will use default zone from the config. :return: UpdatePlacementGroupServersResponse

Usage:

result = api.update_placement_group_servers(
    placement_group_id="example",
    servers=[],
)
update_private_nic(*, server_id: str, private_nic_id: str, zone: str | None = None, tags: List[str] | None = None) PrivateNIC

Update a private NIC. Update one or more parameter(s) of a specified private NIC. :param server_id: UUID of the Instance the private NIC will be attached to. :param private_nic_id: Private NIC unique ID. :param zone: Zone to target. If none is passed will use default zone from the config. :param tags: Tags used to select private NIC/s. :return: PrivateNIC

Usage:

result = api.update_private_nic(
    server_id="example",
    private_nic_id="example",
)
update_security_group(*, security_group_id: str, zone: str | None = None, name: str | None = None, description: str | None = None, enable_default_security: bool | None = None, inbound_default_policy: SecurityGroupPolicy | None = None, tags: List[str] | None = None, organization_default: bool | None = None, project_default: bool | None = None, outbound_default_policy: SecurityGroupPolicy | None = None, stateful: bool | None = None) UpdateSecurityGroupResponse

Update a security group. Update the properties of security group. :param security_group_id: UUID of the security group. :param zone: Zone to target. If none is passed will use default zone from the config. :param name: Name of the security group. :param description: Description of the security group. :param enable_default_security: True to block SMTP on IPv4 and IPv6. This feature is read only, please open a support ticket if you need to make it configurable. :param inbound_default_policy: Default inbound policy. :param tags: Tags of the security group. :param organization_default: Please use project_default instead. :param project_default: True use this security group for future Instances created in this project. :param outbound_default_policy: Default outbound policy. :param stateful: True to set the security group as stateful. :return: UpdateSecurityGroupResponse

Usage:

result = api.update_security_group(
    security_group_id="example",
)
update_security_group_rule(*, security_group_id: str, security_group_rule_id: str, zone: str | None = None, protocol: SecurityGroupRuleProtocol | None = None, direction: SecurityGroupRuleDirection | None = None, action: SecurityGroupRuleAction | None = None, ip_range: str | None = None, dest_port_from: int | None = None, dest_port_to: int | None = None, position: int | None = None) UpdateSecurityGroupRuleResponse

Update security group rule. Update the properties of a rule from a specified security group. :param security_group_id: UUID of the security group. :param security_group_rule_id: UUID of the rule. :param zone: Zone to target. If none is passed will use default zone from the config. :param protocol: Protocol family this rule applies to. :param direction: Direction the rule applies to. :param action: Action to apply when the rule matches a packet. :param ip_range: Range of IP addresses these rules apply to. :param dest_port_from: Beginning of the range of ports this rule applies to (inclusive). If 0 is provided, unset the parameter. :param dest_port_to: End of the range of ports this rule applies to (inclusive). If 0 is provided, unset the parameter. :param position: Position of this rule in the security group rules list. :return: UpdateSecurityGroupRuleResponse

Usage:

result = api.update_security_group_rule(
    security_group_id="example",
    security_group_rule_id="example",
)
update_snapshot(*, snapshot_id: str, zone: str | None = None, name: str | None = None, tags: List[str] | None = None) UpdateSnapshotResponse

Update a snapshot. Update the properties of a snapshot. :param snapshot_id: UUID of the snapshot. :param zone: Zone to target. If none is passed will use default zone from the config. :param name: Name of the snapshot. :param tags: Tags of the snapshot. :return: UpdateSnapshotResponse

Usage:

result = api.update_snapshot(
    snapshot_id="example",
)
update_volume(*, volume_id: str, zone: str | None = None, name: str | None = None, tags: List[str] | None = None, size: int | None = None) UpdateVolumeResponse

Update a volume. Replace the name and/or size properties of a volume specified by its ID, with the specified value(s). :param volume_id: UUID of the volume. :param zone: Zone to target. If none is passed will use default zone from the config. :param name: Volume name. :param tags: Tags of the volume. :param size: Volume disk size, must be a multiple of 512. :return: UpdateVolumeResponse

Usage:

result = api.update_volume(
    volume_id="example",
)

scaleway.instance.v1.content module

scaleway.instance.v1.content.IMAGE_TRANSIENT_STATUSES: List[ImageState] = [<ImageState.CREATING: 'creating'>]

Lists transient statutes of the enum ImageState.

scaleway.instance.v1.content.IP_TRANSIENT_STATUSES: List[IpState] = [<IpState.PENDING: 'pending'>]

Lists transient statutes of the enum IpState.

scaleway.instance.v1.content.PRIVATE_NIC_TRANSIENT_STATUSES: List[PrivateNICState] = [<PrivateNICState.SYNCING: 'syncing'>]

Lists transient statutes of the enum PrivateNICState.

scaleway.instance.v1.content.SECURITY_GROUP_TRANSIENT_STATUSES: List[SecurityGroupState] = [<SecurityGroupState.SYNCING: 'syncing'>]

Lists transient statutes of the enum SecurityGroupState.

scaleway.instance.v1.content.SERVER_FILESYSTEM_TRANSIENT_STATUSES: List[ServerFilesystemState] = [<ServerFilesystemState.ATTACHING: 'attaching'>, <ServerFilesystemState.DETACHING: 'detaching'>]

Lists transient statutes of the enum ServerFilesystemState.

scaleway.instance.v1.content.SERVER_IP_TRANSIENT_STATUSES: List[ServerIpState] = [<ServerIpState.PENDING: 'pending'>]

Lists transient statutes of the enum ServerIpState.

scaleway.instance.v1.content.SERVER_TRANSIENT_STATUSES: List[ServerState] = [<ServerState.STARTING: 'starting'>, <ServerState.STOPPING: 'stopping'>]

Lists transient statutes of the enum ServerState.

scaleway.instance.v1.content.SNAPSHOT_TRANSIENT_STATUSES: List[SnapshotState] = [<SnapshotState.SNAPSHOTTING: 'snapshotting'>, <SnapshotState.IMPORTING: 'importing'>, <SnapshotState.EXPORTING: 'exporting'>]

Lists transient statutes of the enum SnapshotState.

scaleway.instance.v1.content.TASK_TRANSIENT_STATUSES: List[TaskStatus] = [<TaskStatus.PENDING: 'pending'>, <TaskStatus.STARTED: 'started'>, <TaskStatus.RETRY: 'retry'>]

Lists transient statutes of the enum TaskStatus.

scaleway.instance.v1.content.VOLUME_SERVER_TRANSIENT_STATUSES: List[VolumeServerState] = [<VolumeServerState.SNAPSHOTTING: 'snapshotting'>, <VolumeServerState.FETCHING: 'fetching'>, <VolumeServerState.RESIZING: 'resizing'>, <VolumeServerState.SAVING: 'saving'>, <VolumeServerState.HOTSYNCING: 'hotsyncing'>]

Lists transient statutes of the enum VolumeServerState.

scaleway.instance.v1.content.VOLUME_TRANSIENT_STATUSES: List[VolumeState] = [<VolumeState.SNAPSHOTTING: 'snapshotting'>, <VolumeState.FETCHING: 'fetching'>, <VolumeState.RESIZING: 'resizing'>, <VolumeState.SAVING: 'saving'>, <VolumeState.HOTSYNCING: 'hotsyncing'>]

Lists transient statutes of the enum VolumeState.

scaleway.instance.v1.custom_api module

class scaleway.instance.v1.custom_api.InstanceUtilsV1API(client: Client, *, bypass_validation: bool = False)

Bases: InstanceV1API

This API extends InstanceV1API by adding utility methods for managing Instance resources, such as getting and setting server user data, while inheriting all methods of InstanceV1API.

get_all_server_user_data(server_id: str, zone: str | None = None) GetAllServerUserDataResponse
get_server_user_data(server_id: str, key: str, zone: str | None = None) Response

GetServerUserData gets the content of a user data on a server for the given key. :param zone: Zone to target. If none is passed will use default zone from the config. :param server_id: :param key: :return: A plain text response with data user information

Usage:

result = api.get_server_user_data(
    server_id="example",
    key="example",
)
set_all_server_user_data(server_id: str, user_data: Dict[str, bytes], zone: str | None = None) None
set_server_user_data(server_id: str, key: str, content: bytes, zone: str | None = None) Response

Sets the content of a user data on a server for the given key. :param zone: Zone to target. If none is passed, it will use the default zone from the config. :param server_id: The ID of the server. :param key: The user data key. :param content: The content to set as user data in bytes. :return: A plain text response confirming the operation.

scaleway.instance.v1.custom_marshalling module

scaleway.instance.v1.custom_marshalling.marshal_GetServerUserDataRequest(request: GetServerUserDataRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.custom_marshalling.marshal_ListServerUserDataRequest(request: GetAllServerUserDataRequest, defaults: ProfileDefaults) Dict[str, Any]

scaleway.instance.v1.custom_types module

class scaleway.instance.v1.custom_types.GetAllServerUserDataRequest(server_id: str, zone: str | None)

Bases: object

server_id: str

Zone of the user data to get

zone: str | None
class scaleway.instance.v1.custom_types.GetAllServerUserDataResponse(user_data: Dict[str, bytes])

Bases: object

user_data: Dict[str, bytes]
class scaleway.instance.v1.custom_types.GetServerUserDataRequest(server_id: str, key: str, zone: str | None)

Bases: object

key: str

Zone of the user data to get

server_id: str

Key defines the user data key to get

zone: str | None
class scaleway.instance.v1.custom_types.SetAllServerUserDataRequest(server_id: str, user_data: Dict[str, bytes], zone: str | None)

Bases: object

server_id: str
user_data: Dict[str, bytes]

Zone of the user data to set

zone: str | None

scaleway.instance.v1.marshalling module

scaleway.instance.v1.marshalling.marshal_ApplyBlockMigrationRequest(request: ApplyBlockMigrationRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_AttachServerFileSystemRequest(request: AttachServerFileSystemRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_AttachServerVolumeRequest(request: AttachServerVolumeRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_Bootscript(request: Bootscript, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_CheckBlockMigrationOrganizationQuotasRequest(request: CheckBlockMigrationOrganizationQuotasRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_CreateImageRequest(request: CreateImageRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_CreateIpRequest(request: CreateIpRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_CreatePlacementGroupRequest(request: CreatePlacementGroupRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_CreatePrivateNICRequest(request: CreatePrivateNICRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_CreateSecurityGroupRequest(request: CreateSecurityGroupRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_CreateSecurityGroupRuleRequest(request: CreateSecurityGroupRuleRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_CreateServerRequest(request: CreateServerRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_CreateSnapshotRequest(request: CreateSnapshotRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_CreateVolumeRequest(request: CreateVolumeRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_DetachServerFileSystemRequest(request: DetachServerFileSystemRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_DetachServerVolumeRequest(request: DetachServerVolumeRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_ExportSnapshotRequest(request: ExportSnapshotRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_Image(request: Image, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_PlacementGroup(request: PlacementGroup, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_PlanBlockMigrationRequest(request: PlanBlockMigrationRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_PrivateNIC(request: PrivateNIC, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_SecurityGroupSummary(request: SecurityGroupSummary, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_SecurityGroupTemplate(request: SecurityGroupTemplate, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_ServerActionRequest(request: ServerActionRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_ServerActionRequestVolumeBackupTemplate(request: ServerActionRequestVolumeBackupTemplate, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_ServerIp(request: ServerIp, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_ServerIpv6(request: ServerIpv6, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_ServerLocation(request: ServerLocation, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_ServerMaintenance(request: ServerMaintenance, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_ServerSummary(request: ServerSummary, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_SetImageRequest(request: SetImageRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_SetPlacementGroupRequest(request: SetPlacementGroupRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_SetPlacementGroupServersRequest(request: SetPlacementGroupServersRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_SetSecurityGroupRulesRequest(request: SetSecurityGroupRulesRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_SetSecurityGroupRulesRequestRule(request: SetSecurityGroupRulesRequestRule, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_SnapshotBaseVolume(request: SnapshotBaseVolume, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_UpdateImageRequest(request: UpdateImageRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_UpdateIpRequest(request: UpdateIpRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_UpdatePlacementGroupRequest(request: UpdatePlacementGroupRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_UpdatePlacementGroupServersRequest(request: UpdatePlacementGroupServersRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_UpdatePrivateNICRequest(request: UpdatePrivateNICRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_UpdateSecurityGroupRequest(request: UpdateSecurityGroupRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_UpdateSecurityGroupRuleRequest(request: UpdateSecurityGroupRuleRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_UpdateServerRequest(request: UpdateServerRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_UpdateSnapshotRequest(request: UpdateSnapshotRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_UpdateVolumeRequest(request: UpdateVolumeRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_Volume(request: Volume, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_VolumeImageUpdateTemplate(request: VolumeImageUpdateTemplate, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_VolumeServerTemplate(request: VolumeServerTemplate, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_VolumeSummary(request: VolumeSummary, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal_VolumeTemplate(request: VolumeTemplate, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal__SetSecurityGroupRequest(request: _SetSecurityGroupRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal__SetSecurityGroupRuleRequest(request: _SetSecurityGroupRuleRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal__SetServerRequest(request: _SetServerRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.marshal__SetSnapshotRequest(request: _SetSnapshotRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.instance.v1.marshalling.unmarshal_AttachServerFileSystemResponse(data: Any) AttachServerFileSystemResponse
scaleway.instance.v1.marshalling.unmarshal_AttachServerVolumeResponse(data: Any) AttachServerVolumeResponse
scaleway.instance.v1.marshalling.unmarshal_Bootscript(data: Any) Bootscript
scaleway.instance.v1.marshalling.unmarshal_CreateImageResponse(data: Any) CreateImageResponse
scaleway.instance.v1.marshalling.unmarshal_CreateIpResponse(data: Any) CreateIpResponse
scaleway.instance.v1.marshalling.unmarshal_CreatePlacementGroupResponse(data: Any) CreatePlacementGroupResponse
scaleway.instance.v1.marshalling.unmarshal_CreatePrivateNICResponse(data: Any) CreatePrivateNICResponse
scaleway.instance.v1.marshalling.unmarshal_CreateSecurityGroupResponse(data: Any) CreateSecurityGroupResponse
scaleway.instance.v1.marshalling.unmarshal_CreateSecurityGroupRuleResponse(data: Any) CreateSecurityGroupRuleResponse
scaleway.instance.v1.marshalling.unmarshal_CreateServerResponse(data: Any) CreateServerResponse
scaleway.instance.v1.marshalling.unmarshal_CreateSnapshotResponse(data: Any) CreateSnapshotResponse
scaleway.instance.v1.marshalling.unmarshal_CreateVolumeResponse(data: Any) CreateVolumeResponse
scaleway.instance.v1.marshalling.unmarshal_Dashboard(data: Any) Dashboard
scaleway.instance.v1.marshalling.unmarshal_DetachServerFileSystemResponse(data: Any) DetachServerFileSystemResponse
scaleway.instance.v1.marshalling.unmarshal_DetachServerVolumeResponse(data: Any) DetachServerVolumeResponse
scaleway.instance.v1.marshalling.unmarshal_ExportSnapshotResponse(data: Any) ExportSnapshotResponse
scaleway.instance.v1.marshalling.unmarshal_GetDashboardResponse(data: Any) GetDashboardResponse
scaleway.instance.v1.marshalling.unmarshal_GetImageResponse(data: Any) GetImageResponse
scaleway.instance.v1.marshalling.unmarshal_GetIpResponse(data: Any) GetIpResponse
scaleway.instance.v1.marshalling.unmarshal_GetPlacementGroupResponse(data: Any) GetPlacementGroupResponse
scaleway.instance.v1.marshalling.unmarshal_GetPlacementGroupServersResponse(data: Any) GetPlacementGroupServersResponse
scaleway.instance.v1.marshalling.unmarshal_GetPrivateNICResponse(data: Any) GetPrivateNICResponse
scaleway.instance.v1.marshalling.unmarshal_GetSecurityGroupResponse(data: Any) GetSecurityGroupResponse
scaleway.instance.v1.marshalling.unmarshal_GetSecurityGroupRuleResponse(data: Any) GetSecurityGroupRuleResponse
scaleway.instance.v1.marshalling.unmarshal_GetServerResponse(data: Any) GetServerResponse
scaleway.instance.v1.marshalling.unmarshal_GetServerTypesAvailabilityResponse(data: Any) GetServerTypesAvailabilityResponse
scaleway.instance.v1.marshalling.unmarshal_GetServerTypesAvailabilityResponseAvailability(data: Any) GetServerTypesAvailabilityResponseAvailability
scaleway.instance.v1.marshalling.unmarshal_GetSnapshotResponse(data: Any) GetSnapshotResponse
scaleway.instance.v1.marshalling.unmarshal_GetVolumeResponse(data: Any) GetVolumeResponse
scaleway.instance.v1.marshalling.unmarshal_Image(data: Any) Image
scaleway.instance.v1.marshalling.unmarshal_Ip(data: Any) Ip
scaleway.instance.v1.marshalling.unmarshal_ListImagesResponse(data: Any) ListImagesResponse
scaleway.instance.v1.marshalling.unmarshal_ListIpsResponse(data: Any) ListIpsResponse
scaleway.instance.v1.marshalling.unmarshal_ListPlacementGroupsResponse(data: Any) ListPlacementGroupsResponse
scaleway.instance.v1.marshalling.unmarshal_ListPrivateNICsResponse(data: Any) ListPrivateNICsResponse
scaleway.instance.v1.marshalling.unmarshal_ListSecurityGroupRulesResponse(data: Any) ListSecurityGroupRulesResponse
scaleway.instance.v1.marshalling.unmarshal_ListSecurityGroupsResponse(data: Any) ListSecurityGroupsResponse
scaleway.instance.v1.marshalling.unmarshal_ListServerActionsResponse(data: Any) ListServerActionsResponse
scaleway.instance.v1.marshalling.unmarshal_ListServerUserDataResponse(data: Any) ListServerUserDataResponse
scaleway.instance.v1.marshalling.unmarshal_ListServersResponse(data: Any) ListServersResponse
scaleway.instance.v1.marshalling.unmarshal_ListServersTypesResponse(data: Any) ListServersTypesResponse
scaleway.instance.v1.marshalling.unmarshal_ListSnapshotsResponse(data: Any) ListSnapshotsResponse
scaleway.instance.v1.marshalling.unmarshal_ListVolumesResponse(data: Any) ListVolumesResponse
scaleway.instance.v1.marshalling.unmarshal_ListVolumesTypesResponse(data: Any) ListVolumesTypesResponse
scaleway.instance.v1.marshalling.unmarshal_MigrationPlan(data: Any) MigrationPlan
scaleway.instance.v1.marshalling.unmarshal_PlacementGroup(data: Any) PlacementGroup
scaleway.instance.v1.marshalling.unmarshal_PlacementGroupServer(data: Any) PlacementGroupServer
scaleway.instance.v1.marshalling.unmarshal_PrivateNIC(data: Any) PrivateNIC
scaleway.instance.v1.marshalling.unmarshal_SecurityGroup(data: Any) SecurityGroup
scaleway.instance.v1.marshalling.unmarshal_SecurityGroupRule(data: Any) SecurityGroupRule
scaleway.instance.v1.marshalling.unmarshal_SecurityGroupSummary(data: Any) SecurityGroupSummary
scaleway.instance.v1.marshalling.unmarshal_Server(data: Any) Server
scaleway.instance.v1.marshalling.unmarshal_ServerActionResponse(data: Any) ServerActionResponse
scaleway.instance.v1.marshalling.unmarshal_ServerCompatibleTypes(data: Any) ServerCompatibleTypes
scaleway.instance.v1.marshalling.unmarshal_ServerFilesystem(data: Any) ServerFilesystem
scaleway.instance.v1.marshalling.unmarshal_ServerIp(data: Any) ServerIp
scaleway.instance.v1.marshalling.unmarshal_ServerIpv6(data: Any) ServerIpv6
scaleway.instance.v1.marshalling.unmarshal_ServerLocation(data: Any) ServerLocation
scaleway.instance.v1.marshalling.unmarshal_ServerMaintenance(data: Any) ServerMaintenance
scaleway.instance.v1.marshalling.unmarshal_ServerSummary(data: Any) ServerSummary
scaleway.instance.v1.marshalling.unmarshal_ServerType(data: Any) ServerType
scaleway.instance.v1.marshalling.unmarshal_ServerTypeCapabilities(data: Any) ServerTypeCapabilities
scaleway.instance.v1.marshalling.unmarshal_ServerTypeGPUInfo(data: Any) ServerTypeGPUInfo
scaleway.instance.v1.marshalling.unmarshal_ServerTypeNetwork(data: Any) ServerTypeNetwork
scaleway.instance.v1.marshalling.unmarshal_ServerTypeNetworkInterface(data: Any) ServerTypeNetworkInterface
scaleway.instance.v1.marshalling.unmarshal_ServerTypeVolumeConstraintSizes(data: Any) ServerTypeVolumeConstraintSizes
scaleway.instance.v1.marshalling.unmarshal_ServerTypeVolumeConstraintsByType(data: Any) ServerTypeVolumeConstraintsByType
scaleway.instance.v1.marshalling.unmarshal_SetPlacementGroupResponse(data: Any) SetPlacementGroupResponse
scaleway.instance.v1.marshalling.unmarshal_SetPlacementGroupServersResponse(data: Any) SetPlacementGroupServersResponse
scaleway.instance.v1.marshalling.unmarshal_SetSecurityGroupRulesResponse(data: Any) SetSecurityGroupRulesResponse
scaleway.instance.v1.marshalling.unmarshal_Snapshot(data: Any) Snapshot
scaleway.instance.v1.marshalling.unmarshal_SnapshotBaseVolume(data: Any) SnapshotBaseVolume
scaleway.instance.v1.marshalling.unmarshal_Task(data: Any) Task
scaleway.instance.v1.marshalling.unmarshal_UpdateImageResponse(data: Any) UpdateImageResponse
scaleway.instance.v1.marshalling.unmarshal_UpdateIpResponse(data: Any) UpdateIpResponse
scaleway.instance.v1.marshalling.unmarshal_UpdatePlacementGroupResponse(data: Any) UpdatePlacementGroupResponse
scaleway.instance.v1.marshalling.unmarshal_UpdatePlacementGroupServersResponse(data: Any) UpdatePlacementGroupServersResponse
scaleway.instance.v1.marshalling.unmarshal_UpdateSecurityGroupResponse(data: Any) UpdateSecurityGroupResponse
scaleway.instance.v1.marshalling.unmarshal_UpdateSecurityGroupRuleResponse(data: Any) UpdateSecurityGroupRuleResponse
scaleway.instance.v1.marshalling.unmarshal_UpdateServerResponse(data: Any) UpdateServerResponse
scaleway.instance.v1.marshalling.unmarshal_UpdateSnapshotResponse(data: Any) UpdateSnapshotResponse
scaleway.instance.v1.marshalling.unmarshal_UpdateVolumeResponse(data: Any) UpdateVolumeResponse
scaleway.instance.v1.marshalling.unmarshal_Volume(data: Any) Volume
scaleway.instance.v1.marshalling.unmarshal_VolumeServer(data: Any) VolumeServer
scaleway.instance.v1.marshalling.unmarshal_VolumeSummary(data: Any) VolumeSummary
scaleway.instance.v1.marshalling.unmarshal_VolumeType(data: Any) VolumeType
scaleway.instance.v1.marshalling.unmarshal_VolumeTypeCapabilities(data: Any) VolumeTypeCapabilities
scaleway.instance.v1.marshalling.unmarshal_VolumeTypeConstraints(data: Any) VolumeTypeConstraints
scaleway.instance.v1.marshalling.unmarshal__SetImageResponse(data: Any) _SetImageResponse
scaleway.instance.v1.marshalling.unmarshal__SetSecurityGroupResponse(data: Any) _SetSecurityGroupResponse
scaleway.instance.v1.marshalling.unmarshal__SetSecurityGroupRuleResponse(data: Any) _SetSecurityGroupRuleResponse
scaleway.instance.v1.marshalling.unmarshal__SetServerResponse(data: Any) _SetServerResponse
scaleway.instance.v1.marshalling.unmarshal__SetSnapshotResponse(data: Any) _SetSnapshotResponse

scaleway.instance.v1.test_user_data module

class scaleway.instance.v1.test_user_data.TestServerUserData(methodName='runTest')

Bases: TestCase

setUp() None

Hook method for setting up the test fixture before exercising it.

test_set_and_get_all_user_data() None
test_set_and_get_server_user_data() None

scaleway.instance.v1.types module

class scaleway.instance.v1.types.ApplyBlockMigrationRequest(validation_key: 'str', zone: 'Optional[ScwZone]', volume_id: 'Optional[str]', snapshot_id: 'Optional[str]')

Bases: object

snapshot_id: str | None
validation_key: str

A value to be retrieved from a call to the [Get a volume or snapshot’s migration plan](#path-volumes-get-a-volume-or-snapshots-migration-plan) endpoint, to confirm that the volume and/or snapshots specified in said plan should be migrated.

volume_id: str | None
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.Arch(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

ARM = 'arm'
ARM64 = 'arm64'
UNKNOWN_ARCH = 'unknown_arch'
X86_64 = 'x86_64'
class scaleway.instance.v1.types.AttachServerFileSystemRequest(server_id: 'str', filesystem_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

filesystem_id: str
server_id: str
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.AttachServerFileSystemResponse(server: 'Optional[Server]')

Bases: object

server: Server | None
class scaleway.instance.v1.types.AttachServerVolumeRequest(server_id: 'str', volume_id: 'str', zone: 'Optional[ScwZone]', volume_type: 'Optional[AttachServerVolumeRequestVolumeType]', boot: 'Optional[bool]')

Bases: object

boot: bool | None
server_id: str
volume_id: str
volume_type: AttachServerVolumeRequestVolumeType | None
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.AttachServerVolumeRequestVolumeType(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

B_SSD = 'b_ssd'
L_SSD = 'l_ssd'
SBS_VOLUME = 'sbs_volume'
UNKNOWN_VOLUME_TYPE = 'unknown_volume_type'
class scaleway.instance.v1.types.AttachServerVolumeResponse(server: 'Optional[Server]')

Bases: object

server: Server | None
class scaleway.instance.v1.types.BootType(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

BOOTSCRIPT = 'bootscript'
LOCAL = 'local'
RESCUE = 'rescue'
class scaleway.instance.v1.types.Bootscript(architecture: 'Arch', bootcmdargs: 'str', default: 'bool', dtb: 'str', id: 'str', initrd: 'str', kernel: 'str', organization: 'str', public: 'bool', title: 'str', project: 'str', zone: 'ScwZone')

Bases: object

architecture: Arch
bootcmdargs: str
default: bool
dtb: str
id: str
initrd: str
kernel: str
organization: str
project: str
public: bool
title: str
zone: str

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.CheckBlockMigrationOrganizationQuotasRequest(zone: 'Optional[ScwZone]', organization: 'Optional[str]')

Bases: object

organization: str | None
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.CreateImageRequest(root_volume: 'str', arch: 'Arch', zone: 'Optional[ScwZone]', name: 'Optional[str]', extra_volumes: 'Optional[Dict[str, VolumeTemplate]]', tags: 'Optional[List[str]]', public: 'Optional[bool]', project: 'Optional[str]', organization: 'Optional[str]')

Bases: object

arch: Arch

Architecture of the image.

extra_volumes: Dict[str, VolumeTemplate] | None

Additional volumes of the image.

name: str | None

Name of the image.

organization: str | None
project: str | None
public: bool | None

True to create a public image.

root_volume: str

UUID of the snapshot.

tags: List[str] | None

Tags of the image.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.CreateImageResponse(image: 'Optional[Image]')

Bases: object

image: Image | None
class scaleway.instance.v1.types.CreateIpRequest(zone: 'Optional[ScwZone]', tags: 'Optional[List[str]]', server: 'Optional[str]', type_: 'Optional[IpType]', project: 'Optional[str]', organization: 'Optional[str]')

Bases: object

organization: str | None
project: str | None
server: str | None

UUID of the Instance you want to attach the IP to.

tags: List[str] | None

Tags of the IP.

type_: IpType | None

IP type to reserve (either ‘routed_ipv4’ or ‘routed_ipv6’).

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.CreateIpResponse(ip: 'Optional[Ip]')

Bases: object

ip: Ip | None
class scaleway.instance.v1.types.CreatePlacementGroupRequest(zone: 'Optional[ScwZone]', name: 'Optional[str]', tags: 'Optional[List[str]]', policy_mode: 'Optional[PlacementGroupPolicyMode]', policy_type: 'Optional[PlacementGroupPolicyType]', project: 'Optional[str]', organization: 'Optional[str]')

Bases: object

name: str | None

Name of the placement group.

organization: str | None
policy_mode: PlacementGroupPolicyMode | None

Operating mode of the placement group.

policy_type: PlacementGroupPolicyType | None

Policy type of the placement group.

project: str | None
tags: List[str] | None

Tags of the placement group.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.CreatePlacementGroupResponse(placement_group: 'Optional[PlacementGroup]')

Bases: object

placement_group: PlacementGroup | None
class scaleway.instance.v1.types.CreatePrivateNICRequest(server_id: 'str', private_network_id: 'str', zone: 'Optional[ScwZone]', tags: 'Optional[List[str]]', ip_ids: 'Optional[List[str]]', ipam_ip_ids: 'Optional[List[str]]')

Bases: object

ip_ids: List[str] | None

Ip_ids defined from IPAM.

ipam_ip_ids: List[str] | None

UUID of IPAM ips, to be attached to the instance in the requested private network.

private_network_id: str

UUID of the private network where the private NIC will be attached.

server_id: str

UUID of the Instance the private NIC will be attached to.

tags: List[str] | None

Private NIC tags.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.CreatePrivateNICResponse(private_nic: 'Optional[PrivateNIC]')

Bases: object

private_nic: PrivateNIC | None
class scaleway.instance.v1.types.CreateSecurityGroupRequest(description: 'str', stateful: 'bool', zone: 'Optional[ScwZone]', name: 'Optional[str]', tags: 'Optional[List[str]]', inbound_default_policy: 'Optional[SecurityGroupPolicy]', outbound_default_policy: 'Optional[SecurityGroupPolicy]', enable_default_security: 'Optional[bool]', project: 'Optional[str]', organization: 'Optional[str]', organization_default: 'Optional[bool]', project_default: 'Optional[bool]')

Bases: object

description: str

Description of the security group.

enable_default_security: bool | None

True to block SMTP on IPv4 and IPv6. This feature is read only, please open a support ticket if you need to make it configurable.

inbound_default_policy: SecurityGroupPolicy | None

Default policy for inbound rules.

name: str | None

Name of the security group.

organization: str | None
organization_default: bool | None
outbound_default_policy: SecurityGroupPolicy | None

Default policy for outbound rules.

project: str | None
project_default: bool | None
stateful: bool

Whether the security group is stateful or not.

tags: List[str] | None

Tags of the security group.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.CreateSecurityGroupResponse(security_group: 'Optional[SecurityGroup]')

Bases: object

security_group: SecurityGroup | None
class scaleway.instance.v1.types.CreateSecurityGroupRuleRequest(security_group_id: 'str', protocol: 'SecurityGroupRuleProtocol', direction: 'SecurityGroupRuleDirection', action: 'SecurityGroupRuleAction', ip_range: 'str', position: 'int', editable: 'bool', zone: 'Optional[ScwZone]', dest_port_from: 'Optional[int]', dest_port_to: 'Optional[int]')

Bases: object

action: SecurityGroupRuleAction
dest_port_from: int | None

Beginning of the range of ports to apply this rule to (inclusive).

dest_port_to: int | None

End of the range of ports to apply this rule to (inclusive).

direction: SecurityGroupRuleDirection
editable: bool

Indicates if this rule is editable (will be ignored).

ip_range: str
position: int

Position of this rule in the security group rules list.

protocol: SecurityGroupRuleProtocol
security_group_id: str

UUID of the security group.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.CreateSecurityGroupRuleResponse(rule: 'Optional[SecurityGroupRule]')

Bases: object

rule: SecurityGroupRule | None
class scaleway.instance.v1.types.CreateServerRequest(zone: 'Optional[ScwZone]', commercial_type: 'str', name: 'Optional[str]', dynamic_ip_required: 'Optional[bool]', routed_ip_enabled: 'Optional[bool]', image: 'Optional[str]', volumes: 'Optional[Dict[str, VolumeServerTemplate]]', enable_ipv6: 'Optional[bool]', protected: 'bool', public_ip: 'Optional[str]', public_ips: 'Optional[List[str]]', boot_type: 'Optional[BootType]', tags: 'Optional[List[str]]', security_group: 'Optional[str]', placement_group: 'Optional[str]', admin_password_encryption_ssh_key_id: 'Optional[str]', project: 'Optional[str]', organization: 'Optional[str]')

Bases: object

admin_password_encryption_ssh_key_id: str | None

The public_key value of this key is used to encrypt the admin password.

boot_type: BootType | None

Boot type to use.

commercial_type: str

Define the Instance commercial type (i.e. GP1-S).

dynamic_ip_required: bool | None

By default, dynamic_ip_required is true, a dynamic ip is attached to the instance (if no flexible ip is already attached).

enable_ipv6: bool | None

True if IPv6 is enabled on the server (deprecated and always False when routed_ip_enabled is True).

image: str | None

Instance image ID or label.

name: str | None

Instance name.

organization: str | None
placement_group: str | None

Placement group ID if Instance must be part of a placement group.

project: str | None
protected: bool

True to activate server protection option.

public_ip: str | None

ID of the reserved IP to attach to the Instance.

public_ips: List[str] | None

A list of reserved IP IDs to attach to the Instance.

routed_ip_enabled: bool | None

If true, configure the Instance so it uses the new routed IP mode.

security_group: str | None

Security group ID.

tags: List[str] | None

Instance tags.

volumes: Dict[str, VolumeServerTemplate] | None

Volumes attached to the server.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.CreateServerResponse(server: 'Optional[Server]')

Bases: object

server: Server | None
class scaleway.instance.v1.types.CreateSnapshotRequest(zone: 'Optional[ScwZone]', name: 'Optional[str]', volume_id: 'Optional[str]', tags: 'Optional[List[str]]', volume_type: 'Optional[SnapshotVolumeType]', bucket: 'Optional[str]', key: 'Optional[str]', size: 'Optional[int]', project: 'Optional[str]', organization: 'Optional[str]')

Bases: object

bucket: str | None

Bucket name for snapshot imports.

key: str | None

Object key for snapshot imports.

name: str | None

Name of the snapshot.

organization: str | None
project: str | None
size: int | None

Imported snapshot size, must be a multiple of 512.

tags: List[str] | None

Tags of the snapshot.

volume_id: str | None

UUID of the volume.

volume_type: SnapshotVolumeType | None

Overrides the volume_type of the snapshot.

If omitted, the volume type of the original volume will be used.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.CreateSnapshotResponse(snapshot: 'Optional[Snapshot]', task: 'Optional[Task]')

Bases: object

snapshot: Snapshot | None
task: Task | None
class scaleway.instance.v1.types.CreateVolumeRequest(zone: 'Optional[ScwZone]', name: 'Optional[str]', tags: 'Optional[List[str]]', volume_type: 'Optional[VolumeVolumeType]', project: 'Optional[str]', organization: 'Optional[str]', size: 'Optional[int]', base_snapshot: 'Optional[str]')

Bases: object

base_snapshot: str | None
name: str | None

Volume name.

organization: str | None
project: str | None
size: int | None
tags: List[str] | None

Volume tags.

volume_type: VolumeVolumeType | None

Volume type.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.CreateVolumeResponse(volume: 'Optional[Volume]')

Bases: object

volume: Volume | None
class scaleway.instance.v1.types.Dashboard(volumes_count: 'int', running_servers_count: 'int', servers_by_types: 'Dict[str, int]', images_count: 'int', snapshots_count: 'int', servers_count: 'int', ips_count: 'int', security_groups_count: 'int', ips_unused: 'int', volumes_l_ssd_count: 'int', volumes_l_ssd_total_size: 'int', private_nics_count: 'int', placement_groups_count: 'int', volumes_b_ssd_count: 'Optional[int]', volumes_b_ssd_total_size: 'Optional[int]')

Bases: object

images_count: int
ips_count: int
ips_unused: int
placement_groups_count: int
private_nics_count: int
running_servers_count: int
security_groups_count: int
servers_by_types: Dict[str, int]
servers_count: int
snapshots_count: int
volumes_b_ssd_count: int | None
volumes_b_ssd_total_size: int | None
volumes_count: int
volumes_l_ssd_count: int
volumes_l_ssd_total_size: int
class scaleway.instance.v1.types.DeleteImageRequest(image_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

image_id: str

UUID of the image you want to delete.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.DeleteIpRequest(ip: 'str', zone: 'Optional[ScwZone]')

Bases: object

ip: str

ID or address of the IP to delete.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.DeletePlacementGroupRequest(placement_group_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

placement_group_id: str

UUID of the placement group you want to delete.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.DeletePrivateNICRequest(server_id: 'str', private_nic_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

private_nic_id: str

Private NIC unique ID.

server_id: str

Instance to which the private NIC is attached.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.DeleteSecurityGroupRequest(security_group_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

security_group_id: str

UUID of the security group you want to delete.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.DeleteSecurityGroupRuleRequest(security_group_id: 'str', security_group_rule_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

security_group_id: str
security_group_rule_id: str
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.DeleteServerRequest(server_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

server_id: str
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.DeleteServerUserDataRequest(server_id: 'str', key: 'str', zone: 'Optional[ScwZone]')

Bases: object

key: str

Key of the user data to delete.

server_id: str

UUID of the Instance.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.DeleteSnapshotRequest(snapshot_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

snapshot_id: str

UUID of the snapshot you want to delete.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.DeleteVolumeRequest(volume_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

volume_id: str

UUID of the volume you want to delete.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.DetachServerFileSystemRequest(server_id: 'str', filesystem_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

filesystem_id: str
server_id: str
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.DetachServerFileSystemResponse(server: 'Optional[Server]')

Bases: object

server: Server | None
class scaleway.instance.v1.types.DetachServerVolumeRequest(server_id: 'str', volume_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

server_id: str
volume_id: str
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.DetachServerVolumeResponse(server: 'Optional[Server]')

Bases: object

server: Server | None
class scaleway.instance.v1.types.ExportSnapshotRequest(bucket: 'str', key: 'str', snapshot_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

bucket: str

Object Storage bucket name.

key: str

Object key.

snapshot_id: str

Snapshot ID.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.ExportSnapshotResponse(task: 'Optional[Task]')

Bases: object

task: Task | None
class scaleway.instance.v1.types.GetDashboardRequest(zone: 'Optional[ScwZone]', organization: 'Optional[str]', project: 'Optional[str]')

Bases: object

organization: str | None
project: str | None
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.GetDashboardResponse(dashboard: 'Optional[Dashboard]')

Bases: object

dashboard: Dashboard | None
class scaleway.instance.v1.types.GetImageRequest(image_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

image_id: str

UUID of the image you want to get.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.GetImageResponse(image: 'Optional[Image]')

Bases: object

image: Image | None
class scaleway.instance.v1.types.GetIpRequest(ip: 'str', zone: 'Optional[ScwZone]')

Bases: object

ip: str

IP ID or address to get.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.GetIpResponse(ip: 'Optional[Ip]')

Bases: object

ip: Ip | None
class scaleway.instance.v1.types.GetPlacementGroupRequest(placement_group_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

placement_group_id: str

UUID of the placement group you want to get.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.GetPlacementGroupResponse(placement_group: 'Optional[PlacementGroup]')

Bases: object

placement_group: PlacementGroup | None
class scaleway.instance.v1.types.GetPlacementGroupServersRequest(placement_group_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

placement_group_id: str

UUID of the placement group you want to get.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.GetPlacementGroupServersResponse(servers: 'List[PlacementGroupServer]')

Bases: object

servers: List[PlacementGroupServer]

Instances attached to the placement group.

class scaleway.instance.v1.types.GetPrivateNICRequest(server_id: 'str', private_nic_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

private_nic_id: str

Private NIC unique ID.

server_id: str

Instance to which the private NIC is attached.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.GetPrivateNICResponse(private_nic: 'Optional[PrivateNIC]')

Bases: object

private_nic: PrivateNIC | None
class scaleway.instance.v1.types.GetSecurityGroupRequest(security_group_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

security_group_id: str

UUID of the security group you want to get.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.GetSecurityGroupResponse(security_group: 'Optional[SecurityGroup]')

Bases: object

security_group: SecurityGroup | None
class scaleway.instance.v1.types.GetSecurityGroupRuleRequest(security_group_id: 'str', security_group_rule_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

security_group_id: str
security_group_rule_id: str
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.GetSecurityGroupRuleResponse(rule: 'Optional[SecurityGroupRule]')

Bases: object

rule: SecurityGroupRule | None
class scaleway.instance.v1.types.GetServerCompatibleTypesRequest(server_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

server_id: str

UUID of the Instance you want to get.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.GetServerRequest(server_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

server_id: str

UUID of the Instance you want to get.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.GetServerResponse(server: 'Optional[Server]')

Bases: object

server: Server | None
class scaleway.instance.v1.types.GetServerTypesAvailabilityRequest(zone: 'Optional[ScwZone]', per_page: 'Optional[int]', page: 'Optional[int]')

Bases: object

page: int | None

A positive integer to choose the page to return.

per_page: int | None

A positive integer lower or equal to 100 to select the number of items to return.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.GetServerTypesAvailabilityResponse(servers: 'Dict[str, GetServerTypesAvailabilityResponseAvailability]', total_count: 'int')

Bases: object

servers: Dict[str, GetServerTypesAvailabilityResponseAvailability]

Map of server types.

total_count: int
class scaleway.instance.v1.types.GetServerTypesAvailabilityResponseAvailability(availability: 'ServerTypesAvailability')

Bases: object

availability: ServerTypesAvailability
class scaleway.instance.v1.types.GetSnapshotRequest(snapshot_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

snapshot_id: str

UUID of the snapshot you want to get.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.GetSnapshotResponse(snapshot: 'Optional[Snapshot]')

Bases: object

snapshot: Snapshot | None
class scaleway.instance.v1.types.GetVolumeRequest(volume_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

volume_id: str

UUID of the volume you want to get.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.GetVolumeResponse(volume: 'Optional[Volume]')

Bases: object

volume: Volume | None
class scaleway.instance.v1.types.Image(id: 'str', name: 'str', arch: 'Arch', extra_volumes: 'Dict[str, Volume]', from_server: 'str', organization: 'str', creation_date: 'Optional[datetime]', modification_date: 'Optional[datetime]', default_bootscript: 'Optional[Bootscript]', public: 'bool', state: 'ImageState', project: 'str', tags: 'List[str]', zone: 'ScwZone', root_volume: 'Optional[VolumeSummary]')

Bases: object

arch: Arch
creation_date: datetime | None
default_bootscript: Bootscript | None
extra_volumes: Dict[str, Volume]
from_server: str
id: str
modification_date: datetime | None
name: str
organization: str
project: str
public: bool
root_volume: VolumeSummary | None
state: ImageState
tags: List[str]
zone: str

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.ImageState(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

AVAILABLE = 'available'
CREATING = 'creating'
ERROR = 'error'
class scaleway.instance.v1.types.Ip(id: 'str', address: 'str', organization: 'str', tags: 'List[str]', project: 'str', type_: 'IpType', state: 'IpState', prefix: 'str', ipam_id: 'str', zone: 'ScwZone', reverse: 'Optional[str]', server: 'Optional[ServerSummary]')

Bases: object

address: str
id: str
ipam_id: str
organization: str
prefix: str
project: str
reverse: str | None
server: ServerSummary | None
state: IpState
tags: List[str]
type_: IpType
zone: str

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.IpState(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

ATTACHED = 'attached'
DETACHED = 'detached'
ERROR = 'error'
PENDING = 'pending'
UNKNOWN_STATE = 'unknown_state'
class scaleway.instance.v1.types.IpType(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

ROUTED_IPV4 = 'routed_ipv4'
ROUTED_IPV6 = 'routed_ipv6'
UNKNOWN_IPTYPE = 'unknown_iptype'
class scaleway.instance.v1.types.ListDefaultSecurityGroupRulesRequest(zone: 'Optional[ScwZone]')

Bases: object

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.ListImagesRequest(zone: 'Optional[ScwZone]', organization: 'Optional[str]', per_page: 'Optional[int]', page: 'Optional[int]', name: 'Optional[str]', public: 'Optional[bool]', arch: 'Optional[str]', project: 'Optional[str]', tags: 'Optional[str]')

Bases: object

arch: str | None
name: str | None
organization: str | None
page: int | None
per_page: int | None
project: str | None
public: bool | None
tags: str | None
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.ListImagesResponse(total_count: 'int', images: 'List[Image]')

Bases: object

images: List[Image]

List of images.

total_count: int

Total number of images.

class scaleway.instance.v1.types.ListIpsRequest(zone: 'Optional[ScwZone]', project: 'Optional[str]', organization: 'Optional[str]', tags: 'Optional[List[str]]', name: 'Optional[str]', per_page: 'Optional[int]', page: 'Optional[int]', type_: 'Optional[str]')

Bases: object

name: str | None

Filter on the IP address (Works as a LIKE operation on the IP address).

organization: str | None

Organization ID in which the IPs are reserved.

page: int | None

A positive integer to choose the page to return.

per_page: int | None

A positive integer lower or equal to 100 to select the number of items to return.

project: str | None

Project ID in which the IPs are reserved.

tags: List[str] | None

Filter IPs with these exact tags (to filter with several tags, use commas to separate them).

type_: str | None

Filter on the IP Mobility IP type (whose value should be either ‘routed_ipv4’ or ‘routed_ipv6’).

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.ListIpsResponse(total_count: 'int', ips: 'List[Ip]')

Bases: object

ips: List[Ip]

List of ips.

total_count: int

Total number of ips.

class scaleway.instance.v1.types.ListPlacementGroupsRequest(zone: 'Optional[ScwZone]', per_page: 'Optional[int]', page: 'Optional[int]', organization: 'Optional[str]', project: 'Optional[str]', tags: 'Optional[List[str]]', name: 'Optional[str]')

Bases: object

name: str | None

Filter placement groups by name (for eg. “cluster1” will return “cluster100” and “cluster1” but not “foo”).

organization: str | None

List only placement groups of this Organization ID.

page: int | None

A positive integer to choose the page to return.

per_page: int | None

A positive integer lower or equal to 100 to select the number of items to return.

project: str | None

List only placement groups of this Project ID.

tags: List[str] | None

List placement groups with these exact tags (to filter with several tags, use commas to separate them).

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.ListPlacementGroupsResponse(total_count: 'int', placement_groups: 'List[PlacementGroup]')

Bases: object

placement_groups: List[PlacementGroup]

List of placement groups.

total_count: int

Total number of placement groups.

class scaleway.instance.v1.types.ListPrivateNICsRequest(server_id: 'str', zone: 'Optional[ScwZone]', tags: 'Optional[List[str]]', per_page: 'Optional[int]', page: 'Optional[int]')

Bases: object

page: int | None

A positive integer to choose the page to return.

per_page: int | None

A positive integer lower or equal to 100 to select the number of items to return.

server_id: str

Instance to which the private NIC is attached.

tags: List[str] | None

Private NIC tags.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.ListPrivateNICsResponse(private_nics: 'List[PrivateNIC]', total_count: 'int')

Bases: object

private_nics: List[PrivateNIC]
total_count: int
class scaleway.instance.v1.types.ListSecurityGroupRulesRequest(security_group_id: 'str', zone: 'Optional[ScwZone]', per_page: 'Optional[int]', page: 'Optional[int]')

Bases: object

page: int | None

A positive integer to choose the page to return.

per_page: int | None

A positive integer lower or equal to 100 to select the number of items to return.

security_group_id: str

UUID of the security group.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.ListSecurityGroupRulesResponse(total_count: 'int', rules: 'List[SecurityGroupRule]')

Bases: object

rules: List[SecurityGroupRule]

List of security rules.

total_count: int

Total number of security groups.

class scaleway.instance.v1.types.ListSecurityGroupsRequest(zone: 'Optional[ScwZone]', name: 'Optional[str]', organization: 'Optional[str]', project: 'Optional[str]', tags: 'Optional[List[str]]', project_default: 'Optional[bool]', per_page: 'Optional[int]', page: 'Optional[int]')

Bases: object

name: str | None

Name of the security group.

organization: str | None

Security group Organization ID.

page: int | None

A positive integer to choose the page to return.

per_page: int | None

A positive integer lower or equal to 100 to select the number of items to return.

project: str | None

Security group Project ID.

project_default: bool | None

Filter security groups with this value for project_default.

tags: List[str] | None

List security groups with these exact tags (to filter with several tags, use commas to separate them).

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.ListSecurityGroupsResponse(total_count: 'int', security_groups: 'List[SecurityGroup]')

Bases: object

security_groups: List[SecurityGroup]

List of security groups.

total_count: int

Total number of security groups.

class scaleway.instance.v1.types.ListServerActionsRequest(server_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

server_id: str
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.ListServerActionsResponse(actions: 'List[ServerAction]')

Bases: object

actions: List[ServerAction]
class scaleway.instance.v1.types.ListServerUserDataRequest(server_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

server_id: str

UUID of the Instance.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.ListServerUserDataResponse(user_data: 'List[str]')

Bases: object

user_data: List[str]
class scaleway.instance.v1.types.ListServersRequest(zone: 'Optional[ScwZone]', per_page: 'Optional[int]', page: 'Optional[int]', organization: 'Optional[str]', project: 'Optional[str]', name: 'Optional[str]', private_ip: 'Optional[str]', without_ip: 'Optional[bool]', with_ip: 'Optional[str]', commercial_type: 'Optional[str]', state: 'Optional[ServerState]', tags: 'Optional[List[str]]', private_network: 'Optional[str]', order: 'Optional[ListServersRequestOrder]', private_networks: 'Optional[List[str]]', private_nic_mac_address: 'Optional[str]', servers: 'Optional[List[str]]')

Bases: object

commercial_type: str | None

List Instances of this commercial type.

name: str | None

Filter Instances by name (eg. “server1” will return “server100” and “server1” but not “foo”).

order: ListServersRequestOrder | None

Define the order of the returned servers.

organization: str | None

List only Instances of this Organization ID.

page: int | None

A positive integer to choose the page to return.

per_page: int | None

A positive integer lower or equal to 100 to select the number of items to return.

private_ip: str | None

List Instances by private_ip.

private_network: str | None

List Instances in this Private Network.

private_networks: List[str] | None

List Instances from the given Private Networks (use commas to separate them).

private_nic_mac_address: str | None

List Instances associated with the given private NIC MAC address.

project: str | None

List only Instances of this Project ID.

servers: List[str] | None

List Instances from these server ids (use commas to separate them).

state: ServerState | None

List Instances in this state.

tags: List[str] | None

List Instances with these exact tags (to filter with several tags, use commas to separate them).

with_ip: str | None

List Instances by IP (both private_ip and public_ip are supported).

without_ip: bool | None

List Instances that are not attached to a public IP.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.ListServersRequestOrder(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

CREATION_DATE_ASC = 'creation_date_asc'
CREATION_DATE_DESC = 'creation_date_desc'
MODIFICATION_DATE_ASC = 'modification_date_asc'
MODIFICATION_DATE_DESC = 'modification_date_desc'
class scaleway.instance.v1.types.ListServersResponse(total_count: 'int', servers: 'List[Server]')

Bases: object

servers: List[Server]

List of Instances.

total_count: int

Total number of Instances.

class scaleway.instance.v1.types.ListServersTypesRequest(zone: 'Optional[ScwZone]', per_page: 'Optional[int]', page: 'Optional[int]')

Bases: object

page: int | None
per_page: int | None
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.ListServersTypesResponse(total_count: 'int', servers: 'Dict[str, ServerType]')

Bases: object

servers: Dict[str, ServerType]

List of Instance types.

total_count: int

Total number of Instance types.

class scaleway.instance.v1.types.ListSnapshotsRequest(zone: 'Optional[ScwZone]', organization: 'Optional[str]', project: 'Optional[str]', per_page: 'Optional[int]', page: 'Optional[int]', name: 'Optional[str]', tags: 'Optional[str]', base_volume_id: 'Optional[str]')

Bases: object

base_volume_id: str | None

List snapshots originating only from this volume.

name: str | None

List snapshots of the requested name.

organization: str | None

List snapshots only for this Organization ID.

page: int | None

Page to be returned.

per_page: int | None

Number of snapshots returned per page (positive integer lower or equal to 100).

project: str | None

List snapshots only for this Project ID.

tags: str | None

List snapshots that have the requested tag.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.ListSnapshotsResponse(total_count: 'int', snapshots: 'List[Snapshot]')

Bases: object

snapshots: List[Snapshot]

List of snapshots.

total_count: int

Total number of snapshots.

class scaleway.instance.v1.types.ListVolumesRequest(zone: 'Optional[ScwZone]', volume_type: 'Optional[VolumeVolumeType]', per_page: 'Optional[int]', page: 'Optional[int]', organization: 'Optional[str]', project: 'Optional[str]', tags: 'Optional[List[str]]', name: 'Optional[str]')

Bases: object

name: str | None

Filter volume by name (for eg. “vol” will return “myvolume” but not “data”).

organization: str | None

Filter volume by Organization ID.

page: int | None

A positive integer to choose the page to return.

per_page: int | None

A positive integer lower or equal to 100 to select the number of items to return.

project: str | None

Filter volume by Project ID.

tags: List[str] | None

Filter volumes with these exact tags (to filter with several tags, use commas to separate them).

volume_type: VolumeVolumeType | None

Filter by volume type.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.ListVolumesResponse(total_count: 'int', volumes: 'List[Volume]')

Bases: object

total_count: int

Total number of volumes.

volumes: List[Volume]

List of volumes.

class scaleway.instance.v1.types.ListVolumesTypesRequest(zone: 'Optional[ScwZone]', per_page: 'Optional[int]', page: 'Optional[int]')

Bases: object

page: int | None
per_page: int | None
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.ListVolumesTypesResponse(total_count: 'int', volumes: 'Dict[str, VolumeType]')

Bases: object

total_count: int

Total number of volume types.

volumes: Dict[str, VolumeType]

Map of volume types.

class scaleway.instance.v1.types.MigrationPlan(snapshots: 'List[Snapshot]', validation_key: 'str', volume: 'Optional[Volume]')

Bases: object

snapshots: List[Snapshot]

A list of snapshots which will be migrated to SBS together and with the volume, if present.

validation_key: str

A value to be passed to the call to the [Migrate a volume and/or snapshots to SBS](#path-volumes-migrate-a-volume-andor-snapshots-to-sbs-scaleway-block-storage) endpoint, to confirm that the execution of the plan is being requested.

volume: Volume | None

A volume which will be migrated to SBS together with the snapshots, if present.

class scaleway.instance.v1.types.PlacementGroup(id: 'str', name: 'str', organization: 'str', project: 'str', tags: 'List[str]', policy_mode: 'PlacementGroupPolicyMode', policy_type: 'PlacementGroupPolicyType', policy_respected: 'bool', zone: 'ScwZone')

Bases: object

id: str

Placement group unique ID.

name: str

Placement group name.

organization: str

Placement group Organization ID.

policy_mode: PlacementGroupPolicyMode

Select the failure mode when the placement cannot be respected, either optional or enforced.

policy_respected: bool

In the server endpoints the value is always false as it is deprecated.

In the placement group endpoints the value is correct.

policy_type: PlacementGroupPolicyType

Select the behavior of the placement group, either low_latency (group) or max_availability (spread).

project: str

Placement group Project ID.

tags: List[str]

Placement group tags.

zone: str

Zone in which the placement group is located.

class scaleway.instance.v1.types.PlacementGroupPolicyMode(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

ENFORCED = 'enforced'
OPTIONAL = 'optional'
class scaleway.instance.v1.types.PlacementGroupPolicyType(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

LOW_LATENCY = 'low_latency'
MAX_AVAILABILITY = 'max_availability'
class scaleway.instance.v1.types.PlacementGroupServer(id: 'str', name: 'str', policy_respected: 'bool')

Bases: object

id: str

Instance UUID.

name: str

Instance name.

policy_respected: bool

Defines whether the placement group policy is respected (either 1 or 0).

class scaleway.instance.v1.types.PlanBlockMigrationRequest(zone: 'Optional[ScwZone]', volume_id: 'Optional[str]', snapshot_id: 'Optional[str]')

Bases: object

snapshot_id: str | None
volume_id: str | None
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.PrivateNIC(id: 'str', server_id: 'str', private_network_id: 'str', mac_address: 'str', state: 'PrivateNICState', tags: 'List[str]')

Bases: object

id: str

Private NIC unique ID.

mac_address: str

Private NIC MAC address.

private_network_id: str

Private Network the private NIC is attached to.

server_id: str

Instance to which the private NIC is attached.

state: PrivateNICState

Private NIC state.

tags: List[str]

Private NIC tags.

class scaleway.instance.v1.types.PrivateNICState(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

AVAILABLE = 'available'
SYNCING = 'syncing'
SYNCING_ERROR = 'syncing_error'
class scaleway.instance.v1.types.SecurityGroup(id: 'str', name: 'str', description: 'str', enable_default_security: 'bool', inbound_default_policy: 'SecurityGroupPolicy', outbound_default_policy: 'SecurityGroupPolicy', organization: 'str', project: 'str', tags: 'List[str]', project_default: 'bool', servers: 'List[ServerSummary]', stateful: 'bool', state: 'SecurityGroupState', zone: 'ScwZone', organization_default: 'Optional[bool]', creation_date: 'Optional[datetime]', modification_date: 'Optional[datetime]')

Bases: object

creation_date: datetime | None

Security group creation date.

description: str

Security group description.

enable_default_security: bool

True if SMTP is blocked on IPv4 and IPv6. This feature is read only, please open a support ticket if you need to make it configurable.

id: str

Security group unique ID.

inbound_default_policy: SecurityGroupPolicy

Default inbound policy.

modification_date: datetime | None

Security group modification date.

name: str

Security group name.

organization: str

Security group Organization ID.

organization_default: bool | None

True if it is your default security group for this Organization ID.

outbound_default_policy: SecurityGroupPolicy

Default outbound policy.

project: str

Security group Project ID.

project_default: bool

True if it is your default security group for this Project ID.

servers: List[ServerSummary]

List of Instances attached to this security group.

state: SecurityGroupState

Security group state.

stateful: bool

Defines whether the security group is stateful.

tags: List[str]

Security group tags.

zone: str

Zone in which the security group is located.

class scaleway.instance.v1.types.SecurityGroupPolicy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

ACCEPT = 'accept'
DROP = 'drop'
UNKNOWN_POLICY = 'unknown_policy'
class scaleway.instance.v1.types.SecurityGroupRule(id: 'str', protocol: 'SecurityGroupRuleProtocol', direction: 'SecurityGroupRuleDirection', action: 'SecurityGroupRuleAction', ip_range: 'str', position: 'int', editable: 'bool', zone: 'ScwZone', dest_port_from: 'Optional[int]', dest_port_to: 'Optional[int]')

Bases: object

action: SecurityGroupRuleAction
dest_port_from: int | None
dest_port_to: int | None
direction: SecurityGroupRuleDirection
editable: bool
id: str
ip_range: str
position: int
protocol: SecurityGroupRuleProtocol
zone: str

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.SecurityGroupRuleAction(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

ACCEPT = 'accept'
DROP = 'drop'
UNKNOWN_ACTION = 'unknown_action'
class scaleway.instance.v1.types.SecurityGroupRuleDirection(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

INBOUND = 'inbound'
OUTBOUND = 'outbound'
UNKNOWN_DIRECTION = 'unknown_direction'
class scaleway.instance.v1.types.SecurityGroupRuleProtocol(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

ANY = 'any'
ICMP = 'icmp'
TCP = 'tcp'
UDP = 'udp'
UNKNOWN_PROTOCOL = 'unknown_protocol'
class scaleway.instance.v1.types.SecurityGroupState(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

AVAILABLE = 'available'
SYNCING = 'syncing'
SYNCING_ERROR = 'syncing_error'
class scaleway.instance.v1.types.SecurityGroupSummary(id: 'str', name: 'str')

Bases: object

id: str
name: str
class scaleway.instance.v1.types.SecurityGroupTemplate(id: 'str', name: 'str')

Bases: object

id: str
name: str
class scaleway.instance.v1.types.Server(id: 'str', name: 'str', organization: 'str', project: 'str', allowed_actions: 'List[ServerAction]', tags: 'List[str]', commercial_type: 'str', creation_date: 'Optional[datetime]', dynamic_ip_required: 'bool', hostname: 'str', protected: 'bool', public_ips: 'List[ServerIp]', mac_address: 'str', state: 'ServerState', boot_type: 'BootType', volumes: 'Dict[str, VolumeServer]', maintenances: 'List[ServerMaintenance]', state_detail: 'str', arch: 'Arch', private_nics: 'List[PrivateNIC]', zone: 'ScwZone', filesystems: 'List[ServerFilesystem]', end_of_service: 'bool', routed_ip_enabled: 'Optional[bool]', enable_ipv6: 'Optional[bool]', image: 'Optional[Image]', private_ip: 'Optional[str]', public_ip: 'Optional[ServerIp]', modification_date: 'Optional[datetime]', location: 'Optional[ServerLocation]', ipv6: 'Optional[ServerIpv6]', security_group: 'Optional[SecurityGroupSummary]', placement_group: 'Optional[PlacementGroup]', admin_password_encryption_ssh_key_id: 'Optional[str]', admin_password_encrypted_value: 'Optional[str]')

Bases: object

admin_password_encrypted_value: str | None

This value is reset when admin_password_encryption_ssh_key_id is set to an empty string.

admin_password_encryption_ssh_key_id: str | None

The public_key value of this key is used to encrypt the admin password. When set to an empty string, reset this value and admin_password_encrypted_value to an empty string so a new password may be generated.

allowed_actions: List[ServerAction]

List of allowed actions on the Instance.

arch: Arch

Instance architecture.

boot_type: BootType

Instance boot type.

commercial_type: str

Instance commercial type (eg. GP1-M).

creation_date: datetime | None

Instance creation date.

dynamic_ip_required: bool

True if a dynamic IPv4 is required.

enable_ipv6: bool | None

True if IPv6 is enabled (deprecated and always False when routed_ip_enabled is True).

end_of_service: bool

True if the Instance type has reached end of service.

filesystems: List[ServerFilesystem]

List of attached filesystems.

hostname: str

Instance host name.

id: str

Instance unique ID.

image: Image | None

Information about the Instance image.

ipv6: ServerIpv6 | None

Instance IPv6 address (deprecated when routed_ip_enabled is True).

location: ServerLocation | None

Instance location.

mac_address: str

The server’s MAC address.

maintenances: List[ServerMaintenance]

Instance planned maintenance.

modification_date: datetime | None

Instance modification date.

name: str

Instance name.

organization: str

Instance Organization ID.

placement_group: PlacementGroup | None

Instance placement group.

private_ip: str | None

Private IP address of the Instance (deprecated and always null when routed_ip_enabled is True).

private_nics: List[PrivateNIC]

Instance private NICs.

project: str

Instance Project ID.

protected: bool

Defines whether the Instance protection option is activated.

public_ip: ServerIp | None

Information about the public IP (deprecated in favor of public_ips).

public_ips: List[ServerIp]

Information about all the public IPs attached to the server.

routed_ip_enabled: bool | None

True to configure the instance so it uses the routed IP mode. Use of routed_ip_enabled as False is deprecated.

security_group: SecurityGroupSummary | None

Instance security group.

state: ServerState

Instance state.

state_detail: str

Detailed information about the Instance state.

tags: List[str]

Tags associated with the Instance.

volumes: Dict[str, VolumeServer]

Instance volumes.

zone: str

Zone in which the Instance is located.

class scaleway.instance.v1.types.ServerAction(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

BACKUP = 'backup'
ENABLE_ROUTED_IP = 'enable_routed_ip'
POWEROFF = 'poweroff'
POWERON = 'poweron'
REBOOT = 'reboot'
STOP_IN_PLACE = 'stop_in_place'
TERMINATE = 'terminate'
class scaleway.instance.v1.types.ServerActionRequest(server_id: 'str', zone: 'Optional[ScwZone]', action: 'Optional[ServerAction]', name: 'Optional[str]', volumes: 'Optional[Dict[str, ServerActionRequestVolumeBackupTemplate]]', disable_ipv6: 'Optional[bool]')

Bases: object

action: ServerAction | None

Action to perform on the Instance.

disable_ipv6: bool | None

Disable IPv6 on the Instance while performing migration to routed IPs.

This field should only be specified when performing a enable_routed_ip action.

name: str | None

Name of the backup you want to create.

This field should only be specified when performing a backup action.

server_id: str

UUID of the Instance.

volumes: Dict[str, ServerActionRequestVolumeBackupTemplate] | None

For each volume UUID, the snapshot parameters of the volume.

This field should only be specified when performing a backup action.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.ServerActionRequestVolumeBackupTemplate(volume_type: 'SnapshotVolumeType')

Bases: object

volume_type: SnapshotVolumeType

Overrides the volume_type of the snapshot for this volume.

If omitted, the volume type of the original volume will be used.

class scaleway.instance.v1.types.ServerActionResponse(task: 'Optional[Task]')

Bases: object

task: Task | None
class scaleway.instance.v1.types.ServerCompatibleTypes(compatible_types: 'List[str]')

Bases: object

compatible_types: List[str]

Instance compatible types.

class scaleway.instance.v1.types.ServerFilesystem(filesystem_id: 'str', state: 'ServerFilesystemState')

Bases: object

filesystem_id: str
state: ServerFilesystemState
class scaleway.instance.v1.types.ServerFilesystemState(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

ATTACHING = 'attaching'
AVAILABLE = 'available'
DETACHING = 'detaching'
UNKNOWN_STATE = 'unknown_state'
class scaleway.instance.v1.types.ServerIp(id: 'str', address: 'str', gateway: 'str', netmask: 'str', family: 'ServerIpIpFamily', dynamic: 'bool', provisioning_mode: 'ServerIpProvisioningMode', tags: 'List[str]', ipam_id: 'str', state: 'ServerIpState')

Bases: object

address: str

Instance’s public IP-Address.

dynamic: bool

True if the IP address is dynamic.

family: ServerIpIpFamily

IP address family (inet or inet6).

gateway: str

Gateway’s IP address.

id: str

Unique ID of the IP address.

ipam_id: str

The ip_id of an IPAM ip if the ip is created from IPAM, null if not.

netmask: str

CIDR netmask.

provisioning_mode: ServerIpProvisioningMode

Information about this address provisioning mode.

state: ServerIpState

IP address state.

tags: List[str]

Tags associated with the IP.

class scaleway.instance.v1.types.ServerIpIpFamily(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

INET = 'inet'
INET6 = 'inet6'
class scaleway.instance.v1.types.ServerIpProvisioningMode(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

DHCP = 'dhcp'
MANUAL = 'manual'
SLAAC = 'slaac'
class scaleway.instance.v1.types.ServerIpState(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

ATTACHED = 'attached'
DETACHED = 'detached'
ERROR = 'error'
PENDING = 'pending'
UNKNOWN_STATE = 'unknown_state'
class scaleway.instance.v1.types.ServerIpv6(address: 'str', gateway: 'str', netmask: 'str')

Bases: object

address: str

Instance IPv6 IP-Address.

gateway: str

IPv6 IP-addresses gateway.

netmask: str

IPv6 IP-addresses CIDR netmask.

class scaleway.instance.v1.types.ServerLocation(cluster_id: 'str', hypervisor_id: 'str', node_id: 'str', platform_id: 'str', zone_id: 'str')

Bases: object

cluster_id: str
hypervisor_id: str
node_id: str
platform_id: str
zone_id: str
class scaleway.instance.v1.types.ServerMaintenance(reason: 'str', start_date: 'Optional[datetime]')

Bases: object

reason: str
start_date: datetime | None
class scaleway.instance.v1.types.ServerState(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

LOCKED = 'locked'
RUNNING = 'running'
STARTING = 'starting'
STOPPED = 'stopped'
STOPPED_IN_PLACE = 'stopped_in_place'
STOPPING = 'stopping'
class scaleway.instance.v1.types.ServerSummary(id: 'str', name: 'str')

Bases: object

id: str
name: str
class scaleway.instance.v1.types.ServerType(monthly_price: 'Optional[float]', hourly_price: 'float', alt_names: 'List[str]', ncpus: 'int', ram: 'int', arch: 'Arch', end_of_service: 'bool', per_volume_constraint: 'Optional[ServerTypeVolumeConstraintsByType]', volumes_constraint: 'Optional[ServerTypeVolumeConstraintSizes]', gpu: 'Optional[int]', gpu_info: 'Optional[ServerTypeGPUInfo]', network: 'Optional[ServerTypeNetwork]', capabilities: 'Optional[ServerTypeCapabilities]', scratch_storage_max_size: 'Optional[int]', block_bandwidth: 'Optional[int]')

Bases: object

alt_names: List[str]

Alternative Instance name, if any.

arch: Arch

CPU architecture.

block_bandwidth: int | None

The maximum bandwidth allocated to block storage access (in bytes per second).

capabilities: ServerTypeCapabilities | None

Capabilities.

end_of_service: bool

True if this Instance type has reached end of service.

gpu: int | None

Number of GPU.

gpu_info: ServerTypeGPUInfo | None

GPU information.

hourly_price: float

Hourly price in Euro.

monthly_price: float | None

Estimated monthly price, for a 30 days month, in Euro.

ncpus: int

Number of CPU.

network: ServerTypeNetwork | None

Network available for the Instance.

per_volume_constraint: ServerTypeVolumeConstraintsByType | None

Additional volume constraints.

ram: int

Available RAM in bytes.

scratch_storage_max_size: int | None

Maximum available scratch storage.

volumes_constraint: ServerTypeVolumeConstraintSizes | None

Initial volume constraints.

class scaleway.instance.v1.types.ServerTypeCapabilities(boot_types: 'List[BootType]', max_file_systems: 'int', block_storage: 'Optional[bool]')

Bases: object

block_storage: bool | None

Defines whether the Instance supports block storage.

boot_types: List[BootType]

List of supported boot types.

max_file_systems: int

Max number of SFS (Scaleway File Systems) that can be attached to the Instance.

class scaleway.instance.v1.types.ServerTypeGPUInfo(gpu_manufacturer: 'str', gpu_name: 'str', gpu_memory: 'int')

Bases: object

gpu_manufacturer: str

GPU manufacturer.

gpu_memory: int

RAM of a single GPU, in bytes.

gpu_name: str

GPU model name.

class scaleway.instance.v1.types.ServerTypeNetwork(interfaces: 'List[ServerTypeNetworkInterface]', ipv6_support: 'bool', sum_internal_bandwidth: 'Optional[int]', sum_internet_bandwidth: 'Optional[int]')

Bases: object

interfaces: List[ServerTypeNetworkInterface]

List of available network interfaces.

ipv6_support: bool

True if IPv6 is enabled.

sum_internal_bandwidth: int | None

Total maximum internal bandwidth in bits per seconds.

sum_internet_bandwidth: int | None

Total maximum internet bandwidth in bits per seconds.

class scaleway.instance.v1.types.ServerTypeNetworkInterface(internal_bandwidth: 'Optional[int]', internet_bandwidth: 'Optional[int]')

Bases: object

internal_bandwidth: int | None

Maximum internal bandwidth in bits per seconds.

internet_bandwidth: int | None

Maximum internet bandwidth in bits per seconds.

class scaleway.instance.v1.types.ServerTypeVolumeConstraintSizes(min_size: 'int', max_size: 'int')

Bases: object

max_size: int

Maximum volume size in bytes.

min_size: int

Minimum volume size in bytes.

class scaleway.instance.v1.types.ServerTypeVolumeConstraintsByType(l_ssd: 'Optional[ServerTypeVolumeConstraintSizes]')

Bases: object

l_ssd: ServerTypeVolumeConstraintSizes | None

Local SSD volumes.

class scaleway.instance.v1.types.ServerTypesAvailability(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

AVAILABLE = 'available'
SCARCE = 'scarce'
SHORTAGE = 'shortage'
class scaleway.instance.v1.types.SetImageRequest(zone: 'Optional[ScwZone]', id: 'str', name: 'str', arch: 'Optional[Arch]', creation_date: 'Optional[datetime]', modification_date: 'Optional[datetime]', from_server: 'str', public: 'bool', default_bootscript: 'Optional[Bootscript]', extra_volumes: 'Optional[Dict[str, Volume]]', organization: 'Optional[str]', root_volume: 'Optional[VolumeSummary]', state: 'Optional[ImageState]', project: 'Optional[str]', tags: 'Optional[List[str]]')

Bases: object

arch: Arch | None
creation_date: datetime | None
default_bootscript: Bootscript | None
extra_volumes: Dict[str, Volume] | None
from_server: str
id: str
modification_date: datetime | None
name: str
organization: str | None
project: str | None
public: bool
root_volume: VolumeSummary | None
state: ImageState | None
tags: List[str] | None
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.SetPlacementGroupRequest(placement_group_id: 'str', name: 'str', zone: 'Optional[ScwZone]', organization: 'Optional[str]', policy_mode: 'Optional[PlacementGroupPolicyMode]', policy_type: 'Optional[PlacementGroupPolicyType]', project: 'Optional[str]', tags: 'Optional[List[str]]')

Bases: object

name: str
organization: str | None
placement_group_id: str
policy_mode: PlacementGroupPolicyMode | None
policy_type: PlacementGroupPolicyType | None
project: str | None
tags: List[str] | None
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.SetPlacementGroupResponse(placement_group: 'Optional[PlacementGroup]')

Bases: object

placement_group: PlacementGroup | None
class scaleway.instance.v1.types.SetPlacementGroupServersRequest(placement_group_id: 'str', servers: 'List[str]', zone: 'Optional[ScwZone]')

Bases: object

placement_group_id: str

UUID of the placement group you want to set.

servers: List[str]

An array of the Instances’ UUIDs you want to configure.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.SetPlacementGroupServersResponse(servers: 'List[PlacementGroupServer]')

Bases: object

servers: List[PlacementGroupServer]

Instances attached to the placement group.

class scaleway.instance.v1.types.SetSecurityGroupRulesRequest(security_group_id: 'str', zone: 'Optional[ScwZone]', rules: 'Optional[List[SetSecurityGroupRulesRequestRule]]')

Bases: object

rules: List[SetSecurityGroupRulesRequestRule] | None

List of rules to update in the security group.

security_group_id: str

UUID of the security group to update the rules on.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.SetSecurityGroupRulesRequestRule(action: 'SecurityGroupRuleAction', protocol: 'SecurityGroupRuleProtocol', direction: 'SecurityGroupRuleDirection', ip_range: 'str', position: 'int', id: 'Optional[str]', dest_port_from: 'Optional[int]', dest_port_to: 'Optional[int]', editable: 'Optional[bool]', zone: 'Optional[ScwZone]')

Bases: object

action: SecurityGroupRuleAction

Action to apply when the rule matches a packet.

dest_port_from: int | None

Beginning of the range of ports this rule applies to (inclusive). This value will be set to null if protocol is ICMP or ANY.

dest_port_to: int | None

End of the range of ports this rule applies to (inclusive). This value will be set to null if protocol is ICMP or ANY, or if it is equal to dest_port_from.

direction: SecurityGroupRuleDirection

Direction the rule applies to.

editable: bool | None

Indicates if this rule is editable. Rules with the value false will be ignored.

id: str | None

UUID of the security rule to update. If no value is provided, a new rule will be created.

ip_range: str

Range of IP addresses these rules apply to.

position: int

Position of this rule in the security group rules list. If several rules are passed with the same position, the resulting order is undefined.

protocol: SecurityGroupRuleProtocol

Protocol family this rule applies to.

zone: str | None

Zone of the rule. This field is ignored.

class scaleway.instance.v1.types.SetSecurityGroupRulesResponse(rules: 'List[SecurityGroupRule]')

Bases: object

rules: List[SecurityGroupRule]
class scaleway.instance.v1.types.Snapshot(id: 'str', name: 'str', organization: 'str', project: 'str', tags: 'List[str]', volume_type: 'VolumeVolumeType', size: 'int', state: 'SnapshotState', zone: 'ScwZone', base_volume: 'Optional[SnapshotBaseVolume]', creation_date: 'Optional[datetime]', modification_date: 'Optional[datetime]', error_reason: 'Optional[str]')

Bases: object

base_volume: SnapshotBaseVolume | None

Volume on which the snapshot is based on.

creation_date: datetime | None

Snapshot creation date.

error_reason: str | None

Reason for the failed snapshot import.

id: str

Snapshot ID.

modification_date: datetime | None

Snapshot modification date.

name: str

Snapshot name.

organization: str

Snapshot Organization ID.

project: str

Snapshot Project ID.

size: int

Snapshot size.

state: SnapshotState

Snapshot state.

tags: List[str]

Snapshot tags.

volume_type: VolumeVolumeType

Snapshot volume type.

zone: str

Snapshot zone.

class scaleway.instance.v1.types.SnapshotBaseVolume(id: 'str', name: 'str')

Bases: object

id: str

Volume ID on which the snapshot is based.

name: str

Volume name on which the snapshot is based on.

class scaleway.instance.v1.types.SnapshotState(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

AVAILABLE = 'available'
ERROR = 'error'
EXPORTING = 'exporting'
IMPORTING = 'importing'
INVALID_DATA = 'invalid_data'
SNAPSHOTTING = 'snapshotting'
class scaleway.instance.v1.types.SnapshotVolumeType(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

B_SSD = 'b_ssd'
L_SSD = 'l_ssd'
UNIFIED = 'unified'
UNKNOWN_VOLUME_TYPE = 'unknown_volume_type'
class scaleway.instance.v1.types.Task(id: 'str', description: 'str', progress: 'int', status: 'TaskStatus', href_from: 'str', href_result: 'str', zone: 'ScwZone', started_at: 'Optional[datetime]', terminated_at: 'Optional[datetime]')

Bases: object

description: str

Description of the task.

href_from: str
href_result: str
id: str

Unique ID of the task.

progress: int

Progress of the task in percent.

started_at: datetime | None

Task start date.

status: TaskStatus

Task status.

terminated_at: datetime | None

Task end date.

zone: str

Zone in which the task is executed.

class scaleway.instance.v1.types.TaskStatus(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

FAILURE = 'failure'
PENDING = 'pending'
RETRY = 'retry'
STARTED = 'started'
SUCCESS = 'success'
class scaleway.instance.v1.types.UpdateImageRequest(image_id: 'str', zone: 'Optional[ScwZone]', name: 'Optional[str]', arch: 'Optional[Arch]', extra_volumes: 'Optional[Dict[str, VolumeImageUpdateTemplate]]', tags: 'Optional[List[str]]', public: 'Optional[bool]')

Bases: object

arch: Arch | None

Architecture of the image.

extra_volumes: Dict[str, VolumeImageUpdateTemplate] | None

Additional snapshots of the image, with extra_volumeKey being the position of the snapshot in the image.

image_id: str

UUID of the image.

name: str | None

Name of the image.

public: bool | None

True to set the image as public.

tags: List[str] | None

Tags of the image.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.UpdateImageResponse(image: 'Optional[Image]')

Bases: object

image: Image | None
class scaleway.instance.v1.types.UpdateIpRequest(ip: 'str', zone: 'Optional[ScwZone]', reverse: 'Optional[str]', type_: 'Optional[IpType]', tags: 'Optional[List[str]]', server: 'Optional[str]')

Bases: object

ip: str

IP ID or IP address.

reverse: str | None

Reverse domain name.

server: str | None
tags: List[str] | None

An array of keywords you want to tag this IP with.

type_: IpType | None

Should have no effect.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.UpdateIpResponse(ip: 'Optional[Ip]')

Bases: object

ip: Ip | None
class scaleway.instance.v1.types.UpdatePlacementGroupRequest(placement_group_id: 'str', zone: 'Optional[ScwZone]', name: 'Optional[str]', tags: 'Optional[List[str]]', policy_mode: 'Optional[PlacementGroupPolicyMode]', policy_type: 'Optional[PlacementGroupPolicyType]')

Bases: object

name: str | None

Name of the placement group.

placement_group_id: str

UUID of the placement group.

policy_mode: PlacementGroupPolicyMode | None

Operating mode of the placement group.

policy_type: PlacementGroupPolicyType | None

Policy type of the placement group.

tags: List[str] | None

Tags of the placement group.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.UpdatePlacementGroupResponse(placement_group: 'Optional[PlacementGroup]')

Bases: object

placement_group: PlacementGroup | None
class scaleway.instance.v1.types.UpdatePlacementGroupServersRequest(placement_group_id: 'str', servers: 'List[str]', zone: 'Optional[ScwZone]')

Bases: object

placement_group_id: str

UUID of the placement group you want to update.

servers: List[str]

An array of the Instances’ UUIDs you want to configure.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.UpdatePlacementGroupServersResponse(servers: 'List[PlacementGroupServer]')

Bases: object

servers: List[PlacementGroupServer]

Instances attached to the placement group.

class scaleway.instance.v1.types.UpdatePrivateNICRequest(server_id: 'str', private_nic_id: 'str', zone: 'Optional[ScwZone]', tags: 'Optional[List[str]]')

Bases: object

private_nic_id: str

Private NIC unique ID.

server_id: str

UUID of the Instance the private NIC will be attached to.

tags: List[str] | None

Tags used to select private NIC/s.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.UpdateSecurityGroupRequest(security_group_id: 'str', zone: 'Optional[ScwZone]', name: 'Optional[str]', description: 'Optional[str]', enable_default_security: 'Optional[bool]', inbound_default_policy: 'Optional[SecurityGroupPolicy]', tags: 'Optional[List[str]]', organization_default: 'Optional[bool]', project_default: 'Optional[bool]', outbound_default_policy: 'Optional[SecurityGroupPolicy]', stateful: 'Optional[bool]')

Bases: object

description: str | None

Description of the security group.

enable_default_security: bool | None

True to block SMTP on IPv4 and IPv6. This feature is read only, please open a support ticket if you need to make it configurable.

inbound_default_policy: SecurityGroupPolicy | None

Default inbound policy.

name: str | None

Name of the security group.

organization_default: bool | None

Please use project_default instead.

outbound_default_policy: SecurityGroupPolicy | None

Default outbound policy.

project_default: bool | None

True use this security group for future Instances created in this project.

security_group_id: str

UUID of the security group.

stateful: bool | None

True to set the security group as stateful.

tags: List[str] | None

Tags of the security group.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.UpdateSecurityGroupResponse(security_group: 'Optional[SecurityGroup]')

Bases: object

security_group: SecurityGroup | None
class scaleway.instance.v1.types.UpdateSecurityGroupRuleRequest(security_group_id: 'str', security_group_rule_id: 'str', zone: 'Optional[ScwZone]', protocol: 'Optional[SecurityGroupRuleProtocol]', direction: 'Optional[SecurityGroupRuleDirection]', action: 'Optional[SecurityGroupRuleAction]', ip_range: 'Optional[str]', dest_port_from: 'Optional[int]', dest_port_to: 'Optional[int]', position: 'Optional[int]')

Bases: object

action: SecurityGroupRuleAction | None

Action to apply when the rule matches a packet.

dest_port_from: int | None

Beginning of the range of ports this rule applies to (inclusive). If 0 is provided, unset the parameter.

dest_port_to: int | None

End of the range of ports this rule applies to (inclusive). If 0 is provided, unset the parameter.

direction: SecurityGroupRuleDirection | None

Direction the rule applies to.

ip_range: str | None

Range of IP addresses these rules apply to.

position: int | None

Position of this rule in the security group rules list.

protocol: SecurityGroupRuleProtocol | None

Protocol family this rule applies to.

security_group_id: str

UUID of the security group.

security_group_rule_id: str

UUID of the rule.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.UpdateSecurityGroupRuleResponse(rule: 'Optional[SecurityGroupRule]')

Bases: object

rule: SecurityGroupRule | None
class scaleway.instance.v1.types.UpdateServerRequest(server_id: 'str', zone: 'Optional[ScwZone]', name: 'Optional[str]', boot_type: 'Optional[BootType]', tags: 'Optional[List[str]]', volumes: 'Optional[Dict[str, VolumeServerTemplate]]', dynamic_ip_required: 'Optional[bool]', routed_ip_enabled: 'Optional[bool]', public_ips: 'Optional[List[str]]', enable_ipv6: 'Optional[bool]', protected: 'Optional[bool]', security_group: 'Optional[SecurityGroupTemplate]', placement_group: 'Optional[str]', private_nics: 'Optional[List[str]]', commercial_type: 'Optional[str]', admin_password_encryption_ssh_key_id: 'Optional[str]')

Bases: object

admin_password_encryption_ssh_key_id: str | None

The public_key value of this key is used to encrypt the admin password. When set to an empty string, reset this value and admin_password_encrypted_value to an empty string so a new password may be generated.

boot_type: BootType | None
commercial_type: str | None

Warning: This field has some restrictions:

  • Cannot be changed if the Instance is not in stopped state.

  • Cannot be changed if the Instance is in a placement group.

  • Cannot be changed from/to a Windows offer to/from a Linux offer.

  • Local storage requirements of the target commercial_types must be fulfilled (i.e. if an Instance has 80GB of local storage, it can be changed into a GP1-XS, which has a maximum of 150GB, but it cannot be changed into a DEV1-S, which has only 20GB).

dynamic_ip_required: bool | None
enable_ipv6: bool | None
name: str | None

Name of the Instance.

placement_group: str | None

Placement group ID if Instance must be part of a placement group.

private_nics: List[str] | None

Instance private NICs.

protected: bool | None

True to activate server protection option.

public_ips: List[str] | None

A list of reserved IP IDs to attach to the Instance.

routed_ip_enabled: bool | None

True to configure the instance so it uses the new routed IP mode (once this is set to True you cannot set it back to False).

security_group: SecurityGroupTemplate | None
server_id: str

UUID of the Instance.

tags: List[str] | None

Tags of the Instance.

volumes: Dict[str, VolumeServerTemplate] | None
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.UpdateServerResponse(server: 'Optional[Server]')

Bases: object

server: Server | None
class scaleway.instance.v1.types.UpdateSnapshotRequest(snapshot_id: 'str', zone: 'Optional[ScwZone]', name: 'Optional[str]', tags: 'Optional[List[str]]')

Bases: object

name: str | None

Name of the snapshot.

snapshot_id: str

UUID of the snapshot.

tags: List[str] | None

Tags of the snapshot.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.UpdateSnapshotResponse(snapshot: 'Optional[Snapshot]')

Bases: object

snapshot: Snapshot | None
class scaleway.instance.v1.types.UpdateVolumeRequest(volume_id: 'str', zone: 'Optional[ScwZone]', name: 'Optional[str]', tags: 'Optional[List[str]]', size: 'Optional[int]')

Bases: object

name: str | None

Volume name.

size: int | None

Volume disk size, must be a multiple of 512.

tags: List[str] | None

Tags of the volume.

volume_id: str

UUID of the volume.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.UpdateVolumeResponse(volume: 'Optional[Volume]')

Bases: object

volume: Volume | None
class scaleway.instance.v1.types.Volume(id: 'str', name: 'str', size: 'int', volume_type: 'VolumeVolumeType', organization: 'str', project: 'str', export_uri: 'Optional[str]', creation_date: 'Optional[datetime]', modification_date: 'Optional[datetime]', tags: 'List[str]', state: 'VolumeState', zone: 'ScwZone', server: 'Optional[ServerSummary]')

Bases: object

creation_date: datetime | None

Volume creation date.

export_uri: str | None

Show the volume NBD export URI.

id: str

Volume unique ID.

modification_date: datetime | None

Volume modification date.

name: str

Volume name.

organization: str

Volume Organization ID.

project: str

Volume Project ID.

server: ServerSummary | None

Instance attached to the volume.

size: int

Volume disk size.

state: VolumeState

Volume state.

tags: List[str]

Volume tags.

volume_type: VolumeVolumeType

Volume type.

zone: str

Zone in which the volume is located.

class scaleway.instance.v1.types.VolumeImageUpdateTemplate(id: 'str')

Bases: object

id: str

UUID of the snapshot.

class scaleway.instance.v1.types.VolumeServer(id: 'str', name: 'Optional[str]', export_uri: 'Optional[str]', organization: 'Optional[str]', server: 'Optional[ServerSummary]', size: 'Optional[int]', volume_type: 'VolumeServerVolumeType', boot: 'bool', zone: 'ScwZone', creation_date: 'Optional[datetime]', modification_date: 'Optional[datetime]', state: 'Optional[VolumeServerState]', project: 'Optional[str]')

Bases: object

boot: bool
creation_date: datetime | None
export_uri: str | None
id: str
modification_date: datetime | None
name: str | None
organization: str | None
project: str | None
server: ServerSummary | None
size: int | None
state: VolumeServerState | None
volume_type: VolumeServerVolumeType
zone: str

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.types.VolumeServerState(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

AVAILABLE = 'available'
ERROR = 'error'
FETCHING = 'fetching'
HOTSYNCING = 'hotsyncing'
RESIZING = 'resizing'
SAVING = 'saving'
SNAPSHOTTING = 'snapshotting'
class scaleway.instance.v1.types.VolumeServerTemplate(volume_type: 'VolumeVolumeType', id: 'Optional[str]', boot: 'Optional[bool]', name: 'Optional[str]', size: 'Optional[int]', base_snapshot: 'Optional[str]', organization: 'Optional[str]', project: 'Optional[str]')

Bases: object

base_snapshot: str | None

ID of the snapshot on which this volume will be based.

boot: bool | None

Force the Instance to boot on this volume.

id: str | None

UUID of the volume.

name: str | None

Name of the volume.

organization: str | None

Organization ID of the volume.

project: str | None

Project ID of the volume.

size: int | None

Disk size of the volume, must be a multiple of 512.

volume_type: VolumeVolumeType

Type of the volume.

class scaleway.instance.v1.types.VolumeServerVolumeType(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

B_SSD = 'b_ssd'
L_SSD = 'l_ssd'
SBS_VOLUME = 'sbs_volume'
SCRATCH = 'scratch'
class scaleway.instance.v1.types.VolumeState(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

AVAILABLE = 'available'
ERROR = 'error'
FETCHING = 'fetching'
HOTSYNCING = 'hotsyncing'
RESIZING = 'resizing'
SAVING = 'saving'
SNAPSHOTTING = 'snapshotting'
class scaleway.instance.v1.types.VolumeSummary(id: 'str', name: 'str', size: 'int', volume_type: 'VolumeVolumeType')

Bases: object

id: str
name: str
size: int
volume_type: VolumeVolumeType
class scaleway.instance.v1.types.VolumeTemplate(id: 'str', name: 'str', size: 'int', volume_type: 'VolumeVolumeType', project: 'Optional[str]', organization: 'Optional[str]')

Bases: object

id: str

UUID of the volume.

name: str

Name of the volume.

organization: str | None
project: str | None
size: int

Disk size of the volume, must be a multiple of 512.

volume_type: VolumeVolumeType

Type of the volume.

class scaleway.instance.v1.types.VolumeType(display_name: 'str', capabilities: 'Optional[VolumeTypeCapabilities]', constraints: 'Optional[VolumeTypeConstraints]')

Bases: object

capabilities: VolumeTypeCapabilities | None
constraints: VolumeTypeConstraints | None
display_name: str
class scaleway.instance.v1.types.VolumeTypeCapabilities(snapshot: 'bool')

Bases: object

snapshot: bool
class scaleway.instance.v1.types.VolumeTypeConstraints(min: 'int', max: 'int')

Bases: object

max: int
min: int
class scaleway.instance.v1.types.VolumeVolumeType(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

B_SSD = 'b_ssd'
L_SSD = 'l_ssd'
SBS_SNAPSHOT = 'sbs_snapshot'
SBS_VOLUME = 'sbs_volume'
SCRATCH = 'scratch'
UNIFIED = 'unified'

scaleway.instance.v1.types_private module

Module contents

class scaleway.instance.v1.ApplyBlockMigrationRequest(validation_key: 'str', zone: 'Optional[ScwZone]', volume_id: 'Optional[str]', snapshot_id: 'Optional[str]')

Bases: object

snapshot_id: str | None
validation_key: str

A value to be retrieved from a call to the [Get a volume or snapshot’s migration plan](#path-volumes-get-a-volume-or-snapshots-migration-plan) endpoint, to confirm that the volume and/or snapshots specified in said plan should be migrated.

volume_id: str | None
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.Arch(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

ARM = 'arm'
ARM64 = 'arm64'
UNKNOWN_ARCH = 'unknown_arch'
X86_64 = 'x86_64'
class scaleway.instance.v1.AttachServerFileSystemRequest(server_id: 'str', filesystem_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

filesystem_id: str
server_id: str
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.AttachServerFileSystemResponse(server: 'Optional[Server]')

Bases: object

server: Server | None
class scaleway.instance.v1.AttachServerVolumeRequest(server_id: 'str', volume_id: 'str', zone: 'Optional[ScwZone]', volume_type: 'Optional[AttachServerVolumeRequestVolumeType]', boot: 'Optional[bool]')

Bases: object

boot: bool | None
server_id: str
volume_id: str
volume_type: AttachServerVolumeRequestVolumeType | None
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.AttachServerVolumeRequestVolumeType(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

B_SSD = 'b_ssd'
L_SSD = 'l_ssd'
SBS_VOLUME = 'sbs_volume'
UNKNOWN_VOLUME_TYPE = 'unknown_volume_type'
class scaleway.instance.v1.AttachServerVolumeResponse(server: 'Optional[Server]')

Bases: object

server: Server | None
class scaleway.instance.v1.BootType(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

BOOTSCRIPT = 'bootscript'
LOCAL = 'local'
RESCUE = 'rescue'
class scaleway.instance.v1.Bootscript(architecture: 'Arch', bootcmdargs: 'str', default: 'bool', dtb: 'str', id: 'str', initrd: 'str', kernel: 'str', organization: 'str', public: 'bool', title: 'str', project: 'str', zone: 'ScwZone')

Bases: object

architecture: Arch
bootcmdargs: str
default: bool
dtb: str
id: str
initrd: str
kernel: str
organization: str
project: str
public: bool
title: str
zone: str

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.CheckBlockMigrationOrganizationQuotasRequest(zone: 'Optional[ScwZone]', organization: 'Optional[str]')

Bases: object

organization: str | None
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.CreateImageRequest(root_volume: 'str', arch: 'Arch', zone: 'Optional[ScwZone]', name: 'Optional[str]', extra_volumes: 'Optional[Dict[str, VolumeTemplate]]', tags: 'Optional[List[str]]', public: 'Optional[bool]', project: 'Optional[str]', organization: 'Optional[str]')

Bases: object

arch: Arch

Architecture of the image.

extra_volumes: Dict[str, VolumeTemplate] | None

Additional volumes of the image.

name: str | None

Name of the image.

organization: str | None
project: str | None
public: bool | None

True to create a public image.

root_volume: str

UUID of the snapshot.

tags: List[str] | None

Tags of the image.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.CreateImageResponse(image: 'Optional[Image]')

Bases: object

image: Image | None
class scaleway.instance.v1.CreateIpRequest(zone: 'Optional[ScwZone]', tags: 'Optional[List[str]]', server: 'Optional[str]', type_: 'Optional[IpType]', project: 'Optional[str]', organization: 'Optional[str]')

Bases: object

organization: str | None
project: str | None
server: str | None

UUID of the Instance you want to attach the IP to.

tags: List[str] | None

Tags of the IP.

type_: IpType | None

IP type to reserve (either ‘routed_ipv4’ or ‘routed_ipv6’).

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.CreateIpResponse(ip: 'Optional[Ip]')

Bases: object

ip: Ip | None
class scaleway.instance.v1.CreatePlacementGroupRequest(zone: 'Optional[ScwZone]', name: 'Optional[str]', tags: 'Optional[List[str]]', policy_mode: 'Optional[PlacementGroupPolicyMode]', policy_type: 'Optional[PlacementGroupPolicyType]', project: 'Optional[str]', organization: 'Optional[str]')

Bases: object

name: str | None

Name of the placement group.

organization: str | None
policy_mode: PlacementGroupPolicyMode | None

Operating mode of the placement group.

policy_type: PlacementGroupPolicyType | None

Policy type of the placement group.

project: str | None
tags: List[str] | None

Tags of the placement group.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.CreatePlacementGroupResponse(placement_group: 'Optional[PlacementGroup]')

Bases: object

placement_group: PlacementGroup | None
class scaleway.instance.v1.CreatePrivateNICRequest(server_id: 'str', private_network_id: 'str', zone: 'Optional[ScwZone]', tags: 'Optional[List[str]]', ip_ids: 'Optional[List[str]]', ipam_ip_ids: 'Optional[List[str]]')

Bases: object

ip_ids: List[str] | None

Ip_ids defined from IPAM.

ipam_ip_ids: List[str] | None

UUID of IPAM ips, to be attached to the instance in the requested private network.

private_network_id: str

UUID of the private network where the private NIC will be attached.

server_id: str

UUID of the Instance the private NIC will be attached to.

tags: List[str] | None

Private NIC tags.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.CreatePrivateNICResponse(private_nic: 'Optional[PrivateNIC]')

Bases: object

private_nic: PrivateNIC | None
class scaleway.instance.v1.CreateSecurityGroupRequest(description: 'str', stateful: 'bool', zone: 'Optional[ScwZone]', name: 'Optional[str]', tags: 'Optional[List[str]]', inbound_default_policy: 'Optional[SecurityGroupPolicy]', outbound_default_policy: 'Optional[SecurityGroupPolicy]', enable_default_security: 'Optional[bool]', project: 'Optional[str]', organization: 'Optional[str]', organization_default: 'Optional[bool]', project_default: 'Optional[bool]')

Bases: object

description: str

Description of the security group.

enable_default_security: bool | None

True to block SMTP on IPv4 and IPv6. This feature is read only, please open a support ticket if you need to make it configurable.

inbound_default_policy: SecurityGroupPolicy | None

Default policy for inbound rules.

name: str | None

Name of the security group.

organization: str | None
organization_default: bool | None
outbound_default_policy: SecurityGroupPolicy | None

Default policy for outbound rules.

project: str | None
project_default: bool | None
stateful: bool

Whether the security group is stateful or not.

tags: List[str] | None

Tags of the security group.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.CreateSecurityGroupResponse(security_group: 'Optional[SecurityGroup]')

Bases: object

security_group: SecurityGroup | None
class scaleway.instance.v1.CreateSecurityGroupRuleRequest(security_group_id: 'str', protocol: 'SecurityGroupRuleProtocol', direction: 'SecurityGroupRuleDirection', action: 'SecurityGroupRuleAction', ip_range: 'str', position: 'int', editable: 'bool', zone: 'Optional[ScwZone]', dest_port_from: 'Optional[int]', dest_port_to: 'Optional[int]')

Bases: object

action: SecurityGroupRuleAction
dest_port_from: int | None

Beginning of the range of ports to apply this rule to (inclusive).

dest_port_to: int | None

End of the range of ports to apply this rule to (inclusive).

direction: SecurityGroupRuleDirection
editable: bool

Indicates if this rule is editable (will be ignored).

ip_range: str
position: int

Position of this rule in the security group rules list.

protocol: SecurityGroupRuleProtocol
security_group_id: str

UUID of the security group.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.CreateSecurityGroupRuleResponse(rule: 'Optional[SecurityGroupRule]')

Bases: object

rule: SecurityGroupRule | None
class scaleway.instance.v1.CreateServerRequest(zone: 'Optional[ScwZone]', commercial_type: 'str', name: 'Optional[str]', dynamic_ip_required: 'Optional[bool]', routed_ip_enabled: 'Optional[bool]', image: 'Optional[str]', volumes: 'Optional[Dict[str, VolumeServerTemplate]]', enable_ipv6: 'Optional[bool]', protected: 'bool', public_ip: 'Optional[str]', public_ips: 'Optional[List[str]]', boot_type: 'Optional[BootType]', tags: 'Optional[List[str]]', security_group: 'Optional[str]', placement_group: 'Optional[str]', admin_password_encryption_ssh_key_id: 'Optional[str]', project: 'Optional[str]', organization: 'Optional[str]')

Bases: object

admin_password_encryption_ssh_key_id: str | None

The public_key value of this key is used to encrypt the admin password.

boot_type: BootType | None

Boot type to use.

commercial_type: str

Define the Instance commercial type (i.e. GP1-S).

dynamic_ip_required: bool | None

By default, dynamic_ip_required is true, a dynamic ip is attached to the instance (if no flexible ip is already attached).

enable_ipv6: bool | None

True if IPv6 is enabled on the server (deprecated and always False when routed_ip_enabled is True).

image: str | None

Instance image ID or label.

name: str | None

Instance name.

organization: str | None
placement_group: str | None

Placement group ID if Instance must be part of a placement group.

project: str | None
protected: bool

True to activate server protection option.

public_ip: str | None

ID of the reserved IP to attach to the Instance.

public_ips: List[str] | None

A list of reserved IP IDs to attach to the Instance.

routed_ip_enabled: bool | None

If true, configure the Instance so it uses the new routed IP mode.

security_group: str | None

Security group ID.

tags: List[str] | None

Instance tags.

volumes: Dict[str, VolumeServerTemplate] | None

Volumes attached to the server.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.CreateServerResponse(server: 'Optional[Server]')

Bases: object

server: Server | None
class scaleway.instance.v1.CreateSnapshotRequest(zone: 'Optional[ScwZone]', name: 'Optional[str]', volume_id: 'Optional[str]', tags: 'Optional[List[str]]', volume_type: 'Optional[SnapshotVolumeType]', bucket: 'Optional[str]', key: 'Optional[str]', size: 'Optional[int]', project: 'Optional[str]', organization: 'Optional[str]')

Bases: object

bucket: str | None

Bucket name for snapshot imports.

key: str | None

Object key for snapshot imports.

name: str | None

Name of the snapshot.

organization: str | None
project: str | None
size: int | None

Imported snapshot size, must be a multiple of 512.

tags: List[str] | None

Tags of the snapshot.

volume_id: str | None

UUID of the volume.

volume_type: SnapshotVolumeType | None

Overrides the volume_type of the snapshot.

If omitted, the volume type of the original volume will be used.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.CreateSnapshotResponse(snapshot: 'Optional[Snapshot]', task: 'Optional[Task]')

Bases: object

snapshot: Snapshot | None
task: Task | None
class scaleway.instance.v1.CreateVolumeRequest(zone: 'Optional[ScwZone]', name: 'Optional[str]', tags: 'Optional[List[str]]', volume_type: 'Optional[VolumeVolumeType]', project: 'Optional[str]', organization: 'Optional[str]', size: 'Optional[int]', base_snapshot: 'Optional[str]')

Bases: object

base_snapshot: str | None
name: str | None

Volume name.

organization: str | None
project: str | None
size: int | None
tags: List[str] | None

Volume tags.

volume_type: VolumeVolumeType | None

Volume type.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.CreateVolumeResponse(volume: 'Optional[Volume]')

Bases: object

volume: Volume | None
class scaleway.instance.v1.Dashboard(volumes_count: 'int', running_servers_count: 'int', servers_by_types: 'Dict[str, int]', images_count: 'int', snapshots_count: 'int', servers_count: 'int', ips_count: 'int', security_groups_count: 'int', ips_unused: 'int', volumes_l_ssd_count: 'int', volumes_l_ssd_total_size: 'int', private_nics_count: 'int', placement_groups_count: 'int', volumes_b_ssd_count: 'Optional[int]', volumes_b_ssd_total_size: 'Optional[int]')

Bases: object

images_count: int
ips_count: int
ips_unused: int
placement_groups_count: int
private_nics_count: int
running_servers_count: int
security_groups_count: int
servers_by_types: Dict[str, int]
servers_count: int
snapshots_count: int
volumes_b_ssd_count: int | None
volumes_b_ssd_total_size: int | None
volumes_count: int
volumes_l_ssd_count: int
volumes_l_ssd_total_size: int
class scaleway.instance.v1.DeleteImageRequest(image_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

image_id: str

UUID of the image you want to delete.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.DeleteIpRequest(ip: 'str', zone: 'Optional[ScwZone]')

Bases: object

ip: str

ID or address of the IP to delete.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.DeletePlacementGroupRequest(placement_group_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

placement_group_id: str

UUID of the placement group you want to delete.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.DeletePrivateNICRequest(server_id: 'str', private_nic_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

private_nic_id: str

Private NIC unique ID.

server_id: str

Instance to which the private NIC is attached.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.DeleteSecurityGroupRequest(security_group_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

security_group_id: str

UUID of the security group you want to delete.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.DeleteSecurityGroupRuleRequest(security_group_id: 'str', security_group_rule_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

security_group_id: str
security_group_rule_id: str
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.DeleteServerRequest(server_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

server_id: str
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.DeleteServerUserDataRequest(server_id: 'str', key: 'str', zone: 'Optional[ScwZone]')

Bases: object

key: str

Key of the user data to delete.

server_id: str

UUID of the Instance.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.DeleteSnapshotRequest(snapshot_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

snapshot_id: str

UUID of the snapshot you want to delete.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.DeleteVolumeRequest(volume_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

volume_id: str

UUID of the volume you want to delete.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.DetachServerFileSystemRequest(server_id: 'str', filesystem_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

filesystem_id: str
server_id: str
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.DetachServerFileSystemResponse(server: 'Optional[Server]')

Bases: object

server: Server | None
class scaleway.instance.v1.DetachServerVolumeRequest(server_id: 'str', volume_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

server_id: str
volume_id: str
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.DetachServerVolumeResponse(server: 'Optional[Server]')

Bases: object

server: Server | None
class scaleway.instance.v1.ExportSnapshotRequest(bucket: 'str', key: 'str', snapshot_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

bucket: str

Object Storage bucket name.

key: str

Object key.

snapshot_id: str

Snapshot ID.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.ExportSnapshotResponse(task: 'Optional[Task]')

Bases: object

task: Task | None
class scaleway.instance.v1.GetDashboardRequest(zone: 'Optional[ScwZone]', organization: 'Optional[str]', project: 'Optional[str]')

Bases: object

organization: str | None
project: str | None
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.GetDashboardResponse(dashboard: 'Optional[Dashboard]')

Bases: object

dashboard: Dashboard | None
class scaleway.instance.v1.GetImageRequest(image_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

image_id: str

UUID of the image you want to get.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.GetImageResponse(image: 'Optional[Image]')

Bases: object

image: Image | None
class scaleway.instance.v1.GetIpRequest(ip: 'str', zone: 'Optional[ScwZone]')

Bases: object

ip: str

IP ID or address to get.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.GetIpResponse(ip: 'Optional[Ip]')

Bases: object

ip: Ip | None
class scaleway.instance.v1.GetPlacementGroupRequest(placement_group_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

placement_group_id: str

UUID of the placement group you want to get.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.GetPlacementGroupResponse(placement_group: 'Optional[PlacementGroup]')

Bases: object

placement_group: PlacementGroup | None
class scaleway.instance.v1.GetPlacementGroupServersRequest(placement_group_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

placement_group_id: str

UUID of the placement group you want to get.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.GetPlacementGroupServersResponse(servers: 'List[PlacementGroupServer]')

Bases: object

servers: List[PlacementGroupServer]

Instances attached to the placement group.

class scaleway.instance.v1.GetPrivateNICRequest(server_id: 'str', private_nic_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

private_nic_id: str

Private NIC unique ID.

server_id: str

Instance to which the private NIC is attached.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.GetPrivateNICResponse(private_nic: 'Optional[PrivateNIC]')

Bases: object

private_nic: PrivateNIC | None
class scaleway.instance.v1.GetSecurityGroupRequest(security_group_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

security_group_id: str

UUID of the security group you want to get.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.GetSecurityGroupResponse(security_group: 'Optional[SecurityGroup]')

Bases: object

security_group: SecurityGroup | None
class scaleway.instance.v1.GetSecurityGroupRuleRequest(security_group_id: 'str', security_group_rule_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

security_group_id: str
security_group_rule_id: str
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.GetSecurityGroupRuleResponse(rule: 'Optional[SecurityGroupRule]')

Bases: object

rule: SecurityGroupRule | None
class scaleway.instance.v1.GetServerCompatibleTypesRequest(server_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

server_id: str

UUID of the Instance you want to get.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.GetServerRequest(server_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

server_id: str

UUID of the Instance you want to get.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.GetServerResponse(server: 'Optional[Server]')

Bases: object

server: Server | None
class scaleway.instance.v1.GetServerTypesAvailabilityRequest(zone: 'Optional[ScwZone]', per_page: 'Optional[int]', page: 'Optional[int]')

Bases: object

page: int | None

A positive integer to choose the page to return.

per_page: int | None

A positive integer lower or equal to 100 to select the number of items to return.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.GetServerTypesAvailabilityResponse(servers: 'Dict[str, GetServerTypesAvailabilityResponseAvailability]', total_count: 'int')

Bases: object

servers: Dict[str, GetServerTypesAvailabilityResponseAvailability]

Map of server types.

total_count: int
class scaleway.instance.v1.GetServerTypesAvailabilityResponseAvailability(availability: 'ServerTypesAvailability')

Bases: object

availability: ServerTypesAvailability
class scaleway.instance.v1.GetSnapshotRequest(snapshot_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

snapshot_id: str

UUID of the snapshot you want to get.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.GetSnapshotResponse(snapshot: 'Optional[Snapshot]')

Bases: object

snapshot: Snapshot | None
class scaleway.instance.v1.GetVolumeRequest(volume_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

volume_id: str

UUID of the volume you want to get.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.GetVolumeResponse(volume: 'Optional[Volume]')

Bases: object

volume: Volume | None
class scaleway.instance.v1.Image(id: 'str', name: 'str', arch: 'Arch', extra_volumes: 'Dict[str, Volume]', from_server: 'str', organization: 'str', creation_date: 'Optional[datetime]', modification_date: 'Optional[datetime]', default_bootscript: 'Optional[Bootscript]', public: 'bool', state: 'ImageState', project: 'str', tags: 'List[str]', zone: 'ScwZone', root_volume: 'Optional[VolumeSummary]')

Bases: object

arch: Arch
creation_date: datetime | None
default_bootscript: Bootscript | None
extra_volumes: Dict[str, Volume]
from_server: str
id: str
modification_date: datetime | None
name: str
organization: str
project: str
public: bool
root_volume: VolumeSummary | None
state: ImageState
tags: List[str]
zone: str

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.ImageState(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

AVAILABLE = 'available'
CREATING = 'creating'
ERROR = 'error'
class scaleway.instance.v1.InstanceV1API(client: Client, *, bypass_validation: bool = False)

Bases: API

This API allows you to manage your CPU and GPU Instances.

apply_block_migration(*, validation_key: str, zone: str | None = None, volume_id: str | None = None, snapshot_id: str | None = None) None

Migrate a volume and/or snapshots to SBS (Scaleway Block Storage). To be used, the call to this endpoint must be preceded by a call to the [Get a volume or snapshot’s migration plan](#path-volumes-get-a-volume-or-snapshots-migration-plan) endpoint. To migrate all resources mentioned in the migration plan, the validation_key returned in the plan must be provided. :param validation_key: A value to be retrieved from a call to the [Get a volume or snapshot’s migration plan](#path-volumes-get-a-volume-or-snapshots-migration-plan) endpoint, to confirm that the volume and/or snapshots specified in said plan should be migrated. :param zone: Zone to target. If none is passed will use default zone from the config. :param volume_id: The volume to migrate, along with potentially other resources, according to the migration plan generated with a call to the [Get a volume or snapshot’s migration plan](#path-volumes-get-a-volume-or-snapshots-migration-plan) endpoint. One-Of (‘resource’): at most one of ‘volume_id’, ‘snapshot_id’ could be set. :param snapshot_id: The snapshot to migrate, along with potentially other resources, according to the migration plan generated with a call to the [Get a volume or snapshot’s migration plan](#path-volumes-get-a-volume-or-snapshots-migration-plan) endpoint. One-Of (‘resource’): at most one of ‘volume_id’, ‘snapshot_id’ could be set.

Usage:

result = api.apply_block_migration(
    validation_key="example",
)
attach_server_file_system(*, server_id: str, filesystem_id: str, zone: str | None = None) AttachServerFileSystemResponse

Attach a filesystem volume to an Instance. :param server_id: :param filesystem_id: :param zone: Zone to target. If none is passed will use default zone from the config. :return: AttachServerFileSystemResponse

Usage:

result = api.attach_server_file_system(
    server_id="example",
    filesystem_id="example",
)
attach_server_volume(*, server_id: str, volume_id: str, zone: str | None = None, volume_type: AttachServerVolumeRequestVolumeType | None = None, boot: bool | None = None) AttachServerVolumeResponse

Attach a volume to an Instance. :param server_id: :param volume_id: :param zone: Zone to target. If none is passed will use default zone from the config. :param volume_type: :param boot: :return: AttachServerVolumeResponse

Usage:

result = api.attach_server_volume(
    server_id="example",
    volume_id="example",
)
check_block_migration_organization_quotas(*, zone: str | None = None, organization: str | None = None) None
Parameters:
  • zone – Zone to target. If none is passed will use default zone from the config.

  • organization

Usage:

result = api.check_block_migration_organization_quotas()
create_image(*, root_volume: str, arch: Arch, zone: str | None = None, name: str | None = None, extra_volumes: Dict[str, VolumeTemplate] | None = None, organization: str | None = None, project: str | None = None, tags: List[str] | None = None, public: bool | None = None) CreateImageResponse

Create an Instance image. Create an Instance image from the specified snapshot ID. :param root_volume: UUID of the snapshot. :param arch: Architecture of the image. :param zone: Zone to target. If none is passed will use default zone from the config. :param name: Name of the image. :param extra_volumes: Additional volumes of the image. :param organization: Organization ID of the image. One-Of (‘project_identifier’): at most one of ‘project’, ‘organization’ could be set. :param project: Project ID of the image. One-Of (‘project_identifier’): at most one of ‘project’, ‘organization’ could be set. :param tags: Tags of the image. :param public: True to create a public image. :return: CreateImageResponse

Usage:

result = api.create_image(
    root_volume="example",
    arch=Arch.unknown_arch,
)
create_ip(*, zone: str | None = None, organization: str | None = None, project: str | None = None, tags: List[str] | None = None, server: str | None = None, type_: IpType | None = None) CreateIpResponse

Reserve a flexible IP. Reserve a flexible IP and attach it to the specified Instance. :param zone: Zone to target. If none is passed will use default zone from the config. :param organization: Organization ID in which the IP is reserved. One-Of (‘project_identifier’): at most one of ‘project’, ‘organization’ could be set. :param project: Project ID in which the IP is reserved. One-Of (‘project_identifier’): at most one of ‘project’, ‘organization’ could be set. :param tags: Tags of the IP. :param server: UUID of the Instance you want to attach the IP to. :param type_: IP type to reserve (either ‘routed_ipv4’ or ‘routed_ipv6’). :return: CreateIpResponse

Usage:

result = api.create_ip()
create_placement_group(*, zone: str | None = None, name: str | None = None, organization: str | None = None, project: str | None = None, tags: List[str] | None = None, policy_mode: PlacementGroupPolicyMode | None = None, policy_type: PlacementGroupPolicyType | None = None) CreatePlacementGroupResponse

Create a placement group. Create a new placement group in a specified Availability Zone. :param zone: Zone to target. If none is passed will use default zone from the config. :param name: Name of the placement group. :param organization: Organization ID of the placement group. One-Of (‘project_identifier’): at most one of ‘project’, ‘organization’ could be set. :param project: Project ID of the placement group. One-Of (‘project_identifier’): at most one of ‘project’, ‘organization’ could be set. :param tags: Tags of the placement group. :param policy_mode: Operating mode of the placement group. :param policy_type: Policy type of the placement group. :return: CreatePlacementGroupResponse

Usage:

result = api.create_placement_group()
create_private_nic(*, server_id: str, private_network_id: str, zone: str | None = None, tags: List[str] | None = None, ip_ids: List[str] | None = None, ipam_ip_ids: List[str] | None = None) CreatePrivateNICResponse

Create a private NIC connecting an Instance to a Private Network. :param server_id: UUID of the Instance the private NIC will be attached to. :param private_network_id: UUID of the private network where the private NIC will be attached. :param zone: Zone to target. If none is passed will use default zone from the config. :param tags: Private NIC tags. :param ip_ids: Ip_ids defined from IPAM. :param ipam_ip_ids: UUID of IPAM ips, to be attached to the instance in the requested private network. :return: CreatePrivateNICResponse

Usage:

result = api.create_private_nic(
    server_id="example",
    private_network_id="example",
)
create_security_group(*, description: str, stateful: bool, zone: str | None = None, name: str | None = None, organization: str | None = None, project: str | None = None, tags: List[str] | None = None, organization_default: bool | None = None, project_default: bool | None = None, inbound_default_policy: SecurityGroupPolicy | None = None, outbound_default_policy: SecurityGroupPolicy | None = None, enable_default_security: bool | None = None) CreateSecurityGroupResponse

Create a security group. Create a security group with a specified name and description. :param description: Description of the security group. :param stateful: Whether the security group is stateful or not. :param zone: Zone to target. If none is passed will use default zone from the config. :param name: Name of the security group. :param organization: Organization ID the security group belongs to. One-Of (‘project_identifier’): at most one of ‘project’, ‘organization’ could be set. :param project: Project ID the security group belong to. One-Of (‘project_identifier’): at most one of ‘project’, ‘organization’ could be set. :param tags: Tags of the security group. :param organization_default: Defines whether this security group becomes the default security group for new Instances. One-Of (‘default_identifier’): at most one of ‘organization_default’, ‘project_default’ could be set. :param project_default: Whether this security group becomes the default security group for new Instances. One-Of (‘default_identifier’): at most one of ‘organization_default’, ‘project_default’ could be set. :param inbound_default_policy: Default policy for inbound rules. :param outbound_default_policy: Default policy for outbound rules. :param enable_default_security: True to block SMTP on IPv4 and IPv6. This feature is read only, please open a support ticket if you need to make it configurable. :return: CreateSecurityGroupResponse

Usage:

result = api.create_security_group(
    description="example",
    stateful=false,
)
create_security_group_rule(*, security_group_id: str, protocol: SecurityGroupRuleProtocol, direction: SecurityGroupRuleDirection, action: SecurityGroupRuleAction, ip_range: str, position: int, editable: bool, zone: str | None = None, dest_port_from: int | None = None, dest_port_to: int | None = None) CreateSecurityGroupRuleResponse

Create rule. Create a rule in the specified security group ID. :param security_group_id: UUID of the security group. :param protocol: :param direction: :param action: :param ip_range: :param position: Position of this rule in the security group rules list. :param editable: Indicates if this rule is editable (will be ignored). :param zone: Zone to target. If none is passed will use default zone from the config. :param dest_port_from: Beginning of the range of ports to apply this rule to (inclusive). :param dest_port_to: End of the range of ports to apply this rule to (inclusive). :return: CreateSecurityGroupRuleResponse

Usage:

result = api.create_security_group_rule(
    security_group_id="example",
    protocol=SecurityGroupRuleProtocol.unknown_protocol,
    direction=SecurityGroupRuleDirection.unknown_direction,
    action=SecurityGroupRuleAction.unknown_action,
    ip_range="example",
    position=1,
    editable=False,
)
create_snapshot(*, zone: str | None = None, name: str | None = None, volume_id: str | None = None, tags: List[str] | None = None, organization: str | None = None, project: str | None = None, volume_type: SnapshotVolumeType | None = None, bucket: str | None = None, key: str | None = None, size: int | None = None) CreateSnapshotResponse

Create a snapshot from a specified volume or from a QCOW2 file. Create a snapshot from a specified volume or from a QCOW2 file in a specified Availability Zone. :param zone: Zone to target. If none is passed will use default zone from the config. :param name: Name of the snapshot. :param volume_id: UUID of the volume. :param tags: Tags of the snapshot. :param organization: Organization ID of the snapshot. One-Of (‘project_identifier’): at most one of ‘project’, ‘organization’ could be set. :param project: Project ID of the snapshot. One-Of (‘project_identifier’): at most one of ‘project’, ‘organization’ could be set. :param volume_type: Overrides the volume_type of the snapshot. If omitted, the volume type of the original volume will be used. :param bucket: Bucket name for snapshot imports. :param key: Object key for snapshot imports. :param size: Imported snapshot size, must be a multiple of 512. :return: CreateSnapshotResponse

Usage:

result = api.create_snapshot()
create_volume(*, zone: str | None = None, name: str | None = None, organization: str | None = None, project: str | None = None, tags: List[str] | None = None, volume_type: VolumeVolumeType | None = None, size: int | None = None, base_snapshot: str | None = None) CreateVolumeResponse

Create a volume. Create a volume of a specified type in an Availability Zone. :param zone: Zone to target. If none is passed will use default zone from the config. :param name: Volume name. :param organization: Volume Organization ID. One-Of (‘project_identifier’): at most one of ‘project’, ‘organization’ could be set. :param project: Volume Project ID. One-Of (‘project_identifier’): at most one of ‘project’, ‘organization’ could be set. :param tags: Volume tags. :param volume_type: Volume type. :param size: Volume disk size, must be a multiple of 512. One-Of (‘from’): at most one of ‘size’, ‘base_snapshot’ could be set. :param base_snapshot: ID of the snapshot on which this volume will be based. One-Of (‘from’): at most one of ‘size’, ‘base_snapshot’ could be set. :return: CreateVolumeResponse

Usage:

result = api.create_volume()
delete_image(*, image_id: str, zone: str | None = None) None

Delete an Instance image. Delete the image with the specified ID. :param image_id: UUID of the image you want to delete. :param zone: Zone to target. If none is passed will use default zone from the config.

Usage:

result = api.delete_image(
    image_id="example",
)
delete_ip(*, ip: str, zone: str | None = None) None

Delete a flexible IP. Delete the IP with the specified ID. :param ip: ID or address of the IP to delete. :param zone: Zone to target. If none is passed will use default zone from the config.

Usage:

result = api.delete_ip(
    ip="example",
)
delete_placement_group(*, placement_group_id: str, zone: str | None = None) None

Delete the specified placement group. :param placement_group_id: UUID of the placement group you want to delete. :param zone: Zone to target. If none is passed will use default zone from the config.

Usage:

result = api.delete_placement_group(
    placement_group_id="example",
)
delete_private_nic(*, server_id: str, private_nic_id: str, zone: str | None = None) None

Delete a private NIC. :param server_id: Instance to which the private NIC is attached. :param private_nic_id: Private NIC unique ID. :param zone: Zone to target. If none is passed will use default zone from the config.

Usage:

result = api.delete_private_nic(
    server_id="example",
    private_nic_id="example",
)
delete_security_group(*, security_group_id: str, zone: str | None = None) None

Delete a security group. Delete a security group with the specified ID. :param security_group_id: UUID of the security group you want to delete. :param zone: Zone to target. If none is passed will use default zone from the config.

Usage:

result = api.delete_security_group(
    security_group_id="example",
)
delete_security_group_rule(*, security_group_id: str, security_group_rule_id: str, zone: str | None = None) None

Delete rule. Delete a security group rule with the specified ID. :param security_group_id: :param security_group_rule_id: :param zone: Zone to target. If none is passed will use default zone from the config.

Usage:

result = api.delete_security_group_rule(
    security_group_id="example",
    security_group_rule_id="example",
)
delete_server(*, server_id: str, zone: str | None = None) None

Delete an Instance. Delete the Instance with the specified ID. :param server_id: :param zone: Zone to target. If none is passed will use default zone from the config.

Usage:

result = api.delete_server(
    server_id="example",
)
delete_server_user_data(*, server_id: str, key: str, zone: str | None = None) None

Delete user data. Delete the specified key from an Instance’s user data. :param server_id: UUID of the Instance. :param key: Key of the user data to delete. :param zone: Zone to target. If none is passed will use default zone from the config.

Usage:

result = api.delete_server_user_data(
    server_id="example",
    key="example",
)
delete_snapshot(*, snapshot_id: str, zone: str | None = None) None

Delete a snapshot. Delete the snapshot with the specified ID. :param snapshot_id: UUID of the snapshot you want to delete. :param zone: Zone to target. If none is passed will use default zone from the config.

Usage:

result = api.delete_snapshot(
    snapshot_id="example",
)
delete_volume(*, volume_id: str, zone: str | None = None) None

Delete a volume. Delete the volume with the specified ID. :param volume_id: UUID of the volume you want to delete. :param zone: Zone to target. If none is passed will use default zone from the config.

Usage:

result = api.delete_volume(
    volume_id="example",
)
detach_server_file_system(*, server_id: str, filesystem_id: str, zone: str | None = None) DetachServerFileSystemResponse

Detach a filesystem volume from an Instance. :param server_id: :param filesystem_id: :param zone: Zone to target. If none is passed will use default zone from the config. :return: DetachServerFileSystemResponse

Usage:

result = api.detach_server_file_system(
    server_id="example",
    filesystem_id="example",
)
detach_server_volume(*, server_id: str, volume_id: str, zone: str | None = None) DetachServerVolumeResponse

Detach a volume from an Instance. :param server_id: :param volume_id: :param zone: Zone to target. If none is passed will use default zone from the config. :return: DetachServerVolumeResponse

Usage:

result = api.detach_server_volume(
    server_id="example",
    volume_id="example",
)
export_snapshot(*, bucket: str, key: str, snapshot_id: str, zone: str | None = None) ExportSnapshotResponse

Export a snapshot. Export a snapshot to a specified Object Storage bucket in the same region. :param bucket: Object Storage bucket name. :param key: Object key. :param snapshot_id: Snapshot ID. :param zone: Zone to target. If none is passed will use default zone from the config. :return: ExportSnapshotResponse

Usage:

result = api.export_snapshot(
    bucket="example",
    key="example",
    snapshot_id="example",
)
get_dashboard(*, zone: str | None = None, organization: str | None = None, project: str | None = None) GetDashboardResponse
Parameters:
  • zone – Zone to target. If none is passed will use default zone from the config.

  • organization

  • project

Returns:

GetDashboardResponse

Usage:

result = api.get_dashboard()
get_image(*, image_id: str, zone: str | None = None) GetImageResponse

Get an Instance image. Get details of an image with the specified ID. :param image_id: UUID of the image you want to get. :param zone: Zone to target. If none is passed will use default zone from the config. :return: GetImageResponse

Usage:

result = api.get_image(
    image_id="example",
)
get_ip(*, ip: str, zone: str | None = None) GetIpResponse

Get a flexible IP. Get details of an IP with the specified ID or address. :param ip: IP ID or address to get. :param zone: Zone to target. If none is passed will use default zone from the config. :return: GetIpResponse

Usage:

result = api.get_ip(
    ip="example",
)
get_placement_group(*, placement_group_id: str, zone: str | None = None) GetPlacementGroupResponse

Get a placement group. Get the specified placement group. :param placement_group_id: UUID of the placement group you want to get. :param zone: Zone to target. If none is passed will use default zone from the config. :return: GetPlacementGroupResponse

Usage:

result = api.get_placement_group(
    placement_group_id="example",
)
get_placement_group_servers(*, placement_group_id: str, zone: str | None = None) GetPlacementGroupServersResponse

Get placement group servers. Get all Instances belonging to the specified placement group. :param placement_group_id: UUID of the placement group you want to get. :param zone: Zone to target. If none is passed will use default zone from the config. :return: GetPlacementGroupServersResponse

Usage:

result = api.get_placement_group_servers(
    placement_group_id="example",
)
get_private_nic(*, server_id: str, private_nic_id: str, zone: str | None = None) GetPrivateNICResponse

Get a private NIC. Get private NIC properties. :param server_id: Instance to which the private NIC is attached. :param private_nic_id: Private NIC unique ID. :param zone: Zone to target. If none is passed will use default zone from the config. :return: GetPrivateNICResponse

Usage:

result = api.get_private_nic(
    server_id="example",
    private_nic_id="example",
)
get_security_group(*, security_group_id: str, zone: str | None = None) GetSecurityGroupResponse

Get a security group. Get the details of a security group with the specified ID. :param security_group_id: UUID of the security group you want to get. :param zone: Zone to target. If none is passed will use default zone from the config. :return: GetSecurityGroupResponse

Usage:

result = api.get_security_group(
    security_group_id="example",
)
get_security_group_rule(*, security_group_id: str, security_group_rule_id: str, zone: str | None = None) GetSecurityGroupRuleResponse

Get rule. Get details of a security group rule with the specified ID. :param security_group_id: :param security_group_rule_id: :param zone: Zone to target. If none is passed will use default zone from the config. :return: GetSecurityGroupRuleResponse

Usage:

result = api.get_security_group_rule(
    security_group_id="example",
    security_group_rule_id="example",
)
get_server(*, server_id: str, zone: str | None = None) GetServerResponse

Get an Instance. Get the details of a specified Instance. :param server_id: UUID of the Instance you want to get. :param zone: Zone to target. If none is passed will use default zone from the config. :return: GetServerResponse

Usage:

result = api.get_server(
    server_id="example",
)
get_server_compatible_types(*, server_id: str, zone: str | None = None) ServerCompatibleTypes

Get Instance compatible types. Get compatible commercial types that can be used to update the Instance. The compatibility of an Instance offer is based on: * the CPU architecture * the OS type * the required l_ssd storage size * the required scratch storage size If the specified Instance offer is flagged as end of service, the best compatible offer is the first returned. :param server_id: UUID of the Instance you want to get. :param zone: Zone to target. If none is passed will use default zone from the config. :return: ServerCompatibleTypes

Usage:

result = api.get_server_compatible_types(
    server_id="example",
)
get_server_types_availability(*, zone: str | None = None, per_page: int | None = None, page: int | None = None) GetServerTypesAvailabilityResponse

Get availability. Get availability for all Instance types. :param zone: Zone to target. If none is passed will use default zone from the config. :param per_page: A positive integer lower or equal to 100 to select the number of items to return. :param page: A positive integer to choose the page to return. :return: GetServerTypesAvailabilityResponse

Usage:

result = api.get_server_types_availability()
get_snapshot(*, snapshot_id: str, zone: str | None = None) GetSnapshotResponse

Get a snapshot. Get details of a snapshot with the specified ID. :param snapshot_id: UUID of the snapshot you want to get. :param zone: Zone to target. If none is passed will use default zone from the config. :return: GetSnapshotResponse

Usage:

result = api.get_snapshot(
    snapshot_id="example",
)
get_volume(*, volume_id: str, zone: str | None = None) GetVolumeResponse

Get a volume. Get details of a volume with the specified ID. :param volume_id: UUID of the volume you want to get. :param zone: Zone to target. If none is passed will use default zone from the config. :return: GetVolumeResponse

Usage:

result = api.get_volume(
    volume_id="example",
)
list_default_security_group_rules(*, zone: str | None = None) ListSecurityGroupRulesResponse

Get default rules. Lists the default rules applied to all the security groups. :param zone: Zone to target. If none is passed will use default zone from the config. :return: ListSecurityGroupRulesResponse

Usage:

result = api.list_default_security_group_rules()
list_images(*, zone: str | None = None, organization: str | None = None, per_page: int | None = None, page: int | None = None, name: str | None = None, public: bool | None = None, arch: str | None = None, project: str | None = None, tags: str | None = None) ListImagesResponse

List Instance images. List all existing Instance images. :param zone: Zone to target. If none is passed will use default zone from the config. :param organization: :param per_page: :param page: :param name: :param public: :param arch: :param project: :param tags: :return: ListImagesResponse

Usage:

result = api.list_images()
list_images_all(*, zone: str | None = None, organization: str | None = None, per_page: int | None = None, page: int | None = None, name: str | None = None, public: bool | None = None, arch: str | None = None, project: str | None = None, tags: str | None = None) List[Image]

List Instance images. List all existing Instance images. :param zone: Zone to target. If none is passed will use default zone from the config. :param organization: :param per_page: :param page: :param name: :param public: :param arch: :param project: :param tags: :return: List[Image]

Usage:

result = api.list_images_all()
list_ips(*, zone: str | None = None, project: str | None = None, organization: str | None = None, tags: List[str] | None = None, name: str | None = None, per_page: int | None = None, page: int | None = None, type_: str | None = None) ListIpsResponse

List all flexible IPs. List all flexible IPs in a specified zone. :param zone: Zone to target. If none is passed will use default zone from the config. :param project: Project ID in which the IPs are reserved. :param organization: Organization ID in which the IPs are reserved. :param tags: Filter IPs with these exact tags (to filter with several tags, use commas to separate them). :param name: Filter on the IP address (Works as a LIKE operation on the IP address). :param per_page: A positive integer lower or equal to 100 to select the number of items to return. :param page: A positive integer to choose the page to return. :param type_: Filter on the IP Mobility IP type (whose value should be either ‘routed_ipv4’ or ‘routed_ipv6’). :return: ListIpsResponse

Usage:

result = api.list_ips()
list_ips_all(*, zone: str | None = None, project: str | None = None, organization: str | None = None, tags: List[str] | None = None, name: str | None = None, per_page: int | None = None, page: int | None = None, type_: str | None = None) List[Ip]

List all flexible IPs. List all flexible IPs in a specified zone. :param zone: Zone to target. If none is passed will use default zone from the config. :param project: Project ID in which the IPs are reserved. :param organization: Organization ID in which the IPs are reserved. :param tags: Filter IPs with these exact tags (to filter with several tags, use commas to separate them). :param name: Filter on the IP address (Works as a LIKE operation on the IP address). :param per_page: A positive integer lower or equal to 100 to select the number of items to return. :param page: A positive integer to choose the page to return. :param type_: Filter on the IP Mobility IP type (whose value should be either ‘routed_ipv4’ or ‘routed_ipv6’). :return: List[Ip]

Usage:

result = api.list_ips_all()
list_placement_groups(*, zone: str | None = None, per_page: int | None = None, page: int | None = None, organization: str | None = None, project: str | None = None, tags: List[str] | None = None, name: str | None = None) ListPlacementGroupsResponse

List placement groups. List all placement groups in a specified Availability Zone. :param zone: Zone to target. If none is passed will use default zone from the config. :param per_page: A positive integer lower or equal to 100 to select the number of items to return. :param page: A positive integer to choose the page to return. :param organization: List only placement groups of this Organization ID. :param project: List only placement groups of this Project ID. :param tags: List placement groups with these exact tags (to filter with several tags, use commas to separate them). :param name: Filter placement groups by name (for eg. “cluster1” will return “cluster100” and “cluster1” but not “foo”). :return: ListPlacementGroupsResponse

Usage:

result = api.list_placement_groups()
list_placement_groups_all(*, zone: str | None = None, per_page: int | None = None, page: int | None = None, organization: str | None = None, project: str | None = None, tags: List[str] | None = None, name: str | None = None) List[PlacementGroup]

List placement groups. List all placement groups in a specified Availability Zone. :param zone: Zone to target. If none is passed will use default zone from the config. :param per_page: A positive integer lower or equal to 100 to select the number of items to return. :param page: A positive integer to choose the page to return. :param organization: List only placement groups of this Organization ID. :param project: List only placement groups of this Project ID. :param tags: List placement groups with these exact tags (to filter with several tags, use commas to separate them). :param name: Filter placement groups by name (for eg. “cluster1” will return “cluster100” and “cluster1” but not “foo”). :return: List[PlacementGroup]

Usage:

result = api.list_placement_groups_all()
list_private_ni_cs(*, server_id: str, zone: str | None = None, tags: List[str] | None = None, per_page: int | None = None, page: int | None = None) ListPrivateNICsResponse

List all private NICs. List all private NICs of a specified Instance. :param server_id: Instance to which the private NIC is attached. :param zone: Zone to target. If none is passed will use default zone from the config. :param tags: Private NIC tags. :param per_page: A positive integer lower or equal to 100 to select the number of items to return. :param page: A positive integer to choose the page to return. :return: ListPrivateNICsResponse

Usage:

result = api.list_private_ni_cs(
    server_id="example",
)
list_private_ni_cs_all(*, server_id: str, zone: str | None = None, tags: List[str] | None = None, per_page: int | None = None, page: int | None = None) List[PrivateNIC]

List all private NICs. List all private NICs of a specified Instance. :param server_id: Instance to which the private NIC is attached. :param zone: Zone to target. If none is passed will use default zone from the config. :param tags: Private NIC tags. :param per_page: A positive integer lower or equal to 100 to select the number of items to return. :param page: A positive integer to choose the page to return. :return: List[PrivateNIC]

Usage:

result = api.list_private_ni_cs_all(
    server_id="example",
)
list_security_group_rules(*, security_group_id: str, zone: str | None = None, per_page: int | None = None, page: int | None = None) ListSecurityGroupRulesResponse

List rules. List the rules of the a specified security group ID. :param security_group_id: UUID of the security group. :param zone: Zone to target. If none is passed will use default zone from the config. :param per_page: A positive integer lower or equal to 100 to select the number of items to return. :param page: A positive integer to choose the page to return. :return: ListSecurityGroupRulesResponse

Usage:

result = api.list_security_group_rules(
    security_group_id="example",
)
list_security_group_rules_all(*, security_group_id: str, zone: str | None = None, per_page: int | None = None, page: int | None = None) List[SecurityGroupRule]

List rules. List the rules of the a specified security group ID. :param security_group_id: UUID of the security group. :param zone: Zone to target. If none is passed will use default zone from the config. :param per_page: A positive integer lower or equal to 100 to select the number of items to return. :param page: A positive integer to choose the page to return. :return: List[SecurityGroupRule]

Usage:

result = api.list_security_group_rules_all(
    security_group_id="example",
)
list_security_groups(*, zone: str | None = None, name: str | None = None, organization: str | None = None, project: str | None = None, tags: List[str] | None = None, project_default: bool | None = None, per_page: int | None = None, page: int | None = None) ListSecurityGroupsResponse

List security groups. List all existing security groups. :param zone: Zone to target. If none is passed will use default zone from the config. :param name: Name of the security group. :param organization: Security group Organization ID. :param project: Security group Project ID. :param tags: List security groups with these exact tags (to filter with several tags, use commas to separate them). :param project_default: Filter security groups with this value for project_default. :param per_page: A positive integer lower or equal to 100 to select the number of items to return. :param page: A positive integer to choose the page to return. :return: ListSecurityGroupsResponse

Usage:

result = api.list_security_groups()
list_security_groups_all(*, zone: str | None = None, name: str | None = None, organization: str | None = None, project: str | None = None, tags: List[str] | None = None, project_default: bool | None = None, per_page: int | None = None, page: int | None = None) List[SecurityGroup]

List security groups. List all existing security groups. :param zone: Zone to target. If none is passed will use default zone from the config. :param name: Name of the security group. :param organization: Security group Organization ID. :param project: Security group Project ID. :param tags: List security groups with these exact tags (to filter with several tags, use commas to separate them). :param project_default: Filter security groups with this value for project_default. :param per_page: A positive integer lower or equal to 100 to select the number of items to return. :param page: A positive integer to choose the page to return. :return: List[SecurityGroup]

Usage:

result = api.list_security_groups_all()
list_server_actions(*, server_id: str, zone: str | None = None) ListServerActionsResponse

List Instance actions. List all actions (e.g. power on, power off, reboot) that can currently be performed on an Instance. :param server_id: :param zone: Zone to target. If none is passed will use default zone from the config. :return: ListServerActionsResponse

Usage:

result = api.list_server_actions(
    server_id="example",
)
list_server_user_data(*, server_id: str, zone: str | None = None) ListServerUserDataResponse

List user data. List all user data keys registered on a specified Instance. :param server_id: UUID of the Instance. :param zone: Zone to target. If none is passed will use default zone from the config. :return: ListServerUserDataResponse

Usage:

result = api.list_server_user_data(
    server_id="example",
)
list_servers(*, zone: str | None = None, per_page: int | None = None, page: int | None = None, organization: str | None = None, project: str | None = None, name: str | None = None, private_ip: str | None = None, without_ip: bool | None = None, with_ip: str | None = None, commercial_type: str | None = None, state: ServerState | None = None, tags: List[str] | None = None, private_network: str | None = None, order: ListServersRequestOrder | None = None, private_networks: List[str] | None = None, private_nic_mac_address: str | None = None, servers: List[str] | None = None) ListServersResponse

List all Instances. List all Instances in a specified Availability Zone, e.g. fr-par-1. :param zone: Zone to target. If none is passed will use default zone from the config. :param per_page: A positive integer lower or equal to 100 to select the number of items to return. :param page: A positive integer to choose the page to return. :param organization: List only Instances of this Organization ID. :param project: List only Instances of this Project ID. :param name: Filter Instances by name (eg. “server1” will return “server100” and “server1” but not “foo”). :param private_ip: List Instances by private_ip. :param without_ip: List Instances that are not attached to a public IP. :param with_ip: List Instances by IP (both private_ip and public_ip are supported). :param commercial_type: List Instances of this commercial type. :param state: List Instances in this state. :param tags: List Instances with these exact tags (to filter with several tags, use commas to separate them). :param private_network: List Instances in this Private Network. :param order: Define the order of the returned servers. :param private_networks: List Instances from the given Private Networks (use commas to separate them). :param private_nic_mac_address: List Instances associated with the given private NIC MAC address. :param servers: List Instances from these server ids (use commas to separate them). :return: ListServersResponse

Usage:

result = api.list_servers()
list_servers_all(*, zone: str | None = None, per_page: int | None = None, page: int | None = None, organization: str | None = None, project: str | None = None, name: str | None = None, private_ip: str | None = None, without_ip: bool | None = None, with_ip: str | None = None, commercial_type: str | None = None, state: ServerState | None = None, tags: List[str] | None = None, private_network: str | None = None, order: ListServersRequestOrder | None = None, private_networks: List[str] | None = None, private_nic_mac_address: str | None = None, servers: List[str] | None = None) List[Server]

List all Instances. List all Instances in a specified Availability Zone, e.g. fr-par-1. :param zone: Zone to target. If none is passed will use default zone from the config. :param per_page: A positive integer lower or equal to 100 to select the number of items to return. :param page: A positive integer to choose the page to return. :param organization: List only Instances of this Organization ID. :param project: List only Instances of this Project ID. :param name: Filter Instances by name (eg. “server1” will return “server100” and “server1” but not “foo”). :param private_ip: List Instances by private_ip. :param without_ip: List Instances that are not attached to a public IP. :param with_ip: List Instances by IP (both private_ip and public_ip are supported). :param commercial_type: List Instances of this commercial type. :param state: List Instances in this state. :param tags: List Instances with these exact tags (to filter with several tags, use commas to separate them). :param private_network: List Instances in this Private Network. :param order: Define the order of the returned servers. :param private_networks: List Instances from the given Private Networks (use commas to separate them). :param private_nic_mac_address: List Instances associated with the given private NIC MAC address. :param servers: List Instances from these server ids (use commas to separate them). :return: List[Server]

Usage:

result = api.list_servers_all()
list_servers_types(*, zone: str | None = None, per_page: int | None = None, page: int | None = None) ListServersTypesResponse

List Instance types. List available Instance types and their technical details. :param zone: Zone to target. If none is passed will use default zone from the config. :param per_page: :param page: :return: ListServersTypesResponse

Usage:

result = api.list_servers_types()
list_snapshots(*, zone: str | None = None, organization: str | None = None, project: str | None = None, per_page: int | None = None, page: int | None = None, name: str | None = None, tags: str | None = None, base_volume_id: str | None = None) ListSnapshotsResponse

List snapshots. List all snapshots of an Organization in a specified Availability Zone. :param zone: Zone to target. If none is passed will use default zone from the config. :param organization: List snapshots only for this Organization ID. :param project: List snapshots only for this Project ID. :param per_page: Number of snapshots returned per page (positive integer lower or equal to 100). :param page: Page to be returned. :param name: List snapshots of the requested name. :param tags: List snapshots that have the requested tag. :param base_volume_id: List snapshots originating only from this volume. :return: ListSnapshotsResponse

Usage:

result = api.list_snapshots()
list_snapshots_all(*, zone: str | None = None, organization: str | None = None, project: str | None = None, per_page: int | None = None, page: int | None = None, name: str | None = None, tags: str | None = None, base_volume_id: str | None = None) List[Snapshot]

List snapshots. List all snapshots of an Organization in a specified Availability Zone. :param zone: Zone to target. If none is passed will use default zone from the config. :param organization: List snapshots only for this Organization ID. :param project: List snapshots only for this Project ID. :param per_page: Number of snapshots returned per page (positive integer lower or equal to 100). :param page: Page to be returned. :param name: List snapshots of the requested name. :param tags: List snapshots that have the requested tag. :param base_volume_id: List snapshots originating only from this volume. :return: List[Snapshot]

Usage:

result = api.list_snapshots_all()
list_volumes(*, zone: str | None = None, volume_type: VolumeVolumeType | None = None, per_page: int | None = None, page: int | None = None, organization: str | None = None, project: str | None = None, tags: List[str] | None = None, name: str | None = None) ListVolumesResponse

List volumes. List volumes in the specified Availability Zone. You can filter the output by volume type. :param zone: Zone to target. If none is passed will use default zone from the config. :param volume_type: Filter by volume type. :param per_page: A positive integer lower or equal to 100 to select the number of items to return. :param page: A positive integer to choose the page to return. :param organization: Filter volume by Organization ID. :param project: Filter volume by Project ID. :param tags: Filter volumes with these exact tags (to filter with several tags, use commas to separate them). :param name: Filter volume by name (for eg. “vol” will return “myvolume” but not “data”). :return: ListVolumesResponse

Usage:

result = api.list_volumes()
list_volumes_all(*, zone: str | None = None, volume_type: VolumeVolumeType | None = None, per_page: int | None = None, page: int | None = None, organization: str | None = None, project: str | None = None, tags: List[str] | None = None, name: str | None = None) List[Volume]

List volumes. List volumes in the specified Availability Zone. You can filter the output by volume type. :param zone: Zone to target. If none is passed will use default zone from the config. :param volume_type: Filter by volume type. :param per_page: A positive integer lower or equal to 100 to select the number of items to return. :param page: A positive integer to choose the page to return. :param organization: Filter volume by Organization ID. :param project: Filter volume by Project ID. :param tags: Filter volumes with these exact tags (to filter with several tags, use commas to separate them). :param name: Filter volume by name (for eg. “vol” will return “myvolume” but not “data”). :return: List[Volume]

Usage:

result = api.list_volumes_all()
list_volumes_types(*, zone: str | None = None, per_page: int | None = None, page: int | None = None) ListVolumesTypesResponse

List volume types. List all volume types and their technical details. :param zone: Zone to target. If none is passed will use default zone from the config. :param per_page: :param page: :return: ListVolumesTypesResponse

Usage:

result = api.list_volumes_types()
plan_block_migration(*, zone: str | None = None, volume_id: str | None = None, snapshot_id: str | None = None) MigrationPlan

Get a volume or snapshot’s migration plan. Given a volume or snapshot, returns the migration plan but does not perform the actual migration. To perform the migration, you have to call the [Migrate a volume and/or snapshots to SBS](#path-volumes-migrate-a-volume-andor-snapshots-to-sbs-scaleway-block-storage) endpoint afterward. The endpoint returns the resources that should be migrated together: - the volume and any snapshots created from the volume, if the call was made to plan a volume migration. - the base volume of the snapshot (if the volume is not deleted) and its related snapshots, if the call was made to plan a snapshot migration. The endpoint also returns the validation_key, which must be provided to the [Migrate a volume and/or snapshots to SBS](#path-volumes-migrate-a-volume-andor-snapshots-to-sbs-scaleway-block-storage) endpoint to confirm that all resources listed in the plan should be migrated. :param zone: Zone to target. If none is passed will use default zone from the config. :param volume_id: The volume for which the migration plan will be generated. One-Of (‘resource’): at most one of ‘volume_id’, ‘snapshot_id’ could be set. :param snapshot_id: The snapshot for which the migration plan will be generated. One-Of (‘resource’): at most one of ‘volume_id’, ‘snapshot_id’ could be set. :return: MigrationPlan

Usage:

result = api.plan_block_migration()
server_action(*, server_id: str, zone: str | None = None, action: ServerAction | None = None, name: str | None = None, volumes: Dict[str, ServerActionRequestVolumeBackupTemplate] | None = None, disable_ipv6: bool | None = None) ServerActionResponse

Perform action. Perform an action on an Instance. Available actions are: * poweron: Start a stopped Instance. * poweroff: Fully stop the Instance and release the hypervisor slot. * stop_in_place: Stop the Instance, but keep the slot on the hypervisor. * reboot: Stop the instance and restart it. * backup: Create an image with all the volumes of an Instance. * terminate: Delete the Instance along with its attached local volumes. * enable_routed_ip: Migrate the Instance to the new network stack.

The terminate action will result in the deletion of l_ssd and scratch volumes types, sbs_volume volumes will only be detached. If you want to preserve your l_ssd volumes, you should stop your Instance, detach the volumes to be preserved, then delete your Instance.

The backup action can be done with: * No volumes key in the body: an image is created with snapshots of all the server volumes, except for the scratch volumes types. * volumes key in the body with a dictionary as value, in this dictionary volumes UUID as keys and empty dictionaries as values : an image is created with the snapshots of the volumes in volumes key. scratch volumes types can’t be shapshotted. :param server_id: UUID of the Instance. :param zone: Zone to target. If none is passed will use default zone from the config. :param action: Action to perform on the Instance. :param name: Name of the backup you want to create. This field should only be specified when performing a backup action. :param volumes: For each volume UUID, the snapshot parameters of the volume. This field should only be specified when performing a backup action. :param disable_ipv6: Disable IPv6 on the Instance while performing migration to routed IPs. This field should only be specified when performing a enable_routed_ip action. :return: ServerActionResponse

Usage:

result = api.server_action(
    server_id="example",
)
set_placement_group(*, placement_group_id: str, name: str, zone: str | None = None, organization: str | None = None, policy_mode: PlacementGroupPolicyMode | None = None, policy_type: PlacementGroupPolicyType | None = None, project: str | None = None, tags: List[str] | None = None) SetPlacementGroupResponse

Set placement group. Set all parameters of the specified placement group. :param placement_group_id: :param name: :param zone: Zone to target. If none is passed will use default zone from the config. :param organization: :param policy_mode: :param policy_type: :param project: :param tags: :return: SetPlacementGroupResponse

Usage:

result = api.set_placement_group(
    placement_group_id="example",
    name="example",
)
set_placement_group_servers(*, placement_group_id: str, servers: List[str], zone: str | None = None) SetPlacementGroupServersResponse

Set placement group servers. Set all Instances belonging to the specified placement group. :param placement_group_id: UUID of the placement group you want to set. :param servers: An array of the Instances’ UUIDs you want to configure. :param zone: Zone to target. If none is passed will use default zone from the config. :return: SetPlacementGroupServersResponse

Usage:

result = api.set_placement_group_servers(
    placement_group_id="example",
    servers=[],
)
set_security_group_rules(*, security_group_id: str, zone: str | None = None, rules: List[SetSecurityGroupRulesRequestRule] | None = None) SetSecurityGroupRulesResponse

Update all the rules of a security group. Replaces the existing rules of the security group with the rules provided. This endpoint supports the update of existing rules, creation of new rules and deletion of existing rules when they are not passed in the request. :param security_group_id: UUID of the security group to update the rules on. :param zone: Zone to target. If none is passed will use default zone from the config. :param rules: List of rules to update in the security group. :return: SetSecurityGroupRulesResponse

Usage:

result = api.set_security_group_rules(
    security_group_id="example",
)
update_image(*, image_id: str, zone: str | None = None, name: str | None = None, arch: Arch | None = None, extra_volumes: Dict[str, VolumeImageUpdateTemplate] | None = None, tags: List[str] | None = None, public: bool | None = None) UpdateImageResponse

Update image. Update the properties of an image. :param image_id: UUID of the image. :param zone: Zone to target. If none is passed will use default zone from the config. :param name: Name of the image. :param arch: Architecture of the image. :param extra_volumes: Additional snapshots of the image, with extra_volumeKey being the position of the snapshot in the image. :param tags: Tags of the image. :param public: True to set the image as public. :return: UpdateImageResponse

Usage:

result = api.update_image(
    image_id="example",
)
update_ip(*, ip: str, zone: str | None = None, reverse: str | None = None, type_: IpType | None = None, tags: List[str] | None = None, server: str | None = None) UpdateIpResponse

Update a flexible IP. Update a flexible IP in the specified zone with the specified ID. :param ip: IP ID or IP address. :param zone: Zone to target. If none is passed will use default zone from the config. :param reverse: Reverse domain name. :param type_: Should have no effect. :param tags: An array of keywords you want to tag this IP with. :param server: :return: UpdateIpResponse

Usage:

result = api.update_ip(
    ip="example",
)
update_placement_group(*, placement_group_id: str, zone: str | None = None, name: str | None = None, tags: List[str] | None = None, policy_mode: PlacementGroupPolicyMode | None = None, policy_type: PlacementGroupPolicyType | None = None) UpdatePlacementGroupResponse

Update a placement group. Update one or more parameter of the specified placement group. :param placement_group_id: UUID of the placement group. :param zone: Zone to target. If none is passed will use default zone from the config. :param name: Name of the placement group. :param tags: Tags of the placement group. :param policy_mode: Operating mode of the placement group. :param policy_type: Policy type of the placement group. :return: UpdatePlacementGroupResponse

Usage:

result = api.update_placement_group(
    placement_group_id="example",
)
update_placement_group_servers(*, placement_group_id: str, servers: List[str], zone: str | None = None) UpdatePlacementGroupServersResponse

Update placement group servers. Update all Instances belonging to the specified placement group. :param placement_group_id: UUID of the placement group you want to update. :param servers: An array of the Instances’ UUIDs you want to configure. :param zone: Zone to target. If none is passed will use default zone from the config. :return: UpdatePlacementGroupServersResponse

Usage:

result = api.update_placement_group_servers(
    placement_group_id="example",
    servers=[],
)
update_private_nic(*, server_id: str, private_nic_id: str, zone: str | None = None, tags: List[str] | None = None) PrivateNIC

Update a private NIC. Update one or more parameter(s) of a specified private NIC. :param server_id: UUID of the Instance the private NIC will be attached to. :param private_nic_id: Private NIC unique ID. :param zone: Zone to target. If none is passed will use default zone from the config. :param tags: Tags used to select private NIC/s. :return: PrivateNIC

Usage:

result = api.update_private_nic(
    server_id="example",
    private_nic_id="example",
)
update_security_group(*, security_group_id: str, zone: str | None = None, name: str | None = None, description: str | None = None, enable_default_security: bool | None = None, inbound_default_policy: SecurityGroupPolicy | None = None, tags: List[str] | None = None, organization_default: bool | None = None, project_default: bool | None = None, outbound_default_policy: SecurityGroupPolicy | None = None, stateful: bool | None = None) UpdateSecurityGroupResponse

Update a security group. Update the properties of security group. :param security_group_id: UUID of the security group. :param zone: Zone to target. If none is passed will use default zone from the config. :param name: Name of the security group. :param description: Description of the security group. :param enable_default_security: True to block SMTP on IPv4 and IPv6. This feature is read only, please open a support ticket if you need to make it configurable. :param inbound_default_policy: Default inbound policy. :param tags: Tags of the security group. :param organization_default: Please use project_default instead. :param project_default: True use this security group for future Instances created in this project. :param outbound_default_policy: Default outbound policy. :param stateful: True to set the security group as stateful. :return: UpdateSecurityGroupResponse

Usage:

result = api.update_security_group(
    security_group_id="example",
)
update_security_group_rule(*, security_group_id: str, security_group_rule_id: str, zone: str | None = None, protocol: SecurityGroupRuleProtocol | None = None, direction: SecurityGroupRuleDirection | None = None, action: SecurityGroupRuleAction | None = None, ip_range: str | None = None, dest_port_from: int | None = None, dest_port_to: int | None = None, position: int | None = None) UpdateSecurityGroupRuleResponse

Update security group rule. Update the properties of a rule from a specified security group. :param security_group_id: UUID of the security group. :param security_group_rule_id: UUID of the rule. :param zone: Zone to target. If none is passed will use default zone from the config. :param protocol: Protocol family this rule applies to. :param direction: Direction the rule applies to. :param action: Action to apply when the rule matches a packet. :param ip_range: Range of IP addresses these rules apply to. :param dest_port_from: Beginning of the range of ports this rule applies to (inclusive). If 0 is provided, unset the parameter. :param dest_port_to: End of the range of ports this rule applies to (inclusive). If 0 is provided, unset the parameter. :param position: Position of this rule in the security group rules list. :return: UpdateSecurityGroupRuleResponse

Usage:

result = api.update_security_group_rule(
    security_group_id="example",
    security_group_rule_id="example",
)
update_snapshot(*, snapshot_id: str, zone: str | None = None, name: str | None = None, tags: List[str] | None = None) UpdateSnapshotResponse

Update a snapshot. Update the properties of a snapshot. :param snapshot_id: UUID of the snapshot. :param zone: Zone to target. If none is passed will use default zone from the config. :param name: Name of the snapshot. :param tags: Tags of the snapshot. :return: UpdateSnapshotResponse

Usage:

result = api.update_snapshot(
    snapshot_id="example",
)
update_volume(*, volume_id: str, zone: str | None = None, name: str | None = None, tags: List[str] | None = None, size: int | None = None) UpdateVolumeResponse

Update a volume. Replace the name and/or size properties of a volume specified by its ID, with the specified value(s). :param volume_id: UUID of the volume. :param zone: Zone to target. If none is passed will use default zone from the config. :param name: Volume name. :param tags: Tags of the volume. :param size: Volume disk size, must be a multiple of 512. :return: UpdateVolumeResponse

Usage:

result = api.update_volume(
    volume_id="example",
)
class scaleway.instance.v1.Ip(id: 'str', address: 'str', organization: 'str', tags: 'List[str]', project: 'str', type_: 'IpType', state: 'IpState', prefix: 'str', ipam_id: 'str', zone: 'ScwZone', reverse: 'Optional[str]', server: 'Optional[ServerSummary]')

Bases: object

address: str
id: str
ipam_id: str
organization: str
prefix: str
project: str
reverse: str | None
server: ServerSummary | None
state: IpState
tags: List[str]
type_: IpType
zone: str

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.IpState(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

ATTACHED = 'attached'
DETACHED = 'detached'
ERROR = 'error'
PENDING = 'pending'
UNKNOWN_STATE = 'unknown_state'
class scaleway.instance.v1.IpType(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

ROUTED_IPV4 = 'routed_ipv4'
ROUTED_IPV6 = 'routed_ipv6'
UNKNOWN_IPTYPE = 'unknown_iptype'
class scaleway.instance.v1.ListDefaultSecurityGroupRulesRequest(zone: 'Optional[ScwZone]')

Bases: object

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.ListImagesRequest(zone: 'Optional[ScwZone]', organization: 'Optional[str]', per_page: 'Optional[int]', page: 'Optional[int]', name: 'Optional[str]', public: 'Optional[bool]', arch: 'Optional[str]', project: 'Optional[str]', tags: 'Optional[str]')

Bases: object

arch: str | None
name: str | None
organization: str | None
page: int | None
per_page: int | None
project: str | None
public: bool | None
tags: str | None
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.ListImagesResponse(total_count: 'int', images: 'List[Image]')

Bases: object

images: List[Image]

List of images.

total_count: int

Total number of images.

class scaleway.instance.v1.ListIpsRequest(zone: 'Optional[ScwZone]', project: 'Optional[str]', organization: 'Optional[str]', tags: 'Optional[List[str]]', name: 'Optional[str]', per_page: 'Optional[int]', page: 'Optional[int]', type_: 'Optional[str]')

Bases: object

name: str | None

Filter on the IP address (Works as a LIKE operation on the IP address).

organization: str | None

Organization ID in which the IPs are reserved.

page: int | None

A positive integer to choose the page to return.

per_page: int | None

A positive integer lower or equal to 100 to select the number of items to return.

project: str | None

Project ID in which the IPs are reserved.

tags: List[str] | None

Filter IPs with these exact tags (to filter with several tags, use commas to separate them).

type_: str | None

Filter on the IP Mobility IP type (whose value should be either ‘routed_ipv4’ or ‘routed_ipv6’).

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.ListIpsResponse(total_count: 'int', ips: 'List[Ip]')

Bases: object

ips: List[Ip]

List of ips.

total_count: int

Total number of ips.

class scaleway.instance.v1.ListPlacementGroupsRequest(zone: 'Optional[ScwZone]', per_page: 'Optional[int]', page: 'Optional[int]', organization: 'Optional[str]', project: 'Optional[str]', tags: 'Optional[List[str]]', name: 'Optional[str]')

Bases: object

name: str | None

Filter placement groups by name (for eg. “cluster1” will return “cluster100” and “cluster1” but not “foo”).

organization: str | None

List only placement groups of this Organization ID.

page: int | None

A positive integer to choose the page to return.

per_page: int | None

A positive integer lower or equal to 100 to select the number of items to return.

project: str | None

List only placement groups of this Project ID.

tags: List[str] | None

List placement groups with these exact tags (to filter with several tags, use commas to separate them).

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.ListPlacementGroupsResponse(total_count: 'int', placement_groups: 'List[PlacementGroup]')

Bases: object

placement_groups: List[PlacementGroup]

List of placement groups.

total_count: int

Total number of placement groups.

class scaleway.instance.v1.ListPrivateNICsRequest(server_id: 'str', zone: 'Optional[ScwZone]', tags: 'Optional[List[str]]', per_page: 'Optional[int]', page: 'Optional[int]')

Bases: object

page: int | None

A positive integer to choose the page to return.

per_page: int | None

A positive integer lower or equal to 100 to select the number of items to return.

server_id: str

Instance to which the private NIC is attached.

tags: List[str] | None

Private NIC tags.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.ListPrivateNICsResponse(private_nics: 'List[PrivateNIC]', total_count: 'int')

Bases: object

private_nics: List[PrivateNIC]
total_count: int
class scaleway.instance.v1.ListSecurityGroupRulesRequest(security_group_id: 'str', zone: 'Optional[ScwZone]', per_page: 'Optional[int]', page: 'Optional[int]')

Bases: object

page: int | None

A positive integer to choose the page to return.

per_page: int | None

A positive integer lower or equal to 100 to select the number of items to return.

security_group_id: str

UUID of the security group.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.ListSecurityGroupRulesResponse(total_count: 'int', rules: 'List[SecurityGroupRule]')

Bases: object

rules: List[SecurityGroupRule]

List of security rules.

total_count: int

Total number of security groups.

class scaleway.instance.v1.ListSecurityGroupsRequest(zone: 'Optional[ScwZone]', name: 'Optional[str]', organization: 'Optional[str]', project: 'Optional[str]', tags: 'Optional[List[str]]', project_default: 'Optional[bool]', per_page: 'Optional[int]', page: 'Optional[int]')

Bases: object

name: str | None

Name of the security group.

organization: str | None

Security group Organization ID.

page: int | None

A positive integer to choose the page to return.

per_page: int | None

A positive integer lower or equal to 100 to select the number of items to return.

project: str | None

Security group Project ID.

project_default: bool | None

Filter security groups with this value for project_default.

tags: List[str] | None

List security groups with these exact tags (to filter with several tags, use commas to separate them).

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.ListSecurityGroupsResponse(total_count: 'int', security_groups: 'List[SecurityGroup]')

Bases: object

security_groups: List[SecurityGroup]

List of security groups.

total_count: int

Total number of security groups.

class scaleway.instance.v1.ListServerActionsRequest(server_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

server_id: str
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.ListServerActionsResponse(actions: 'List[ServerAction]')

Bases: object

actions: List[ServerAction]
class scaleway.instance.v1.ListServerUserDataRequest(server_id: 'str', zone: 'Optional[ScwZone]')

Bases: object

server_id: str

UUID of the Instance.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.ListServerUserDataResponse(user_data: 'List[str]')

Bases: object

user_data: List[str]
class scaleway.instance.v1.ListServersRequest(zone: 'Optional[ScwZone]', per_page: 'Optional[int]', page: 'Optional[int]', organization: 'Optional[str]', project: 'Optional[str]', name: 'Optional[str]', private_ip: 'Optional[str]', without_ip: 'Optional[bool]', with_ip: 'Optional[str]', commercial_type: 'Optional[str]', state: 'Optional[ServerState]', tags: 'Optional[List[str]]', private_network: 'Optional[str]', order: 'Optional[ListServersRequestOrder]', private_networks: 'Optional[List[str]]', private_nic_mac_address: 'Optional[str]', servers: 'Optional[List[str]]')

Bases: object

commercial_type: str | None

List Instances of this commercial type.

name: str | None

Filter Instances by name (eg. “server1” will return “server100” and “server1” but not “foo”).

order: ListServersRequestOrder | None

Define the order of the returned servers.

organization: str | None

List only Instances of this Organization ID.

page: int | None

A positive integer to choose the page to return.

per_page: int | None

A positive integer lower or equal to 100 to select the number of items to return.

private_ip: str | None

List Instances by private_ip.

private_network: str | None

List Instances in this Private Network.

private_networks: List[str] | None

List Instances from the given Private Networks (use commas to separate them).

private_nic_mac_address: str | None

List Instances associated with the given private NIC MAC address.

project: str | None

List only Instances of this Project ID.

servers: List[str] | None

List Instances from these server ids (use commas to separate them).

state: ServerState | None

List Instances in this state.

tags: List[str] | None

List Instances with these exact tags (to filter with several tags, use commas to separate them).

with_ip: str | None

List Instances by IP (both private_ip and public_ip are supported).

without_ip: bool | None

List Instances that are not attached to a public IP.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.ListServersRequestOrder(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

CREATION_DATE_ASC = 'creation_date_asc'
CREATION_DATE_DESC = 'creation_date_desc'
MODIFICATION_DATE_ASC = 'modification_date_asc'
MODIFICATION_DATE_DESC = 'modification_date_desc'
class scaleway.instance.v1.ListServersResponse(total_count: 'int', servers: 'List[Server]')

Bases: object

servers: List[Server]

List of Instances.

total_count: int

Total number of Instances.

class scaleway.instance.v1.ListServersTypesRequest(zone: 'Optional[ScwZone]', per_page: 'Optional[int]', page: 'Optional[int]')

Bases: object

page: int | None
per_page: int | None
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.ListServersTypesResponse(total_count: 'int', servers: 'Dict[str, ServerType]')

Bases: object

servers: Dict[str, ServerType]

List of Instance types.

total_count: int

Total number of Instance types.

class scaleway.instance.v1.ListSnapshotsRequest(zone: 'Optional[ScwZone]', organization: 'Optional[str]', project: 'Optional[str]', per_page: 'Optional[int]', page: 'Optional[int]', name: 'Optional[str]', tags: 'Optional[str]', base_volume_id: 'Optional[str]')

Bases: object

base_volume_id: str | None

List snapshots originating only from this volume.

name: str | None

List snapshots of the requested name.

organization: str | None

List snapshots only for this Organization ID.

page: int | None

Page to be returned.

per_page: int | None

Number of snapshots returned per page (positive integer lower or equal to 100).

project: str | None

List snapshots only for this Project ID.

tags: str | None

List snapshots that have the requested tag.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.ListSnapshotsResponse(total_count: 'int', snapshots: 'List[Snapshot]')

Bases: object

snapshots: List[Snapshot]

List of snapshots.

total_count: int

Total number of snapshots.

class scaleway.instance.v1.ListVolumesRequest(zone: 'Optional[ScwZone]', volume_type: 'Optional[VolumeVolumeType]', per_page: 'Optional[int]', page: 'Optional[int]', organization: 'Optional[str]', project: 'Optional[str]', tags: 'Optional[List[str]]', name: 'Optional[str]')

Bases: object

name: str | None

Filter volume by name (for eg. “vol” will return “myvolume” but not “data”).

organization: str | None

Filter volume by Organization ID.

page: int | None

A positive integer to choose the page to return.

per_page: int | None

A positive integer lower or equal to 100 to select the number of items to return.

project: str | None

Filter volume by Project ID.

tags: List[str] | None

Filter volumes with these exact tags (to filter with several tags, use commas to separate them).

volume_type: VolumeVolumeType | None

Filter by volume type.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.ListVolumesResponse(total_count: 'int', volumes: 'List[Volume]')

Bases: object

total_count: int

Total number of volumes.

volumes: List[Volume]

List of volumes.

class scaleway.instance.v1.ListVolumesTypesRequest(zone: 'Optional[ScwZone]', per_page: 'Optional[int]', page: 'Optional[int]')

Bases: object

page: int | None
per_page: int | None
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.ListVolumesTypesResponse(total_count: 'int', volumes: 'Dict[str, VolumeType]')

Bases: object

total_count: int

Total number of volume types.

volumes: Dict[str, VolumeType]

Map of volume types.

class scaleway.instance.v1.MigrationPlan(snapshots: 'List[Snapshot]', validation_key: 'str', volume: 'Optional[Volume]')

Bases: object

snapshots: List[Snapshot]

A list of snapshots which will be migrated to SBS together and with the volume, if present.

validation_key: str

A value to be passed to the call to the [Migrate a volume and/or snapshots to SBS](#path-volumes-migrate-a-volume-andor-snapshots-to-sbs-scaleway-block-storage) endpoint, to confirm that the execution of the plan is being requested.

volume: Volume | None

A volume which will be migrated to SBS together with the snapshots, if present.

class scaleway.instance.v1.PlacementGroup(id: 'str', name: 'str', organization: 'str', project: 'str', tags: 'List[str]', policy_mode: 'PlacementGroupPolicyMode', policy_type: 'PlacementGroupPolicyType', policy_respected: 'bool', zone: 'ScwZone')

Bases: object

id: str

Placement group unique ID.

name: str

Placement group name.

organization: str

Placement group Organization ID.

policy_mode: PlacementGroupPolicyMode

Select the failure mode when the placement cannot be respected, either optional or enforced.

policy_respected: bool

In the server endpoints the value is always false as it is deprecated.

In the placement group endpoints the value is correct.

policy_type: PlacementGroupPolicyType

Select the behavior of the placement group, either low_latency (group) or max_availability (spread).

project: str

Placement group Project ID.

tags: List[str]

Placement group tags.

zone: str

Zone in which the placement group is located.

class scaleway.instance.v1.PlacementGroupPolicyMode(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

ENFORCED = 'enforced'
OPTIONAL = 'optional'
class scaleway.instance.v1.PlacementGroupPolicyType(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

LOW_LATENCY = 'low_latency'
MAX_AVAILABILITY = 'max_availability'
class scaleway.instance.v1.PlacementGroupServer(id: 'str', name: 'str', policy_respected: 'bool')

Bases: object

id: str

Instance UUID.

name: str

Instance name.

policy_respected: bool

Defines whether the placement group policy is respected (either 1 or 0).

class scaleway.instance.v1.PlanBlockMigrationRequest(zone: 'Optional[ScwZone]', volume_id: 'Optional[str]', snapshot_id: 'Optional[str]')

Bases: object

snapshot_id: str | None
volume_id: str | None
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.PrivateNIC(id: 'str', server_id: 'str', private_network_id: 'str', mac_address: 'str', state: 'PrivateNICState', tags: 'List[str]')

Bases: object

id: str

Private NIC unique ID.

mac_address: str

Private NIC MAC address.

private_network_id: str

Private Network the private NIC is attached to.

server_id: str

Instance to which the private NIC is attached.

state: PrivateNICState

Private NIC state.

tags: List[str]

Private NIC tags.

class scaleway.instance.v1.PrivateNICState(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

AVAILABLE = 'available'
SYNCING = 'syncing'
SYNCING_ERROR = 'syncing_error'
class scaleway.instance.v1.SecurityGroup(id: 'str', name: 'str', description: 'str', enable_default_security: 'bool', inbound_default_policy: 'SecurityGroupPolicy', outbound_default_policy: 'SecurityGroupPolicy', organization: 'str', project: 'str', tags: 'List[str]', project_default: 'bool', servers: 'List[ServerSummary]', stateful: 'bool', state: 'SecurityGroupState', zone: 'ScwZone', organization_default: 'Optional[bool]', creation_date: 'Optional[datetime]', modification_date: 'Optional[datetime]')

Bases: object

creation_date: datetime | None

Security group creation date.

description: str

Security group description.

enable_default_security: bool

True if SMTP is blocked on IPv4 and IPv6. This feature is read only, please open a support ticket if you need to make it configurable.

id: str

Security group unique ID.

inbound_default_policy: SecurityGroupPolicy

Default inbound policy.

modification_date: datetime | None

Security group modification date.

name: str

Security group name.

organization: str

Security group Organization ID.

organization_default: bool | None

True if it is your default security group for this Organization ID.

outbound_default_policy: SecurityGroupPolicy

Default outbound policy.

project: str

Security group Project ID.

project_default: bool

True if it is your default security group for this Project ID.

servers: List[ServerSummary]

List of Instances attached to this security group.

state: SecurityGroupState

Security group state.

stateful: bool

Defines whether the security group is stateful.

tags: List[str]

Security group tags.

zone: str

Zone in which the security group is located.

class scaleway.instance.v1.SecurityGroupPolicy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

ACCEPT = 'accept'
DROP = 'drop'
UNKNOWN_POLICY = 'unknown_policy'
class scaleway.instance.v1.SecurityGroupRule(id: 'str', protocol: 'SecurityGroupRuleProtocol', direction: 'SecurityGroupRuleDirection', action: 'SecurityGroupRuleAction', ip_range: 'str', position: 'int', editable: 'bool', zone: 'ScwZone', dest_port_from: 'Optional[int]', dest_port_to: 'Optional[int]')

Bases: object

action: SecurityGroupRuleAction
dest_port_from: int | None
dest_port_to: int | None
direction: SecurityGroupRuleDirection
editable: bool
id: str
ip_range: str
position: int
protocol: SecurityGroupRuleProtocol
zone: str

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.SecurityGroupRuleAction(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

ACCEPT = 'accept'
DROP = 'drop'
UNKNOWN_ACTION = 'unknown_action'
class scaleway.instance.v1.SecurityGroupRuleDirection(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

INBOUND = 'inbound'
OUTBOUND = 'outbound'
UNKNOWN_DIRECTION = 'unknown_direction'
class scaleway.instance.v1.SecurityGroupRuleProtocol(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

ANY = 'any'
ICMP = 'icmp'
TCP = 'tcp'
UDP = 'udp'
UNKNOWN_PROTOCOL = 'unknown_protocol'
class scaleway.instance.v1.SecurityGroupState(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

AVAILABLE = 'available'
SYNCING = 'syncing'
SYNCING_ERROR = 'syncing_error'
class scaleway.instance.v1.SecurityGroupSummary(id: 'str', name: 'str')

Bases: object

id: str
name: str
class scaleway.instance.v1.SecurityGroupTemplate(id: 'str', name: 'str')

Bases: object

id: str
name: str
class scaleway.instance.v1.Server(id: 'str', name: 'str', organization: 'str', project: 'str', allowed_actions: 'List[ServerAction]', tags: 'List[str]', commercial_type: 'str', creation_date: 'Optional[datetime]', dynamic_ip_required: 'bool', hostname: 'str', protected: 'bool', public_ips: 'List[ServerIp]', mac_address: 'str', state: 'ServerState', boot_type: 'BootType', volumes: 'Dict[str, VolumeServer]', maintenances: 'List[ServerMaintenance]', state_detail: 'str', arch: 'Arch', private_nics: 'List[PrivateNIC]', zone: 'ScwZone', filesystems: 'List[ServerFilesystem]', end_of_service: 'bool', routed_ip_enabled: 'Optional[bool]', enable_ipv6: 'Optional[bool]', image: 'Optional[Image]', private_ip: 'Optional[str]', public_ip: 'Optional[ServerIp]', modification_date: 'Optional[datetime]', location: 'Optional[ServerLocation]', ipv6: 'Optional[ServerIpv6]', security_group: 'Optional[SecurityGroupSummary]', placement_group: 'Optional[PlacementGroup]', admin_password_encryption_ssh_key_id: 'Optional[str]', admin_password_encrypted_value: 'Optional[str]')

Bases: object

admin_password_encrypted_value: str | None

This value is reset when admin_password_encryption_ssh_key_id is set to an empty string.

admin_password_encryption_ssh_key_id: str | None

The public_key value of this key is used to encrypt the admin password. When set to an empty string, reset this value and admin_password_encrypted_value to an empty string so a new password may be generated.

allowed_actions: List[ServerAction]

List of allowed actions on the Instance.

arch: Arch

Instance architecture.

boot_type: BootType

Instance boot type.

commercial_type: str

Instance commercial type (eg. GP1-M).

creation_date: datetime | None

Instance creation date.

dynamic_ip_required: bool

True if a dynamic IPv4 is required.

enable_ipv6: bool | None

True if IPv6 is enabled (deprecated and always False when routed_ip_enabled is True).

end_of_service: bool

True if the Instance type has reached end of service.

filesystems: List[ServerFilesystem]

List of attached filesystems.

hostname: str

Instance host name.

id: str

Instance unique ID.

image: Image | None

Information about the Instance image.

ipv6: ServerIpv6 | None

Instance IPv6 address (deprecated when routed_ip_enabled is True).

location: ServerLocation | None

Instance location.

mac_address: str

The server’s MAC address.

maintenances: List[ServerMaintenance]

Instance planned maintenance.

modification_date: datetime | None

Instance modification date.

name: str

Instance name.

organization: str

Instance Organization ID.

placement_group: PlacementGroup | None

Instance placement group.

private_ip: str | None

Private IP address of the Instance (deprecated and always null when routed_ip_enabled is True).

private_nics: List[PrivateNIC]

Instance private NICs.

project: str

Instance Project ID.

protected: bool

Defines whether the Instance protection option is activated.

public_ip: ServerIp | None

Information about the public IP (deprecated in favor of public_ips).

public_ips: List[ServerIp]

Information about all the public IPs attached to the server.

routed_ip_enabled: bool | None

True to configure the instance so it uses the routed IP mode. Use of routed_ip_enabled as False is deprecated.

security_group: SecurityGroupSummary | None

Instance security group.

state: ServerState

Instance state.

state_detail: str

Detailed information about the Instance state.

tags: List[str]

Tags associated with the Instance.

volumes: Dict[str, VolumeServer]

Instance volumes.

zone: str

Zone in which the Instance is located.

class scaleway.instance.v1.ServerAction(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

BACKUP = 'backup'
ENABLE_ROUTED_IP = 'enable_routed_ip'
POWEROFF = 'poweroff'
POWERON = 'poweron'
REBOOT = 'reboot'
STOP_IN_PLACE = 'stop_in_place'
TERMINATE = 'terminate'
class scaleway.instance.v1.ServerActionRequest(server_id: 'str', zone: 'Optional[ScwZone]', action: 'Optional[ServerAction]', name: 'Optional[str]', volumes: 'Optional[Dict[str, ServerActionRequestVolumeBackupTemplate]]', disable_ipv6: 'Optional[bool]')

Bases: object

action: ServerAction | None

Action to perform on the Instance.

disable_ipv6: bool | None

Disable IPv6 on the Instance while performing migration to routed IPs.

This field should only be specified when performing a enable_routed_ip action.

name: str | None

Name of the backup you want to create.

This field should only be specified when performing a backup action.

server_id: str

UUID of the Instance.

volumes: Dict[str, ServerActionRequestVolumeBackupTemplate] | None

For each volume UUID, the snapshot parameters of the volume.

This field should only be specified when performing a backup action.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.ServerActionRequestVolumeBackupTemplate(volume_type: 'SnapshotVolumeType')

Bases: object

volume_type: SnapshotVolumeType

Overrides the volume_type of the snapshot for this volume.

If omitted, the volume type of the original volume will be used.

class scaleway.instance.v1.ServerActionResponse(task: 'Optional[Task]')

Bases: object

task: Task | None
class scaleway.instance.v1.ServerCompatibleTypes(compatible_types: 'List[str]')

Bases: object

compatible_types: List[str]

Instance compatible types.

class scaleway.instance.v1.ServerFilesystem(filesystem_id: 'str', state: 'ServerFilesystemState')

Bases: object

filesystem_id: str
state: ServerFilesystemState
class scaleway.instance.v1.ServerFilesystemState(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

ATTACHING = 'attaching'
AVAILABLE = 'available'
DETACHING = 'detaching'
UNKNOWN_STATE = 'unknown_state'
class scaleway.instance.v1.ServerIp(id: 'str', address: 'str', gateway: 'str', netmask: 'str', family: 'ServerIpIpFamily', dynamic: 'bool', provisioning_mode: 'ServerIpProvisioningMode', tags: 'List[str]', ipam_id: 'str', state: 'ServerIpState')

Bases: object

address: str

Instance’s public IP-Address.

dynamic: bool

True if the IP address is dynamic.

family: ServerIpIpFamily

IP address family (inet or inet6).

gateway: str

Gateway’s IP address.

id: str

Unique ID of the IP address.

ipam_id: str

The ip_id of an IPAM ip if the ip is created from IPAM, null if not.

netmask: str

CIDR netmask.

provisioning_mode: ServerIpProvisioningMode

Information about this address provisioning mode.

state: ServerIpState

IP address state.

tags: List[str]

Tags associated with the IP.

class scaleway.instance.v1.ServerIpIpFamily(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

INET = 'inet'
INET6 = 'inet6'
class scaleway.instance.v1.ServerIpProvisioningMode(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

DHCP = 'dhcp'
MANUAL = 'manual'
SLAAC = 'slaac'
class scaleway.instance.v1.ServerIpState(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

ATTACHED = 'attached'
DETACHED = 'detached'
ERROR = 'error'
PENDING = 'pending'
UNKNOWN_STATE = 'unknown_state'
class scaleway.instance.v1.ServerIpv6(address: 'str', gateway: 'str', netmask: 'str')

Bases: object

address: str

Instance IPv6 IP-Address.

gateway: str

IPv6 IP-addresses gateway.

netmask: str

IPv6 IP-addresses CIDR netmask.

class scaleway.instance.v1.ServerLocation(cluster_id: 'str', hypervisor_id: 'str', node_id: 'str', platform_id: 'str', zone_id: 'str')

Bases: object

cluster_id: str
hypervisor_id: str
node_id: str
platform_id: str
zone_id: str
class scaleway.instance.v1.ServerMaintenance(reason: 'str', start_date: 'Optional[datetime]')

Bases: object

reason: str
start_date: datetime | None
class scaleway.instance.v1.ServerState(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

LOCKED = 'locked'
RUNNING = 'running'
STARTING = 'starting'
STOPPED = 'stopped'
STOPPED_IN_PLACE = 'stopped_in_place'
STOPPING = 'stopping'
class scaleway.instance.v1.ServerSummary(id: 'str', name: 'str')

Bases: object

id: str
name: str
class scaleway.instance.v1.ServerType(monthly_price: 'Optional[float]', hourly_price: 'float', alt_names: 'List[str]', ncpus: 'int', ram: 'int', arch: 'Arch', end_of_service: 'bool', per_volume_constraint: 'Optional[ServerTypeVolumeConstraintsByType]', volumes_constraint: 'Optional[ServerTypeVolumeConstraintSizes]', gpu: 'Optional[int]', gpu_info: 'Optional[ServerTypeGPUInfo]', network: 'Optional[ServerTypeNetwork]', capabilities: 'Optional[ServerTypeCapabilities]', scratch_storage_max_size: 'Optional[int]', block_bandwidth: 'Optional[int]')

Bases: object

alt_names: List[str]

Alternative Instance name, if any.

arch: Arch

CPU architecture.

block_bandwidth: int | None

The maximum bandwidth allocated to block storage access (in bytes per second).

capabilities: ServerTypeCapabilities | None

Capabilities.

end_of_service: bool

True if this Instance type has reached end of service.

gpu: int | None

Number of GPU.

gpu_info: ServerTypeGPUInfo | None

GPU information.

hourly_price: float

Hourly price in Euro.

monthly_price: float | None

Estimated monthly price, for a 30 days month, in Euro.

ncpus: int

Number of CPU.

network: ServerTypeNetwork | None

Network available for the Instance.

per_volume_constraint: ServerTypeVolumeConstraintsByType | None

Additional volume constraints.

ram: int

Available RAM in bytes.

scratch_storage_max_size: int | None

Maximum available scratch storage.

volumes_constraint: ServerTypeVolumeConstraintSizes | None

Initial volume constraints.

class scaleway.instance.v1.ServerTypeCapabilities(boot_types: 'List[BootType]', max_file_systems: 'int', block_storage: 'Optional[bool]')

Bases: object

block_storage: bool | None

Defines whether the Instance supports block storage.

boot_types: List[BootType]

List of supported boot types.

max_file_systems: int

Max number of SFS (Scaleway File Systems) that can be attached to the Instance.

class scaleway.instance.v1.ServerTypeGPUInfo(gpu_manufacturer: 'str', gpu_name: 'str', gpu_memory: 'int')

Bases: object

gpu_manufacturer: str

GPU manufacturer.

gpu_memory: int

RAM of a single GPU, in bytes.

gpu_name: str

GPU model name.

class scaleway.instance.v1.ServerTypeNetwork(interfaces: 'List[ServerTypeNetworkInterface]', ipv6_support: 'bool', sum_internal_bandwidth: 'Optional[int]', sum_internet_bandwidth: 'Optional[int]')

Bases: object

interfaces: List[ServerTypeNetworkInterface]

List of available network interfaces.

ipv6_support: bool

True if IPv6 is enabled.

sum_internal_bandwidth: int | None

Total maximum internal bandwidth in bits per seconds.

sum_internet_bandwidth: int | None

Total maximum internet bandwidth in bits per seconds.

class scaleway.instance.v1.ServerTypeNetworkInterface(internal_bandwidth: 'Optional[int]', internet_bandwidth: 'Optional[int]')

Bases: object

internal_bandwidth: int | None

Maximum internal bandwidth in bits per seconds.

internet_bandwidth: int | None

Maximum internet bandwidth in bits per seconds.

class scaleway.instance.v1.ServerTypeVolumeConstraintSizes(min_size: 'int', max_size: 'int')

Bases: object

max_size: int

Maximum volume size in bytes.

min_size: int

Minimum volume size in bytes.

class scaleway.instance.v1.ServerTypeVolumeConstraintsByType(l_ssd: 'Optional[ServerTypeVolumeConstraintSizes]')

Bases: object

l_ssd: ServerTypeVolumeConstraintSizes | None

Local SSD volumes.

class scaleway.instance.v1.ServerTypesAvailability(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

AVAILABLE = 'available'
SCARCE = 'scarce'
SHORTAGE = 'shortage'
class scaleway.instance.v1.SetImageRequest(zone: 'Optional[ScwZone]', id: 'str', name: 'str', arch: 'Optional[Arch]', creation_date: 'Optional[datetime]', modification_date: 'Optional[datetime]', from_server: 'str', public: 'bool', default_bootscript: 'Optional[Bootscript]', extra_volumes: 'Optional[Dict[str, Volume]]', organization: 'Optional[str]', root_volume: 'Optional[VolumeSummary]', state: 'Optional[ImageState]', project: 'Optional[str]', tags: 'Optional[List[str]]')

Bases: object

arch: Arch | None
creation_date: datetime | None
default_bootscript: Bootscript | None
extra_volumes: Dict[str, Volume] | None
from_server: str
id: str
modification_date: datetime | None
name: str
organization: str | None
project: str | None
public: bool
root_volume: VolumeSummary | None
state: ImageState | None
tags: List[str] | None
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.SetPlacementGroupRequest(placement_group_id: 'str', name: 'str', zone: 'Optional[ScwZone]', organization: 'Optional[str]', policy_mode: 'Optional[PlacementGroupPolicyMode]', policy_type: 'Optional[PlacementGroupPolicyType]', project: 'Optional[str]', tags: 'Optional[List[str]]')

Bases: object

name: str
organization: str | None
placement_group_id: str
policy_mode: PlacementGroupPolicyMode | None
policy_type: PlacementGroupPolicyType | None
project: str | None
tags: List[str] | None
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.SetPlacementGroupResponse(placement_group: 'Optional[PlacementGroup]')

Bases: object

placement_group: PlacementGroup | None
class scaleway.instance.v1.SetPlacementGroupServersRequest(placement_group_id: 'str', servers: 'List[str]', zone: 'Optional[ScwZone]')

Bases: object

placement_group_id: str

UUID of the placement group you want to set.

servers: List[str]

An array of the Instances’ UUIDs you want to configure.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.SetPlacementGroupServersResponse(servers: 'List[PlacementGroupServer]')

Bases: object

servers: List[PlacementGroupServer]

Instances attached to the placement group.

class scaleway.instance.v1.SetSecurityGroupRulesRequest(security_group_id: 'str', zone: 'Optional[ScwZone]', rules: 'Optional[List[SetSecurityGroupRulesRequestRule]]')

Bases: object

rules: List[SetSecurityGroupRulesRequestRule] | None

List of rules to update in the security group.

security_group_id: str

UUID of the security group to update the rules on.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.SetSecurityGroupRulesRequestRule(action: 'SecurityGroupRuleAction', protocol: 'SecurityGroupRuleProtocol', direction: 'SecurityGroupRuleDirection', ip_range: 'str', position: 'int', id: 'Optional[str]', dest_port_from: 'Optional[int]', dest_port_to: 'Optional[int]', editable: 'Optional[bool]', zone: 'Optional[ScwZone]')

Bases: object

action: SecurityGroupRuleAction

Action to apply when the rule matches a packet.

dest_port_from: int | None

Beginning of the range of ports this rule applies to (inclusive). This value will be set to null if protocol is ICMP or ANY.

dest_port_to: int | None

End of the range of ports this rule applies to (inclusive). This value will be set to null if protocol is ICMP or ANY, or if it is equal to dest_port_from.

direction: SecurityGroupRuleDirection

Direction the rule applies to.

editable: bool | None

Indicates if this rule is editable. Rules with the value false will be ignored.

id: str | None

UUID of the security rule to update. If no value is provided, a new rule will be created.

ip_range: str

Range of IP addresses these rules apply to.

position: int

Position of this rule in the security group rules list. If several rules are passed with the same position, the resulting order is undefined.

protocol: SecurityGroupRuleProtocol

Protocol family this rule applies to.

zone: str | None

Zone of the rule. This field is ignored.

class scaleway.instance.v1.SetSecurityGroupRulesResponse(rules: 'List[SecurityGroupRule]')

Bases: object

rules: List[SecurityGroupRule]
class scaleway.instance.v1.Snapshot(id: 'str', name: 'str', organization: 'str', project: 'str', tags: 'List[str]', volume_type: 'VolumeVolumeType', size: 'int', state: 'SnapshotState', zone: 'ScwZone', base_volume: 'Optional[SnapshotBaseVolume]', creation_date: 'Optional[datetime]', modification_date: 'Optional[datetime]', error_reason: 'Optional[str]')

Bases: object

base_volume: SnapshotBaseVolume | None

Volume on which the snapshot is based on.

creation_date: datetime | None

Snapshot creation date.

error_reason: str | None

Reason for the failed snapshot import.

id: str

Snapshot ID.

modification_date: datetime | None

Snapshot modification date.

name: str

Snapshot name.

organization: str

Snapshot Organization ID.

project: str

Snapshot Project ID.

size: int

Snapshot size.

state: SnapshotState

Snapshot state.

tags: List[str]

Snapshot tags.

volume_type: VolumeVolumeType

Snapshot volume type.

zone: str

Snapshot zone.

class scaleway.instance.v1.SnapshotBaseVolume(id: 'str', name: 'str')

Bases: object

id: str

Volume ID on which the snapshot is based.

name: str

Volume name on which the snapshot is based on.

class scaleway.instance.v1.SnapshotState(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

AVAILABLE = 'available'
ERROR = 'error'
EXPORTING = 'exporting'
IMPORTING = 'importing'
INVALID_DATA = 'invalid_data'
SNAPSHOTTING = 'snapshotting'
class scaleway.instance.v1.SnapshotVolumeType(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

B_SSD = 'b_ssd'
L_SSD = 'l_ssd'
UNIFIED = 'unified'
UNKNOWN_VOLUME_TYPE = 'unknown_volume_type'
class scaleway.instance.v1.Task(id: 'str', description: 'str', progress: 'int', status: 'TaskStatus', href_from: 'str', href_result: 'str', zone: 'ScwZone', started_at: 'Optional[datetime]', terminated_at: 'Optional[datetime]')

Bases: object

description: str

Description of the task.

href_from: str
href_result: str
id: str

Unique ID of the task.

progress: int

Progress of the task in percent.

started_at: datetime | None

Task start date.

status: TaskStatus

Task status.

terminated_at: datetime | None

Task end date.

zone: str

Zone in which the task is executed.

class scaleway.instance.v1.TaskStatus(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

FAILURE = 'failure'
PENDING = 'pending'
RETRY = 'retry'
STARTED = 'started'
SUCCESS = 'success'
class scaleway.instance.v1.UpdateImageRequest(image_id: 'str', zone: 'Optional[ScwZone]', name: 'Optional[str]', arch: 'Optional[Arch]', extra_volumes: 'Optional[Dict[str, VolumeImageUpdateTemplate]]', tags: 'Optional[List[str]]', public: 'Optional[bool]')

Bases: object

arch: Arch | None

Architecture of the image.

extra_volumes: Dict[str, VolumeImageUpdateTemplate] | None

Additional snapshots of the image, with extra_volumeKey being the position of the snapshot in the image.

image_id: str

UUID of the image.

name: str | None

Name of the image.

public: bool | None

True to set the image as public.

tags: List[str] | None

Tags of the image.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.UpdateImageResponse(image: 'Optional[Image]')

Bases: object

image: Image | None
class scaleway.instance.v1.UpdateIpRequest(ip: 'str', zone: 'Optional[ScwZone]', reverse: 'Optional[str]', type_: 'Optional[IpType]', tags: 'Optional[List[str]]', server: 'Optional[str]')

Bases: object

ip: str

IP ID or IP address.

reverse: str | None

Reverse domain name.

server: str | None
tags: List[str] | None

An array of keywords you want to tag this IP with.

type_: IpType | None

Should have no effect.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.UpdateIpResponse(ip: 'Optional[Ip]')

Bases: object

ip: Ip | None
class scaleway.instance.v1.UpdatePlacementGroupRequest(placement_group_id: 'str', zone: 'Optional[ScwZone]', name: 'Optional[str]', tags: 'Optional[List[str]]', policy_mode: 'Optional[PlacementGroupPolicyMode]', policy_type: 'Optional[PlacementGroupPolicyType]')

Bases: object

name: str | None

Name of the placement group.

placement_group_id: str

UUID of the placement group.

policy_mode: PlacementGroupPolicyMode | None

Operating mode of the placement group.

policy_type: PlacementGroupPolicyType | None

Policy type of the placement group.

tags: List[str] | None

Tags of the placement group.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.UpdatePlacementGroupResponse(placement_group: 'Optional[PlacementGroup]')

Bases: object

placement_group: PlacementGroup | None
class scaleway.instance.v1.UpdatePlacementGroupServersRequest(placement_group_id: 'str', servers: 'List[str]', zone: 'Optional[ScwZone]')

Bases: object

placement_group_id: str

UUID of the placement group you want to update.

servers: List[str]

An array of the Instances’ UUIDs you want to configure.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.UpdatePlacementGroupServersResponse(servers: 'List[PlacementGroupServer]')

Bases: object

servers: List[PlacementGroupServer]

Instances attached to the placement group.

class scaleway.instance.v1.UpdatePrivateNICRequest(server_id: 'str', private_nic_id: 'str', zone: 'Optional[ScwZone]', tags: 'Optional[List[str]]')

Bases: object

private_nic_id: str

Private NIC unique ID.

server_id: str

UUID of the Instance the private NIC will be attached to.

tags: List[str] | None

Tags used to select private NIC/s.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.UpdateSecurityGroupRequest(security_group_id: 'str', zone: 'Optional[ScwZone]', name: 'Optional[str]', description: 'Optional[str]', enable_default_security: 'Optional[bool]', inbound_default_policy: 'Optional[SecurityGroupPolicy]', tags: 'Optional[List[str]]', organization_default: 'Optional[bool]', project_default: 'Optional[bool]', outbound_default_policy: 'Optional[SecurityGroupPolicy]', stateful: 'Optional[bool]')

Bases: object

description: str | None

Description of the security group.

enable_default_security: bool | None

True to block SMTP on IPv4 and IPv6. This feature is read only, please open a support ticket if you need to make it configurable.

inbound_default_policy: SecurityGroupPolicy | None

Default inbound policy.

name: str | None

Name of the security group.

organization_default: bool | None

Please use project_default instead.

outbound_default_policy: SecurityGroupPolicy | None

Default outbound policy.

project_default: bool | None

True use this security group for future Instances created in this project.

security_group_id: str

UUID of the security group.

stateful: bool | None

True to set the security group as stateful.

tags: List[str] | None

Tags of the security group.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.UpdateSecurityGroupResponse(security_group: 'Optional[SecurityGroup]')

Bases: object

security_group: SecurityGroup | None
class scaleway.instance.v1.UpdateSecurityGroupRuleRequest(security_group_id: 'str', security_group_rule_id: 'str', zone: 'Optional[ScwZone]', protocol: 'Optional[SecurityGroupRuleProtocol]', direction: 'Optional[SecurityGroupRuleDirection]', action: 'Optional[SecurityGroupRuleAction]', ip_range: 'Optional[str]', dest_port_from: 'Optional[int]', dest_port_to: 'Optional[int]', position: 'Optional[int]')

Bases: object

action: SecurityGroupRuleAction | None

Action to apply when the rule matches a packet.

dest_port_from: int | None

Beginning of the range of ports this rule applies to (inclusive). If 0 is provided, unset the parameter.

dest_port_to: int | None

End of the range of ports this rule applies to (inclusive). If 0 is provided, unset the parameter.

direction: SecurityGroupRuleDirection | None

Direction the rule applies to.

ip_range: str | None

Range of IP addresses these rules apply to.

position: int | None

Position of this rule in the security group rules list.

protocol: SecurityGroupRuleProtocol | None

Protocol family this rule applies to.

security_group_id: str

UUID of the security group.

security_group_rule_id: str

UUID of the rule.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.UpdateSecurityGroupRuleResponse(rule: 'Optional[SecurityGroupRule]')

Bases: object

rule: SecurityGroupRule | None
class scaleway.instance.v1.UpdateServerRequest(server_id: 'str', zone: 'Optional[ScwZone]', name: 'Optional[str]', boot_type: 'Optional[BootType]', tags: 'Optional[List[str]]', volumes: 'Optional[Dict[str, VolumeServerTemplate]]', dynamic_ip_required: 'Optional[bool]', routed_ip_enabled: 'Optional[bool]', public_ips: 'Optional[List[str]]', enable_ipv6: 'Optional[bool]', protected: 'Optional[bool]', security_group: 'Optional[SecurityGroupTemplate]', placement_group: 'Optional[str]', private_nics: 'Optional[List[str]]', commercial_type: 'Optional[str]', admin_password_encryption_ssh_key_id: 'Optional[str]')

Bases: object

admin_password_encryption_ssh_key_id: str | None

The public_key value of this key is used to encrypt the admin password. When set to an empty string, reset this value and admin_password_encrypted_value to an empty string so a new password may be generated.

boot_type: BootType | None
commercial_type: str | None

Warning: This field has some restrictions:

  • Cannot be changed if the Instance is not in stopped state.

  • Cannot be changed if the Instance is in a placement group.

  • Cannot be changed from/to a Windows offer to/from a Linux offer.

  • Local storage requirements of the target commercial_types must be fulfilled (i.e. if an Instance has 80GB of local storage, it can be changed into a GP1-XS, which has a maximum of 150GB, but it cannot be changed into a DEV1-S, which has only 20GB).

dynamic_ip_required: bool | None
enable_ipv6: bool | None
name: str | None

Name of the Instance.

placement_group: str | None

Placement group ID if Instance must be part of a placement group.

private_nics: List[str] | None

Instance private NICs.

protected: bool | None

True to activate server protection option.

public_ips: List[str] | None

A list of reserved IP IDs to attach to the Instance.

routed_ip_enabled: bool | None

True to configure the instance so it uses the new routed IP mode (once this is set to True you cannot set it back to False).

security_group: SecurityGroupTemplate | None
server_id: str

UUID of the Instance.

tags: List[str] | None

Tags of the Instance.

volumes: Dict[str, VolumeServerTemplate] | None
zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.UpdateServerResponse(server: 'Optional[Server]')

Bases: object

server: Server | None
class scaleway.instance.v1.UpdateSnapshotRequest(snapshot_id: 'str', zone: 'Optional[ScwZone]', name: 'Optional[str]', tags: 'Optional[List[str]]')

Bases: object

name: str | None

Name of the snapshot.

snapshot_id: str

UUID of the snapshot.

tags: List[str] | None

Tags of the snapshot.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.UpdateSnapshotResponse(snapshot: 'Optional[Snapshot]')

Bases: object

snapshot: Snapshot | None
class scaleway.instance.v1.UpdateVolumeRequest(volume_id: 'str', zone: 'Optional[ScwZone]', name: 'Optional[str]', tags: 'Optional[List[str]]', size: 'Optional[int]')

Bases: object

name: str | None

Volume name.

size: int | None

Volume disk size, must be a multiple of 512.

tags: List[str] | None

Tags of the volume.

volume_id: str

UUID of the volume.

zone: str | None

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.UpdateVolumeResponse(volume: 'Optional[Volume]')

Bases: object

volume: Volume | None
class scaleway.instance.v1.Volume(id: 'str', name: 'str', size: 'int', volume_type: 'VolumeVolumeType', organization: 'str', project: 'str', export_uri: 'Optional[str]', creation_date: 'Optional[datetime]', modification_date: 'Optional[datetime]', tags: 'List[str]', state: 'VolumeState', zone: 'ScwZone', server: 'Optional[ServerSummary]')

Bases: object

creation_date: datetime | None

Volume creation date.

export_uri: str | None

Show the volume NBD export URI.

id: str

Volume unique ID.

modification_date: datetime | None

Volume modification date.

name: str

Volume name.

organization: str

Volume Organization ID.

project: str

Volume Project ID.

server: ServerSummary | None

Instance attached to the volume.

size: int

Volume disk size.

state: VolumeState

Volume state.

tags: List[str]

Volume tags.

volume_type: VolumeVolumeType

Volume type.

zone: str

Zone in which the volume is located.

class scaleway.instance.v1.VolumeImageUpdateTemplate(id: 'str')

Bases: object

id: str

UUID of the snapshot.

class scaleway.instance.v1.VolumeServer(id: 'str', name: 'Optional[str]', export_uri: 'Optional[str]', organization: 'Optional[str]', server: 'Optional[ServerSummary]', size: 'Optional[int]', volume_type: 'VolumeServerVolumeType', boot: 'bool', zone: 'ScwZone', creation_date: 'Optional[datetime]', modification_date: 'Optional[datetime]', state: 'Optional[VolumeServerState]', project: 'Optional[str]')

Bases: object

boot: bool
creation_date: datetime | None
export_uri: str | None
id: str
modification_date: datetime | None
name: str | None
organization: str | None
project: str | None
server: ServerSummary | None
size: int | None
state: VolumeServerState | None
volume_type: VolumeServerVolumeType
zone: str

Zone to target. If none is passed will use default zone from the config.

class scaleway.instance.v1.VolumeServerState(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

AVAILABLE = 'available'
ERROR = 'error'
FETCHING = 'fetching'
HOTSYNCING = 'hotsyncing'
RESIZING = 'resizing'
SAVING = 'saving'
SNAPSHOTTING = 'snapshotting'
class scaleway.instance.v1.VolumeServerTemplate(volume_type: 'VolumeVolumeType', id: 'Optional[str]', boot: 'Optional[bool]', name: 'Optional[str]', size: 'Optional[int]', base_snapshot: 'Optional[str]', organization: 'Optional[str]', project: 'Optional[str]')

Bases: object

base_snapshot: str | None

ID of the snapshot on which this volume will be based.

boot: bool | None

Force the Instance to boot on this volume.

id: str | None

UUID of the volume.

name: str | None

Name of the volume.

organization: str | None

Organization ID of the volume.

project: str | None

Project ID of the volume.

size: int | None

Disk size of the volume, must be a multiple of 512.

volume_type: VolumeVolumeType

Type of the volume.

class scaleway.instance.v1.VolumeServerVolumeType(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

B_SSD = 'b_ssd'
L_SSD = 'l_ssd'
SBS_VOLUME = 'sbs_volume'
SCRATCH = 'scratch'
class scaleway.instance.v1.VolumeState(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

AVAILABLE = 'available'
ERROR = 'error'
FETCHING = 'fetching'
HOTSYNCING = 'hotsyncing'
RESIZING = 'resizing'
SAVING = 'saving'
SNAPSHOTTING = 'snapshotting'
class scaleway.instance.v1.VolumeSummary(id: 'str', name: 'str', size: 'int', volume_type: 'VolumeVolumeType')

Bases: object

id: str
name: str
size: int
volume_type: VolumeVolumeType
class scaleway.instance.v1.VolumeTemplate(id: 'str', name: 'str', size: 'int', volume_type: 'VolumeVolumeType', project: 'Optional[str]', organization: 'Optional[str]')

Bases: object

id: str

UUID of the volume.

name: str

Name of the volume.

organization: str | None
project: str | None
size: int

Disk size of the volume, must be a multiple of 512.

volume_type: VolumeVolumeType

Type of the volume.

class scaleway.instance.v1.VolumeType(display_name: 'str', capabilities: 'Optional[VolumeTypeCapabilities]', constraints: 'Optional[VolumeTypeConstraints]')

Bases: object

capabilities: VolumeTypeCapabilities | None
constraints: VolumeTypeConstraints | None
display_name: str
class scaleway.instance.v1.VolumeTypeCapabilities(snapshot: 'bool')

Bases: object

snapshot: bool
class scaleway.instance.v1.VolumeTypeConstraints(min: 'int', max: 'int')

Bases: object

max: int
min: int
class scaleway.instance.v1.VolumeVolumeType(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

B_SSD = 'b_ssd'
L_SSD = 'l_ssd'
SBS_SNAPSHOT = 'sbs_snapshot'
SBS_VOLUME = 'sbs_volume'
SCRATCH = 'scratch'
UNIFIED = 'unified'