ECS

The SDK interfaces based on the Nova v2 API are as follows. For details about the invoking methods, see the sample codes.

Interface

Method

API

ComputeFloatingIPService

ActionResponse addFloatingIP(Server server, String ipAddress)

POST /v2/{project_id}/servers/{server_id}/action

Link

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

POST /v2/{project_id}/servers/{server_id}/action

Link

FloatingIP allocateIP(String pool)

POST /v2/{project_id}/os-floating-ips

Link

ActionResponse deallocateIP(String id)

DELETE /v2/{project_id}/os-floating-ips/{floating_ip_id}

Link

List<? extends FloatingIP> list()

GET /v2/{project_id}/os-floating-ips

Link

ActionResponse removeFloatingIP(Server server, String ipAddress)

POST /v2/{project_id}/servers/{server_id}/action

Link

ComputeImageService

ActionResponse delete(String imageId)

DELETE /v2/{project_id}/images/{image_id}

Link

Image get(String imageId)

GET /v2/{project_id}/images/{image_id}

Link

List<? extends Image> list()

GET /v2/{project_id}/images/detail

Link

List<? extends Image> list(boolean detailed)

  • detailed=true:

    GET /v2/{project_id}/images/detail

    Link

  • detailed=false:

    GET /v2/{project_id}/images

    Link

ComputeSecurityGroupService

SecGroupExtension create(String name, String description)

POST /v2/{project_id}/os-security-groups

Link

SecGroupExtension.Rule createRule(SecGroupExtension.Rule rule)

POST /v2/{project_id}/os-security-group-rules

Link

ActionResponse delete(String securityGroupId)

DELETE /v2/{project_id}/os-security-groups/{security_group}

Link

ActionResponse deleteRule(String ruleId)

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

Link

SecGroupExtension get(String securityGroupId)

GET /v2/{project_id}/os-security-groups/{security_group_id}

Link

List<? extends SecGroupExtension> list()

GET /v2/{project_id}/os-security-groups

Link

SecGroupExtension update(String securityGroupId, String name, String description)

PUT /v2/{project_id}/os-security-groups/{security_group_id}

Link

FlavorService

Flavor get(String flavorId)

GET /v2/{project_id}/flavors/{flavor_id}

Link

List<? extends Flavor> list()

GET /v2/{project_id}/flavors/detail

Link

KeypairService

Keypair create(String name, String publicKey)

POST /v2/{project_id}/os-keypairs

Link

ActionResponse delete(String name)

DELETE /v2/{project_id}/os-keypairs/{keypair_name}

Link

Keypair get(String name)

GET /v2/{project_id}/os-keypairs/{keypair_name}

Link

List<? extends Keypair> list()

GET /v2/{project_id}/os-keypairs

Link

InstanceActionsService

List<? extends InstanceAction> list(String serverId)

GET /v2/{project_id}/servers/{server_id}/os-instance-actions

Link

InstanceAction get(String serverId, String requestId)

GET /v2/{project_id}/servers/{server_id}/os-instance-actions/{request_id}

Link

QuotaSetService

QuotaSet get(String tenantId)

GET /v2/{project_id}/os-quota-sets/{project_id}

Link

QuotaSet get(String tenantId, String userId)

GET /v2/{project_id}/os-quota-sets/{project_id}?user_id={user_id}

Link

Limits limits()

GET /v2/{project_id}/limits

Link

getDefault(String tenantId)

GET /v2/{project_id}/os-quota-sets/{project_id}/defaults

Link

ServerGroupService

ServerGroup create(String name, String policy)

POST /v2/{project_id}/os-server-groups

Link

ActionResponse delete(String id)

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

Link

ServerGroup get(String id)

GET /v2/{project_id}/os-server-groups/{server_group_id}

Link

List<? extends ServerGroup> list()

GET /v2/{project_id}/os-server-groups

Link

ServerService

VolumeAttachment getAttachVolume(String serverId, String volumeId)

GET /v2/{project_id}/servers/{server_id}/os-volume_attachments/{volume_id}

Link

List<? extends VolumeAttachment> listAttachedVolumes(String serverId)

GET /v2/{project_id}/servers/{server_id}/os-volume_attachments

Link

ActionResponse action(String serverId, Action action)

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

POST /v2/{project_id}/servers/{server_id}/action

Link (START)

Link (STOP)

ActionResponse stop(String serverId, StopType type)

POST /v2/{project_id}/servers/{server_id}/action

Link

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

POST /v2/{project_id}/servers/{server_id}/os-volume_attachments

Link

Server boot(ServerCreate server)

POST /v2/{project_id}/servers

Link

Server bootAndWaitActive(ServerCreate server, int maxWaitTime)

POST /v2/{project_id}/servers

Link

GET /v2/{project_id}/servers/{server_id}

Link

ActionResponse confirmResize(String serverId)

POST /v2/{project_id}/servers/{server_id}/action

Link

String createSnapshot(String serverId, String snapshotName)

POST /v2/{project_id}/servers/{server_id}/action

Link

ActionResponse delete(String serverId)

DELETE /v2/{project_id}/servers/{server_id}

Link

ActionResponse deleteMetadataItem(String serverId, String key)

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

Link

ActionResponse detachVolume(String serverId, String attachmentId)

DELETE /v2/{project_id}/servers/{server_id}/os-volume_attachments/{volume_id}

Link

ActionResponse detachVolume(String serverId, String volumeId, int deleteFlag)

DELETE /v2/{project_id}/servers/{server_id}/os-volume_attachments/{volume_id}?delete_flag={delete_flag}

Link

Server get(String serverId)

GET /v2/{project_id}/servers/{server_id}

Link

Map<String,String> getMetadata(String serverId)

GET /v2/{project_id}/servers/{server_id}/metadata

Link

List<? extends Server> list()

GET /v2/{project_id}/servers/detail

Link

List<? extends Server> list(boolean detail)

  • detail=true:

    GET /v2/{project_id}/servers/detail

    Link

  • detail=false:

    GET /v2/{project_id}/servers

    Link

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

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

Link

ActionResponse reboot(String serverId, RebootType type)

POST /v2/{project_id}/servers/{server_id}/action

Link

ActionResponse resize(String serverId, String flavorId)

POST /v2/{project_id}/servers/{server_id}/action

Link

ActionResponse revertResize(String serverId)

POST /v2/{project_id}/servers/{server_id}/action

Link

Server update(String serverId, ServerUpdateOptions options)

PUT /v2/{project_id}/servers/{server_id}

Link

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

PUT /v2/{project_id}/servers/{server_id}/metadata

Link

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

GET /v2/{project_id}/servers/{server_id}

Link

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

  • detail = true:

GET /v2/{project_id}/servers/detail{?changes-since,image,flavor,name,status,limit,marker,not-tags,reservation_id,ip}

Link

  • detail = false:

GET /v2/{project_id}/servers{?changes-since,image,flavor,name,status,limit,marker,not-tags,reservation_id}

Link

String getConsoleOutput(String serverId, int numLines)

POST /v2/{project_id}/servers/{server_id}/action

Link

Map<String, String> getMetadataItem(String serverId, String key)

GET /v2/{project_id}/servers/{server_id}/metadata/{key}

Link

Map<String, String> setMetadataItem(String serverId, String key, String value)

PUT /v2/{project_id}/servers/{server_id}/metadata/{key}

Link

InterfaceService (ext)

InterfaceAttachment create(String serverId, String portId)

POST /v2/{project_id}/servers/{server_id}/os-interface

Link

InterfaceAttachment create(String serverId, NovaInterfaceAttachmentCreate novaInterfaceAttachmentCreate)

POST /v2/{project_id}/servers/{server_id}/os-interface

Link

ActionResponse detach(String serverId, String attachmentId)

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

Link

InterfaceAttachment get(String serverId, String attachmentId)

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

Link

List<? extends InterfaceAttachment> list(String serverId)

GET /v2/{project_id}/servers/{server_id}/os-interface

Link

ZoneService(ext)

List<? extends AvailabilityZone> list()

GET /v2/{project_id}/os-availability-zone

Link

The SDK interfaces based on the Nova v2.1 API are as follows. For details about the invoking methods, see the sample codes.

Interface

Method

API

ServerService

NovaRemoteConsoleResponse getRemoteConsole(String serverId, NovaRemoteConsole remoteConsole, Map<String, String> headers)

POST /v2.1/{project_id}/servers/{server_id}/remote-consoles

Link

ServerTagService

NovaServerTag list(String serverId)

GET /v2.1/{project_id}/servers/{server_id}/tags

Link

NovaServerTag addTags(String serverId, NovaServerTag tags)

PUT /v2.1/{project_id}/servers/{server_id}/tags

Link

ActionResponse delete(String serverId, String tag)

DELETE /v2.1/{project_id}/servers/{server_id}/tags

Link

ActionResponse check(String serverId, String tag)

GET /v2.1/{project_id}/servers/{server_id}/tags/{tag}

Link

ActionResponse addSingle(String serverId, String tag)

PUT /v2.1/{project_id}/servers/{server_id}/tags/{tag}

Link

ActionResponse deleteAll(String serverId)

DELETE /v2.1/{project_id}/servers/{server_id}/tags/{tag}

Link

The SDK interfaces based on the ECS v1 API are as follows. For details about the invoking methods, see the sample codes.

Interface

Method

API

CloudServerService

String create(ServerCreate creation)

POST /v1/{project_id}/cloudservers

Link

List<CloudServer> list()

GET /v1/{project_id}/cloudservers/detail

Link

CloudServers listWithCount()

GET /v1/{project_id}/cloudservers/detail

Link

CloudServer get(String serverId)

GET /v1/{project_id}/cloudservers/{server_id}

Link

String resize(ResizeServer resize,String serverId)

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

Link

String delete(List<String> serverIds, boolean deletePublicIp, boolean deleteVolume)

POST /v1/{project_id}/cloudservers/delete

Link

String stop(List<String> serverIds, StopType type)

POST /v1/{project_id}/cloudservers/action

Link

String reboot(List<String> serverIds, RebootType type)

POST /v1/{project_id}/cloudservers/action

Link

String start(List<String> serverIds)

POST /v1/{project_id}/cloudservers/action

Link

List<CloudServer> list(Map<String, String> filteringParams)

GET /v1/{project_id}/cloudservers/detail{?flavor,name,status,limit,offset,not-tags,reservation_id,enterprise_project_id}

Link

CloudServers listWithCount(Map<String, String> filteringParams)

GET /v1/{project_id}/cloudservers/detail{?flavor,name,status,limit,offset,not-tags,reservation_id,enterprise_project_id}

Link

List<Flavor> getSpecifications(String availabilityZone)

GET /v1/{project_id}/cloudservers/flavors{?availability_zone}

Link

CloudAbsoluteLimit limits()

GET /v1/{project_id}/cloudservers/limits

Link

SupportAutoRecovery getAutoRecovery(String serverId)

GET /v1/{project_id}/cloudservers/{server_id}/autorecovery

Link

ActionResponse manageAutoRecovery(String serverId, SupportAutoRecovery supportAutoRecovery)

PUT /v1/{project_id}/cloudservers/{server_id}/autorecovery

Link

RemoteConsoleResponse remoteConsole(String serverId, RemoteConsole remoteConsole)

POST /v1/{project_id}/cloudservers/{server_id}/remote_console

Link

JobService

Job get(String jobId)

GET /v1/{project_id}/jobs/{job_id}

Link

InterfaceService

InterfaceAttachments list(String serverId)

GET /v1/{project_id}/cloudservers/{server_id}/os-interface

Link

TagService

ActionResponse add(String serverId, List<ServerTags>

serverTags)

POST /v1/{project_id}/cloudservers/{server_id}/tags/action

Link

ActionResponse delete(String serverId, List<ServerTags>

serverTags)

POST /v1/{project_id}/cloudservers/{server_id}/tags/action

Link

CloudServerTag list(String serverId)

GET /v1/{project_id}/cloudservers/{server_id}/tags

Link

ProjectTag listProjectTags()

GET /v1/{project_id}/cloudservers/tags

Link

The SDK interfaces based on the ECS v2 API are as follows. For details about the invoking methods, see the sample codes.

Interface

Method

API

CloudServerV2Service

AsyncJobEntity reinstallOS(OSReinstall osReinstall, String serverId)

POST /v2/{project_id}/cloudservers/{server_id}/reinstallos

Link

The SDK interfaces based on the ECS v1.1 API are as follows. For details about the invoking methods, see the sample codes.

Interface

Method

API

CloudServerService

AsyncServerRespEntity create(ServerCreate creation)

POST /v1.1/{project_id}/cloudservers

Link

AsyncRespEntity resize(ResizeServer resize,String serverId)

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

Link