scaleway_async.autoscaling.v1alpha1 package
Submodules
scaleway_async.autoscaling.v1alpha1.api module
- class scaleway_async.autoscaling.v1alpha1.api.AutoscalingV1Alpha1API(client: Client, *, bypass_validation: bool = False)
Bases:
API- async create_instance_group(*, name: str, template_id: str, capacity: Capacity, loadbalancer: Loadbalancer, zone: str | None = None, project_id: str | None = None, tags: List[str] | None = None) InstanceGroup
Create Instance group. Create a new Instance group. You must specify a template_id, capacity and Load Balancer object. :param name: Name of Instance group. :param template_id: Template ID (ID of the Instance template to attach to the Instance group). :param capacity: Specification of the minimum and maximum replicas for the Instance group, and the cooldown interval between two scaling events. :param loadbalancer: Specification of the Load Balancer to link to the Instance group. :param zone: Zone to target. If none is passed will use default zone from the config. :param project_id: Project ID to filter for, only Instance groups from this Project will be returned. :param tags: List of tags for the Instance group. :return:
InstanceGroupUsage:
result = await api.create_instance_group( name="example", template_id="example", capacity=Capacity(), loadbalancer=Loadbalancer(), )
- async create_instance_policy(*, name: str, action: InstancePolicyAction, type_: InstancePolicyType, value: int, priority: int, instance_group_id: str, zone: str | None = None, metric: Metric | None = None) InstancePolicy
Create scaling policy. Create a new scaling policy. You must specify a policy_id, capacity and Load Balancer object. :param name: Name of the policy. :param action: Action to execute when the metric-based condition is met. :param type_: How to use the number defined in value when determining by how many Instances to scale up/down. :param value: Value representing the magnitude of the scaling action to take for the Instance group. Depending on the type parameter, this number could represent a total number of Instances in the group, a number of Instances to add, or a percentage to scale the group by. :param priority: Priority of this policy compared to all other scaling policies. This determines the processing order. The lower the number, the higher the priority. :param instance_group_id: Instance group ID related to this policy. :param zone: Zone to target. If none is passed will use default zone from the config. :param metric: Cockpit metric to use when determining whether to trigger a scale up/down action. One-Of (‘trigger’): at most one of ‘metric’ could be set. :return:
InstancePolicyUsage:
result = await api.create_instance_policy( name="example", action=InstancePolicyAction.unknown_action, type=InstancePolicyType.unknown_type, value=1, priority=1, instance_group_id="example", )
- async create_instance_template(*, zone: str | None = None, commercial_type: str, volumes: Dict[str, VolumeInstanceTemplate], image_id: str | None = None, tags: List[str] | None = None, security_group_id: str | None = None, name: str, placement_group_id: str | None = None, public_ips_v4_count: int | None = None, public_ips_v6_count: int | None = None, project_id: str | None = None, private_network_ids: List[str] | None = None, cloud_init: str | None = None) InstanceTemplate
Create Instance template. Create a new Instance template. This specifies the details of the Instance (commercial type, zone, image, volumes etc.) that will be in the Instance group. :param zone: Zone to target. If none is passed will use default zone from the config. :param commercial_type: Name of Instance commercial type. :param volumes: Template of Instance volume. :param image_id: Instance image ID. Can be an ID of a marketplace or personal image. This image must be compatible with volume and commercial_type template. :param tags: List of tags for the Instance template. :param security_group_id: Instance security group ID (optional). :param name: Name of Instance template. :param placement_group_id: Instance placement group ID. This is optional, but it is highly recommended to set a preference for Instance location within Availability Zone. :param public_ips_v4_count: Number of flexible IPv4 addresses to attach to the new Instance. :param public_ips_v6_count: Number of flexible IPv6 addresses to attach to the new Instance. :param project_id: ID of the Project containing the Instance template resource. :param private_network_ids: Private Network IDs to attach to the new Instance. :param cloud_init: Cloud-config file must be passed in Base64 format. Cloud-config files are special scripts designed to be run by the cloud-init process. These are generally used for initial configuration on the very first boot of a server. :return:
InstanceTemplateUsage:
result = await api.create_instance_template( commercial_type="example", volumes={}, name="example", )
- async delete_instance_group(*, instance_group_id: str, zone: str | None = None) None
Delete Instance group. Delete an existing Instance group, specified by its instance_group_id. Deleting an Instance group is permanent, and cannot be undone. :param instance_group_id: ID of the Instance group to delete. :param zone: Zone to target. If none is passed will use default zone from the config.
Usage:
result = await api.delete_instance_group( instance_group_id="example", )
- async delete_instance_policy(*, policy_id: str, zone: str | None = None) None
Delete scaling policy. Delete an existing scaling policy, specified by its policy_id. Deleting a scaling policy is permanent, and cannot be undone. :param policy_id: ID of the policy to delete. :param zone: Zone to target. If none is passed will use default zone from the config.
Usage:
result = await api.delete_instance_policy( policy_id="example", )
- async delete_instance_template(*, template_id: str, zone: str | None = None) None
Delete Instance template. Delete an existing Instance template. This action is permanent and cannot be undone. :param template_id: ID of the template to delete. :param zone: Zone to target. If none is passed will use default zone from the config.
Usage:
result = await api.delete_instance_template( template_id="example", )
- async get_instance_group(*, instance_group_id: str, zone: str | None = None) InstanceGroup
Get Instance group. Retrieve information about an existing Instance group, specified by its instance_group_id. Its full details, including errors, are returned in the response object. :param instance_group_id: ID of the requested Instance group. :param zone: Zone to target. If none is passed will use default zone from the config. :return:
InstanceGroupUsage:
result = await api.get_instance_group( instance_group_id="example", )
- async get_instance_policy(*, policy_id: str, zone: str | None = None) InstancePolicy
Get scaling policy. Retrieve information about an existing scaling policy, specified by its policy_id. Its full details are returned in the response object. :param policy_id: Policy ID. :param zone: Zone to target. If none is passed will use default zone from the config. :return:
InstancePolicyUsage:
result = await api.get_instance_policy( policy_id="example", )
- async get_instance_template(*, template_id: str, zone: str | None = None) InstanceTemplate
Get Instance template. Get an existing Instance template from its template_id. :param template_id: Template ID of the resource. :param zone: Zone to target. If none is passed will use default zone from the config. :return:
InstanceTemplateUsage:
result = await api.get_instance_template( template_id="example", )
- async list_instance_group_events(*, instance_group_id: str, zone: str | None = None, order_by: ListInstanceGroupEventsRequestOrderBy | None = None, page: int | None = None, page_size: int | None = None) ListInstanceGroupEventsResponse
List events. List all events for a given Instance group. By default, the events are ordered by creation date in descending order, though this can be modified via the order_by field. :param instance_group_id: List all event logs for the Instance group ID. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Sort order of Instance groups in the response. :param page: Page number to return, from the paginated results. :param page_size: Number of Instance groups to return per page. :return:
ListInstanceGroupEventsResponseUsage:
result = await api.list_instance_group_events( instance_group_id="example", )
- async list_instance_group_events_all(*, instance_group_id: str, zone: str | None = None, order_by: ListInstanceGroupEventsRequestOrderBy | None = None, page: int | None = None, page_size: int | None = None) List[InstanceGroupEvent]
List events. List all events for a given Instance group. By default, the events are ordered by creation date in descending order, though this can be modified via the order_by field. :param instance_group_id: List all event logs for the Instance group ID. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Sort order of Instance groups in the response. :param page: Page number to return, from the paginated results. :param page_size: Number of Instance groups to return per page. :return:
List[InstanceGroupEvent]Usage:
result = await api.list_instance_group_events_all( instance_group_id="example", )
- async list_instance_groups(*, zone: str | None = None, order_by: ListInstanceGroupsRequestOrderBy | None = None, page: int | None = None, page_size: int | None = None) ListInstanceGroupsResponse
List Instance groups. List all Instance groups, for a Scaleway Organization or Scaleway Project. By default, the Instance groups returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Sort order of Instance groups in the response. :param page: Page number to return, from the paginated results. :param page_size: Number of Instance groups to return per page. :return:
ListInstanceGroupsResponseUsage:
result = await api.list_instance_groups()
- async list_instance_groups_all(*, zone: str | None = None, order_by: ListInstanceGroupsRequestOrderBy | None = None, page: int | None = None, page_size: int | None = None) List[InstanceGroup]
List Instance groups. List all Instance groups, for a Scaleway Organization or Scaleway Project. By default, the Instance groups returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Sort order of Instance groups in the response. :param page: Page number to return, from the paginated results. :param page_size: Number of Instance groups to return per page. :return:
List[InstanceGroup]Usage:
result = await api.list_instance_groups_all()
- async list_instance_policies(*, instance_group_id: str, zone: str | None = None, order_by: ListInstancePoliciesRequestOrderBy | None = None, page: int | None = None, page_size: int | None = None) ListInstancePoliciesResponse
List scaling policies. List all scaling policies, for a Scaleway Organization or Scaleway Project. By default, the policies returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. :param instance_group_id: Instance group ID. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Sort order of Instance groups in the response. :param page: Page number to return, from the paginated results. :param page_size: Number of scaling policies to return per page. :return:
ListInstancePoliciesResponseUsage:
result = await api.list_instance_policies( instance_group_id="example", )
- async list_instance_policies_all(*, instance_group_id: str, zone: str | None = None, order_by: ListInstancePoliciesRequestOrderBy | None = None, page: int | None = None, page_size: int | None = None) List[InstancePolicy]
List scaling policies. List all scaling policies, for a Scaleway Organization or Scaleway Project. By default, the policies returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. :param instance_group_id: Instance group ID. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Sort order of Instance groups in the response. :param page: Page number to return, from the paginated results. :param page_size: Number of scaling policies to return per page. :return:
List[InstancePolicy]Usage:
result = await api.list_instance_policies_all( instance_group_id="example", )
- async list_instance_templates(*, zone: str | None = None, order_by: ListInstanceTemplatesRequestOrderBy | None = None, page: int | None = None, page_size: int | None = None) ListInstanceTemplatesResponse
List Instance templates. List all Instance templates, for a Scaleway Organization or Scaleway Project. By default, the Instance templates returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Sort order of Instance groups in the response. :param page: Page number to return, from the paginated results. :param page_size: Number of Instance groups to return per page. :return:
ListInstanceTemplatesResponseUsage:
result = await api.list_instance_templates()
- async list_instance_templates_all(*, zone: str | None = None, order_by: ListInstanceTemplatesRequestOrderBy | None = None, page: int | None = None, page_size: int | None = None) List[InstanceTemplate]
List Instance templates. List all Instance templates, for a Scaleway Organization or Scaleway Project. By default, the Instance templates returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Sort order of Instance groups in the response. :param page: Page number to return, from the paginated results. :param page_size: Number of Instance groups to return per page. :return:
List[InstanceTemplate]Usage:
result = await api.list_instance_templates_all()
- async update_instance_group(*, instance_group_id: str, zone: str | None = None, name: str | None = None, tags: List[str] | None = None, capacity: UpdateInstanceGroupRequestCapacity | None = None, loadbalancer: UpdateInstanceGroupRequestLoadbalancer | None = None) InstanceGroup
Update Instance group. Update the parameters of an existing Instance group, specified by its instance_group_id. :param instance_group_id: Instance group ID to update. :param zone: Zone to target. If none is passed will use default zone from the config. :param name: Name of Instance group. :param tags: List of tags for the Load Balancer. :param capacity: Specification of the minimum and maximum replicas for the Instance group, and the cooldown interval between two scaling events. :param loadbalancer: Specification of the Load Balancer to link to the Instance group. :return:
InstanceGroupUsage:
result = await api.update_instance_group( instance_group_id="example", )
- async update_instance_policy(*, policy_id: str, zone: str | None = None, name: str | None = None, metric: UpdateInstancePolicyRequestMetric | None = None, action: InstancePolicyAction | None = None, type_: InstancePolicyType | None = None, value: int | None = None, priority: int | None = None) InstancePolicy
Update scaling policy. Update the parameters of an existing scaling policy, specified by its policy_id. :param policy_id: Policy ID to update. :param zone: Zone to target. If none is passed will use default zone from the config. :param name: Policy name to update. :param metric: Metric specification to update (Cockpit metric to use when determining whether to trigger a scale up/down action). One-Of (‘trigger’): at most one of ‘metric’ could be set. :param action: Action to update (action to execute when the metric-based condition is met). :param type_: Type to update (how to use the number defined in value when determining by how many Instances to scale up/down). :param value: Value to update (number representing the magnitude of the scaling action to take for the Instance group). :param priority: Priority to update (priority of this policy compared to all other scaling policies. The lower the number, the higher the priority). :return:
InstancePolicyUsage:
result = await api.update_instance_policy( policy_id="example", )
- async update_instance_template(*, template_id: str, zone: str | None = None, commercial_type: str | None = None, image_id: str | None = None, volumes: Dict[str, VolumeInstanceTemplate] | None = None, tags: List[str] | None = None, security_group_id: str | None = None, placement_group_id: str | None = None, public_ips_v4_count: int | None = None, public_ips_v6_count: int | None = None, name: str | None = None, private_network_ids: List[str] | None = None, cloud_init: str | None = None) InstanceTemplate
Update Instance template. Update an Instance template, such as its commercial offer type, image or volume template. :param template_id: Template ID of the resource. :param zone: Zone to target. If none is passed will use default zone from the config. :param commercial_type: Name of Instance commercial type. :param image_id: Instance image ID. Can be an ID of a marketplace or personal image. This image must be compatible with volume and commercial_type template. :param volumes: Template of Instance volume. :param tags: List of tags for the Instance template. :param security_group_id: Instance security group ID (optional). :param placement_group_id: Instance placement group ID. This is optional, but it is highly recommended to set a preference for Instance location within Availability Zone. :param public_ips_v4_count: Number of flexible IPv4 addresses to attach to the new Instance. :param public_ips_v6_count: Number of flexible IPv6 addresses to attach to the new Instance. :param name: Name of Instance template. :param private_network_ids: Private Network IDs to attach to the new Instance. :param cloud_init: Cloud-config file must be passed in Base64 format. Cloud-config files are special scripts designed to be run by the cloud-init process. These are generally used for initial configuration on the very first boot of a server. :return:
InstanceTemplateUsage:
result = await api.update_instance_template( template_id="example", )
scaleway_async.autoscaling.v1alpha1.marshalling module
- scaleway_async.autoscaling.v1alpha1.marshalling.marshal_Capacity(request: Capacity, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.autoscaling.v1alpha1.marshalling.marshal_CreateInstanceGroupRequest(request: CreateInstanceGroupRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.autoscaling.v1alpha1.marshalling.marshal_CreateInstancePolicyRequest(request: CreateInstancePolicyRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.autoscaling.v1alpha1.marshalling.marshal_CreateInstanceTemplateRequest(request: CreateInstanceTemplateRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.autoscaling.v1alpha1.marshalling.marshal_Loadbalancer(request: Loadbalancer, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.autoscaling.v1alpha1.marshalling.marshal_Metric(request: Metric, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.autoscaling.v1alpha1.marshalling.marshal_UpdateInstanceGroupRequest(request: UpdateInstanceGroupRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.autoscaling.v1alpha1.marshalling.marshal_UpdateInstanceGroupRequestCapacity(request: UpdateInstanceGroupRequestCapacity, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.autoscaling.v1alpha1.marshalling.marshal_UpdateInstanceGroupRequestLoadbalancer(request: UpdateInstanceGroupRequestLoadbalancer, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.autoscaling.v1alpha1.marshalling.marshal_UpdateInstancePolicyRequest(request: UpdateInstancePolicyRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.autoscaling.v1alpha1.marshalling.marshal_UpdateInstancePolicyRequestMetric(request: UpdateInstancePolicyRequestMetric, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.autoscaling.v1alpha1.marshalling.marshal_UpdateInstanceTemplateRequest(request: UpdateInstanceTemplateRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.autoscaling.v1alpha1.marshalling.marshal_VolumeInstanceTemplate(request: VolumeInstanceTemplate, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.autoscaling.v1alpha1.marshalling.marshal_VolumeInstanceTemplateFromEmpty(request: VolumeInstanceTemplateFromEmpty, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.autoscaling.v1alpha1.marshalling.marshal_VolumeInstanceTemplateFromSnapshot(request: VolumeInstanceTemplateFromSnapshot, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.autoscaling.v1alpha1.marshalling.unmarshal_InstanceGroup(data: Any) InstanceGroup
- scaleway_async.autoscaling.v1alpha1.marshalling.unmarshal_InstanceGroupEvent(data: Any) InstanceGroupEvent
- scaleway_async.autoscaling.v1alpha1.marshalling.unmarshal_InstancePolicy(data: Any) InstancePolicy
- scaleway_async.autoscaling.v1alpha1.marshalling.unmarshal_InstanceTemplate(data: Any) InstanceTemplate
- scaleway_async.autoscaling.v1alpha1.marshalling.unmarshal_ListInstanceGroupEventsResponse(data: Any) ListInstanceGroupEventsResponse
- scaleway_async.autoscaling.v1alpha1.marshalling.unmarshal_ListInstanceGroupsResponse(data: Any) ListInstanceGroupsResponse
- scaleway_async.autoscaling.v1alpha1.marshalling.unmarshal_ListInstancePoliciesResponse(data: Any) ListInstancePoliciesResponse
- scaleway_async.autoscaling.v1alpha1.marshalling.unmarshal_ListInstanceTemplatesResponse(data: Any) ListInstanceTemplatesResponse
- scaleway_async.autoscaling.v1alpha1.marshalling.unmarshal_Loadbalancer(data: Any) Loadbalancer
- scaleway_async.autoscaling.v1alpha1.marshalling.unmarshal_VolumeInstanceTemplate(data: Any) VolumeInstanceTemplate
- scaleway_async.autoscaling.v1alpha1.marshalling.unmarshal_VolumeInstanceTemplateFromEmpty(data: Any) VolumeInstanceTemplateFromEmpty
- scaleway_async.autoscaling.v1alpha1.marshalling.unmarshal_VolumeInstanceTemplateFromSnapshot(data: Any) VolumeInstanceTemplateFromSnapshot
scaleway_async.autoscaling.v1alpha1.types module
- class scaleway_async.autoscaling.v1alpha1.types.Capacity(max_replicas: 'int', min_replicas: 'int', cooldown_delay: 'Optional[str]' = None)
Bases:
object- cooldown_delay: str | None = None
Time (in seconds) after a scaling action during which requests to carry out a new scaling action will be denied.
- max_replicas: int
Maximum count of Instances for the Instance group.
- min_replicas: int
Minimum count of Instances for the Instance group.
- class scaleway_async.autoscaling.v1alpha1.types.CreateInstanceGroupRequest(name: 'str', template_id: 'str', capacity: 'Capacity', loadbalancer: 'Loadbalancer', zone: 'Optional[ScwZone]' = None, project_id: 'Optional[str]' = None, tags: 'Optional[List[str]]' = <factory>)
Bases:
object- capacity: Capacity
Specification of the minimum and maximum replicas for the Instance group, and the cooldown interval between two scaling events.
- loadbalancer: Loadbalancer
Specification of the Load Balancer to link to the Instance group.
- name: str
Name of Instance group.
- project_id: str | None = None
Project ID to filter for, only Instance groups from this Project will be returned.
- tags: List[str] | None
List of tags for the Instance group.
- template_id: str
Template ID (ID of the Instance template to attach to the Instance group).
- zone: str | None = None
Zone to target. If none is passed will use default zone from the config.
- class scaleway_async.autoscaling.v1alpha1.types.CreateInstancePolicyRequest(name: 'str', action: 'InstancePolicyAction', type_: 'InstancePolicyType', value: 'int', priority: 'int', instance_group_id: 'str', zone: 'Optional[ScwZone]' = None, metric: 'Optional[Metric]' = None)
Bases:
object- action: InstancePolicyAction
Action to execute when the metric-based condition is met.
- instance_group_id: str
Instance group ID related to this policy.
- name: str
Name of the policy.
- priority: int
Priority of this policy compared to all other scaling policies. This determines the processing order. The lower the number, the higher the priority.
- type_: InstancePolicyType
How to use the number defined in value when determining by how many Instances to scale up/down.
- value: int
Value representing the magnitude of the scaling action to take for the Instance group. Depending on the type parameter, this number could represent a total number of Instances in the group, a number of Instances to add, or a percentage to scale the group by.
- zone: str | None = None
Zone to target. If none is passed will use default zone from the config.
- class scaleway_async.autoscaling.v1alpha1.types.CreateInstanceTemplateRequest(commercial_type: 'str', volumes: 'Dict[str, VolumeInstanceTemplate]', name: 'str', zone: 'Optional[ScwZone]' = None, image_id: 'Optional[str]' = None, tags: 'Optional[List[str]]' = <factory>, security_group_id: 'Optional[str]' = None, placement_group_id: 'Optional[str]' = None, public_ips_v4_count: 'Optional[int]' = 0, public_ips_v6_count: 'Optional[int]' = 0, project_id: 'Optional[str]' = None, private_network_ids: 'Optional[List[str]]' = <factory>, cloud_init: 'Optional[str]' = None)
Bases:
object- cloud_init: str | None = None
Cloud-config file must be passed in Base64 format. Cloud-config files are special scripts designed to be run by the cloud-init process. These are generally used for initial configuration on the very first boot of a server.
- commercial_type: str
Name of Instance commercial type.
- image_id: str | None = None
Instance image ID. Can be an ID of a marketplace or personal image. This image must be compatible with volume and commercial_type template.
- name: str
Name of Instance template.
- placement_group_id: str | None = None
Instance placement group ID. This is optional, but it is highly recommended to set a preference for Instance location within Availability Zone.
- private_network_ids: List[str] | None
Private Network IDs to attach to the new Instance.
- project_id: str | None = None
ID of the Project containing the Instance template resource.
- public_ips_v4_count: int | None = 0
Number of flexible IPv4 addresses to attach to the new Instance.
- public_ips_v6_count: int | None = 0
Number of flexible IPv6 addresses to attach to the new Instance.
- security_group_id: str | None = None
Instance security group ID (optional).
- tags: List[str] | None
List of tags for the Instance template.
- volumes: Dict[str, VolumeInstanceTemplate]
Template of Instance volume.
- zone: str | None = None
Zone to target. If none is passed will use default zone from the config.
- class scaleway_async.autoscaling.v1alpha1.types.DeleteInstanceGroupRequest(instance_group_id: 'str', zone: 'Optional[ScwZone]' = None)
Bases:
object- instance_group_id: str
ID of the Instance group to delete.
- zone: str | None = None
Zone to target. If none is passed will use default zone from the config.
- class scaleway_async.autoscaling.v1alpha1.types.DeleteInstancePolicyRequest(policy_id: 'str', zone: 'Optional[ScwZone]' = None)
Bases:
object- policy_id: str
ID of the policy to delete.
- zone: str | None = None
Zone to target. If none is passed will use default zone from the config.
- class scaleway_async.autoscaling.v1alpha1.types.DeleteInstanceTemplateRequest(template_id: 'str', zone: 'Optional[ScwZone]' = None)
Bases:
object- template_id: str
ID of the template to delete.
- zone: str | None = None
Zone to target. If none is passed will use default zone from the config.
- class scaleway_async.autoscaling.v1alpha1.types.GetInstanceGroupRequest(instance_group_id: 'str', zone: 'Optional[ScwZone]' = None)
Bases:
object- instance_group_id: str
ID of the requested Instance group.
- zone: str | None = None
Zone to target. If none is passed will use default zone from the config.
- class scaleway_async.autoscaling.v1alpha1.types.GetInstancePolicyRequest(policy_id: 'str', zone: 'Optional[ScwZone]' = None)
Bases:
object- policy_id: str
Policy ID.
- zone: str | None = None
Zone to target. If none is passed will use default zone from the config.
- class scaleway_async.autoscaling.v1alpha1.types.GetInstanceTemplateRequest(template_id: 'str', zone: 'Optional[ScwZone]' = None)
Bases:
object- template_id: str
Template ID of the resource.
- zone: str | None = None
Zone to target. If none is passed will use default zone from the config.
- class scaleway_async.autoscaling.v1alpha1.types.InstanceGroup(id: 'str', project_id: 'str', name: 'str', tags: 'List[str]', instance_template_id: 'str', capacity: 'Capacity', loadbalancer: 'Loadbalancer', error_messages: 'List[str]', created_at: 'Optional[datetime]' = None, updated_at: 'Optional[datetime]' = None)
Bases:
object- capacity: Capacity
Specification of the minimum and maximum replicas for the Instance group, and the cooldown interval between two scaling events.
- created_at: datetime | None = None
Date on which the Instance group was created.
- error_messages: List[str]
Any configuration errors for dependencies (Load Balancer, Private Network, Instance template etc.).
- id: str
Instance group ID.
- instance_template_id: str
Template ID (ID of the Instance template to attach to the Instance group).
- loadbalancer: Loadbalancer
Specification of the Load Balancer linked to the Instance group.
- name: str
Name of the Instance group.
- project_id: str
Project ID of the Instance group.
- tags: List[str]
Instance group tags.
- updated_at: datetime | None = None
Date on which the Instance group was last updated.
- class scaleway_async.autoscaling.v1alpha1.types.InstanceGroupEvent(id: 'str', source: 'InstanceGroupEventSource', level: 'InstanceGroupEventLevel', name: 'str', created_at: 'Optional[datetime]' = None, details: 'Optional[str]' = None)
Bases:
object- created_at: datetime | None = None
Date and time of the log.
- details: str | None = None
Full text of the log.
- id: str
Instance group event ID.
- level: InstanceGroupEventLevel
The severity of the log.
- name: str
Log title.
- source: InstanceGroupEventSource
Log source.
- class scaleway_async.autoscaling.v1alpha1.types.InstanceGroupEventLevel(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- ERROR = 'error'
- INFO = 'info'
- SUCCESS = 'success'
- class scaleway_async.autoscaling.v1alpha1.types.InstanceGroupEventSource(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- INSTANCE_MANAGER = 'instance_manager'
- SCALER = 'scaler'
- SUPERVISOR = 'supervisor'
- UNKNOWN_SOURCE = 'unknown_source'
- WATCHER = 'watcher'
- class scaleway_async.autoscaling.v1alpha1.types.InstancePolicy(id: 'str', name: 'str', action: 'InstancePolicyAction', type_: 'InstancePolicyType', value: 'int', priority: 'int', instance_group_id: 'str', metric: 'Optional[Metric]' = None)
Bases:
object- action: InstancePolicyAction
Action to execute when the metric-based condition is met.
- id: str
Scaling policy ID.
- instance_group_id: str
Instance group ID related to this policy.
- name: str
Name of scaling policy.
- priority: int
Priority of this policy compared to all other scaling policies. The lower the number, the higher the priority (higher priority will be processed sooner in the order).
- type_: InstancePolicyType
How to use the number defined in value when determining by how many Instances to scale up/down.
- value: int
Number representing the magnitude of the scaling action to take for the Instance group.
- class scaleway_async.autoscaling.v1alpha1.types.InstancePolicyAction(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- SCALE_DOWN = 'scale_down'
- SCALE_UP = 'scale_up'
- UNKNOWN_ACTION = 'unknown_action'
- class scaleway_async.autoscaling.v1alpha1.types.InstancePolicyType(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- FLAT_COUNT = 'flat_count'
- PERCENT_OF_TOTAL_GROUP = 'percent_of_total_group'
- SET_TOTAL_GROUP = 'set_total_group'
- UNKNOWN_TYPE = 'unknown_type'
- class scaleway_async.autoscaling.v1alpha1.types.InstanceTemplate(id: 'str', commercial_type: 'str', volumes: 'Dict[str, VolumeInstanceTemplate]', tags: 'List[str]', project_id: 'str', name: 'str', private_network_ids: 'List[str]', status: 'InstanceTemplateStatus', image_id: 'Optional[str]' = None, security_group_id: 'Optional[str]' = None, placement_group_id: 'Optional[str]' = None, public_ips_v4_count: 'Optional[int]' = 0, public_ips_v6_count: 'Optional[int]' = 0, cloud_init: 'Optional[str]' = None, created_at: 'Optional[datetime]' = None, updated_at: 'Optional[datetime]' = None)
Bases:
object- cloud_init: str | None = None
Cloud-config file must be passed in Base64 format. Cloud-config files are special scripts designed to be run by the cloud-init process. These are generally used for initial configuration on the very first boot of a server.
- commercial_type: str
Name of Instance commercial type.
- created_at: datetime | None = None
Date on which the Instance template was created.
- id: str
ID of Instance template resource.
- image_id: str | None = None
Instance image ID. Can be an ID of a marketplace or personal image. This image must be compatible with volume and commercial_type template.
- name: str
Name of Instance template.
- placement_group_id: str | None = None
Instance placement group ID. This is optional, but it is highly recommended to set a preference for Instance location within Availability Zone.
- private_network_ids: List[str]
Private Network IDs to attach to the new Instance.
- project_id: str
ID of the Project containing the Instance template resource.
- public_ips_v4_count: int | None = 0
Number of flexible IPv4 addresses to attach to the new Instance.
- public_ips_v6_count: int | None = 0
Number of flexible IPv6 addresses to attach to the new Instance.
- security_group_id: str | None = None
Instance security group ID (optional).
- status: InstanceTemplateStatus
Status of Instance template.
- tags: List[str]
List of tags for the Instance template.
- updated_at: datetime | None = None
Date on which the Instance template was last updated.
- volumes: Dict[str, VolumeInstanceTemplate]
Template of Instance volume.
- class scaleway_async.autoscaling.v1alpha1.types.InstanceTemplateStatus(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- ERROR = 'error'
- READY = 'ready'
- UNKNOWN_STATUS = 'unknown_status'
- class scaleway_async.autoscaling.v1alpha1.types.ListInstanceGroupEventsRequest(instance_group_id: 'str', zone: 'Optional[ScwZone]' = None, order_by: 'Optional[ListInstanceGroupEventsRequestOrderBy]' = <ListInstanceGroupEventsRequestOrderBy.CREATED_AT_DESC: 'created_at_desc'>, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0)
Bases:
object- instance_group_id: str
List all event logs for the Instance group ID.
- order_by: ListInstanceGroupEventsRequestOrderBy | None = 'created_at_desc'
Sort order of Instance groups in the response.
- page: int | None = 0
Page number to return, from the paginated results.
- page_size: int | None = 0
Number of Instance groups to return per page.
- zone: str | None = None
Zone to target. If none is passed will use default zone from the config.
- class scaleway_async.autoscaling.v1alpha1.types.ListInstanceGroupEventsRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- class scaleway_async.autoscaling.v1alpha1.types.ListInstanceGroupEventsResponse(instance_events: 'List[InstanceGroupEvent]', total_count: 'int')
Bases:
object- instance_events: List[InstanceGroupEvent]
Paginated list of Instance groups.
- total_count: int
Count of all Instance groups matching the requested criteria.
- class scaleway_async.autoscaling.v1alpha1.types.ListInstanceGroupsRequest(zone: 'Optional[ScwZone]' = None, order_by: 'Optional[ListInstanceGroupsRequestOrderBy]' = <ListInstanceGroupsRequestOrderBy.CREATED_AT_DESC: 'created_at_desc'>, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0)
Bases:
object- order_by: ListInstanceGroupsRequestOrderBy | None = 'created_at_desc'
Sort order of Instance groups in the response.
- page: int | None = 0
Page number to return, from the paginated results.
- page_size: int | None = 0
Number of Instance groups to return per page.
- zone: str | None = None
Zone to target. If none is passed will use default zone from the config.
- class scaleway_async.autoscaling.v1alpha1.types.ListInstanceGroupsRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- class scaleway_async.autoscaling.v1alpha1.types.ListInstanceGroupsResponse(instance_groups: 'List[InstanceGroup]', total_count: 'int')
Bases:
object- instance_groups: List[InstanceGroup]
Paginated list of Instance groups.
- total_count: int
Count of all Instance groups matching the requested criteria.
- class scaleway_async.autoscaling.v1alpha1.types.ListInstancePoliciesRequest(instance_group_id: 'str', zone: 'Optional[ScwZone]' = None, order_by: 'Optional[ListInstancePoliciesRequestOrderBy]' = <ListInstancePoliciesRequestOrderBy.CREATED_AT_DESC: 'created_at_desc'>, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0)
Bases:
object- instance_group_id: str
Instance group ID.
- order_by: ListInstancePoliciesRequestOrderBy | None = 'created_at_desc'
Sort order of Instance groups in the response.
- page: int | None = 0
Page number to return, from the paginated results.
- page_size: int | None = 0
Number of scaling policies to return per page.
- zone: str | None = None
Zone to target. If none is passed will use default zone from the config.
- class scaleway_async.autoscaling.v1alpha1.types.ListInstancePoliciesRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- class scaleway_async.autoscaling.v1alpha1.types.ListInstancePoliciesResponse(policies: 'List[InstancePolicy]', total_count: 'int')
Bases:
object- policies: List[InstancePolicy]
Paginated list of policies.
- total_count: int
Count of all policies matching the requested criteria.
- class scaleway_async.autoscaling.v1alpha1.types.ListInstanceTemplatesRequest(zone: 'Optional[ScwZone]' = None, order_by: 'Optional[ListInstanceTemplatesRequestOrderBy]' = <ListInstanceTemplatesRequestOrderBy.CREATED_AT_DESC: 'created_at_desc'>, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0)
Bases:
object- order_by: ListInstanceTemplatesRequestOrderBy | None = 'created_at_desc'
Sort order of Instance groups in the response.
- page: int | None = 0
Page number to return, from the paginated results.
- page_size: int | None = 0
Number of Instance groups to return per page.
- zone: str | None = None
Zone to target. If none is passed will use default zone from the config.
- class scaleway_async.autoscaling.v1alpha1.types.ListInstanceTemplatesRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- class scaleway_async.autoscaling.v1alpha1.types.ListInstanceTemplatesResponse(total_count: 'int', instance_templates: 'List[InstanceTemplate]')
Bases:
object- instance_templates: List[InstanceTemplate]
Paginated list of Instance templates.
- total_count: int
Count of all templates matching the requested criteria.
- class scaleway_async.autoscaling.v1alpha1.types.Loadbalancer(id: 'str', backend_ids: 'List[str]', private_network_id: 'str')
Bases:
object- backend_ids: List[str]
Load Balancer backend IDs.
- id: str
Load Balancer ID.
- private_network_id: str
ID of the Private Network attached to the Load Balancer.
- class scaleway_async.autoscaling.v1alpha1.types.Metric(name: 'str', operator: 'MetricOperator', aggregate: 'MetricAggregate', sampling_range_min: 'int', threshold: 'float', managed_metric: 'Optional[MetricManagedMetric]' = <MetricManagedMetric.MANAGED_METRIC_UNKNOWN: 'managed_metric_unknown'>, cockpit_metric_name: 'Optional[str]' = None)
Bases:
object- aggregate: MetricAggregate
How the values sampled for the metric should be aggregated.
- cockpit_metric_name: str | None = None
- managed_metric: MetricManagedMetric | None = 'managed_metric_unknown'
- name: str
Name or description of the metric policy.
- operator: MetricOperator
Operator used when comparing the threshold value of the chosen metric to the actual sampled and aggregated value.
- sampling_range_min: int
Interval of time, in minutes, during which metric is sampled.
- threshold: float
Threshold value to measure the aggregated sampled metric value against. Combined with the operator field, determines whether a scaling action should be triggered.
- class scaleway_async.autoscaling.v1alpha1.types.MetricAggregate(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- AGGREGATE_AVERAGE = 'aggregate_average'
- AGGREGATE_MAX = 'aggregate_max'
- AGGREGATE_MIN = 'aggregate_min'
- AGGREGATE_SUM = 'aggregate_sum'
- AGGREGATE_UNKNOWN = 'aggregate_unknown'
- class scaleway_async.autoscaling.v1alpha1.types.MetricManagedMetric(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- MANAGED_LOADBALANCER_BACKEND_CONNECTIONS_RATE = 'managed_loadbalancer_backend_connections_rate'
- MANAGED_LOADBALANCER_BACKEND_THROUGHPUT = 'managed_loadbalancer_backend_throughput'
- MANAGED_METRIC_INSTANCE_CPU = 'managed_metric_instance_cpu'
- MANAGED_METRIC_INSTANCE_NETWORK_IN = 'managed_metric_instance_network_in'
- MANAGED_METRIC_INSTANCE_NETWORK_OUT = 'managed_metric_instance_network_out'
- MANAGED_METRIC_UNKNOWN = 'managed_metric_unknown'
- class scaleway_async.autoscaling.v1alpha1.types.MetricOperator(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- OPERATOR_GREATER_THAN = 'operator_greater_than'
- OPERATOR_LESS_THAN = 'operator_less_than'
- OPERATOR_UNKNOWN = 'operator_unknown'
- class scaleway_async.autoscaling.v1alpha1.types.UpdateInstanceGroupRequest(instance_group_id: 'str', zone: 'Optional[ScwZone]' = None, name: 'Optional[str]' = None, tags: 'Optional[List[str]]' = <factory>, capacity: 'Optional[UpdateInstanceGroupRequestCapacity]' = None, loadbalancer: 'Optional[UpdateInstanceGroupRequestLoadbalancer]' = None)
Bases:
object- capacity: UpdateInstanceGroupRequestCapacity | None = None
Specification of the minimum and maximum replicas for the Instance group, and the cooldown interval between two scaling events.
- instance_group_id: str
Instance group ID to update.
- loadbalancer: UpdateInstanceGroupRequestLoadbalancer | None = None
Specification of the Load Balancer to link to the Instance group.
- name: str | None = None
Name of Instance group.
- tags: List[str] | None
List of tags for the Load Balancer.
- zone: str | None = None
Zone to target. If none is passed will use default zone from the config.
- class scaleway_async.autoscaling.v1alpha1.types.UpdateInstanceGroupRequestCapacity(max_replicas: 'Optional[int]' = 0, min_replicas: 'Optional[int]' = 0, cooldown_delay: 'Optional[str]' = None)
Bases:
object- cooldown_delay: str | None = None
Time (in seconds) after a scaling action during which requests to carry out a new scaling action will be denied.
- max_replicas: int | None = 0
Maximum count of Instances for the Instance group.
- min_replicas: int | None = 0
Minimum count of Instances for the Instance group.
- class scaleway_async.autoscaling.v1alpha1.types.UpdateInstanceGroupRequestLoadbalancer(backend_ids: 'Optional[List[str]]' = <factory>)
Bases:
object- backend_ids: List[str] | None
Load Balancer backend IDs.
- class scaleway_async.autoscaling.v1alpha1.types.UpdateInstancePolicyRequest(policy_id: 'str', zone: 'Optional[ScwZone]' = None, name: 'Optional[str]' = None, action: 'Optional[InstancePolicyAction]' = <InstancePolicyAction.UNKNOWN_ACTION: 'unknown_action'>, type_: 'Optional[InstancePolicyType]' = <InstancePolicyType.UNKNOWN_TYPE: 'unknown_type'>, value: 'Optional[int]' = 0, priority: 'Optional[int]' = 0, metric: 'Optional[UpdateInstancePolicyRequestMetric]' = None)
Bases:
object- action: InstancePolicyAction | None = 'unknown_action'
Action to update (action to execute when the metric-based condition is met).
- metric: UpdateInstancePolicyRequestMetric | None = None
- name: str | None = None
Policy name to update.
- policy_id: str
Policy ID to update.
- priority: int | None = 0
Priority to update (priority of this policy compared to all other scaling policies. The lower the number, the higher the priority).
- type_: InstancePolicyType | None = 'unknown_type'
Type to update (how to use the number defined in value when determining by how many Instances to scale up/down).
- value: int | None = 0
Value to update (number representing the magnitude of the scaling action to take for the Instance group).
- zone: str | None = None
Zone to target. If none is passed will use default zone from the config.
- class scaleway_async.autoscaling.v1alpha1.types.UpdateInstancePolicyRequestMetric(operator: 'UpdateInstancePolicyRequestMetricOperator', aggregate: 'UpdateInstancePolicyRequestMetricAggregate', name: 'Optional[str]' = None, sampling_range_min: 'Optional[int]' = 0, threshold: 'Optional[float]' = 0.0, managed_metric: 'Optional[UpdateInstancePolicyRequestMetricManagedMetric]' = <UpdateInstancePolicyRequestMetricManagedMetric.MANAGED_METRIC_UNKNOWN: 'managed_metric_unknown'>, cockpit_metric_name: 'Optional[str]' = None)
Bases:
object- aggregate: UpdateInstancePolicyRequestMetricAggregate
How the values sampled for the metric should be aggregated.
- cockpit_metric_name: str | None = None
- managed_metric: UpdateInstancePolicyRequestMetricManagedMetric | None = 'managed_metric_unknown'
- name: str | None = None
Name or description of your metric policy.
- operator: UpdateInstancePolicyRequestMetricOperator
Operator used when comparing the threshold value of the chosen metric to the actual sampled and aggregated value.
- sampling_range_min: int | None = 0
Interval of time, in minutes, during which metric is sampled.
- threshold: float | None = 0.0
Threshold value to measure the aggregated sampled metric value against. Combined with the operator field, determines whether a scaling action should be triggered.
- class scaleway_async.autoscaling.v1alpha1.types.UpdateInstancePolicyRequestMetricAggregate(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- AGGREGATE_AVERAGE = 'aggregate_average'
- AGGREGATE_MAX = 'aggregate_max'
- AGGREGATE_MIN = 'aggregate_min'
- AGGREGATE_SUM = 'aggregate_sum'
- AGGREGATE_UNKNOWN = 'aggregate_unknown'
- class scaleway_async.autoscaling.v1alpha1.types.UpdateInstancePolicyRequestMetricManagedMetric(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- MANAGED_LOADBALANCER_BACKEND_CONNECTIONS_RATE = 'managed_loadbalancer_backend_connections_rate'
- MANAGED_LOADBALANCER_BACKEND_THROUGHPUT = 'managed_loadbalancer_backend_throughput'
- MANAGED_METRIC_INSTANCE_CPU = 'managed_metric_instance_cpu'
- MANAGED_METRIC_INSTANCE_NETWORK_IN = 'managed_metric_instance_network_in'
- MANAGED_METRIC_INSTANCE_NETWORK_OUT = 'managed_metric_instance_network_out'
- MANAGED_METRIC_UNKNOWN = 'managed_metric_unknown'
- class scaleway_async.autoscaling.v1alpha1.types.UpdateInstancePolicyRequestMetricOperator(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- OPERATOR_GREATER_THAN = 'operator_greater_than'
- OPERATOR_LESS_THAN = 'operator_less_than'
- OPERATOR_UNKNOWN = 'operator_unknown'
- class scaleway_async.autoscaling.v1alpha1.types.UpdateInstanceTemplateRequest(template_id: 'str', zone: 'Optional[ScwZone]' = None, commercial_type: 'Optional[str]' = None, image_id: 'Optional[str]' = None, volumes: 'Optional[Dict[str, VolumeInstanceTemplate]]' = <factory>, tags: 'Optional[List[str]]' = <factory>, security_group_id: 'Optional[str]' = None, placement_group_id: 'Optional[str]' = None, public_ips_v4_count: 'Optional[int]' = 0, public_ips_v6_count: 'Optional[int]' = 0, name: 'Optional[str]' = None, private_network_ids: 'Optional[List[str]]' = <factory>, cloud_init: 'Optional[str]' = None)
Bases:
object- cloud_init: str | None = None
Cloud-config file must be passed in Base64 format. Cloud-config files are special scripts designed to be run by the cloud-init process. These are generally used for initial configuration on the very first boot of a server.
- commercial_type: str | None = None
Name of Instance commercial type.
- image_id: str | None = None
Instance image ID. Can be an ID of a marketplace or personal image. This image must be compatible with volume and commercial_type template.
- name: str | None = None
Name of Instance template.
- placement_group_id: str | None = None
Instance placement group ID. This is optional, but it is highly recommended to set a preference for Instance location within Availability Zone.
- private_network_ids: List[str] | None
Private Network IDs to attach to the new Instance.
- public_ips_v4_count: int | None = 0
Number of flexible IPv4 addresses to attach to the new Instance.
- public_ips_v6_count: int | None = 0
Number of flexible IPv6 addresses to attach to the new Instance.
- security_group_id: str | None = None
Instance security group ID (optional).
- tags: List[str] | None
List of tags for the Instance template.
- template_id: str
Template ID of the resource.
- volumes: Dict[str, VolumeInstanceTemplate] | None
Template of Instance volume.
- zone: str | None = None
Zone to target. If none is passed will use default zone from the config.
- class scaleway_async.autoscaling.v1alpha1.types.VolumeInstanceTemplate(name: 'str', tags: 'List[str]', boot: 'bool', volume_type: 'VolumeInstanceTemplateVolumeType', from_empty: 'Optional[VolumeInstanceTemplateFromEmpty]' = None, from_snapshot: 'Optional[VolumeInstanceTemplateFromSnapshot]' = None, perf_iops: 'Optional[int]' = None)
Bases:
object- boot: bool
Force the Instance to boot on this volume.
- from_empty: VolumeInstanceTemplateFromEmpty | None = None
- from_snapshot: VolumeInstanceTemplateFromSnapshot | None = None
- name: str
Name of the volume.
- perf_iops: int | None = None
- tags: List[str]
List of tags assigned to the volume.
- volume_type: VolumeInstanceTemplateVolumeType
Type of the volume.
- class scaleway_async.autoscaling.v1alpha1.types.VolumeInstanceTemplateFromEmpty(size: 'int')
Bases:
object- size: int
Module contents
- class scaleway_async.autoscaling.v1alpha1.AutoscalingV1Alpha1API(client: Client, *, bypass_validation: bool = False)
Bases:
API- async create_instance_group(*, name: str, template_id: str, capacity: Capacity, loadbalancer: Loadbalancer, zone: str | None = None, project_id: str | None = None, tags: List[str] | None = None) InstanceGroup
Create Instance group. Create a new Instance group. You must specify a template_id, capacity and Load Balancer object. :param name: Name of Instance group. :param template_id: Template ID (ID of the Instance template to attach to the Instance group). :param capacity: Specification of the minimum and maximum replicas for the Instance group, and the cooldown interval between two scaling events. :param loadbalancer: Specification of the Load Balancer to link to the Instance group. :param zone: Zone to target. If none is passed will use default zone from the config. :param project_id: Project ID to filter for, only Instance groups from this Project will be returned. :param tags: List of tags for the Instance group. :return:
InstanceGroupUsage:
result = await api.create_instance_group( name="example", template_id="example", capacity=Capacity(), loadbalancer=Loadbalancer(), )
- async create_instance_policy(*, name: str, action: InstancePolicyAction, type_: InstancePolicyType, value: int, priority: int, instance_group_id: str, zone: str | None = None, metric: Metric | None = None) InstancePolicy
Create scaling policy. Create a new scaling policy. You must specify a policy_id, capacity and Load Balancer object. :param name: Name of the policy. :param action: Action to execute when the metric-based condition is met. :param type_: How to use the number defined in value when determining by how many Instances to scale up/down. :param value: Value representing the magnitude of the scaling action to take for the Instance group. Depending on the type parameter, this number could represent a total number of Instances in the group, a number of Instances to add, or a percentage to scale the group by. :param priority: Priority of this policy compared to all other scaling policies. This determines the processing order. The lower the number, the higher the priority. :param instance_group_id: Instance group ID related to this policy. :param zone: Zone to target. If none is passed will use default zone from the config. :param metric: Cockpit metric to use when determining whether to trigger a scale up/down action. One-Of (‘trigger’): at most one of ‘metric’ could be set. :return:
InstancePolicyUsage:
result = await api.create_instance_policy( name="example", action=InstancePolicyAction.unknown_action, type=InstancePolicyType.unknown_type, value=1, priority=1, instance_group_id="example", )
- async create_instance_template(*, zone: str | None = None, commercial_type: str, volumes: Dict[str, VolumeInstanceTemplate], image_id: str | None = None, tags: List[str] | None = None, security_group_id: str | None = None, name: str, placement_group_id: str | None = None, public_ips_v4_count: int | None = None, public_ips_v6_count: int | None = None, project_id: str | None = None, private_network_ids: List[str] | None = None, cloud_init: str | None = None) InstanceTemplate
Create Instance template. Create a new Instance template. This specifies the details of the Instance (commercial type, zone, image, volumes etc.) that will be in the Instance group. :param zone: Zone to target. If none is passed will use default zone from the config. :param commercial_type: Name of Instance commercial type. :param volumes: Template of Instance volume. :param image_id: Instance image ID. Can be an ID of a marketplace or personal image. This image must be compatible with volume and commercial_type template. :param tags: List of tags for the Instance template. :param security_group_id: Instance security group ID (optional). :param name: Name of Instance template. :param placement_group_id: Instance placement group ID. This is optional, but it is highly recommended to set a preference for Instance location within Availability Zone. :param public_ips_v4_count: Number of flexible IPv4 addresses to attach to the new Instance. :param public_ips_v6_count: Number of flexible IPv6 addresses to attach to the new Instance. :param project_id: ID of the Project containing the Instance template resource. :param private_network_ids: Private Network IDs to attach to the new Instance. :param cloud_init: Cloud-config file must be passed in Base64 format. Cloud-config files are special scripts designed to be run by the cloud-init process. These are generally used for initial configuration on the very first boot of a server. :return:
InstanceTemplateUsage:
result = await api.create_instance_template( commercial_type="example", volumes={}, name="example", )
- async delete_instance_group(*, instance_group_id: str, zone: str | None = None) None
Delete Instance group. Delete an existing Instance group, specified by its instance_group_id. Deleting an Instance group is permanent, and cannot be undone. :param instance_group_id: ID of the Instance group to delete. :param zone: Zone to target. If none is passed will use default zone from the config.
Usage:
result = await api.delete_instance_group( instance_group_id="example", )
- async delete_instance_policy(*, policy_id: str, zone: str | None = None) None
Delete scaling policy. Delete an existing scaling policy, specified by its policy_id. Deleting a scaling policy is permanent, and cannot be undone. :param policy_id: ID of the policy to delete. :param zone: Zone to target. If none is passed will use default zone from the config.
Usage:
result = await api.delete_instance_policy( policy_id="example", )
- async delete_instance_template(*, template_id: str, zone: str | None = None) None
Delete Instance template. Delete an existing Instance template. This action is permanent and cannot be undone. :param template_id: ID of the template to delete. :param zone: Zone to target. If none is passed will use default zone from the config.
Usage:
result = await api.delete_instance_template( template_id="example", )
- async get_instance_group(*, instance_group_id: str, zone: str | None = None) InstanceGroup
Get Instance group. Retrieve information about an existing Instance group, specified by its instance_group_id. Its full details, including errors, are returned in the response object. :param instance_group_id: ID of the requested Instance group. :param zone: Zone to target. If none is passed will use default zone from the config. :return:
InstanceGroupUsage:
result = await api.get_instance_group( instance_group_id="example", )
- async get_instance_policy(*, policy_id: str, zone: str | None = None) InstancePolicy
Get scaling policy. Retrieve information about an existing scaling policy, specified by its policy_id. Its full details are returned in the response object. :param policy_id: Policy ID. :param zone: Zone to target. If none is passed will use default zone from the config. :return:
InstancePolicyUsage:
result = await api.get_instance_policy( policy_id="example", )
- async get_instance_template(*, template_id: str, zone: str | None = None) InstanceTemplate
Get Instance template. Get an existing Instance template from its template_id. :param template_id: Template ID of the resource. :param zone: Zone to target. If none is passed will use default zone from the config. :return:
InstanceTemplateUsage:
result = await api.get_instance_template( template_id="example", )
- async list_instance_group_events(*, instance_group_id: str, zone: str | None = None, order_by: ListInstanceGroupEventsRequestOrderBy | None = None, page: int | None = None, page_size: int | None = None) ListInstanceGroupEventsResponse
List events. List all events for a given Instance group. By default, the events are ordered by creation date in descending order, though this can be modified via the order_by field. :param instance_group_id: List all event logs for the Instance group ID. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Sort order of Instance groups in the response. :param page: Page number to return, from the paginated results. :param page_size: Number of Instance groups to return per page. :return:
ListInstanceGroupEventsResponseUsage:
result = await api.list_instance_group_events( instance_group_id="example", )
- async list_instance_group_events_all(*, instance_group_id: str, zone: str | None = None, order_by: ListInstanceGroupEventsRequestOrderBy | None = None, page: int | None = None, page_size: int | None = None) List[InstanceGroupEvent]
List events. List all events for a given Instance group. By default, the events are ordered by creation date in descending order, though this can be modified via the order_by field. :param instance_group_id: List all event logs for the Instance group ID. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Sort order of Instance groups in the response. :param page: Page number to return, from the paginated results. :param page_size: Number of Instance groups to return per page. :return:
List[InstanceGroupEvent]Usage:
result = await api.list_instance_group_events_all( instance_group_id="example", )
- async list_instance_groups(*, zone: str | None = None, order_by: ListInstanceGroupsRequestOrderBy | None = None, page: int | None = None, page_size: int | None = None) ListInstanceGroupsResponse
List Instance groups. List all Instance groups, for a Scaleway Organization or Scaleway Project. By default, the Instance groups returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Sort order of Instance groups in the response. :param page: Page number to return, from the paginated results. :param page_size: Number of Instance groups to return per page. :return:
ListInstanceGroupsResponseUsage:
result = await api.list_instance_groups()
- async list_instance_groups_all(*, zone: str | None = None, order_by: ListInstanceGroupsRequestOrderBy | None = None, page: int | None = None, page_size: int | None = None) List[InstanceGroup]
List Instance groups. List all Instance groups, for a Scaleway Organization or Scaleway Project. By default, the Instance groups returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Sort order of Instance groups in the response. :param page: Page number to return, from the paginated results. :param page_size: Number of Instance groups to return per page. :return:
List[InstanceGroup]Usage:
result = await api.list_instance_groups_all()
- async list_instance_policies(*, instance_group_id: str, zone: str | None = None, order_by: ListInstancePoliciesRequestOrderBy | None = None, page: int | None = None, page_size: int | None = None) ListInstancePoliciesResponse
List scaling policies. List all scaling policies, for a Scaleway Organization or Scaleway Project. By default, the policies returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. :param instance_group_id: Instance group ID. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Sort order of Instance groups in the response. :param page: Page number to return, from the paginated results. :param page_size: Number of scaling policies to return per page. :return:
ListInstancePoliciesResponseUsage:
result = await api.list_instance_policies( instance_group_id="example", )
- async list_instance_policies_all(*, instance_group_id: str, zone: str | None = None, order_by: ListInstancePoliciesRequestOrderBy | None = None, page: int | None = None, page_size: int | None = None) List[InstancePolicy]
List scaling policies. List all scaling policies, for a Scaleway Organization or Scaleway Project. By default, the policies returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. :param instance_group_id: Instance group ID. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Sort order of Instance groups in the response. :param page: Page number to return, from the paginated results. :param page_size: Number of scaling policies to return per page. :return:
List[InstancePolicy]Usage:
result = await api.list_instance_policies_all( instance_group_id="example", )
- async list_instance_templates(*, zone: str | None = None, order_by: ListInstanceTemplatesRequestOrderBy | None = None, page: int | None = None, page_size: int | None = None) ListInstanceTemplatesResponse
List Instance templates. List all Instance templates, for a Scaleway Organization or Scaleway Project. By default, the Instance templates returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Sort order of Instance groups in the response. :param page: Page number to return, from the paginated results. :param page_size: Number of Instance groups to return per page. :return:
ListInstanceTemplatesResponseUsage:
result = await api.list_instance_templates()
- async list_instance_templates_all(*, zone: str | None = None, order_by: ListInstanceTemplatesRequestOrderBy | None = None, page: int | None = None, page_size: int | None = None) List[InstanceTemplate]
List Instance templates. List all Instance templates, for a Scaleway Organization or Scaleway Project. By default, the Instance templates returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Sort order of Instance groups in the response. :param page: Page number to return, from the paginated results. :param page_size: Number of Instance groups to return per page. :return:
List[InstanceTemplate]Usage:
result = await api.list_instance_templates_all()
- async update_instance_group(*, instance_group_id: str, zone: str | None = None, name: str | None = None, tags: List[str] | None = None, capacity: UpdateInstanceGroupRequestCapacity | None = None, loadbalancer: UpdateInstanceGroupRequestLoadbalancer | None = None) InstanceGroup
Update Instance group. Update the parameters of an existing Instance group, specified by its instance_group_id. :param instance_group_id: Instance group ID to update. :param zone: Zone to target. If none is passed will use default zone from the config. :param name: Name of Instance group. :param tags: List of tags for the Load Balancer. :param capacity: Specification of the minimum and maximum replicas for the Instance group, and the cooldown interval between two scaling events. :param loadbalancer: Specification of the Load Balancer to link to the Instance group. :return:
InstanceGroupUsage:
result = await api.update_instance_group( instance_group_id="example", )
- async update_instance_policy(*, policy_id: str, zone: str | None = None, name: str | None = None, metric: UpdateInstancePolicyRequestMetric | None = None, action: InstancePolicyAction | None = None, type_: InstancePolicyType | None = None, value: int | None = None, priority: int | None = None) InstancePolicy
Update scaling policy. Update the parameters of an existing scaling policy, specified by its policy_id. :param policy_id: Policy ID to update. :param zone: Zone to target. If none is passed will use default zone from the config. :param name: Policy name to update. :param metric: Metric specification to update (Cockpit metric to use when determining whether to trigger a scale up/down action). One-Of (‘trigger’): at most one of ‘metric’ could be set. :param action: Action to update (action to execute when the metric-based condition is met). :param type_: Type to update (how to use the number defined in value when determining by how many Instances to scale up/down). :param value: Value to update (number representing the magnitude of the scaling action to take for the Instance group). :param priority: Priority to update (priority of this policy compared to all other scaling policies. The lower the number, the higher the priority). :return:
InstancePolicyUsage:
result = await api.update_instance_policy( policy_id="example", )
- async update_instance_template(*, template_id: str, zone: str | None = None, commercial_type: str | None = None, image_id: str | None = None, volumes: Dict[str, VolumeInstanceTemplate] | None = None, tags: List[str] | None = None, security_group_id: str | None = None, placement_group_id: str | None = None, public_ips_v4_count: int | None = None, public_ips_v6_count: int | None = None, name: str | None = None, private_network_ids: List[str] | None = None, cloud_init: str | None = None) InstanceTemplate
Update Instance template. Update an Instance template, such as its commercial offer type, image or volume template. :param template_id: Template ID of the resource. :param zone: Zone to target. If none is passed will use default zone from the config. :param commercial_type: Name of Instance commercial type. :param image_id: Instance image ID. Can be an ID of a marketplace or personal image. This image must be compatible with volume and commercial_type template. :param volumes: Template of Instance volume. :param tags: List of tags for the Instance template. :param security_group_id: Instance security group ID (optional). :param placement_group_id: Instance placement group ID. This is optional, but it is highly recommended to set a preference for Instance location within Availability Zone. :param public_ips_v4_count: Number of flexible IPv4 addresses to attach to the new Instance. :param public_ips_v6_count: Number of flexible IPv6 addresses to attach to the new Instance. :param name: Name of Instance template. :param private_network_ids: Private Network IDs to attach to the new Instance. :param cloud_init: Cloud-config file must be passed in Base64 format. Cloud-config files are special scripts designed to be run by the cloud-init process. These are generally used for initial configuration on the very first boot of a server. :return:
InstanceTemplateUsage:
result = await api.update_instance_template( template_id="example", )
- class scaleway_async.autoscaling.v1alpha1.Capacity(max_replicas: 'int', min_replicas: 'int', cooldown_delay: 'Optional[str]' = None)
Bases:
object- cooldown_delay: str | None = None
Time (in seconds) after a scaling action during which requests to carry out a new scaling action will be denied.
- max_replicas: int
Maximum count of Instances for the Instance group.
- min_replicas: int
Minimum count of Instances for the Instance group.
- class scaleway_async.autoscaling.v1alpha1.CreateInstanceGroupRequest(name: 'str', template_id: 'str', capacity: 'Capacity', loadbalancer: 'Loadbalancer', zone: 'Optional[ScwZone]' = None, project_id: 'Optional[str]' = None, tags: 'Optional[List[str]]' = <factory>)
Bases:
object- capacity: Capacity
Specification of the minimum and maximum replicas for the Instance group, and the cooldown interval between two scaling events.
- loadbalancer: Loadbalancer
Specification of the Load Balancer to link to the Instance group.
- name: str
Name of Instance group.
- project_id: str | None = None
Project ID to filter for, only Instance groups from this Project will be returned.
- tags: List[str] | None
List of tags for the Instance group.
- template_id: str
Template ID (ID of the Instance template to attach to the Instance group).
- zone: str | None = None
Zone to target. If none is passed will use default zone from the config.
- class scaleway_async.autoscaling.v1alpha1.CreateInstancePolicyRequest(name: 'str', action: 'InstancePolicyAction', type_: 'InstancePolicyType', value: 'int', priority: 'int', instance_group_id: 'str', zone: 'Optional[ScwZone]' = None, metric: 'Optional[Metric]' = None)
Bases:
object- action: InstancePolicyAction
Action to execute when the metric-based condition is met.
- instance_group_id: str
Instance group ID related to this policy.
- name: str
Name of the policy.
- priority: int
Priority of this policy compared to all other scaling policies. This determines the processing order. The lower the number, the higher the priority.
- type_: InstancePolicyType
How to use the number defined in value when determining by how many Instances to scale up/down.
- value: int
Value representing the magnitude of the scaling action to take for the Instance group. Depending on the type parameter, this number could represent a total number of Instances in the group, a number of Instances to add, or a percentage to scale the group by.
- zone: str | None = None
Zone to target. If none is passed will use default zone from the config.
- class scaleway_async.autoscaling.v1alpha1.CreateInstanceTemplateRequest(commercial_type: 'str', volumes: 'Dict[str, VolumeInstanceTemplate]', name: 'str', zone: 'Optional[ScwZone]' = None, image_id: 'Optional[str]' = None, tags: 'Optional[List[str]]' = <factory>, security_group_id: 'Optional[str]' = None, placement_group_id: 'Optional[str]' = None, public_ips_v4_count: 'Optional[int]' = 0, public_ips_v6_count: 'Optional[int]' = 0, project_id: 'Optional[str]' = None, private_network_ids: 'Optional[List[str]]' = <factory>, cloud_init: 'Optional[str]' = None)
Bases:
object- cloud_init: str | None = None
Cloud-config file must be passed in Base64 format. Cloud-config files are special scripts designed to be run by the cloud-init process. These are generally used for initial configuration on the very first boot of a server.
- commercial_type: str
Name of Instance commercial type.
- image_id: str | None = None
Instance image ID. Can be an ID of a marketplace or personal image. This image must be compatible with volume and commercial_type template.
- name: str
Name of Instance template.
- placement_group_id: str | None = None
Instance placement group ID. This is optional, but it is highly recommended to set a preference for Instance location within Availability Zone.
- private_network_ids: List[str] | None
Private Network IDs to attach to the new Instance.
- project_id: str | None = None
ID of the Project containing the Instance template resource.
- public_ips_v4_count: int | None = 0
Number of flexible IPv4 addresses to attach to the new Instance.
- public_ips_v6_count: int | None = 0
Number of flexible IPv6 addresses to attach to the new Instance.
- security_group_id: str | None = None
Instance security group ID (optional).
- tags: List[str] | None
List of tags for the Instance template.
- volumes: Dict[str, VolumeInstanceTemplate]
Template of Instance volume.
- zone: str | None = None
Zone to target. If none is passed will use default zone from the config.
- class scaleway_async.autoscaling.v1alpha1.DeleteInstanceGroupRequest(instance_group_id: 'str', zone: 'Optional[ScwZone]' = None)
Bases:
object- instance_group_id: str
ID of the Instance group to delete.
- zone: str | None = None
Zone to target. If none is passed will use default zone from the config.
- class scaleway_async.autoscaling.v1alpha1.DeleteInstancePolicyRequest(policy_id: 'str', zone: 'Optional[ScwZone]' = None)
Bases:
object- policy_id: str
ID of the policy to delete.
- zone: str | None = None
Zone to target. If none is passed will use default zone from the config.
- class scaleway_async.autoscaling.v1alpha1.DeleteInstanceTemplateRequest(template_id: 'str', zone: 'Optional[ScwZone]' = None)
Bases:
object- template_id: str
ID of the template to delete.
- zone: str | None = None
Zone to target. If none is passed will use default zone from the config.
- class scaleway_async.autoscaling.v1alpha1.GetInstanceGroupRequest(instance_group_id: 'str', zone: 'Optional[ScwZone]' = None)
Bases:
object- instance_group_id: str
ID of the requested Instance group.
- zone: str | None = None
Zone to target. If none is passed will use default zone from the config.
- class scaleway_async.autoscaling.v1alpha1.GetInstancePolicyRequest(policy_id: 'str', zone: 'Optional[ScwZone]' = None)
Bases:
object- policy_id: str
Policy ID.
- zone: str | None = None
Zone to target. If none is passed will use default zone from the config.
- class scaleway_async.autoscaling.v1alpha1.GetInstanceTemplateRequest(template_id: 'str', zone: 'Optional[ScwZone]' = None)
Bases:
object- template_id: str
Template ID of the resource.
- zone: str | None = None
Zone to target. If none is passed will use default zone from the config.
- class scaleway_async.autoscaling.v1alpha1.InstanceGroup(id: 'str', project_id: 'str', name: 'str', tags: 'List[str]', instance_template_id: 'str', capacity: 'Capacity', loadbalancer: 'Loadbalancer', error_messages: 'List[str]', created_at: 'Optional[datetime]' = None, updated_at: 'Optional[datetime]' = None)
Bases:
object- capacity: Capacity
Specification of the minimum and maximum replicas for the Instance group, and the cooldown interval between two scaling events.
- created_at: datetime | None = None
Date on which the Instance group was created.
- error_messages: List[str]
Any configuration errors for dependencies (Load Balancer, Private Network, Instance template etc.).
- id: str
Instance group ID.
- instance_template_id: str
Template ID (ID of the Instance template to attach to the Instance group).
- loadbalancer: Loadbalancer
Specification of the Load Balancer linked to the Instance group.
- name: str
Name of the Instance group.
- project_id: str
Project ID of the Instance group.
- tags: List[str]
Instance group tags.
- updated_at: datetime | None = None
Date on which the Instance group was last updated.
- class scaleway_async.autoscaling.v1alpha1.InstanceGroupEvent(id: 'str', source: 'InstanceGroupEventSource', level: 'InstanceGroupEventLevel', name: 'str', created_at: 'Optional[datetime]' = None, details: 'Optional[str]' = None)
Bases:
object- created_at: datetime | None = None
Date and time of the log.
- details: str | None = None
Full text of the log.
- id: str
Instance group event ID.
- level: InstanceGroupEventLevel
The severity of the log.
- name: str
Log title.
- source: InstanceGroupEventSource
Log source.
- class scaleway_async.autoscaling.v1alpha1.InstanceGroupEventLevel(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- ERROR = 'error'
- INFO = 'info'
- SUCCESS = 'success'
- class scaleway_async.autoscaling.v1alpha1.InstanceGroupEventSource(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- INSTANCE_MANAGER = 'instance_manager'
- SCALER = 'scaler'
- SUPERVISOR = 'supervisor'
- UNKNOWN_SOURCE = 'unknown_source'
- WATCHER = 'watcher'
- class scaleway_async.autoscaling.v1alpha1.InstancePolicy(id: 'str', name: 'str', action: 'InstancePolicyAction', type_: 'InstancePolicyType', value: 'int', priority: 'int', instance_group_id: 'str', metric: 'Optional[Metric]' = None)
Bases:
object- action: InstancePolicyAction
Action to execute when the metric-based condition is met.
- id: str
Scaling policy ID.
- instance_group_id: str
Instance group ID related to this policy.
- name: str
Name of scaling policy.
- priority: int
Priority of this policy compared to all other scaling policies. The lower the number, the higher the priority (higher priority will be processed sooner in the order).
- type_: InstancePolicyType
How to use the number defined in value when determining by how many Instances to scale up/down.
- value: int
Number representing the magnitude of the scaling action to take for the Instance group.
- class scaleway_async.autoscaling.v1alpha1.InstancePolicyAction(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- SCALE_DOWN = 'scale_down'
- SCALE_UP = 'scale_up'
- UNKNOWN_ACTION = 'unknown_action'
- class scaleway_async.autoscaling.v1alpha1.InstancePolicyType(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- FLAT_COUNT = 'flat_count'
- PERCENT_OF_TOTAL_GROUP = 'percent_of_total_group'
- SET_TOTAL_GROUP = 'set_total_group'
- UNKNOWN_TYPE = 'unknown_type'
- class scaleway_async.autoscaling.v1alpha1.InstanceTemplate(id: 'str', commercial_type: 'str', volumes: 'Dict[str, VolumeInstanceTemplate]', tags: 'List[str]', project_id: 'str', name: 'str', private_network_ids: 'List[str]', status: 'InstanceTemplateStatus', image_id: 'Optional[str]' = None, security_group_id: 'Optional[str]' = None, placement_group_id: 'Optional[str]' = None, public_ips_v4_count: 'Optional[int]' = 0, public_ips_v6_count: 'Optional[int]' = 0, cloud_init: 'Optional[str]' = None, created_at: 'Optional[datetime]' = None, updated_at: 'Optional[datetime]' = None)
Bases:
object- cloud_init: str | None = None
Cloud-config file must be passed in Base64 format. Cloud-config files are special scripts designed to be run by the cloud-init process. These are generally used for initial configuration on the very first boot of a server.
- commercial_type: str
Name of Instance commercial type.
- created_at: datetime | None = None
Date on which the Instance template was created.
- id: str
ID of Instance template resource.
- image_id: str | None = None
Instance image ID. Can be an ID of a marketplace or personal image. This image must be compatible with volume and commercial_type template.
- name: str
Name of Instance template.
- placement_group_id: str | None = None
Instance placement group ID. This is optional, but it is highly recommended to set a preference for Instance location within Availability Zone.
- private_network_ids: List[str]
Private Network IDs to attach to the new Instance.
- project_id: str
ID of the Project containing the Instance template resource.
- public_ips_v4_count: int | None = 0
Number of flexible IPv4 addresses to attach to the new Instance.
- public_ips_v6_count: int | None = 0
Number of flexible IPv6 addresses to attach to the new Instance.
- security_group_id: str | None = None
Instance security group ID (optional).
- status: InstanceTemplateStatus
Status of Instance template.
- tags: List[str]
List of tags for the Instance template.
- updated_at: datetime | None = None
Date on which the Instance template was last updated.
- volumes: Dict[str, VolumeInstanceTemplate]
Template of Instance volume.
- class scaleway_async.autoscaling.v1alpha1.InstanceTemplateStatus(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- ERROR = 'error'
- READY = 'ready'
- UNKNOWN_STATUS = 'unknown_status'
- class scaleway_async.autoscaling.v1alpha1.ListInstanceGroupEventsRequest(instance_group_id: 'str', zone: 'Optional[ScwZone]' = None, order_by: 'Optional[ListInstanceGroupEventsRequestOrderBy]' = <ListInstanceGroupEventsRequestOrderBy.CREATED_AT_DESC: 'created_at_desc'>, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0)
Bases:
object- instance_group_id: str
List all event logs for the Instance group ID.
- order_by: ListInstanceGroupEventsRequestOrderBy | None = 'created_at_desc'
Sort order of Instance groups in the response.
- page: int | None = 0
Page number to return, from the paginated results.
- page_size: int | None = 0
Number of Instance groups to return per page.
- zone: str | None = None
Zone to target. If none is passed will use default zone from the config.
- class scaleway_async.autoscaling.v1alpha1.ListInstanceGroupEventsRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- class scaleway_async.autoscaling.v1alpha1.ListInstanceGroupEventsResponse(instance_events: 'List[InstanceGroupEvent]', total_count: 'int')
Bases:
object- instance_events: List[InstanceGroupEvent]
Paginated list of Instance groups.
- total_count: int
Count of all Instance groups matching the requested criteria.
- class scaleway_async.autoscaling.v1alpha1.ListInstanceGroupsRequest(zone: 'Optional[ScwZone]' = None, order_by: 'Optional[ListInstanceGroupsRequestOrderBy]' = <ListInstanceGroupsRequestOrderBy.CREATED_AT_DESC: 'created_at_desc'>, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0)
Bases:
object- order_by: ListInstanceGroupsRequestOrderBy | None = 'created_at_desc'
Sort order of Instance groups in the response.
- page: int | None = 0
Page number to return, from the paginated results.
- page_size: int | None = 0
Number of Instance groups to return per page.
- zone: str | None = None
Zone to target. If none is passed will use default zone from the config.
- class scaleway_async.autoscaling.v1alpha1.ListInstanceGroupsRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- class scaleway_async.autoscaling.v1alpha1.ListInstanceGroupsResponse(instance_groups: 'List[InstanceGroup]', total_count: 'int')
Bases:
object- instance_groups: List[InstanceGroup]
Paginated list of Instance groups.
- total_count: int
Count of all Instance groups matching the requested criteria.
- class scaleway_async.autoscaling.v1alpha1.ListInstancePoliciesRequest(instance_group_id: 'str', zone: 'Optional[ScwZone]' = None, order_by: 'Optional[ListInstancePoliciesRequestOrderBy]' = <ListInstancePoliciesRequestOrderBy.CREATED_AT_DESC: 'created_at_desc'>, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0)
Bases:
object- instance_group_id: str
Instance group ID.
- order_by: ListInstancePoliciesRequestOrderBy | None = 'created_at_desc'
Sort order of Instance groups in the response.
- page: int | None = 0
Page number to return, from the paginated results.
- page_size: int | None = 0
Number of scaling policies to return per page.
- zone: str | None = None
Zone to target. If none is passed will use default zone from the config.
- class scaleway_async.autoscaling.v1alpha1.ListInstancePoliciesRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- class scaleway_async.autoscaling.v1alpha1.ListInstancePoliciesResponse(policies: 'List[InstancePolicy]', total_count: 'int')
Bases:
object- policies: List[InstancePolicy]
Paginated list of policies.
- total_count: int
Count of all policies matching the requested criteria.
- class scaleway_async.autoscaling.v1alpha1.ListInstanceTemplatesRequest(zone: 'Optional[ScwZone]' = None, order_by: 'Optional[ListInstanceTemplatesRequestOrderBy]' = <ListInstanceTemplatesRequestOrderBy.CREATED_AT_DESC: 'created_at_desc'>, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0)
Bases:
object- order_by: ListInstanceTemplatesRequestOrderBy | None = 'created_at_desc'
Sort order of Instance groups in the response.
- page: int | None = 0
Page number to return, from the paginated results.
- page_size: int | None = 0
Number of Instance groups to return per page.
- zone: str | None = None
Zone to target. If none is passed will use default zone from the config.
- class scaleway_async.autoscaling.v1alpha1.ListInstanceTemplatesRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- class scaleway_async.autoscaling.v1alpha1.ListInstanceTemplatesResponse(total_count: 'int', instance_templates: 'List[InstanceTemplate]')
Bases:
object- instance_templates: List[InstanceTemplate]
Paginated list of Instance templates.
- total_count: int
Count of all templates matching the requested criteria.
- class scaleway_async.autoscaling.v1alpha1.Loadbalancer(id: 'str', backend_ids: 'List[str]', private_network_id: 'str')
Bases:
object- backend_ids: List[str]
Load Balancer backend IDs.
- id: str
Load Balancer ID.
- private_network_id: str
ID of the Private Network attached to the Load Balancer.
- class scaleway_async.autoscaling.v1alpha1.Metric(name: 'str', operator: 'MetricOperator', aggregate: 'MetricAggregate', sampling_range_min: 'int', threshold: 'float', managed_metric: 'Optional[MetricManagedMetric]' = <MetricManagedMetric.MANAGED_METRIC_UNKNOWN: 'managed_metric_unknown'>, cockpit_metric_name: 'Optional[str]' = None)
Bases:
object- aggregate: MetricAggregate
How the values sampled for the metric should be aggregated.
- cockpit_metric_name: str | None = None
- managed_metric: MetricManagedMetric | None = 'managed_metric_unknown'
- name: str
Name or description of the metric policy.
- operator: MetricOperator
Operator used when comparing the threshold value of the chosen metric to the actual sampled and aggregated value.
- sampling_range_min: int
Interval of time, in minutes, during which metric is sampled.
- threshold: float
Threshold value to measure the aggregated sampled metric value against. Combined with the operator field, determines whether a scaling action should be triggered.
- class scaleway_async.autoscaling.v1alpha1.MetricAggregate(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- AGGREGATE_AVERAGE = 'aggregate_average'
- AGGREGATE_MAX = 'aggregate_max'
- AGGREGATE_MIN = 'aggregate_min'
- AGGREGATE_SUM = 'aggregate_sum'
- AGGREGATE_UNKNOWN = 'aggregate_unknown'
- class scaleway_async.autoscaling.v1alpha1.MetricManagedMetric(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- MANAGED_LOADBALANCER_BACKEND_CONNECTIONS_RATE = 'managed_loadbalancer_backend_connections_rate'
- MANAGED_LOADBALANCER_BACKEND_THROUGHPUT = 'managed_loadbalancer_backend_throughput'
- MANAGED_METRIC_INSTANCE_CPU = 'managed_metric_instance_cpu'
- MANAGED_METRIC_INSTANCE_NETWORK_IN = 'managed_metric_instance_network_in'
- MANAGED_METRIC_INSTANCE_NETWORK_OUT = 'managed_metric_instance_network_out'
- MANAGED_METRIC_UNKNOWN = 'managed_metric_unknown'
- class scaleway_async.autoscaling.v1alpha1.MetricOperator(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- OPERATOR_GREATER_THAN = 'operator_greater_than'
- OPERATOR_LESS_THAN = 'operator_less_than'
- OPERATOR_UNKNOWN = 'operator_unknown'
- class scaleway_async.autoscaling.v1alpha1.UpdateInstanceGroupRequest(instance_group_id: 'str', zone: 'Optional[ScwZone]' = None, name: 'Optional[str]' = None, tags: 'Optional[List[str]]' = <factory>, capacity: 'Optional[UpdateInstanceGroupRequestCapacity]' = None, loadbalancer: 'Optional[UpdateInstanceGroupRequestLoadbalancer]' = None)
Bases:
object- capacity: UpdateInstanceGroupRequestCapacity | None = None
Specification of the minimum and maximum replicas for the Instance group, and the cooldown interval between two scaling events.
- instance_group_id: str
Instance group ID to update.
- loadbalancer: UpdateInstanceGroupRequestLoadbalancer | None = None
Specification of the Load Balancer to link to the Instance group.
- name: str | None = None
Name of Instance group.
- tags: List[str] | None
List of tags for the Load Balancer.
- zone: str | None = None
Zone to target. If none is passed will use default zone from the config.
- class scaleway_async.autoscaling.v1alpha1.UpdateInstanceGroupRequestCapacity(max_replicas: 'Optional[int]' = 0, min_replicas: 'Optional[int]' = 0, cooldown_delay: 'Optional[str]' = None)
Bases:
object- cooldown_delay: str | None = None
Time (in seconds) after a scaling action during which requests to carry out a new scaling action will be denied.
- max_replicas: int | None = 0
Maximum count of Instances for the Instance group.
- min_replicas: int | None = 0
Minimum count of Instances for the Instance group.
- class scaleway_async.autoscaling.v1alpha1.UpdateInstanceGroupRequestLoadbalancer(backend_ids: 'Optional[List[str]]' = <factory>)
Bases:
object- backend_ids: List[str] | None
Load Balancer backend IDs.
- class scaleway_async.autoscaling.v1alpha1.UpdateInstancePolicyRequest(policy_id: 'str', zone: 'Optional[ScwZone]' = None, name: 'Optional[str]' = None, action: 'Optional[InstancePolicyAction]' = <InstancePolicyAction.UNKNOWN_ACTION: 'unknown_action'>, type_: 'Optional[InstancePolicyType]' = <InstancePolicyType.UNKNOWN_TYPE: 'unknown_type'>, value: 'Optional[int]' = 0, priority: 'Optional[int]' = 0, metric: 'Optional[UpdateInstancePolicyRequestMetric]' = None)
Bases:
object- action: InstancePolicyAction | None = 'unknown_action'
Action to update (action to execute when the metric-based condition is met).
- metric: UpdateInstancePolicyRequestMetric | None = None
- name: str | None = None
Policy name to update.
- policy_id: str
Policy ID to update.
- priority: int | None = 0
Priority to update (priority of this policy compared to all other scaling policies. The lower the number, the higher the priority).
- type_: InstancePolicyType | None = 'unknown_type'
Type to update (how to use the number defined in value when determining by how many Instances to scale up/down).
- value: int | None = 0
Value to update (number representing the magnitude of the scaling action to take for the Instance group).
- zone: str | None = None
Zone to target. If none is passed will use default zone from the config.
- class scaleway_async.autoscaling.v1alpha1.UpdateInstancePolicyRequestMetric(operator: 'UpdateInstancePolicyRequestMetricOperator', aggregate: 'UpdateInstancePolicyRequestMetricAggregate', name: 'Optional[str]' = None, sampling_range_min: 'Optional[int]' = 0, threshold: 'Optional[float]' = 0.0, managed_metric: 'Optional[UpdateInstancePolicyRequestMetricManagedMetric]' = <UpdateInstancePolicyRequestMetricManagedMetric.MANAGED_METRIC_UNKNOWN: 'managed_metric_unknown'>, cockpit_metric_name: 'Optional[str]' = None)
Bases:
object- aggregate: UpdateInstancePolicyRequestMetricAggregate
How the values sampled for the metric should be aggregated.
- cockpit_metric_name: str | None = None
- managed_metric: UpdateInstancePolicyRequestMetricManagedMetric | None = 'managed_metric_unknown'
- name: str | None = None
Name or description of your metric policy.
- operator: UpdateInstancePolicyRequestMetricOperator
Operator used when comparing the threshold value of the chosen metric to the actual sampled and aggregated value.
- sampling_range_min: int | None = 0
Interval of time, in minutes, during which metric is sampled.
- threshold: float | None = 0.0
Threshold value to measure the aggregated sampled metric value against. Combined with the operator field, determines whether a scaling action should be triggered.
- class scaleway_async.autoscaling.v1alpha1.UpdateInstancePolicyRequestMetricAggregate(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- AGGREGATE_AVERAGE = 'aggregate_average'
- AGGREGATE_MAX = 'aggregate_max'
- AGGREGATE_MIN = 'aggregate_min'
- AGGREGATE_SUM = 'aggregate_sum'
- AGGREGATE_UNKNOWN = 'aggregate_unknown'
- class scaleway_async.autoscaling.v1alpha1.UpdateInstancePolicyRequestMetricManagedMetric(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- MANAGED_LOADBALANCER_BACKEND_CONNECTIONS_RATE = 'managed_loadbalancer_backend_connections_rate'
- MANAGED_LOADBALANCER_BACKEND_THROUGHPUT = 'managed_loadbalancer_backend_throughput'
- MANAGED_METRIC_INSTANCE_CPU = 'managed_metric_instance_cpu'
- MANAGED_METRIC_INSTANCE_NETWORK_IN = 'managed_metric_instance_network_in'
- MANAGED_METRIC_INSTANCE_NETWORK_OUT = 'managed_metric_instance_network_out'
- MANAGED_METRIC_UNKNOWN = 'managed_metric_unknown'
- class scaleway_async.autoscaling.v1alpha1.UpdateInstancePolicyRequestMetricOperator(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- OPERATOR_GREATER_THAN = 'operator_greater_than'
- OPERATOR_LESS_THAN = 'operator_less_than'
- OPERATOR_UNKNOWN = 'operator_unknown'
- class scaleway_async.autoscaling.v1alpha1.UpdateInstanceTemplateRequest(template_id: 'str', zone: 'Optional[ScwZone]' = None, commercial_type: 'Optional[str]' = None, image_id: 'Optional[str]' = None, volumes: 'Optional[Dict[str, VolumeInstanceTemplate]]' = <factory>, tags: 'Optional[List[str]]' = <factory>, security_group_id: 'Optional[str]' = None, placement_group_id: 'Optional[str]' = None, public_ips_v4_count: 'Optional[int]' = 0, public_ips_v6_count: 'Optional[int]' = 0, name: 'Optional[str]' = None, private_network_ids: 'Optional[List[str]]' = <factory>, cloud_init: 'Optional[str]' = None)
Bases:
object- cloud_init: str | None = None
Cloud-config file must be passed in Base64 format. Cloud-config files are special scripts designed to be run by the cloud-init process. These are generally used for initial configuration on the very first boot of a server.
- commercial_type: str | None = None
Name of Instance commercial type.
- image_id: str | None = None
Instance image ID. Can be an ID of a marketplace or personal image. This image must be compatible with volume and commercial_type template.
- name: str | None = None
Name of Instance template.
- placement_group_id: str | None = None
Instance placement group ID. This is optional, but it is highly recommended to set a preference for Instance location within Availability Zone.
- private_network_ids: List[str] | None
Private Network IDs to attach to the new Instance.
- public_ips_v4_count: int | None = 0
Number of flexible IPv4 addresses to attach to the new Instance.
- public_ips_v6_count: int | None = 0
Number of flexible IPv6 addresses to attach to the new Instance.
- security_group_id: str | None = None
Instance security group ID (optional).
- tags: List[str] | None
List of tags for the Instance template.
- template_id: str
Template ID of the resource.
- volumes: Dict[str, VolumeInstanceTemplate] | None
Template of Instance volume.
- zone: str | None = None
Zone to target. If none is passed will use default zone from the config.
- class scaleway_async.autoscaling.v1alpha1.VolumeInstanceTemplate(name: 'str', tags: 'List[str]', boot: 'bool', volume_type: 'VolumeInstanceTemplateVolumeType', from_empty: 'Optional[VolumeInstanceTemplateFromEmpty]' = None, from_snapshot: 'Optional[VolumeInstanceTemplateFromSnapshot]' = None, perf_iops: 'Optional[int]' = None)
Bases:
object- boot: bool
Force the Instance to boot on this volume.
- from_empty: VolumeInstanceTemplateFromEmpty | None = None
- from_snapshot: VolumeInstanceTemplateFromSnapshot | None = None
- name: str
Name of the volume.
- perf_iops: int | None = None
- tags: List[str]
List of tags assigned to the volume.
- volume_type: VolumeInstanceTemplateVolumeType
Type of the volume.
- class scaleway_async.autoscaling.v1alpha1.VolumeInstanceTemplateFromEmpty(size: 'int')
Bases:
object- size: int