Help Center > > Developer Guide> Mapping Between API and SDK> Python> AS

AS

Updated at: Oct 09, 2019 GMT+08:00
The SDK interfaces based on the AS v1 API are as follows. Invocation example: conn.auto_scaling.create_group()

Interface

Method

API

Group Operations

create_group(self, **attrs)

POST /autoscaling-api/v1/{project_id}/scaling_group

groups(self, **query)

GET /autoscaling-api/v1/{project_id}/scaling_group

get_group(self, group)

GET /autoscaling-api/v1/{project_id}/scaling_group/{scaling_group_id}

update_group(self, group, **attrs)

PUT /autoscaling-api/v1/{project_id}/scaling_group/{scaling_group_id}

delete_group(self, group, ignore_missing=True)

DELETE /autoscaling-api/v1/{project_id}/scaling_group/{scaling_group_id}

resume_group(self, group)

POST /autoscaling-api/v1/{project_id}/scaling_group/{scaling_group_id}/action

pause_group(self, group)

POST /autoscaling-api/v1/{project_id}/scaling_group/{scaling_group_id}/action

Config Operations

create_config(self, name, **attrs)

POST /autoscaling-api/v1/{project_id}/scaling_configuration

configs(self, **query)

GET /autoscaling-api/v1/{project_id}/scaling_configuration

get_config(self, config)

GET /autoscaling-api/v1/{project_id}/scaling_configuration/{scaling_configuration_id}

delete_config(self, config, ignore_missing=True)

DELETE /autoscaling-api/v1/{project_id}/scaling_configuration/{scaling_configuration_id}

batch_delete_configs(self, configs)

POST /autoscaling-api/v1/{project_id}/scaling_configurations

Instance Operations

instances(self, group, **query)

GET /autoscaling-api/v1/{project_id}/scaling_group_instance/{scaling_group_id}/list

remove_instance(self, instance, delete_instance=False, ignore_missing=True)

DELETE /autoscaling-api/v1/{project_id}/scaling_group_instance/{instance_id}

batch_add_instances(self, group, instances)

POST /autoscaling-api/v1/{project_id}/scaling_group_instance/{scaling_group_id}/action

batch_remove_instances(self, group, instances, delete_instance=False)

POST /autoscaling-api/v1/{project_id}/scaling_group_instance/{scaling_group_id}/action

Policy Operations

create_policy(self, **attrs)

POST /autoscaling-api/v1/{project_id}/scaling_policy

update_policy(self, policy, **attrs)

PUT /autoscaling-api/v1/{project_id}/scaling_policy/{scaling_policy_id}

policies(self, group, **query)

GET /autoscaling-api/v1/{project_id}/scaling_policy/{scaling_group_id}/list

get_policy(self, policy)

GET /autoscaling-api/v1/{project_id}/scaling_policy/{scaling_policy_id}

execute_policy(self, policy)

POST /autoscaling-api/v1/{project_id}/scaling_policy/{scaling_policy_id}/action

resume_policy(self, policy)

POST /autoscaling-api/v1/{project_id}/scaling_policy/{scaling_policy_id}/action

pause_policy(self, policy)

POST /autoscaling-api/v1/{project_id}/scaling_policy/{scaling_policy_id}/action

delete_policy(self, policy, ignore_missing=True)

DELETE /autoscaling-api/v1/{project_id}/scaling_policy/{scaling_policy_id}

Activity Operations

activities(self, group, **query)

GET /autoscaling-api/v1/{project_id}/scaling_activity_log/{scaling_group_id}

Quota Operations

quotas(self, group=None)

GET /autoscaling-api/v1/{project_id}/quotas

quotas(self, group=None)

GET /autoscaling-api/v1/{project_id}/quotas/{scaling_group_id}

Lifecycle_hook Operations

create_lifecycle_hook(self, group, **attrs)

POST /autoscaling-api/v1/{project_id}/scaling_lifecycle_hook/{scaling_group_id}

lifecycle_hooks(self, group)

GET /autoscaling-api/v1/{project_id}/scaling_lifecycle_hook/{scaling_group_id}/list

get_lifecycle_hook(self, group, lifecycle_hook)

GET /autoscaling-api/v1/{project_id}/scaling_lifecycle_hook/{scaling_group_id}/{lifecycle_hook_name}

update_lifecycle_hook(self, group, lifecycle_hook, **attrs)

PUT /autoscaling-api/v1/{project_id}/scaling_lifecycle_hook/{scaling_group_id}/{lifecycle_hook_name}

delete_lifecycle_hook(self, group, lifecycle_hook)

DELETE /autoscaling-api/v1/{project_id}/scaling_lifecycle_hook/{scaling_group_id}/{lifecycle_hook_name}

call_back_instance(self, group, **attrs)

PUT /autoscaling-api/v1/{project_id}/scaling_instance_hook/{scaling_group_id}/callback

get_group_hanging_instance(self, group, **query)

GET /autoscaling-api/v1/{project_id}/scaling_instance_hook/{scaling_group_id}/list{?instance_id}

Notification Operations

create_notification(self, group, **data)

PUT /autoscaling-api/v1/{project_id}/scaling_notification/{scaling_group_id}

notifications(self, group)

GET /autoscaling-api/v1/{project_id}/scaling_notification/{scaling_group_id}

delete_notification(self, group, topic)

DELETE /autoscaling-api/v1/{project_id}/scaling_notification/{scaling_group_id}/{topic_urn}

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel