diff --git a/aliyun-java-sdk-eci/ChangeLog.txt b/aliyun-java-sdk-eci/ChangeLog.txt index aa0137c2b9..b3f679be55 100644 --- a/aliyun-java-sdk-eci/ChangeLog.txt +++ b/aliyun-java-sdk-eci/ChangeLog.txt @@ -1,3 +1,6 @@ +2024-09-11 Version 1.5.5 +1、Api support: TagResources、UntagResources、ListTagResources + 2024-06-05 Version 1.5.4 1、CreateContainerGroup support gpuDriverVersion diff --git a/aliyun-java-sdk-eci/pom.xml b/aliyun-java-sdk-eci/pom.xml index a72e8efd5a..a20c94a95c 100644 --- a/aliyun-java-sdk-eci/pom.xml +++ b/aliyun-java-sdk-eci/pom.xml @@ -3,7 +3,7 @@ com.aliyun aliyun-java-sdk-eci jar - 1.5.4 + 1.5.5 aliyun-java-sdk-eci http://www.aliyun.com Aliyun Open API SDK for Java diff --git a/aliyun-java-sdk-eci/src/main/java/com/aliyuncs/eci/model/v20180808/ListTagResourcesRequest.java b/aliyun-java-sdk-eci/src/main/java/com/aliyuncs/eci/model/v20180808/ListTagResourcesRequest.java new file mode 100644 index 0000000000..d41736d39a --- /dev/null +++ b/aliyun-java-sdk-eci/src/main/java/com/aliyuncs/eci/model/v20180808/ListTagResourcesRequest.java @@ -0,0 +1,178 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.aliyuncs.eci.model.v20180808; + +import com.aliyuncs.RpcAcsRequest; + +import java.util.List; + + +public class ListTagResourcesRequest extends RpcAcsRequest { + + public ListTagResourcesRequest() { + super("Eci", "2018-08-08", "ListTagResources", "eci"); + } + + private Long resourceOwnerId; + + private String resourceOwnerAccount; + + private Long ownerId; + + private String ownerAccount; + + private List resourceId; + + private List tags; + + private String resourceType; + + private String limit; + + private String nextToken; + + public List getResourceId() { + return resourceId; + } + + public void setResourceId(List resourceId) { + this.resourceId = resourceId; + if (resourceId != null) { + for (int i = 0; i < resourceId.size(); i++) { + putQueryParameter("ResourceId." + (i + 1) , resourceId.get(i)); + } + } + } + + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + if (tags != null) { + for (int i = 0; i < tags.size(); i++) { + putQueryParameter("Tag." + (i + 1) + ".Key" , tags.get(i).getKey()); + putQueryParameter("Tag." + (i + 1) + ".Value" , tags.get(i).getValue()); + } + } + } + + public String getResourceType() { + return resourceType; + } + + public void setResourceType(String resourceType) { + this.resourceType = resourceType; + if (resourceType != null) { + putQueryParameter("ResourceType", resourceType); + } + } + + public String getLimit() { + return limit; + } + + public void setLimit(String limit) { + this.limit = limit; + if (limit != null) { + putQueryParameter("Limit", limit); + } + } + + public String getNextToken() { + return nextToken; + } + + public void setNextToken(String nextToken) { + this.nextToken = nextToken; + if (nextToken != null) { + putQueryParameter("NextToken", nextToken); + } + } + + public Long getResourceOwnerId() { + return resourceOwnerId; + } + + public void setResourceOwnerId(Long resourceOwnerId) { + this.resourceOwnerId = resourceOwnerId; + if (resourceOwnerId != null) { + putQueryParameter("ResourceOwnerId", resourceOwnerId.toString()); + } + } + + public String getResourceOwnerAccount() { + return resourceOwnerAccount; + } + + public void setResourceOwnerAccount(String resourceOwnerAccount) { + this.resourceOwnerAccount = resourceOwnerAccount; + if (resourceOwnerAccount != null) { + putQueryParameter("ResourceOwnerAccount", resourceOwnerAccount); + } + } + + public Long getOwnerId() { + return ownerId; + } + + public void setOwnerId(Long ownerId) { + this.ownerId = ownerId; + if (ownerId != null) { + putQueryParameter("OwnerId", ownerId.toString()); + } + } + + public String getOwnerAccount() { + return ownerAccount; + } + + public void setOwnerAccount(String ownerAccount) { + this.ownerAccount = ownerAccount; + if (ownerAccount != null) { + putQueryParameter("OwnerAccount", ownerAccount); + } + } + + public static class Tag { + + private String key; + + private String value; + + public String getKey() { + return this.key; + } + + public void setKey(String key) { + this.key = key; + } + + public String getValue() { + return this.value; + } + + public void setValue(String value) { + this.value = value; + } + } + + @Override + public Class getResponseClass() { + return ListTagResourcesResponse.class; + } + +} diff --git a/aliyun-java-sdk-eci/src/main/java/com/aliyuncs/eci/model/v20180808/ListTagResourcesResponse.java b/aliyun-java-sdk-eci/src/main/java/com/aliyuncs/eci/model/v20180808/ListTagResourcesResponse.java new file mode 100644 index 0000000000..52d47707b2 --- /dev/null +++ b/aliyun-java-sdk-eci/src/main/java/com/aliyuncs/eci/model/v20180808/ListTagResourcesResponse.java @@ -0,0 +1,106 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.aliyuncs.eci.model.v20180808; + +import com.aliyuncs.AcsResponse; +import com.aliyuncs.eci.transform.v20180808.ListTagResourcesResponseUnmarshaller; +import com.aliyuncs.transform.UnmarshallerContext; + +import java.util.List; + +public class ListTagResourcesResponse extends AcsResponse { + + private String requestId; + + private String nextToken; + + private List tagResources; + + public String getRequestId() { + return requestId; + } + + public void setRequestId(String requestId) { + this.requestId = requestId; + } + + public String getNextToken() { + return nextToken; + } + + public void setNextToken(String nextToken) { + this.nextToken = nextToken; + } + + public List getTagResources() { + return tagResources; + } + + public void setTagResources(List tagResources) { + this.tagResources = tagResources; + } + + public static class TagResource { + private String resourceType; + + private String resourceId; + + private String tagKey; + + private String tagValue; + + public String getResourceType() { + return resourceType; + } + + public void setResourceType(String resourceType) { + this.resourceType = resourceType; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + public String getTagKey() { + return tagKey; + } + + public void setTagKey(String tagKey) { + this.tagKey = tagKey; + } + + public String getTagValue() { + return tagValue; + } + + public void setTagValue(String tagValue) { + this.tagValue = tagValue; + } + } + + @Override + public ListTagResourcesResponse getInstance(UnmarshallerContext context) { + return ListTagResourcesResponseUnmarshaller.unmarshall(this, context); + } + + @Override + public boolean checkShowJsonItemName() { + return false; + } +} diff --git a/aliyun-java-sdk-eci/src/main/java/com/aliyuncs/eci/model/v20180808/TagResourcesRequest.java b/aliyun-java-sdk-eci/src/main/java/com/aliyuncs/eci/model/v20180808/TagResourcesRequest.java new file mode 100644 index 0000000000..ed1f9ec2d4 --- /dev/null +++ b/aliyun-java-sdk-eci/src/main/java/com/aliyuncs/eci/model/v20180808/TagResourcesRequest.java @@ -0,0 +1,150 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.aliyuncs.eci.model.v20180808; + +import com.aliyuncs.RpcAcsRequest; + +import java.util.List; + +public class TagResourcesRequest extends RpcAcsRequest { + public TagResourcesRequest() { + super("Eci", "2018-08-08", "TagResources", "eci"); + } + + private Long resourceOwnerId; + + private String resourceOwnerAccount; + + private Long ownerId; + + private String ownerAccount; + + private List resourceId; + + private List tags; + + private String resourceType; + + public List getResourceId() { + return resourceId; + } + + public void setResourceId(List resourceId) { + this.resourceId = resourceId; + if (resourceId != null) { + for (int i = 0; i < resourceId.size(); i++) { + putQueryParameter("ResourceId." + (i + 1) , resourceId.get(i)); + } + } + } + + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + if (tags != null) { + for (int i = 0; i < tags.size(); i++) { + putQueryParameter("Tag." + (i + 1) + ".Key" , tags.get(i).getKey()); + putQueryParameter("Tag." + (i + 1) + ".Value" , tags.get(i).getValue()); + } + } + } + + public String getResourceType() { + return resourceType; + } + + public void setResourceType(String resourceType) { + this.resourceType = resourceType; + if (resourceType != null) { + putQueryParameter("ResourceType", resourceType); + } + } + + public Long getResourceOwnerId() { + return resourceOwnerId; + } + + public void setResourceOwnerId(Long resourceOwnerId) { + this.resourceOwnerId = resourceOwnerId; + if (resourceOwnerId != null) { + putQueryParameter("ResourceOwnerId", resourceOwnerId.toString()); + } + } + + public String getResourceOwnerAccount() { + return resourceOwnerAccount; + } + + public void setResourceOwnerAccount(String resourceOwnerAccount) { + this.resourceOwnerAccount = resourceOwnerAccount; + if (resourceOwnerAccount != null) { + putQueryParameter("ResourceOwnerAccount", resourceOwnerAccount); + } + } + + public Long getOwnerId() { + return ownerId; + } + + public void setOwnerId(Long ownerId) { + this.ownerId = ownerId; + if (ownerId != null) { + putQueryParameter("OwnerId", ownerId.toString()); + } + } + + public String getOwnerAccount() { + return ownerAccount; + } + + public void setOwnerAccount(String ownerAccount) { + this.ownerAccount = ownerAccount; + if (ownerAccount != null) { + putQueryParameter("OwnerAccount", ownerAccount); + } + } + + public static class Tag { + + private String key; + + private String value; + + public String getKey() { + return this.key; + } + + public void setKey(String key) { + this.key = key; + } + + public String getValue() { + return this.value; + } + + public void setValue(String value) { + this.value = value; + } + } + + @Override + public Class getResponseClass() { + return TagResourcesResponse.class; + } + +} diff --git a/aliyun-java-sdk-eci/src/main/java/com/aliyuncs/eci/model/v20180808/TagResourcesResponse.java b/aliyun-java-sdk-eci/src/main/java/com/aliyuncs/eci/model/v20180808/TagResourcesResponse.java new file mode 100644 index 0000000000..393be9c42f --- /dev/null +++ b/aliyun-java-sdk-eci/src/main/java/com/aliyuncs/eci/model/v20180808/TagResourcesResponse.java @@ -0,0 +1,42 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.aliyuncs.eci.model.v20180808; + +import com.aliyuncs.AcsResponse; +import com.aliyuncs.eci.transform.v20180808.TagResourcesResponseUnmarshaller; +import com.aliyuncs.transform.UnmarshallerContext; + + +public class TagResourcesResponse extends AcsResponse { + private String requestId; + + public String getRequestId() { + return requestId; + } + + public void setRequestId(String requestId) { + this.requestId = requestId; + } + + @Override + public TagResourcesResponse getInstance(UnmarshallerContext context) { + return TagResourcesResponseUnmarshaller.unmarshall(this, context); + } + + @Override + public boolean checkShowJsonItemName() { + return false; + } +} diff --git a/aliyun-java-sdk-eci/src/main/java/com/aliyuncs/eci/model/v20180808/UntagResourcesRequest.java b/aliyun-java-sdk-eci/src/main/java/com/aliyuncs/eci/model/v20180808/UntagResourcesRequest.java new file mode 100644 index 0000000000..0b5e106fdb --- /dev/null +++ b/aliyun-java-sdk-eci/src/main/java/com/aliyuncs/eci/model/v20180808/UntagResourcesRequest.java @@ -0,0 +1,155 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.aliyuncs.eci.model.v20180808; + +import com.aliyuncs.RpcAcsRequest; + +import java.util.List; + + +public class UntagResourcesRequest extends RpcAcsRequest { + public UntagResourcesRequest() { + super("Eci", "2018-08-08", "UntagResources", "eci"); + } + + private Long resourceOwnerId; + + private String resourceOwnerAccount; + + private Long ownerId; + + private String ownerAccount; + + private List resourceId; + + private List tagKeys; + + private String resourceType; + + private Boolean all; + + private String clientToken; + + public List getResourceId() { + return resourceId; + } + + public void setResourceId(List resourceId) { + this.resourceId = resourceId; + if (resourceId != null) { + for (int i = 0; i < resourceId.size(); i++) { + putQueryParameter("ResourceId." + (i + 1) , resourceId.get(i)); + } + } + } + + public List getTagKeys() { + return tagKeys; + } + + public void setTagKeys(List tagKeys) { + this.tagKeys = tagKeys; + if (tagKeys != null) { + for (int i = 0; i < tagKeys.size(); i++) { + putQueryParameter("TagKey." + (i + 1) , tagKeys.get(i)); + } + } + } + + public String getResourceType() { + return resourceType; + } + + public void setResourceType(String resourceType) { + this.resourceType = resourceType; + if (resourceType != null) { + putQueryParameter("ResourceType", resourceType); + } + } + + public Boolean getAll() { + return all; + } + + public void setAll(Boolean all) { + this.all = all; + if (all != null) { + putQueryParameter("All", all.toString()); + } + } + + public String getClientToken() { + return clientToken; + } + + public void setClientToken(String clientToken) { + this.clientToken = clientToken; + if (clientToken != null) { + putQueryParameter("ClientToken", clientToken); + } + } + + public Long getResourceOwnerId() { + return resourceOwnerId; + } + + public void setResourceOwnerId(Long resourceOwnerId) { + this.resourceOwnerId = resourceOwnerId; + if (resourceOwnerId != null) { + putQueryParameter("ResourceOwnerId", resourceOwnerId.toString()); + } + } + + public String getResourceOwnerAccount() { + return resourceOwnerAccount; + } + + public void setResourceOwnerAccount(String resourceOwnerAccount) { + this.resourceOwnerAccount = resourceOwnerAccount; + if (resourceOwnerAccount != null) { + putQueryParameter("ResourceOwnerAccount", resourceOwnerAccount); + } + } + + public Long getOwnerId() { + return ownerId; + } + + public void setOwnerId(Long ownerId) { + this.ownerId = ownerId; + if (ownerId != null) { + putQueryParameter("OwnerId", ownerId.toString()); + } + } + + public String getOwnerAccount() { + return ownerAccount; + } + + public void setOwnerAccount(String ownerAccount) { + this.ownerAccount = ownerAccount; + if (ownerAccount != null) { + putQueryParameter("OwnerAccount", ownerAccount); + } + } + + + @Override + public Class getResponseClass() { + return UntagResourcesResponse.class; + } + +} + diff --git a/aliyun-java-sdk-eci/src/main/java/com/aliyuncs/eci/model/v20180808/UntagResourcesResponse.java b/aliyun-java-sdk-eci/src/main/java/com/aliyuncs/eci/model/v20180808/UntagResourcesResponse.java new file mode 100644 index 0000000000..c9ddb6f7f2 --- /dev/null +++ b/aliyun-java-sdk-eci/src/main/java/com/aliyuncs/eci/model/v20180808/UntagResourcesResponse.java @@ -0,0 +1,42 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.aliyuncs.eci.model.v20180808; + +import com.aliyuncs.AcsResponse; +import com.aliyuncs.eci.transform.v20180808.UntagResourcesResponseUnmarshaller; +import com.aliyuncs.transform.UnmarshallerContext; + + +public class UntagResourcesResponse extends AcsResponse { + private String requestId; + + public String getRequestId() { + return requestId; + } + + public void setRequestId(String requestId) { + this.requestId = requestId; + } + + @Override + public UntagResourcesResponse getInstance(UnmarshallerContext context) { + return UntagResourcesResponseUnmarshaller.unmarshall(this, context); + } + + @Override + public boolean checkShowJsonItemName() { + return false; + } +} diff --git a/aliyun-java-sdk-eci/src/main/java/com/aliyuncs/eci/transform/v20180808/ListTagResourcesResponseUnmarshaller.java b/aliyun-java-sdk-eci/src/main/java/com/aliyuncs/eci/transform/v20180808/ListTagResourcesResponseUnmarshaller.java new file mode 100644 index 0000000000..0079218891 --- /dev/null +++ b/aliyun-java-sdk-eci/src/main/java/com/aliyuncs/eci/transform/v20180808/ListTagResourcesResponseUnmarshaller.java @@ -0,0 +1,31 @@ +package com.aliyuncs.eci.transform.v20180808; + +import com.aliyuncs.eci.model.v20180808.ListTagResourcesResponse; +import com.aliyuncs.eci.model.v20180808.ListTagResourcesResponse.TagResource; +import com.aliyuncs.transform.UnmarshallerContext; + +import java.util.ArrayList; +import java.util.List; + +public class ListTagResourcesResponseUnmarshaller { + public static ListTagResourcesResponse unmarshall(ListTagResourcesResponse listTagResourcesResponse, UnmarshallerContext context) { + + listTagResourcesResponse.setRequestId(context.stringValue("ListTagResourcesResponse.RequestId")); + listTagResourcesResponse.setNextToken(context.stringValue("ListTagResourcesResponse.NextToken")); + + List tagResources = new ArrayList(); + for (int i = 0; i < context.lengthValue("ListTagResourcesResponse.TagResources.Length"); i++) { + TagResource tagResource = new TagResource(); + tagResource.setTagKey(context.stringValue("ListTagResourcesResponse.TagResources["+ i +"].TagKey")); + tagResource.setTagValue(context.stringValue("ListTagResourcesResponse.TagResources["+ i +"].TagValue")); + tagResource.setResourceId(context.stringValue("ListTagResourcesResponse.TagResources["+ i +"].ResourceId")); + tagResource.setResourceType(context.stringValue("ListTagResourcesResponse.TagResources["+ i +"].ResourceType")); + + tagResources.add(tagResource); + } + + listTagResourcesResponse.setTagResources(tagResources); + + return listTagResourcesResponse; + } +} diff --git a/aliyun-java-sdk-eci/src/main/java/com/aliyuncs/eci/transform/v20180808/TagResourcesResponseUnmarshaller.java b/aliyun-java-sdk-eci/src/main/java/com/aliyuncs/eci/transform/v20180808/TagResourcesResponseUnmarshaller.java new file mode 100644 index 0000000000..ced1311b5d --- /dev/null +++ b/aliyun-java-sdk-eci/src/main/java/com/aliyuncs/eci/transform/v20180808/TagResourcesResponseUnmarshaller.java @@ -0,0 +1,26 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.aliyuncs.eci.transform.v20180808; + +import com.aliyuncs.eci.model.v20180808.TagResourcesResponse; +import com.aliyuncs.transform.UnmarshallerContext; + +public class TagResourcesResponseUnmarshaller { + public static TagResourcesResponse unmarshall(TagResourcesResponse tagResourcesResponse, UnmarshallerContext context) { + tagResourcesResponse.setRequestId(context.stringValue("TagResourcesResponse.RequestId")); + + return tagResourcesResponse; + } +} diff --git a/aliyun-java-sdk-eci/src/main/java/com/aliyuncs/eci/transform/v20180808/UntagResourcesResponseUnmarshaller.java b/aliyun-java-sdk-eci/src/main/java/com/aliyuncs/eci/transform/v20180808/UntagResourcesResponseUnmarshaller.java new file mode 100644 index 0000000000..beb89c5c88 --- /dev/null +++ b/aliyun-java-sdk-eci/src/main/java/com/aliyuncs/eci/transform/v20180808/UntagResourcesResponseUnmarshaller.java @@ -0,0 +1,26 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.aliyuncs.eci.transform.v20180808; + +import com.aliyuncs.eci.model.v20180808.UntagResourcesResponse; +import com.aliyuncs.transform.UnmarshallerContext; + +public class UntagResourcesResponseUnmarshaller { + public static UntagResourcesResponse unmarshall(UntagResourcesResponse untagResourcesResponse, UnmarshallerContext context) { + untagResourcesResponse.setRequestId(context.stringValue("UntagResourcesResponse.RequestId")); + + return untagResourcesResponse; + } +}