Przeglądaj źródła

Add param, DescribePrice supprot ReservedInstance.

sdk-team 6 lat temu
rodzic
commit
556f6a7a84

+ 3 - 0
ChangeLog.txt

@@ -1,3 +1,6 @@
+2019-09-23 Version: 1.60.173
+- Add param, DescribePrice supprot ReservedInstance.
+
 2019-09-20 Version: 1.60.172
 - Generated 2017-12-14 for `BssOpenApi`.
 

+ 1 - 0
services/ecs/describe_commands.go

@@ -81,6 +81,7 @@ type DescribeCommandsRequest struct {
 	Type                 string           `position:"Query" name:"Type"`
 	CommandId            string           `position:"Query" name:"CommandId"`
 	PageNumber           requests.Integer `position:"Query" name:"PageNumber"`
+	ContentEncoding      string           `position:"Query" name:"ContentEncoding"`
 	PageSize             requests.Integer `position:"Query" name:"PageSize"`
 	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
 	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`

+ 1 - 1
services/ecs/describe_instance_attribute.go

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

+ 1 - 0
services/ecs/describe_invocations.go

@@ -80,6 +80,7 @@ type DescribeInvocationsRequest struct {
 	InvokeStatus         string           `position:"Query" name:"InvokeStatus"`
 	CommandId            string           `position:"Query" name:"CommandId"`
 	PageNumber           requests.Integer `position:"Query" name:"PageNumber"`
+	ContentEncoding      string           `position:"Query" name:"ContentEncoding"`
 	PageSize             requests.Integer `position:"Query" name:"PageSize"`
 	InvokeId             string           `position:"Query" name:"InvokeId"`
 	Timed                requests.Boolean `position:"Query" name:"Timed"`

+ 4 - 0
services/ecs/describe_price.go

@@ -86,14 +86,17 @@ type DescribePriceRequest struct {
 	OwnerId                    requests.Integer `position:"Query" name:"OwnerId"`
 	InternetChargeType         string           `position:"Query" name:"InternetChargeType"`
 	InstanceNetworkType        string           `position:"Query" name:"InstanceNetworkType"`
+	InstanceAmount             requests.Integer `position:"Query" name:"InstanceAmount"`
 	DataDisk3PerformanceLevel  string           `position:"Query" name:"DataDisk.3.PerformanceLevel"`
 	ImageId                    string           `position:"Query" name:"ImageId"`
 	IoOptimized                string           `position:"Query" name:"IoOptimized"`
 	InternetMaxBandwidthOut    requests.Integer `position:"Query" name:"InternetMaxBandwidthOut"`
 	SystemDiskCategory         string           `position:"Query" name:"SystemDisk.Category"`
+	Platform                   string           `position:"Query" name:"Platform"`
 	SystemDiskPerformanceLevel string           `position:"Query" name:"SystemDisk.PerformanceLevel"`
 	DataDisk4Category          string           `position:"Query" name:"DataDisk.4.Category"`
 	DataDisk4PerformanceLevel  string           `position:"Query" name:"DataDisk.4.PerformanceLevel"`
+	Scope                      string           `position:"Query" name:"Scope"`
 	InstanceType               string           `position:"Query" name:"InstanceType"`
 	DataDisk2Category          string           `position:"Query" name:"DataDisk.2.Category"`
 	DataDisk1Size              requests.Integer `position:"Query" name:"DataDisk.1.Size"`
@@ -105,6 +108,7 @@ type DescribePriceRequest struct {
 	DataDisk1Category          string           `position:"Query" name:"DataDisk.1.Category"`
 	DataDisk2PerformanceLevel  string           `position:"Query" name:"DataDisk.2.PerformanceLevel"`
 	SystemDiskSize             requests.Integer `position:"Query" name:"SystemDisk.Size"`
+	OfferingType               string           `position:"Query" name:"OfferingType"`
 }
 
 // DescribePriceResponse is the response struct for api DescribePrice

+ 121 - 0
services/ecs/run_command.go

@@ -0,0 +1,121 @@
+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"
+)
+
+// RunCommand invokes the ecs.RunCommand API synchronously
+// api document: https://help.aliyun.com/api/ecs/runcommand.html
+func (client *Client) RunCommand(request *RunCommandRequest) (response *RunCommandResponse, err error) {
+	response = CreateRunCommandResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// RunCommandWithChan invokes the ecs.RunCommand API asynchronously
+// api document: https://help.aliyun.com/api/ecs/runcommand.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) RunCommandWithChan(request *RunCommandRequest) (<-chan *RunCommandResponse, <-chan error) {
+	responseChan := make(chan *RunCommandResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.RunCommand(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// RunCommandWithCallback invokes the ecs.RunCommand API asynchronously
+// api document: https://help.aliyun.com/api/ecs/runcommand.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) RunCommandWithCallback(request *RunCommandRequest, callback func(response *RunCommandResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *RunCommandResponse
+		var err error
+		defer close(result)
+		response, err = client.RunCommand(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// RunCommandRequest is the request struct for api RunCommand
+type RunCommandRequest struct {
+	*requests.RpcRequest
+	ResourceOwnerId      requests.Integer       `position:"Query" name:"ResourceOwnerId"`
+	WorkingDir           string                 `position:"Query" name:"WorkingDir"`
+	Description          string                 `position:"Query" name:"Description"`
+	Type                 string                 `position:"Query" name:"Type"`
+	CommandContent       string                 `position:"Query" name:"CommandContent"`
+	Timeout              requests.Integer       `position:"Query" name:"Timeout"`
+	Frequency            string                 `position:"Query" name:"Frequency"`
+	ContentEncoding      string                 `position:"Query" name:"ContentEncoding"`
+	KeepCommand          requests.Boolean       `position:"Query" name:"KeepCommand"`
+	Timed                requests.Boolean       `position:"Query" name:"Timed"`
+	ResourceOwnerAccount string                 `position:"Query" name:"ResourceOwnerAccount"`
+	OwnerAccount         string                 `position:"Query" name:"OwnerAccount"`
+	OwnerId              requests.Integer       `position:"Query" name:"OwnerId"`
+	InstanceId           *[]string              `position:"Query" name:"InstanceId"  type:"Repeated"`
+	Name                 string                 `position:"Query" name:"Name"`
+	Parameters           map[string]interface{} `position:"Query" name:"Parameters"`
+	EnableParameter      requests.Boolean       `position:"Query" name:"EnableParameter"`
+}
+
+// RunCommandResponse is the response struct for api RunCommand
+type RunCommandResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	CommandId string `json:"CommandId" xml:"CommandId"`
+	InvokeId  string `json:"InvokeId" xml:"InvokeId"`
+}
+
+// CreateRunCommandRequest creates a request to invoke RunCommand API
+func CreateRunCommandRequest() (request *RunCommandRequest) {
+	request = &RunCommandRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Ecs", "2014-05-26", "RunCommand", "ecs", "openAPI")
+	return
+}
+
+// CreateRunCommandResponse creates a response to parse from RunCommand response
+func CreateRunCommandResponse() (response *RunCommandResponse) {
+	response = &RunCommandResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 2 - 2
services/ecs/struct_available_resource.go

@@ -17,6 +17,6 @@ package ecs
 
 // AvailableResource is a nested struct in ecs response
 type AvailableResource struct {
-	Type               string                                            `json:"Type" xml:"Type"`
-	SupportedResources SupportedResourcesInDescribeResourcesModification `json:"SupportedResources" xml:"SupportedResources"`
+	Type               string                                        `json:"Type" xml:"Type"`
+	SupportedResources SupportedResourcesInDescribeAvailableResource `json:"SupportedResources" xml:"SupportedResources"`
 }

+ 5 - 5
services/ecs/struct_available_zone.go

@@ -17,9 +17,9 @@ package ecs
 
 // AvailableZone is a nested struct in ecs response
 type AvailableZone struct {
-	RegionId           string                                            `json:"RegionId" xml:"RegionId"`
-	ZoneId             string                                            `json:"ZoneId" xml:"ZoneId"`
-	StatusCategory     string                                            `json:"StatusCategory" xml:"StatusCategory"`
-	Status             string                                            `json:"Status" xml:"Status"`
-	AvailableResources AvailableResourcesInDescribeResourcesModification `json:"AvailableResources" xml:"AvailableResources"`
+	RegionId           string                                        `json:"RegionId" xml:"RegionId"`
+	ZoneId             string                                        `json:"ZoneId" xml:"ZoneId"`
+	StatusCategory     string                                        `json:"StatusCategory" xml:"StatusCategory"`
+	Status             string                                        `json:"Status" xml:"Status"`
+	AvailableResources AvailableResourcesInDescribeAvailableResource `json:"AvailableResources" xml:"AvailableResources"`
 }

+ 1 - 1
services/ecs/struct_disk.go

@@ -28,8 +28,8 @@ type Disk struct {
 	IOPS                          int                           `json:"IOPS" xml:"IOPS"`
 	RegionId                      string                        `json:"RegionId" xml:"RegionId"`
 	MountInstanceNum              int                           `json:"MountInstanceNum" xml:"MountInstanceNum"`
-	StorageSetId                  string                        `json:"StorageSetId" xml:"StorageSetId"`
 	ResourceGroupId               string                        `json:"ResourceGroupId" xml:"ResourceGroupId"`
+	StorageSetId                  string                        `json:"StorageSetId" xml:"StorageSetId"`
 	InstanceId                    string                        `json:"InstanceId" xml:"InstanceId"`
 	Description                   string                        `json:"Description" xml:"Description"`
 	Type                          string                        `json:"Type" xml:"Type"`

+ 13 - 5
services/ecs/struct_eip_address.go

@@ -17,9 +17,17 @@ package ecs
 
 // EipAddress is a nested struct in ecs response
 type EipAddress struct {
-	Bandwidth            int    `json:"Bandwidth" xml:"Bandwidth"`
-	IsSupportUnassociate bool   `json:"IsSupportUnassociate" xml:"IsSupportUnassociate"`
-	IpAddress            string `json:"IpAddress" xml:"IpAddress"`
-	InternetChargeType   string `json:"InternetChargeType" xml:"InternetChargeType"`
-	AllocationId         string `json:"AllocationId" xml:"AllocationId"`
+	ExpiredTime        string                               `json:"ExpiredTime" xml:"ExpiredTime"`
+	IpAddress          string                               `json:"IpAddress" xml:"IpAddress"`
+	EipBandwidth       string                               `json:"EipBandwidth" xml:"EipBandwidth"`
+	ChargeType         string                               `json:"ChargeType" xml:"ChargeType"`
+	AllocationTime     string                               `json:"AllocationTime" xml:"AllocationTime"`
+	InstanceType       string                               `json:"InstanceType" xml:"InstanceType"`
+	AllocationId       string                               `json:"AllocationId" xml:"AllocationId"`
+	RegionId           string                               `json:"RegionId" xml:"RegionId"`
+	InstanceId         string                               `json:"InstanceId" xml:"InstanceId"`
+	Bandwidth          string                               `json:"Bandwidth" xml:"Bandwidth"`
+	InternetChargeType string                               `json:"InternetChargeType" xml:"InternetChargeType"`
+	Status             string                               `json:"Status" xml:"Status"`
+	OperationLocks     OperationLocksInDescribeEipAddresses `json:"OperationLocks" xml:"OperationLocks"`
 }

+ 0 - 33
services/ecs/struct_eip_address_in_describe_eip_addresses.go

@@ -1,33 +0,0 @@
-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.
-
-// EipAddressInDescribeEipAddresses is a nested struct in ecs response
-type EipAddressInDescribeEipAddresses struct {
-	RegionId           string                               `json:"RegionId" xml:"RegionId"`
-	IpAddress          string                               `json:"IpAddress" xml:"IpAddress"`
-	AllocationId       string                               `json:"AllocationId" xml:"AllocationId"`
-	Status             string                               `json:"Status" xml:"Status"`
-	InstanceId         string                               `json:"InstanceId" xml:"InstanceId"`
-	Bandwidth          string                               `json:"Bandwidth" xml:"Bandwidth"`
-	EipBandwidth       string                               `json:"EipBandwidth" xml:"EipBandwidth"`
-	InternetChargeType string                               `json:"InternetChargeType" xml:"InternetChargeType"`
-	AllocationTime     string                               `json:"AllocationTime" xml:"AllocationTime"`
-	InstanceType       string                               `json:"InstanceType" xml:"InstanceType"`
-	ChargeType         string                               `json:"ChargeType" xml:"ChargeType"`
-	ExpiredTime        string                               `json:"ExpiredTime" xml:"ExpiredTime"`
-	OperationLocks     OperationLocksInDescribeEipAddresses `json:"OperationLocks" xml:"OperationLocks"`
-}

+ 24 - 0
services/ecs/struct_eip_address_in_describe_instance_attribute.go

@@ -0,0 +1,24 @@
+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.
+
+// EipAddressInDescribeInstanceAttribute is a nested struct in ecs response
+type EipAddressInDescribeInstanceAttribute struct {
+	AllocationId       string `json:"AllocationId" xml:"AllocationId"`
+	IpAddress          string `json:"IpAddress" xml:"IpAddress"`
+	Bandwidth          int    `json:"Bandwidth" xml:"Bandwidth"`
+	InternetChargeType string `json:"InternetChargeType" xml:"InternetChargeType"`
+}

+ 25 - 0
services/ecs/struct_eip_address_in_describe_instances.go

@@ -0,0 +1,25 @@
+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.
+
+// EipAddressInDescribeInstances is a nested struct in ecs response
+type EipAddressInDescribeInstances struct {
+	AllocationId         string `json:"AllocationId" xml:"AllocationId"`
+	IpAddress            string `json:"IpAddress" xml:"IpAddress"`
+	Bandwidth            int    `json:"Bandwidth" xml:"Bandwidth"`
+	InternetChargeType   string `json:"InternetChargeType" xml:"InternetChargeType"`
+	IsSupportUnassociate bool   `json:"IsSupportUnassociate" xml:"IsSupportUnassociate"`
+}

+ 1 - 1
services/ecs/struct_eip_addresses.go

@@ -17,5 +17,5 @@ package ecs
 
 // EipAddresses is a nested struct in ecs response
 type EipAddresses struct {
-	EipAddress []EipAddressInDescribeEipAddresses `json:"EipAddress" xml:"EipAddress"`
+	EipAddress []EipAddress `json:"EipAddress" xml:"EipAddress"`
 }

+ 1 - 1
services/ecs/struct_instance.go

@@ -69,7 +69,7 @@ type Instance struct {
 	InnerIpAddress             InnerIpAddressInDescribeInstances    `json:"InnerIpAddress" xml:"InnerIpAddress"`
 	PublicIpAddress            PublicIpAddressInDescribeInstances   `json:"PublicIpAddress" xml:"PublicIpAddress"`
 	RdmaIpAddress              RdmaIpAddress                        `json:"RdmaIpAddress" xml:"RdmaIpAddress"`
-	EipAddress                 EipAddress                           `json:"EipAddress" xml:"EipAddress"`
+	EipAddress                 EipAddressInDescribeInstances        `json:"EipAddress" xml:"EipAddress"`
 	EcsCapacityReservationAttr EcsCapacityReservationAttr           `json:"EcsCapacityReservationAttr" xml:"EcsCapacityReservationAttr"`
 	DedicatedHostAttribute     DedicatedHostAttribute               `json:"DedicatedHostAttribute" xml:"DedicatedHostAttribute"`
 	DedicatedInstanceAttribute DedicatedInstanceAttribute           `json:"DedicatedInstanceAttribute" xml:"DedicatedInstanceAttribute"`

+ 2 - 2
services/ecs/struct_instance_type.go

@@ -25,11 +25,11 @@ type InstanceType struct {
 	Memory                      int     `json:"Memory" xml:"Memory"`
 	InstanceTypeId              string  `json:"InstanceTypeId" xml:"InstanceTypeId"`
 	InstanceBandwidthRx         int     `json:"InstanceBandwidthRx" xml:"InstanceBandwidthRx"`
-	InstanceType                string  `json:"InstanceType" xml:"InstanceType"`
 	BaselineCredit              int     `json:"BaselineCredit" xml:"BaselineCredit"`
+	InstanceType                string  `json:"InstanceType" xml:"InstanceType"`
 	EniQuantity                 int     `json:"EniQuantity" xml:"EniQuantity"`
-	Generation                  string  `json:"Generation" xml:"Generation"`
 	GPUAmount                   int     `json:"GPUAmount" xml:"GPUAmount"`
+	Generation                  string  `json:"Generation" xml:"Generation"`
 	SupportIoOptimized          string  `json:"SupportIoOptimized" xml:"SupportIoOptimized"`
 	InstanceTypeFamily          string  `json:"InstanceTypeFamily" xml:"InstanceTypeFamily"`
 	InitialCredit               int     `json:"InitialCredit" xml:"InitialCredit"`

+ 1 - 1
services/ecs/struct_invocation.go

@@ -17,8 +17,8 @@ package ecs
 
 // Invocation is a nested struct in ecs response
 type Invocation struct {
-	CommandId         string            `json:"CommandId" xml:"CommandId"`
 	PageNumber        int64             `json:"PageNumber" xml:"PageNumber"`
+	CommandId         string            `json:"CommandId" xml:"CommandId"`
 	TotalCount        int64             `json:"TotalCount" xml:"TotalCount"`
 	PageSize          int64             `json:"PageSize" xml:"PageSize"`
 	Timed             bool              `json:"Timed" xml:"Timed"`

+ 6 - 5
services/ecs/struct_price.go

@@ -17,9 +17,10 @@ package ecs
 
 // Price is a nested struct in ecs response
 type Price struct {
-	DiscountPrice float64                           `json:"DiscountPrice" xml:"DiscountPrice"`
-	TradePrice    float64                           `json:"TradePrice" xml:"TradePrice"`
-	OriginalPrice float64                           `json:"OriginalPrice" xml:"OriginalPrice"`
-	Currency      string                            `json:"Currency" xml:"Currency"`
-	DetailInfos   DetailInfosInDescribeRenewalPrice `json:"DetailInfos" xml:"DetailInfos"`
+	DiscountPrice             float64                    `json:"DiscountPrice" xml:"DiscountPrice"`
+	TradePrice                float64                    `json:"TradePrice" xml:"TradePrice"`
+	OriginalPrice             float64                    `json:"OriginalPrice" xml:"OriginalPrice"`
+	ReservedInstanceHourPrice float64                    `json:"ReservedInstanceHourPrice" xml:"ReservedInstanceHourPrice"`
+	Currency                  string                     `json:"Currency" xml:"Currency"`
+	DetailInfos               DetailInfosInDescribePrice `json:"DetailInfos" xml:"DetailInfos"`
 }

+ 2 - 2
services/ecs/struct_price_info.go

@@ -17,6 +17,6 @@ package ecs
 
 // PriceInfo is a nested struct in ecs response
 type PriceInfo struct {
-	Price Price                       `json:"Price" xml:"Price"`
-	Rules RulesInDescribeRenewalPrice `json:"Rules" xml:"Rules"`
+	Price Price                `json:"Price" xml:"Price"`
+	Rules RulesInDescribePrice `json:"Rules" xml:"Rules"`
 }

+ 5 - 5
services/ecs/struct_resource_price_model.go

@@ -17,9 +17,9 @@ package ecs
 
 // ResourcePriceModel is a nested struct in ecs response
 type ResourcePriceModel struct {
-	DiscountPrice float64                        `json:"DiscountPrice" xml:"DiscountPrice"`
-	TradePrice    float64                        `json:"TradePrice" xml:"TradePrice"`
-	OriginalPrice float64                        `json:"OriginalPrice" xml:"OriginalPrice"`
-	Resource      string                         `json:"Resource" xml:"Resource"`
-	SubRules      SubRulesInDescribeRenewalPrice `json:"SubRules" xml:"SubRules"`
+	DiscountPrice float64                 `json:"DiscountPrice" xml:"DiscountPrice"`
+	TradePrice    float64                 `json:"TradePrice" xml:"TradePrice"`
+	OriginalPrice float64                 `json:"OriginalPrice" xml:"OriginalPrice"`
+	Resource      string                  `json:"Resource" xml:"Resource"`
+	SubRules      SubRulesInDescribePrice `json:"SubRules" xml:"SubRules"`
 }

+ 4 - 4
services/ecs/struct_vpc_attributes.go

@@ -17,8 +17,8 @@ package ecs
 
 // VpcAttributes is a nested struct in ecs response
 type VpcAttributes struct {
-	VSwitchId        string                              `json:"VSwitchId" xml:"VSwitchId"`
-	VpcId            string                              `json:"VpcId" xml:"VpcId"`
-	NatIpAddress     string                              `json:"NatIpAddress" xml:"NatIpAddress"`
-	PrivateIpAddress PrivateIpAddressInDescribeInstances `json:"PrivateIpAddress" xml:"PrivateIpAddress"`
+	VSwitchId        string                                      `json:"VSwitchId" xml:"VSwitchId"`
+	VpcId            string                                      `json:"VpcId" xml:"VpcId"`
+	NatIpAddress     string                                      `json:"NatIpAddress" xml:"NatIpAddress"`
+	PrivateIpAddress PrivateIpAddressInDescribeInstanceAttribute `json:"PrivateIpAddress" xml:"PrivateIpAddress"`
 }