Переглянути джерело

由柏霜发起的ECS SDK自动发布, 版本号:1.9.3

Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
haowei.yao 7 роки тому
батько
коміт
788d2fc5bd

+ 5 - 0
ChangeLog.txt

@@ -1,3 +1,8 @@
+2018-04-23 Version: 1.9.3
+1, DescribeInstanceHistoryEvents adds parameter instanceEventTypes and instanceEventCycleStatuss.
+2, InstanceId parameter is not necessary for DescribeInstanceHistoryEvents now.
+3, DescribeInstancesFullStatus adds parameter instanceEventTypes.
+
 2018-04-23 Version: 1.9.2
 1, Add notificationConfiguration.
 2, Add standby status.

+ 102 - 0
services/ecs/assign_private_ip_addresses.go

@@ -0,0 +1,102 @@
+package ecs
+
+//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.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// AssignPrivateIpAddresses invokes the ecs.AssignPrivateIpAddresses API synchronously
+// api document: https://help.aliyun.com/api/ecs/assignprivateipaddresses.html
+func (client *Client) AssignPrivateIpAddresses(request *AssignPrivateIpAddressesRequest) (response *AssignPrivateIpAddressesResponse, err error) {
+	response = CreateAssignPrivateIpAddressesResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// AssignPrivateIpAddressesWithChan invokes the ecs.AssignPrivateIpAddresses API asynchronously
+// api document: https://help.aliyun.com/api/ecs/assignprivateipaddresses.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) AssignPrivateIpAddressesWithChan(request *AssignPrivateIpAddressesRequest) (<-chan *AssignPrivateIpAddressesResponse, <-chan error) {
+	responseChan := make(chan *AssignPrivateIpAddressesResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.AssignPrivateIpAddresses(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// AssignPrivateIpAddressesWithCallback invokes the ecs.AssignPrivateIpAddresses API asynchronously
+// api document: https://help.aliyun.com/api/ecs/assignprivateipaddresses.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) AssignPrivateIpAddressesWithCallback(request *AssignPrivateIpAddressesRequest, callback func(response *AssignPrivateIpAddressesResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *AssignPrivateIpAddressesResponse
+		var err error
+		defer close(result)
+		response, err = client.AssignPrivateIpAddresses(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// AssignPrivateIpAddressesRequest is the request struct for api AssignPrivateIpAddresses
+type AssignPrivateIpAddressesRequest struct {
+	*requests.RpcRequest
+}
+
+// AssignPrivateIpAddressesResponse is the response struct for api AssignPrivateIpAddresses
+type AssignPrivateIpAddressesResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateAssignPrivateIpAddressesRequest creates a request to invoke AssignPrivateIpAddresses API
+func CreateAssignPrivateIpAddressesRequest() (request *AssignPrivateIpAddressesRequest) {
+	request = &AssignPrivateIpAddressesRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Ecs", "2014-05-26", "AssignPrivateIpAddresses", "ecs", "openAPI")
+	return
+}
+
+// CreateAssignPrivateIpAddressesResponse creates a response to parse from AssignPrivateIpAddresses response
+func CreateAssignPrivateIpAddressesResponse() (response *AssignPrivateIpAddressesResponse) {
+	response = &AssignPrivateIpAddressesResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 1 - 0
services/ecs/create_instance.go

@@ -131,6 +131,7 @@ type CreateInstanceRequest struct {
 	ResourceGroupId             string                    `position:"Query" name:"ResourceGroupId"`
 	HpcClusterId                string                    `position:"Query" name:"HpcClusterId"`
 	DryRun                      requests.Boolean          `position:"Query" name:"DryRun"`
+	DedicatedHostId             string                    `position:"Query" name:"DedicatedHostId"`
 }
 
 // CreateInstanceDataDisk is a repeated param struct in CreateInstanceRequest

+ 1 - 0
services/ecs/describe_instance_attribute.go

@@ -115,6 +115,7 @@ type DescribeInstanceAttributeResponse struct {
 	InnerIpAddress          InnerIpAddressInDescribeInstanceAttribute   `json:"InnerIpAddress" xml:"InnerIpAddress"`
 	VpcAttributes           VpcAttributes                               `json:"VpcAttributes" xml:"VpcAttributes"`
 	EipAddress              EipAddress                                  `json:"EipAddress" xml:"EipAddress"`
+	DedicatedHostAttribute  DedicatedHostAttribute                      `json:"DedicatedHostAttribute" xml:"DedicatedHostAttribute"`
 	OperationLocks          OperationLocksInDescribeInstanceAttribute   `json:"OperationLocks" xml:"OperationLocks"`
 }
 

+ 21 - 0
services/ecs/struct_available_dedicated_host_types.go

@@ -0,0 +1,21 @@
+package ecs
+
+//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.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// AvailableDedicatedHostTypes is a nested struct in ecs response
+type AvailableDedicatedHostTypes struct {
+	DedicatedHostType []string `json:"DedicatedHostType" xml:"DedicatedHostType"`
+}

+ 22 - 0
services/ecs/struct_dedicated_host_attribute.go

@@ -0,0 +1,22 @@
+package ecs
+
+//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.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// DedicatedHostAttribute is a nested struct in ecs response
+type DedicatedHostAttribute struct {
+	DedicatedHostName string `json:"DedicatedHostName" xml:"DedicatedHostName"`
+	DedicatedHostId   string `json:"DedicatedHostId" xml:"DedicatedHostId"`
+}

+ 21 - 0
services/ecs/struct_dedicated_host_generations.go

@@ -0,0 +1,21 @@
+package ecs
+
+//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.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// DedicatedHostGenerations is a nested struct in ecs response
+type DedicatedHostGenerations struct {
+	DedicatedHostGeneration []string `json:"DedicatedHostGeneration" xml:"DedicatedHostGeneration"`
+}

+ 1 - 1
services/ecs/struct_event_cycle_status.go

@@ -17,6 +17,6 @@ package ecs
 
 // EventCycleStatus is a nested struct in ecs response
 type EventCycleStatus struct {
-	Code int    `json:"Code" xml:"Code"`
 	Name string `json:"Name" xml:"Name"`
+	Code int    `json:"Code" xml:"Code"`
 }

+ 1 - 0
services/ecs/struct_instance.go

@@ -63,6 +63,7 @@ type Instance struct {
 	RdmaIpAddress           RdmaIpAddress                       `json:"RdmaIpAddress" xml:"RdmaIpAddress"`
 	VpcAttributes           VpcAttributes                       `json:"VpcAttributes" xml:"VpcAttributes"`
 	EipAddress              EipAddress                          `json:"EipAddress" xml:"EipAddress"`
+	DedicatedHostAttribute  DedicatedHostAttribute              `json:"DedicatedHostAttribute" xml:"DedicatedHostAttribute"`
 	NetworkInterfaces       NetworkInterfaces                   `json:"NetworkInterfaces" xml:"NetworkInterfaces"`
 	OperationLocks          OperationLocksInDescribeInstances   `json:"OperationLocks" xml:"OperationLocks"`
 	Tags                    TagsInDescribeInstances             `json:"Tags" xml:"Tags"`

+ 7 - 5
services/ecs/struct_instance_system_event_type.go

@@ -17,9 +17,11 @@ package ecs
 
 // InstanceSystemEventType is a nested struct in ecs response
 type InstanceSystemEventType struct {
-	InstanceId       string    `json:"InstanceId" xml:"InstanceId"`
-	EventId          string    `json:"EventId" xml:"EventId"`
-	EventPublishTime string    `json:"EventPublishTime" xml:"EventPublishTime"`
-	NotBefore        string    `json:"NotBefore" xml:"NotBefore"`
-	EventType        EventType `json:"EventType" xml:"EventType"`
+	InstanceId       string           `json:"InstanceId" xml:"InstanceId"`
+	EventId          string           `json:"EventId" xml:"EventId"`
+	EventPublishTime string           `json:"EventPublishTime" xml:"EventPublishTime"`
+	NotBefore        string           `json:"NotBefore" xml:"NotBefore"`
+	EventFinishTime  string           `json:"EventFinishTime" xml:"EventFinishTime"`
+	EventType        EventType        `json:"EventType" xml:"EventType"`
+	EventCycleStatus EventCycleStatus `json:"EventCycleStatus" xml:"EventCycleStatus"`
 }

+ 11 - 9
services/ecs/struct_zone.go

@@ -17,13 +17,15 @@ package ecs
 
 // Zone is a nested struct in ecs response
 type Zone struct {
-	ZoneNo                    string                                      `json:"ZoneNo" xml:"ZoneNo"`
-	ZoneId                    string                                      `json:"ZoneId" xml:"ZoneId"`
-	LocalName                 string                                      `json:"LocalName" xml:"LocalName"`
-	AvailableResourceCreation AvailableResourceCreation                   `json:"AvailableResourceCreation" xml:"AvailableResourceCreation"`
-	AvailableVolumeCategories AvailableVolumeCategories                   `json:"AvailableVolumeCategories" xml:"AvailableVolumeCategories"`
-	AvailableInstanceTypes    AvailableInstanceTypes                      `json:"AvailableInstanceTypes" xml:"AvailableInstanceTypes"`
-	NetworkTypes              NetworkTypesInDescribeRecommendInstanceType `json:"NetworkTypes" xml:"NetworkTypes"`
-	AvailableDiskCategories   AvailableDiskCategories                     `json:"AvailableDiskCategories" xml:"AvailableDiskCategories"`
-	AvailableResources        AvailableResourcesInDescribeZones           `json:"AvailableResources" xml:"AvailableResources"`
+	ZoneNo                      string                                      `json:"ZoneNo" xml:"ZoneNo"`
+	ZoneId                      string                                      `json:"ZoneId" xml:"ZoneId"`
+	LocalName                   string                                      `json:"LocalName" xml:"LocalName"`
+	AvailableResourceCreation   AvailableResourceCreation                   `json:"AvailableResourceCreation" xml:"AvailableResourceCreation"`
+	AvailableVolumeCategories   AvailableVolumeCategories                   `json:"AvailableVolumeCategories" xml:"AvailableVolumeCategories"`
+	AvailableInstanceTypes      AvailableInstanceTypes                      `json:"AvailableInstanceTypes" xml:"AvailableInstanceTypes"`
+	AvailableDedicatedHostTypes AvailableDedicatedHostTypes                 `json:"AvailableDedicatedHostTypes" xml:"AvailableDedicatedHostTypes"`
+	NetworkTypes                NetworkTypesInDescribeRecommendInstanceType `json:"NetworkTypes" xml:"NetworkTypes"`
+	AvailableDiskCategories     AvailableDiskCategories                     `json:"AvailableDiskCategories" xml:"AvailableDiskCategories"`
+	DedicatedHostGenerations    DedicatedHostGenerations                    `json:"DedicatedHostGenerations" xml:"DedicatedHostGenerations"`
+	AvailableResources          AvailableResourcesInDescribeZones           `json:"AvailableResources" xml:"AvailableResources"`
 }

+ 102 - 0
services/ecs/unassign_private_ip_addresses.go

@@ -0,0 +1,102 @@
+package ecs
+
+//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.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// UnassignPrivateIpAddresses invokes the ecs.UnassignPrivateIpAddresses API synchronously
+// api document: https://help.aliyun.com/api/ecs/unassignprivateipaddresses.html
+func (client *Client) UnassignPrivateIpAddresses(request *UnassignPrivateIpAddressesRequest) (response *UnassignPrivateIpAddressesResponse, err error) {
+	response = CreateUnassignPrivateIpAddressesResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// UnassignPrivateIpAddressesWithChan invokes the ecs.UnassignPrivateIpAddresses API asynchronously
+// api document: https://help.aliyun.com/api/ecs/unassignprivateipaddresses.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UnassignPrivateIpAddressesWithChan(request *UnassignPrivateIpAddressesRequest) (<-chan *UnassignPrivateIpAddressesResponse, <-chan error) {
+	responseChan := make(chan *UnassignPrivateIpAddressesResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.UnassignPrivateIpAddresses(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// UnassignPrivateIpAddressesWithCallback invokes the ecs.UnassignPrivateIpAddresses API asynchronously
+// api document: https://help.aliyun.com/api/ecs/unassignprivateipaddresses.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UnassignPrivateIpAddressesWithCallback(request *UnassignPrivateIpAddressesRequest, callback func(response *UnassignPrivateIpAddressesResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *UnassignPrivateIpAddressesResponse
+		var err error
+		defer close(result)
+		response, err = client.UnassignPrivateIpAddresses(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// UnassignPrivateIpAddressesRequest is the request struct for api UnassignPrivateIpAddresses
+type UnassignPrivateIpAddressesRequest struct {
+	*requests.RpcRequest
+}
+
+// UnassignPrivateIpAddressesResponse is the response struct for api UnassignPrivateIpAddresses
+type UnassignPrivateIpAddressesResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateUnassignPrivateIpAddressesRequest creates a request to invoke UnassignPrivateIpAddresses API
+func CreateUnassignPrivateIpAddressesRequest() (request *UnassignPrivateIpAddressesRequest) {
+	request = &UnassignPrivateIpAddressesRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Ecs", "2014-05-26", "UnassignPrivateIpAddresses", "ecs", "openAPI")
+	return
+}
+
+// CreateUnassignPrivateIpAddressesResponse creates a response to parse from UnassignPrivateIpAddresses response
+func CreateUnassignPrivateIpAddressesResponse() (response *UnassignPrivateIpAddressesResponse) {
+	response = &UnassignPrivateIpAddressesResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}