• CLI

sdk
  1. Help Center
  2. CLI
  3. Developer Guide
  4. Mapping Between API and SDK
  5. Java
  6. ECS

ECS

Interface

Method

API

ComputeFloatingIPService

ActionResponse addFloatingIP(Server server, String ipAddress)

POST /servers/{server_id}/action Add FloatingIp

ActionResponse addFloatingIP(Server server, String fixedIpAddress, String ipAddress)

POST /servers/{server_id}/action Add FloatingIp

FloatingIP allocateIP(String pool)

POST /os-floating-ips

ActionResponse deallocateIP(String id)

DELETE /os-floating-ips/{floating_ip_id}

List<? extends FloatingIP> list()

GET /os-floating-ips

ActionResponse removeFloatingIP(Server server, String ipAddress)

POST /servers/{server_id}/action Remove FloatingIp

ComputeImageService

ActionResponse delete(String imageId)

DELETE /images/{image_id}

Image get(String imageId)

GET /images/{image_id}

List<? extends Image> list()

GET /images/detail

List<? extends Image> list(boolean detailed)

GET /images

ComputeSecurityGroupService

SecGroupExtension create(String name, String description)

POST /os-security-groups

SecGroupExtension.Rule createRule(SecGroupExtension.Rule rule)

POST /os-security-group-rules

ActionResponse delete(String securityGroupId)

DELETE /os-security-groups/{security_group}

ActionResponse deleteRule(String ruleId)

DELETE /os-security-group-rules/{security_group_rule_id}

SecGroupExtension get(String securityGroupId)

GET /os-security-groups/{security_group_id}

List<? extends SecGroupExtension> list()

GET /os-security-groups

FlavorService

Flavor get(String flavorId)

GET /flavors/{flavor_id}

List<? extends Flavor> list()

GET /flavors/detail?is_public=None

KeypairService

Keypair create(String name, String publicKey)

POST /os-keypairs

ActionResponse delete(String name)

DELETE /os-keypairs/{keypair_name}

Keypair get(String name)

GET /os-keypairs/{keypair_name}

List<? extends Keypair> list()

GET /os-keypairs

QuotaSetService

QuotaSet get(String tenantId)

GET /os-quota-sets/{tenant_id}

Limits limits()

GET /limits

ServerGroupService

ServerGroup create(String name, String policy)

POST /os-server-groups

ActionResponse delete(String id)

DELETE /os-server-groups/{{server_group_id}}

ServerGroup get(String id)

GET /os-server-groups/{server_group_id}

List<? extends ServerGroup> list()

GET /os-server-groups

ServerService

ActionResponse action(String serverId, Action action)

Executes the specified Action such as RESUME, PAUSE, START, and STOP.

POST /servers/{server_id}/action

start server action

stop server action

lock server action

unlock server action

VolumeAttachment attachVolume(String serverId, String volumeId, String device)

POST /servers/{server_id}/os-volume_attachments

Server boot(ServerCreate server)

POST /servers

Server bootAndWaitActive(ServerCreate server, int maxWaitTime)

POST /servers

GET /servers/{server_id}

ActionResponse confirmResize(String serverId)

POST /servers/{server_id}/action

resize server action

String createSnapshot(String serverId, String snapshotName)

POST

/servers/{server_id}/action

Create Image (createImage Action)

ActionResponse delete(String serverId)

DELETE /servers/{server_id}

ActionResponse deleteMetadataItem(String serverId, String key)

DELETE /servers/{server_id}/metadata/{key}

ActionResponse detachVolume(String serverId, String attachmentId)

DELETE /servers/{server_id}/os-volume_attachments/{attachment_id}

Server get(String serverId)

GET /servers/{server_id}

Map<String,String> getMetadata(String serverId)

GET /servers/{server_id}/metadata

List<? extends Server> list()

GET /servers/detail

List<? extends Server> list(boolean detail)

GET /servers

List<? extends Server> list(Map<String,String> filteringParams)

GET /servers/detail{?changes-since,image,flavor,name,status,host,limit,marker}

ActionResponse reboot(String serverId, RebootType type)

POST /servers/{server_id}/action

reboot server action

ActionResponse rebuild(String serverId, RebuildOptions options)

POST /servers/{server_id}/action

rebuild server action

ActionResponse resize(String serverId, String flavorId)

POST /servers/{server_id}/action

resize server action

ActionResponse revertResize(String serverId)

POST /servers/{server_id}/action

revert server action

resize server action

Server update(String serverId, ServerUpdateOptions options)

PUT /servers/{server_id}

Map<String,String> updateMetadata(String serverId, Map<String,String> metadata)

PUT /servers/{server_id}/metadata

Server waitForServerStatus(String serverId, Server.Status status, int maxWait, TimeUnit maxWaitUnit)

GET /servers/{server_id}

InterfaceService (ext)

InterfaceAttachment create(String serverId, String portId)

POST /servers/{server_id}/os-interface

ActionResponse detach(String serverId, String attachmentId)

DELETE /servers/{server_id}/os-interface/{port_id}

InterfaceAttachment get(String serverId, String attachmentId)

GET /servers/{server_id}/os-interface/{port_id}

List<? extends InterfaceAttachment> list(String serverId)

GET /servers/{server_id}/os-interface

ZoneService(ext)

List<? extends AvailabilityZone> list()

GET /os-availability-zone

Interface

Method

API

CloudServerService

osclient.ecs().servers().create(creation)

POST /v1/{tenant_id}/cloudservers

osclient.ecs().servers().list()

GET /v1/{tenant_id}/cloudservers/detail

osclient.ecs().servers().get(" serverId ")

GET /v1/{tenant_id}/cloudservers/{server_id}

osclient.ecs().servers().resize(resize, " serverId ")

POST /v1/{tenant_id}/cloudservers/{server_id}/resize

osclient.ecs().servers().delete(serverIds, deletePublicIp, deleteVolume);

POST /v1/{tenant_id}/cloudservers/action

osclient.ecs().servers().stop(serverIds, type)

POST /v1/{tenant_id}/cloudservers/action

osclient.ecs().servers().reboot(serverIds, type)

POST /v1/{tenant_id}/cloudservers/action

osclient.ecs().servers().start(serverIds)

POST /v1/{tenant_id}/cloudservers/action

JobService

osclient.ecs().jobs().get(" jobId ")

GET /v1/{tenant_id}/jobs/{job_id}

Interface

Method

API

CloudServerService

osclient.ecsV1_1().servers().create(creation)

POST /v1.1/{tenant_id}/cloudservers

osclient.ecsV1_1().servers().resize(resize, " serverId")

POST /v1.1/{tenant_id}/cloudservers/{server_id}/resize