Skip to content

Commit

Permalink
Support describe and modify NVMe on instance.
Browse files Browse the repository at this point in the history
  • Loading branch information
sdk-team committed Oct 30, 2024
1 parent e3ef92a commit 57652cb
Show file tree
Hide file tree
Showing 10 changed files with 131 additions and 3 deletions.
3 changes: 3 additions & 0 deletions aliyun-java-sdk-ecs/ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2024-10-30 Version: 5.11.11
- Support describe and modify NVMe on instance.

2024-10-15 Version: 5.11.10
- Add ResourcePoolOptions.Strategy for CreateAutoProvisioningGroup.

Expand Down
2 changes: 1 addition & 1 deletion aliyun-java-sdk-ecs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-ecs</artifactId>
<packaging>jar</packaging>
<version>5.11.10</version>
<version>5.11.11</version>
<name>aliyun-java-sdk-ecs</name>
<url>http://www.aliyun.com</url>
<description>Aliyun Open API SDK for Java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ public class CreateCommandRequest extends RpcAcsRequest<CreateCommandResponse> {

private String name;

private Boolean enableParameter;
private Boolean enableParameter;

private String launcher;
public CreateCommandRequest() {
super("Ecs", "2014-05-26", "CreateCommand", "ecs");
setMethod(MethodType.POST);
Expand Down Expand Up @@ -219,6 +221,17 @@ public void setEnableParameter(Boolean enableParameter) {
}
}

public String getLauncher() {
return this.launcher;
}

public void setLauncher(String launcher) {
this.launcher = launcher;
if(launcher != null){
putQueryParameter("Launcher", launcher);
}
}

public static class Tag {

private String key;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ public static class Command {

private String resourceGroupId;

private String launcher;

private List<ParameterDefinition> parameterDefinitions;

private List<Tag> tags;
Expand Down Expand Up @@ -243,6 +245,14 @@ public void setResourceGroupId(String resourceGroupId) {
this.resourceGroupId = resourceGroupId;
}

public String getLauncher() {
return this.launcher;
}

public void setLauncher(String launcher) {
this.launcher = launcher;
}

public List<ParameterDefinition> getParameterDefinitions() {
return this.parameterDefinitions;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ public static class ElasticityAssuranceItem {

private String startTimeType;

private String elasticityAssuranceOwnerId;

private List<AllocatedResource> allocatedResources;

private List<Tag> tags;
Expand Down Expand Up @@ -221,6 +223,14 @@ public void setStartTimeType(String startTimeType) {
this.startTimeType = startTimeType;
}

public String getElasticityAssuranceOwnerId() {
return this.elasticityAssuranceOwnerId;
}

public void setElasticityAssuranceOwnerId(String elasticityAssuranceOwnerId) {
this.elasticityAssuranceOwnerId = elasticityAssuranceOwnerId;
}

public List<AllocatedResource> getAllocatedResources() {
return this.allocatedResources;
}
Expand All @@ -243,10 +253,14 @@ public static class AllocatedResource {

private Integer totalAmount;

private Integer availableAmount;

private String zoneId;

private String instanceType;

private List<ElasticityAssuranceUsage> elasticityAssuranceUsages;

public Integer getUsedAmount() {
return this.usedAmount;
}
Expand All @@ -263,6 +277,14 @@ public void setTotalAmount(Integer totalAmount) {
this.totalAmount = totalAmount;
}

public Integer getAvailableAmount() {
return this.availableAmount;
}

public void setAvailableAmount(Integer availableAmount) {
this.availableAmount = availableAmount;
}

public String getZoneId() {
return this.zoneId;
}
Expand All @@ -278,6 +300,47 @@ public String getInstanceType() {
public void setInstanceType(String instanceType) {
this.instanceType = instanceType;
}

public List<ElasticityAssuranceUsage> getElasticityAssuranceUsages() {
return this.elasticityAssuranceUsages;
}

public void setElasticityAssuranceUsages(List<ElasticityAssuranceUsage> elasticityAssuranceUsages) {
this.elasticityAssuranceUsages = elasticityAssuranceUsages;
}

public static class ElasticityAssuranceUsage {

private String accountId;

private String serviceName;

private Integer usedAmount;

public String getAccountId() {
return this.accountId;
}

public void setAccountId(String accountId) {
this.accountId = accountId;
}

public String getServiceName() {
return this.serviceName;
}

public void setServiceName(String serviceName) {
this.serviceName = serviceName;
}

public Integer getUsedAmount() {
return this.usedAmount;
}

public void setUsedAmount(Integer usedAmount) {
this.usedAmount = usedAmount;
}
}
}

public static class Tag {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1206,13 +1206,23 @@ public static class ImageOptions {

private Boolean loginAsNonRoot;

private Boolean currentOSNVMeSupported;

public Boolean getLoginAsNonRoot() {
return this.loginAsNonRoot;
}

public void setLoginAsNonRoot(Boolean loginAsNonRoot) {
this.loginAsNonRoot = loginAsNonRoot;
}

public Boolean getCurrentOSNVMeSupported() {
return this.currentOSNVMeSupported;
}

public void setCurrentOSNVMeSupported(Boolean currentOSNVMeSupported) {
this.currentOSNVMeSupported = currentOSNVMeSupported;
}
}

public static class PrivateDnsNameOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ public class ModifyCommandRequest extends RpcAcsRequest<ModifyCommandResponse> {

private Long ownerId;

private String name;
private String name;

private String launcher;
public ModifyCommandRequest() {
super("Ecs", "2014-05-26", "ModifyCommand", "ecs");
setMethod(MethodType.POST);
Expand Down Expand Up @@ -161,6 +163,17 @@ public void setName(String name) {
if(name != null){
putQueryParameter("Name", name);
}
}

public String getLauncher() {
return this.launcher;
}

public void setLauncher(String launcher) {
this.launcher = launcher;
if(launcher != null){
putQueryParameter("Launcher", launcher);
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public static DescribeCommandsResponse unmarshall(DescribeCommandsResponse descr
command.setName(_ctx.stringValue("DescribeCommandsResponse.Commands["+ i +"].Name"));
command.setEnableParameter(_ctx.booleanValue("DescribeCommandsResponse.Commands["+ i +"].EnableParameter"));
command.setResourceGroupId(_ctx.stringValue("DescribeCommandsResponse.Commands["+ i +"].ResourceGroupId"));
command.setLauncher(_ctx.stringValue("DescribeCommandsResponse.Commands["+ i +"].Launcher"));

List<String> parameterNames = new ArrayList<String>();
for (int j = 0; j < _ctx.lengthValue("DescribeCommandsResponse.Commands["+ i +"].ParameterNames.Length"); j++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.aliyuncs.ecs.model.v20140526.DescribeElasticityAssurancesResponse;
import com.aliyuncs.ecs.model.v20140526.DescribeElasticityAssurancesResponse.ElasticityAssuranceItem;
import com.aliyuncs.ecs.model.v20140526.DescribeElasticityAssurancesResponse.ElasticityAssuranceItem.AllocatedResource;
import com.aliyuncs.ecs.model.v20140526.DescribeElasticityAssurancesResponse.ElasticityAssuranceItem.AllocatedResource.ElasticityAssuranceUsage;
import com.aliyuncs.ecs.model.v20140526.DescribeElasticityAssurancesResponse.ElasticityAssuranceItem.Tag;
import com.aliyuncs.transform.UnmarshallerContext;

Expand Down Expand Up @@ -50,15 +51,28 @@ public static DescribeElasticityAssurancesResponse unmarshall(DescribeElasticity
elasticityAssuranceItem.setTotalAssuranceTimes(_ctx.stringValue("DescribeElasticityAssurancesResponse.ElasticityAssuranceSet["+ i +"].TotalAssuranceTimes"));
elasticityAssuranceItem.setInstanceChargeType(_ctx.stringValue("DescribeElasticityAssurancesResponse.ElasticityAssuranceSet["+ i +"].InstanceChargeType"));
elasticityAssuranceItem.setStartTimeType(_ctx.stringValue("DescribeElasticityAssurancesResponse.ElasticityAssuranceSet["+ i +"].StartTimeType"));
elasticityAssuranceItem.setElasticityAssuranceOwnerId(_ctx.stringValue("DescribeElasticityAssurancesResponse.ElasticityAssuranceSet["+ i +"].ElasticityAssuranceOwnerId"));

List<AllocatedResource> allocatedResources = new ArrayList<AllocatedResource>();
for (int j = 0; j < _ctx.lengthValue("DescribeElasticityAssurancesResponse.ElasticityAssuranceSet["+ i +"].AllocatedResources.Length"); j++) {
AllocatedResource allocatedResource = new AllocatedResource();
allocatedResource.setUsedAmount(_ctx.integerValue("DescribeElasticityAssurancesResponse.ElasticityAssuranceSet["+ i +"].AllocatedResources["+ j +"].UsedAmount"));
allocatedResource.setTotalAmount(_ctx.integerValue("DescribeElasticityAssurancesResponse.ElasticityAssuranceSet["+ i +"].AllocatedResources["+ j +"].TotalAmount"));
allocatedResource.setAvailableAmount(_ctx.integerValue("DescribeElasticityAssurancesResponse.ElasticityAssuranceSet["+ i +"].AllocatedResources["+ j +"].AvailableAmount"));
allocatedResource.setZoneId(_ctx.stringValue("DescribeElasticityAssurancesResponse.ElasticityAssuranceSet["+ i +"].AllocatedResources["+ j +"].zoneId"));
allocatedResource.setInstanceType(_ctx.stringValue("DescribeElasticityAssurancesResponse.ElasticityAssuranceSet["+ i +"].AllocatedResources["+ j +"].InstanceType"));

List<ElasticityAssuranceUsage> elasticityAssuranceUsages = new ArrayList<ElasticityAssuranceUsage>();
for (int k = 0; k < _ctx.lengthValue("DescribeElasticityAssurancesResponse.ElasticityAssuranceSet["+ i +"].AllocatedResources["+ j +"].ElasticityAssuranceUsages.Length"); k++) {
ElasticityAssuranceUsage elasticityAssuranceUsage = new ElasticityAssuranceUsage();
elasticityAssuranceUsage.setAccountId(_ctx.stringValue("DescribeElasticityAssurancesResponse.ElasticityAssuranceSet["+ i +"].AllocatedResources["+ j +"].ElasticityAssuranceUsages["+ k +"].AccountId"));
elasticityAssuranceUsage.setServiceName(_ctx.stringValue("DescribeElasticityAssurancesResponse.ElasticityAssuranceSet["+ i +"].AllocatedResources["+ j +"].ElasticityAssuranceUsages["+ k +"].ServiceName"));
elasticityAssuranceUsage.setUsedAmount(_ctx.integerValue("DescribeElasticityAssurancesResponse.ElasticityAssuranceSet["+ i +"].AllocatedResources["+ j +"].ElasticityAssuranceUsages["+ k +"].UsedAmount"));

elasticityAssuranceUsages.add(elasticityAssuranceUsage);
}
allocatedResource.setElasticityAssuranceUsages(elasticityAssuranceUsages);

allocatedResources.add(allocatedResource);
}
elasticityAssuranceItem.setAllocatedResources(allocatedResources);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ public static DescribeInstancesResponse unmarshall(DescribeInstancesResponse des

ImageOptions imageOptions = new ImageOptions();
imageOptions.setLoginAsNonRoot(_ctx.booleanValue("DescribeInstancesResponse.Instances["+ i +"].ImageOptions.LoginAsNonRoot"));
imageOptions.setCurrentOSNVMeSupported(_ctx.booleanValue("DescribeInstancesResponse.Instances["+ i +"].ImageOptions.CurrentOSNVMeSupported"));
instance.setImageOptions(imageOptions);

PrivateDnsNameOptions privateDnsNameOptions = new PrivateDnsNameOptions();
Expand Down

0 comments on commit 57652cb

Please sign in to comment.