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 |
|
ActionResponse addFloatingIP(Server server, String fixedIpAddress, String ipAddress) |
POST /v2/{project_id}/servers/{server_id}/action |
|
|
FloatingIP allocateIP(String pool) |
POST /v2/{project_id}/os-floating-ips |
|
|
ActionResponse deallocateIP(String id) |
DELETE /v2/{project_id}/os-floating-ips/{floating_ip_id} |
|
|
List<? extends FloatingIP> list() |
GET /v2/{project_id}/os-floating-ips |
|
|
ActionResponse removeFloatingIP(Server server, String ipAddress) |
POST /v2/{project_id}/servers/{server_id}/action |
|
|
ComputeImageService |
ActionResponse delete(String imageId) |
DELETE /v2/{project_id}/images/{image_id} |
|
Image get(String imageId) |
GET /v2/{project_id}/images/{image_id} |
|
|
List<? extends Image> list() |
GET /v2/{project_id}/images/detail |
|
|
List<? extends Image> list(boolean detailed) |
||
|
ComputeSecurityGroupService |
SecGroupExtension create(String name, String description) |
POST /v2/{project_id}/os-security-groups |
|
SecGroupExtension.Rule createRule(SecGroupExtension.Rule rule) |
POST /v2/{project_id}/os-security-group-rules |
|
|
ActionResponse delete(String securityGroupId) |
DELETE /v2/{project_id}/os-security-groups/{security_group} |
|
|
ActionResponse deleteRule(String ruleId) |
DELETE /v2/{project_id}/os-security-group-rules/{security_group_rule_id} |
|
|
SecGroupExtension get(String securityGroupId) |
GET /v2/{project_id}/os-security-groups/{security_group_id} |
|
|
List<? extends SecGroupExtension> list() |
GET /v2/{project_id}/os-security-groups |
|
|
SecGroupExtension update(String securityGroupId, String name, String description) |
PUT /v2/{project_id}/os-security-groups/{security_group_id} |
|
|
FlavorService |
Flavor get(String flavorId) |
GET /v2/{project_id}/flavors/{flavor_id} |
|
List<? extends Flavor> list() |
GET /v2/{project_id}/flavors/detail |
|
|
KeypairService |
Keypair create(String name, String publicKey) |
POST /v2/{project_id}/os-keypairs |
|
ActionResponse delete(String name) |
DELETE /v2/{project_id}/os-keypairs/{keypair_name} |
|
|
Keypair get(String name) |
GET /v2/{project_id}/os-keypairs/{keypair_name} |
|
|
List<? extends Keypair> list() |
GET /v2/{project_id}/os-keypairs |
|
|
InstanceActionsService |
List<? extends InstanceAction> list(String serverId) |
GET /v2/{project_id}/servers/{server_id}/os-instance-actions |
|
InstanceAction get(String serverId, String requestId) |
GET /v2/{project_id}/servers/{server_id}/os-instance-actions/{request_id} |
|
|
QuotaSetService |
QuotaSet get(String tenantId) |
GET /v2/{project_id}/os-quota-sets/{project_id} |
|
QuotaSet get(String tenantId, String userId) |
GET /v2/{project_id}/os-quota-sets/{project_id}?user_id={user_id} |
|
|
Limits limits() |
GET /v2/{project_id}/limits |
|
|
getDefault(String tenantId) |
GET /v2/{project_id}/os-quota-sets/{project_id}/defaults |
|
|
ServerGroupService |
ServerGroup create(String name, String policy) |
POST /v2/{project_id}/os-server-groups |
|
ActionResponse delete(String id) |
DELETE /v2/{project_id}/os-server-groups/{server_group_id} |
|
|
ServerGroup get(String id) |
GET /v2/{project_id}/os-server-groups/{server_group_id} |
|
|
List<? extends ServerGroup> list() |
GET /v2/{project_id}/os-server-groups |
|
|
ServerService |
VolumeAttachment getAttachVolume(String serverId, String volumeId) |
GET /v2/{project_id}/servers/{server_id}/os-volume_attachments/{volume_id} |
|
List<? extends VolumeAttachment> listAttachedVolumes(String serverId) |
GET /v2/{project_id}/servers/{server_id}/os-volume_attachments |
|
|
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 |
|
|
VolumeAttachment attachVolume(String serverId, String volumeId, String device) |
POST /v2/{project_id}/servers/{server_id}/os-volume_attachments |
|
|
Server boot(ServerCreate server) |
POST /v2/{project_id}/servers |
|
|
Server bootAndWaitActive(ServerCreate server, int maxWaitTime) |
POST /v2/{project_id}/servers GET /v2/{project_id}/servers/{server_id} |
|
|
ActionResponse confirmResize(String serverId) |
POST /v2/{project_id}/servers/{server_id}/action |
|
|
String createSnapshot(String serverId, String snapshotName) |
POST /v2/{project_id}/servers/{server_id}/action |
|
|
ActionResponse delete(String serverId) |
DELETE /v2/{project_id}/servers/{server_id} |
|
|
ActionResponse deleteMetadataItem(String serverId, String key) |
DELETE /v2/{project_id}/servers/{server_id}/metadata/{key} |
|
|
ActionResponse detachVolume(String serverId, String attachmentId) |
DELETE /v2/{project_id}/servers/{server_id}/os-volume_attachments/{volume_id} |
|
|
ActionResponse detachVolume(String serverId, String volumeId, int deleteFlag) |
DELETE /v2/{project_id}/servers/{server_id}/os-volume_attachments/{volume_id}?delete_flag={delete_flag} |
|
|
Server get(String serverId) |
GET /v2/{project_id}/servers/{server_id} |
|
|
Map<String,String> getMetadata(String serverId) |
GET /v2/{project_id}/servers/{server_id}/metadata |
|
|
List<? extends Server> list() |
GET /v2/{project_id}/servers/detail |
|
|
List<? extends Server> list(boolean detail) |
||
|
List<? extends Server> list(Map<String,String> filteringParams) |
GET /v2/{project_id}/servers/detail{?changes-since,image,flavor,name,status,host,limit,marker} |
|
|
ActionResponse reboot(String serverId, RebootType type) |
POST /v2/{project_id}/servers/{server_id}/action |
|
|
ActionResponse resize(String serverId, String flavorId) |
POST /v2/{project_id}/servers/{server_id}/action |
|
|
ActionResponse revertResize(String serverId) |
POST /v2/{project_id}/servers/{server_id}/action |
|
|
Server update(String serverId, ServerUpdateOptions options) |
PUT /v2/{project_id}/servers/{server_id} |
|
|
Map<String,String> updateMetadata(String serverId, Map<String,String> metadata) |
PUT /v2/{project_id}/servers/{server_id}/metadata |
|
|
Server waitForServerStatus(String serverId, Server.Status status, int maxWait, TimeUnit maxWaitUnit) |
GET /v2/{project_id}/servers/{server_id} |
|
|
List<? extends Server> list(boolean detail , Map<String, String> filteringParams) |
GET /v2/{project_id}/servers/detail{?changes-since,image,flavor,name,status,limit,marker,not-tags,reservation_id,ip}
GET /v2/{project_id}/servers{?changes-since,image,flavor,name,status,limit,marker,not-tags,reservation_id} |
|
|
String getConsoleOutput(String serverId, int numLines) |
POST /v2/{project_id}/servers/{server_id}/action |
|
|
Map<String, String> getMetadataItem(String serverId, String key) |
GET /v2/{project_id}/servers/{server_id}/metadata/{key} |
|
|
Map<String, String> setMetadataItem(String serverId, String key, String value) |
PUT /v2/{project_id}/servers/{server_id}/metadata/{key} |
|
|
InterfaceService (ext) |
InterfaceAttachment create(String serverId, String portId) |
POST /v2/{project_id}/servers/{server_id}/os-interface |
|
InterfaceAttachment create(String serverId, NovaInterfaceAttachmentCreate novaInterfaceAttachmentCreate) |
POST /v2/{project_id}/servers/{server_id}/os-interface |
|
|
ActionResponse detach(String serverId, String attachmentId) |
DELETE /v2/{project_id}/servers/{server_id}/os-interface/{port_id} |
|
|
InterfaceAttachment get(String serverId, String attachmentId) |
GET /v2/{project_id}/servers/{server_id}/os-interface/{port_id} |
|
|
List<? extends InterfaceAttachment> list(String serverId) |
GET /v2/{project_id}/servers/{server_id}/os-interface |
|
|
ZoneService(ext) |
List<? extends AvailabilityZone> list() |
GET /v2/{project_id}/os-availability-zone |
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 |
|
ServerTagService |
NovaServerTag list(String serverId) |
GET /v2.1/{project_id}/servers/{server_id}/tags |
|
NovaServerTag addTags(String serverId, NovaServerTag tags) |
PUT /v2.1/{project_id}/servers/{server_id}/tags |
|
|
ActionResponse delete(String serverId, String tag) |
DELETE /v2.1/{project_id}/servers/{server_id}/tags |
|
|
ActionResponse check(String serverId, String tag) |
GET /v2.1/{project_id}/servers/{server_id}/tags/{tag} |
|
|
ActionResponse addSingle(String serverId, String tag) |
PUT /v2.1/{project_id}/servers/{server_id}/tags/{tag} |
|
|
ActionResponse deleteAll(String serverId) |
DELETE /v2.1/{project_id}/servers/{server_id}/tags/{tag} |
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 |
|
List<CloudServer> list() |
GET /v1/{project_id}/cloudservers/detail |
|
|
CloudServers listWithCount() |
GET /v1/{project_id}/cloudservers/detail |
|
|
CloudServer get(String serverId) |
GET /v1/{project_id}/cloudservers/{server_id} |
|
|
String resize(ResizeServer resize,String serverId) |
POST /v1/{project_id}/cloudservers/{server_id}/resize |
|
|
String delete(List<String> serverIds, boolean deletePublicIp, boolean deleteVolume) |
POST /v1/{project_id}/cloudservers/delete |
|
|
String stop(List<String> serverIds, StopType type) |
POST /v1/{project_id}/cloudservers/action |
|
|
String reboot(List<String> serverIds, RebootType type) |
POST /v1/{project_id}/cloudservers/action |
|
|
String start(List<String> serverIds) |
POST /v1/{project_id}/cloudservers/action |
|
|
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} |
|
|
CloudServers listWithCount(Map<String, String> filteringParams) |
GET /v1/{project_id}/cloudservers/detail{?flavor,name,status,limit,offset,not-tags,reservation_id,enterprise_project_id} |
|
|
List<Flavor> getSpecifications(String availabilityZone) |
GET /v1/{project_id}/cloudservers/flavors{?availability_zone} |
|
|
CloudAbsoluteLimit limits() |
GET /v1/{project_id}/cloudservers/limits |
|
|
SupportAutoRecovery getAutoRecovery(String serverId) |
GET /v1/{project_id}/cloudservers/{server_id}/autorecovery |
|
|
ActionResponse manageAutoRecovery(String serverId, SupportAutoRecovery supportAutoRecovery) |
PUT /v1/{project_id}/cloudservers/{server_id}/autorecovery |
|
|
RemoteConsoleResponse remoteConsole(String serverId, RemoteConsole remoteConsole) |
POST /v1/{project_id}/cloudservers/{server_id}/remote_console |
|
|
JobService |
Job get(String jobId) |
GET /v1/{project_id}/jobs/{job_id} |
|
InterfaceService |
InterfaceAttachments list(String serverId) |
GET /v1/{project_id}/cloudservers/{server_id}/os-interface |
|
TagService |
ActionResponse add(String serverId, List<ServerTags> serverTags) |
POST /v1/{project_id}/cloudservers/{server_id}/tags/action |
|
ActionResponse delete(String serverId, List<ServerTags> serverTags) |
POST /v1/{project_id}/cloudservers/{server_id}/tags/action |
|
|
CloudServerTag list(String serverId) |
GET /v1/{project_id}/cloudservers/{server_id}/tags |
|
|
ProjectTag listProjectTags() |
GET /v1/{project_id}/cloudservers/tags |
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 |
The SDK interfaces based on the ECS v1.1 API are as follows. For details about the invoking methods, see the sample codes.
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.