diff options
Diffstat (limited to 'vendor/github.com/mitchellh/packer/vendor/github.com/denverdino/aliyungo/ecs/nat_gateway.go')
-rw-r--r-- | vendor/github.com/mitchellh/packer/vendor/github.com/denverdino/aliyungo/ecs/nat_gateway.go | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/vendor/github.com/mitchellh/packer/vendor/github.com/denverdino/aliyungo/ecs/nat_gateway.go b/vendor/github.com/mitchellh/packer/vendor/github.com/denverdino/aliyungo/ecs/nat_gateway.go index dfcb74d3..10e00638 100644 --- a/vendor/github.com/mitchellh/packer/vendor/github.com/denverdino/aliyungo/ecs/nat_gateway.go +++ b/vendor/github.com/mitchellh/packer/vendor/github.com/denverdino/aliyungo/ecs/nat_gateway.go @@ -83,17 +83,25 @@ type DescribeNatGatewaysArgs struct { func (client *Client) DescribeNatGateways(args *DescribeNatGatewaysArgs) (natGateways []NatGatewaySetType, pagination *common.PaginationResult, err error) { + response, err := client.DescribeNatGatewaysWithRaw(args) + if err == nil { + return response.NatGateways.NatGateway, &response.PaginationResult, nil + } + + return nil, nil, err +} +func (client *Client) DescribeNatGatewaysWithRaw(args *DescribeNatGatewaysArgs) (response *DescribeNatGatewayResponse, err error) { args.Validate() - response := DescribeNatGatewayResponse{} + response = &DescribeNatGatewayResponse{} - err = client.Invoke("DescribeNatGateways", args, &response) + err = client.Invoke("DescribeNatGateways", args, response) if err == nil { - return response.NatGateways.NatGateway, &response.PaginationResult, nil + return response, nil } - return nil, nil, err + return nil, err } type ModifyNatGatewayAttributeArgs struct { |