diff --git a/generator/ServiceModels/ec2/ec2-2016-11-15.normal.json b/generator/ServiceModels/ec2/ec2-2016-11-15.normal.json index 8cfe684cce3a..3d07f1f7e24d 100644 --- a/generator/ServiceModels/ec2/ec2-2016-11-15.normal.json +++ b/generator/ServiceModels/ec2/ec2-2016-11-15.normal.json @@ -939,6 +939,16 @@ "output":{"shape":"DescribeEgressOnlyInternetGatewaysResult"}, "documentation":"

Describes one or more of your egress-only Internet gateways.

" }, + "DescribeElasticGpus":{ + "name":"DescribeElasticGpus", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribeElasticGpusRequest"}, + "output":{"shape":"DescribeElasticGpusResult"}, + "documentation":"

Describes the Elastic GPUs associated with your instances. For more information about Elastic GPUs, see Amazon EC2 Elastic GPUs.

" + }, "DescribeExportTasks":{ "name":"DescribeExportTasks", "http":{ @@ -6154,6 +6164,53 @@ } } }, + "DescribeElasticGpusRequest":{ + "type":"structure", + "members":{ + "ElasticGpuIds":{ + "shape":"ElasticGpuIdSet", + "documentation":"

One or more Elastic GPU IDs.

", + "locationName":"ElasticGpuId" + }, + "DryRun":{ + "shape":"Boolean", + "documentation":"

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

" + }, + "Filters":{ + "shape":"FilterList", + "documentation":"

One or more filters.

", + "locationName":"Filter" + }, + "MaxResults":{ + "shape":"Integer", + "documentation":"

The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. This value can be between 5 and 1000.

" + }, + "NextToken":{ + "shape":"String", + "documentation":"

The token to request the next page of results.

" + } + } + }, + "DescribeElasticGpusResult":{ + "type":"structure", + "members":{ + "ElasticGpuSet":{ + "shape":"ElasticGpuSet", + "documentation":"

Information about the Elastic GPUs.

", + "locationName":"elasticGpuSet" + }, + "MaxResults":{ + "shape":"Integer", + "documentation":"

The total number of items to return. If the total number of items available is more than the value specified in max-items then a Next-Token will be provided in the output that you can use to resume pagination.

", + "locationName":"maxResults" + }, + "NextToken":{ + "shape":"String", + "documentation":"

The token to use to retrieve the next page of results. This value is null when there are no more results to return.

", + "locationName":"nextToken" + } + } + }, "DescribeExportTasksRequest":{ "type":"structure", "members":{ @@ -9156,6 +9213,126 @@ "locationName":"item" } }, + "ElasticGpuAssociation":{ + "type":"structure", + "members":{ + "ElasticGpuId":{ + "shape":"String", + "documentation":"

The ID of the Elastic GPU.

", + "locationName":"elasticGpuId" + }, + "ElasticGpuAssociationId":{ + "shape":"String", + "documentation":"

The ID of the association.

", + "locationName":"elasticGpuAssociationId" + }, + "ElasticGpuAssociationState":{ + "shape":"String", + "documentation":"

The state of the association between the instance and the Elastic GPU.

", + "locationName":"elasticGpuAssociationState" + }, + "ElasticGpuAssociationTime":{ + "shape":"String", + "documentation":"

The time the Elastic GPU was associated with the instance.

", + "locationName":"elasticGpuAssociationTime" + } + }, + "documentation":"

Describes the association between an instance and an Elastic GPU.

" + }, + "ElasticGpuAssociationList":{ + "type":"list", + "member":{ + "shape":"ElasticGpuAssociation", + "locationName":"item" + } + }, + "ElasticGpuHealth":{ + "type":"structure", + "members":{ + "Status":{ + "shape":"ElasticGpuStatus", + "documentation":"

The health status.

", + "locationName":"status" + } + }, + "documentation":"

Describes the status of an Elastic GPU.

" + }, + "ElasticGpuIdSet":{ + "type":"list", + "member":{ + "shape":"String", + "locationName":"item" + } + }, + "ElasticGpuSet":{ + "type":"list", + "member":{"shape":"ElasticGpus"} + }, + "ElasticGpuSpecification":{ + "type":"structure", + "required":["Type"], + "members":{ + "Type":{ + "shape":"String", + "documentation":"

The type of Elastic GPU.

" + } + }, + "documentation":"

A specification for an Elastic GPU.

" + }, + "ElasticGpuSpecifications":{ + "type":"list", + "member":{ + "shape":"ElasticGpuSpecification", + "locationName":"item" + } + }, + "ElasticGpuState":{ + "type":"string", + "enum":["ATTACHED"] + }, + "ElasticGpuStatus":{ + "type":"string", + "enum":[ + "OK", + "IMPAIRED" + ] + }, + "ElasticGpus":{ + "type":"structure", + "members":{ + "ElasticGpuId":{ + "shape":"String", + "documentation":"

The ID of the Elastic GPU.

", + "locationName":"elasticGpuId" + }, + "AvailabilityZone":{ + "shape":"String", + "documentation":"

The Availability Zone in the which the Elastic GPU resides.

", + "locationName":"availabilityZone" + }, + "ElasticGpuType":{ + "shape":"String", + "documentation":"

The type of Elastic GPU.

", + "locationName":"elasticGpuType" + }, + "ElasticGpuHealth":{ + "shape":"ElasticGpuHealth", + "documentation":"

The status of the Elastic GPU.

", + "locationName":"elasticGpuHealth" + }, + "ElasticGpuState":{ + "shape":"ElasticGpuState", + "documentation":"

The state of the Elastic GPU.

", + "locationName":"elasticGpuState" + }, + "InstanceId":{ + "shape":"String", + "documentation":"

The ID of the instance to which the Elastic GPU is attached.

", + "locationName":"instanceId" + } + }, + "documentation":"

Describes an Elastic GPU.

" + }, "EnableVgwRoutePropagationRequest":{ "type":"structure", "required":[ @@ -11264,6 +11441,11 @@ "documentation":"

Indicates whether this is a Spot instance or a Scheduled Instance.

", "locationName":"instanceLifecycle" }, + "ElasticGpuAssociations":{ + "shape":"ElasticGpuAssociationList", + "documentation":"

The Elastic GPU associated with the instance.

", + "locationName":"elasticGpuAssociationSet" + }, "NetworkInterfaces":{ "shape":"InstanceNetworkInterfaceList", "documentation":"

[EC2-VPC] One or more network interfaces for the instance.

", @@ -16340,6 +16522,10 @@ "documentation":"

[EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 address range of the subnet.

Only one private IP address can be designated as primary. You can't specify this option if you've specified the option to designate a private IP address as the primary IP address in a network interface specification. You cannot specify this option if you're launching more than one instance in the request.

", "locationName":"privateIpAddress" }, + "ElasticGpuSpecification":{ + "shape":"ElasticGpuSpecifications", + "documentation":"

An Elastic GPU to associate with the instance.

" + }, "TagSpecifications":{ "shape":"TagSpecificationList", "documentation":"

The tags to apply to the resources during launch. You can tag instances and volumes. The specified tags are applied to all instances or volumes that are created during launch.

", diff --git a/sdk/src/Services/EC2/Generated/Model/DescribeElasticGpusRequest.cs b/sdk/src/Services/EC2/Generated/Model/DescribeElasticGpusRequest.cs new file mode 100644 index 000000000000..ab970bc6d04f --- /dev/null +++ b/sdk/src/Services/EC2/Generated/Model/DescribeElasticGpusRequest.cs @@ -0,0 +1,140 @@ +/* + * Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file 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. + */ + +/* + * Do not modify this file. This file is generated from the ec2-2016-11-15.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; +using System.Text; +using System.IO; + +using Amazon.Runtime; +using Amazon.Runtime.Internal; + +namespace Amazon.EC2.Model +{ + /// + /// Container for the parameters to the DescribeElasticGpus operation. + /// Describes the Elastic GPUs associated with your instances. For more information about + /// Elastic GPUs, see Amazon + /// EC2 Elastic GPUs. + /// + public partial class DescribeElasticGpusRequest : AmazonEC2Request + { + private List _elasticGpuIds = new List(); + private List _filters = new List(); + private int? _maxResults; + private string _nextToken; + + /// + /// Gets and sets the property ElasticGpuIds. + /// + /// One or more Elastic GPU IDs. + /// + /// + public List ElasticGpuIds + { + get { return this._elasticGpuIds; } + set { this._elasticGpuIds = value; } + } + + // Check to see if ElasticGpuIds property is set + internal bool IsSetElasticGpuIds() + { + return this._elasticGpuIds != null && this._elasticGpuIds.Count > 0; + } + + /// + /// Gets and sets the property Filters. + /// + /// One or more filters. + /// + ///
  • + /// + /// availability-zone - The Availability Zone in which the Elastic GPU resides. + /// + ///
  • + /// + /// elastic-gpu-health - The status of the Elastic GPU (OK + /// | IMPAIRED). + /// + ///
  • + /// + /// elastic-gpu-state - The state of the Elastic GPU (ATTACHED). + /// + ///
  • + /// + /// elastic-gpu-type - The type of Elastic GPU; for example, eg1.medium. + /// + ///
  • + /// + /// instance-id - The ID of the instance to which the Elastic GPU is associated. + /// + ///
+ ///
+ public List Filters + { + get { return this._filters; } + set { this._filters = value; } + } + + // Check to see if Filters property is set + internal bool IsSetFilters() + { + return this._filters != null && this._filters.Count > 0; + } + + /// + /// Gets and sets the property MaxResults. + /// + /// The maximum number of results to return in a single call. To retrieve the remaining + /// results, make another call with the returned NextToken value. This value + /// can be between 5 and 1000. + /// + /// + public int MaxResults + { + get { return this._maxResults.GetValueOrDefault(); } + set { this._maxResults = value; } + } + + // Check to see if MaxResults property is set + internal bool IsSetMaxResults() + { + return this._maxResults.HasValue; + } + + /// + /// Gets and sets the property NextToken. + /// + /// The token to request the next page of results. + /// + /// + public string NextToken + { + get { return this._nextToken; } + set { this._nextToken = value; } + } + + // Check to see if NextToken property is set + internal bool IsSetNextToken() + { + return this._nextToken != null; + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/EC2/Generated/Model/DescribeElasticGpusResponse.cs b/sdk/src/Services/EC2/Generated/Model/DescribeElasticGpusResponse.cs new file mode 100644 index 000000000000..3e5d222d9939 --- /dev/null +++ b/sdk/src/Services/EC2/Generated/Model/DescribeElasticGpusResponse.cs @@ -0,0 +1,97 @@ +/* + * Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file 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. + */ + +/* + * Do not modify this file. This file is generated from the ec2-2016-11-15.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; +using System.Text; +using System.IO; + +using Amazon.Runtime; +using Amazon.Runtime.Internal; + +namespace Amazon.EC2.Model +{ + /// + /// This is the response object from the DescribeElasticGpus operation. + /// + public partial class DescribeElasticGpusResponse : AmazonWebServiceResponse + { + private List _elasticGpuSet = new List(); + private int? _maxResults; + private string _nextToken; + + /// + /// Gets and sets the property ElasticGpuSet. + /// + /// Information about the Elastic GPUs. + /// + /// + public List ElasticGpuSet + { + get { return this._elasticGpuSet; } + set { this._elasticGpuSet = value; } + } + + // Check to see if ElasticGpuSet property is set + internal bool IsSetElasticGpuSet() + { + return this._elasticGpuSet != null && this._elasticGpuSet.Count > 0; + } + + /// + /// Gets and sets the property MaxResults. + /// + /// The total number of items to return. If the total number of items available is more + /// than the value specified in max-items then a Next-Token will be provided in the output + /// that you can use to resume pagination. + /// + /// + public int MaxResults + { + get { return this._maxResults.GetValueOrDefault(); } + set { this._maxResults = value; } + } + + // Check to see if MaxResults property is set + internal bool IsSetMaxResults() + { + return this._maxResults.HasValue; + } + + /// + /// Gets and sets the property NextToken. + /// + /// The token to use to retrieve the next page of results. This value is null + /// when there are no more results to return. + /// + /// + public string NextToken + { + get { return this._nextToken; } + set { this._nextToken = value; } + } + + // Check to see if NextToken property is set + internal bool IsSetNextToken() + { + return this._nextToken != null; + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/EC2/Generated/Model/ElasticGpuAssociation.cs b/sdk/src/Services/EC2/Generated/Model/ElasticGpuAssociation.cs new file mode 100644 index 000000000000..975c8e3e84bc --- /dev/null +++ b/sdk/src/Services/EC2/Generated/Model/ElasticGpuAssociation.cs @@ -0,0 +1,113 @@ +/* + * Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file 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. + */ + +/* + * Do not modify this file. This file is generated from the ec2-2016-11-15.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; +using System.Text; +using System.IO; + +using Amazon.Runtime; +using Amazon.Runtime.Internal; + +namespace Amazon.EC2.Model +{ + /// + /// Describes the association between an instance and an Elastic GPU. + /// + public partial class ElasticGpuAssociation + { + private string _elasticGpuAssociationId; + private string _elasticGpuAssociationState; + private string _elasticGpuAssociationTime; + private string _elasticGpuId; + + /// + /// Gets and sets the property ElasticGpuAssociationId. + /// + /// The ID of the association. + /// + /// + public string ElasticGpuAssociationId + { + get { return this._elasticGpuAssociationId; } + set { this._elasticGpuAssociationId = value; } + } + + // Check to see if ElasticGpuAssociationId property is set + internal bool IsSetElasticGpuAssociationId() + { + return this._elasticGpuAssociationId != null; + } + + /// + /// Gets and sets the property ElasticGpuAssociationState. + /// + /// The state of the association between the instance and the Elastic GPU. + /// + /// + public string ElasticGpuAssociationState + { + get { return this._elasticGpuAssociationState; } + set { this._elasticGpuAssociationState = value; } + } + + // Check to see if ElasticGpuAssociationState property is set + internal bool IsSetElasticGpuAssociationState() + { + return this._elasticGpuAssociationState != null; + } + + /// + /// Gets and sets the property ElasticGpuAssociationTime. + /// + /// The time the Elastic GPU was associated with the instance. + /// + /// + public string ElasticGpuAssociationTime + { + get { return this._elasticGpuAssociationTime; } + set { this._elasticGpuAssociationTime = value; } + } + + // Check to see if ElasticGpuAssociationTime property is set + internal bool IsSetElasticGpuAssociationTime() + { + return this._elasticGpuAssociationTime != null; + } + + /// + /// Gets and sets the property ElasticGpuId. + /// + /// The ID of the Elastic GPU. + /// + /// + public string ElasticGpuId + { + get { return this._elasticGpuId; } + set { this._elasticGpuId = value; } + } + + // Check to see if ElasticGpuId property is set + internal bool IsSetElasticGpuId() + { + return this._elasticGpuId != null; + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/EC2/Generated/Model/ElasticGpuHealth.cs b/sdk/src/Services/EC2/Generated/Model/ElasticGpuHealth.cs new file mode 100644 index 000000000000..f0df09022fed --- /dev/null +++ b/sdk/src/Services/EC2/Generated/Model/ElasticGpuHealth.cs @@ -0,0 +1,56 @@ +/* + * Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file 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. + */ + +/* + * Do not modify this file. This file is generated from the ec2-2016-11-15.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; +using System.Text; +using System.IO; + +using Amazon.Runtime; +using Amazon.Runtime.Internal; + +namespace Amazon.EC2.Model +{ + /// + /// Describes the status of an Elastic GPU. + /// + public partial class ElasticGpuHealth + { + private ElasticGpuStatus _status; + + /// + /// Gets and sets the property Status. + /// + /// The health status. + /// + /// + public ElasticGpuStatus Status + { + get { return this._status; } + set { this._status = value; } + } + + // Check to see if Status property is set + internal bool IsSetStatus() + { + return this._status != null; + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/EC2/Generated/Model/ElasticGpuSpecification.cs b/sdk/src/Services/EC2/Generated/Model/ElasticGpuSpecification.cs new file mode 100644 index 000000000000..cbccdbaf5cb4 --- /dev/null +++ b/sdk/src/Services/EC2/Generated/Model/ElasticGpuSpecification.cs @@ -0,0 +1,56 @@ +/* + * Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file 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. + */ + +/* + * Do not modify this file. This file is generated from the ec2-2016-11-15.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; +using System.Text; +using System.IO; + +using Amazon.Runtime; +using Amazon.Runtime.Internal; + +namespace Amazon.EC2.Model +{ + /// + /// A specification for an Elastic GPU. + /// + public partial class ElasticGpuSpecification + { + private string _type; + + /// + /// Gets and sets the property Type. + /// + /// The type of Elastic GPU. + /// + /// + public string Type + { + get { return this._type; } + set { this._type = value; } + } + + // Check to see if Type property is set + internal bool IsSetType() + { + return this._type != null; + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/EC2/Generated/Model/ElasticGpus.cs b/sdk/src/Services/EC2/Generated/Model/ElasticGpus.cs new file mode 100644 index 000000000000..655d0d9b499c --- /dev/null +++ b/sdk/src/Services/EC2/Generated/Model/ElasticGpus.cs @@ -0,0 +1,151 @@ +/* + * Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file 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. + */ + +/* + * Do not modify this file. This file is generated from the ec2-2016-11-15.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; +using System.Text; +using System.IO; + +using Amazon.Runtime; +using Amazon.Runtime.Internal; + +namespace Amazon.EC2.Model +{ + /// + /// Describes an Elastic GPU. + /// + public partial class ElasticGpus + { + private string _availabilityZone; + private ElasticGpuHealth _elasticGpuHealth; + private string _elasticGpuId; + private ElasticGpuState _elasticGpuState; + private string _elasticGpuType; + private string _instanceId; + + /// + /// Gets and sets the property AvailabilityZone. + /// + /// The Availability Zone in the which the Elastic GPU resides. + /// + /// + public string AvailabilityZone + { + get { return this._availabilityZone; } + set { this._availabilityZone = value; } + } + + // Check to see if AvailabilityZone property is set + internal bool IsSetAvailabilityZone() + { + return this._availabilityZone != null; + } + + /// + /// Gets and sets the property ElasticGpuHealth. + /// + /// The status of the Elastic GPU. + /// + /// + public ElasticGpuHealth ElasticGpuHealth + { + get { return this._elasticGpuHealth; } + set { this._elasticGpuHealth = value; } + } + + // Check to see if ElasticGpuHealth property is set + internal bool IsSetElasticGpuHealth() + { + return this._elasticGpuHealth != null; + } + + /// + /// Gets and sets the property ElasticGpuId. + /// + /// The ID of the Elastic GPU. + /// + /// + public string ElasticGpuId + { + get { return this._elasticGpuId; } + set { this._elasticGpuId = value; } + } + + // Check to see if ElasticGpuId property is set + internal bool IsSetElasticGpuId() + { + return this._elasticGpuId != null; + } + + /// + /// Gets and sets the property ElasticGpuState. + /// + /// The state of the Elastic GPU. + /// + /// + public ElasticGpuState ElasticGpuState + { + get { return this._elasticGpuState; } + set { this._elasticGpuState = value; } + } + + // Check to see if ElasticGpuState property is set + internal bool IsSetElasticGpuState() + { + return this._elasticGpuState != null; + } + + /// + /// Gets and sets the property ElasticGpuType. + /// + /// The type of Elastic GPU. + /// + /// + public string ElasticGpuType + { + get { return this._elasticGpuType; } + set { this._elasticGpuType = value; } + } + + // Check to see if ElasticGpuType property is set + internal bool IsSetElasticGpuType() + { + return this._elasticGpuType != null; + } + + /// + /// Gets and sets the property InstanceId. + /// + /// The ID of the instance to which the Elastic GPU is attached. + /// + /// + public string InstanceId + { + get { return this._instanceId; } + set { this._instanceId = value; } + } + + // Check to see if InstanceId property is set + internal bool IsSetInstanceId() + { + return this._instanceId != null; + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/EC2/Generated/Model/Instance.cs b/sdk/src/Services/EC2/Generated/Model/Instance.cs index b5f56680fcc0..5c1f48f48908 100644 --- a/sdk/src/Services/EC2/Generated/Model/Instance.cs +++ b/sdk/src/Services/EC2/Generated/Model/Instance.cs @@ -37,6 +37,7 @@ public partial class Instance private List _blockDeviceMappings = new List(); private string _clientToken; private bool? _ebsOptimized; + private List _elasticGpuAssociations = new List(); private bool? _enaSupport; private HypervisorType _hypervisor; private IamInstanceProfile _iamInstanceProfile; @@ -164,6 +165,24 @@ internal bool IsSetEbsOptimized() return this._ebsOptimized.HasValue; } + /// + /// Gets and sets the property ElasticGpuAssociations. + /// + /// The Elastic GPU associated with the instance. + /// + /// + public List ElasticGpuAssociations + { + get { return this._elasticGpuAssociations; } + set { this._elasticGpuAssociations = value; } + } + + // Check to see if ElasticGpuAssociations property is set + internal bool IsSetElasticGpuAssociations() + { + return this._elasticGpuAssociations != null && this._elasticGpuAssociations.Count > 0; + } + /// /// Gets and sets the property EnaSupport. /// diff --git a/sdk/src/Services/EC2/Generated/Model/Internal/MarshallTransformations/DescribeElasticGpusRequestMarshaller.cs b/sdk/src/Services/EC2/Generated/Model/Internal/MarshallTransformations/DescribeElasticGpusRequestMarshaller.cs new file mode 100644 index 000000000000..e0d54d692915 --- /dev/null +++ b/sdk/src/Services/EC2/Generated/Model/Internal/MarshallTransformations/DescribeElasticGpusRequestMarshaller.cs @@ -0,0 +1,103 @@ +/* + * Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file 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. + */ + +/* + * Do not modify this file. This file is generated from the ec2-2016-11-15.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Text; +using System.Xml.Serialization; + +using Amazon.EC2.Model; +using Amazon.Runtime; +using Amazon.Runtime.Internal; +using Amazon.Runtime.Internal.Transform; +using Amazon.Runtime.Internal.Util; +namespace Amazon.EC2.Model.Internal.MarshallTransformations +{ + /// + /// DescribeElasticGpus Request Marshaller + /// + public class DescribeElasticGpusRequestMarshaller : IMarshaller , IMarshaller + { + /// + /// Marshaller the request object to the HTTP request. + /// + /// + /// + public IRequest Marshall(AmazonWebServiceRequest input) + { + return this.Marshall((DescribeElasticGpusRequest)input); + } + + /// + /// Marshaller the request object to the HTTP request. + /// + /// + /// + public IRequest Marshall(DescribeElasticGpusRequest publicRequest) + { + IRequest request = new DefaultRequest(publicRequest, "Amazon.EC2"); + request.Parameters.Add("Action", "DescribeElasticGpus"); + request.Parameters.Add("Version", "2016-11-15"); + + if(publicRequest != null) + { + if(publicRequest.IsSetElasticGpuIds()) + { + int publicRequestlistValueIndex = 1; + foreach(var publicRequestlistValue in publicRequest.ElasticGpuIds) + { + request.Parameters.Add("ElasticGpuId" + "." + publicRequestlistValueIndex, StringUtils.FromString(publicRequestlistValue)); + publicRequestlistValueIndex++; + } + } + if(publicRequest.IsSetFilters()) + { + int publicRequestlistValueIndex = 1; + foreach(var publicRequestlistValue in publicRequest.Filters) + { + if(publicRequestlistValue.IsSetName()) + { + request.Parameters.Add("Filter" + "." + publicRequestlistValueIndex + "." + "Name", StringUtils.FromString(publicRequestlistValue.Name)); + } + if(publicRequestlistValue.IsSetValues()) + { + int publicRequestlistValuelistValueIndex = 1; + foreach(var publicRequestlistValuelistValue in publicRequestlistValue.Values) + { + request.Parameters.Add("Filter" + "." + publicRequestlistValueIndex + "." + "Value" + "." + publicRequestlistValuelistValueIndex, StringUtils.FromString(publicRequestlistValuelistValue)); + publicRequestlistValuelistValueIndex++; + } + } + publicRequestlistValueIndex++; + } + } + if(publicRequest.IsSetMaxResults()) + { + request.Parameters.Add("MaxResults", StringUtils.FromInt(publicRequest.MaxResults)); + } + if(publicRequest.IsSetNextToken()) + { + request.Parameters.Add("NextToken", StringUtils.FromString(publicRequest.NextToken)); + } + } + return request; + } + } +} \ No newline at end of file diff --git a/sdk/src/Services/EC2/Generated/Model/Internal/MarshallTransformations/DescribeElasticGpusResponseUnmarshaller.cs b/sdk/src/Services/EC2/Generated/Model/Internal/MarshallTransformations/DescribeElasticGpusResponseUnmarshaller.cs new file mode 100644 index 000000000000..6533fa400b1b --- /dev/null +++ b/sdk/src/Services/EC2/Generated/Model/Internal/MarshallTransformations/DescribeElasticGpusResponseUnmarshaller.cs @@ -0,0 +1,114 @@ +/* + * Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file 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. + */ + +/* + * Do not modify this file. This file is generated from the ec2-2016-11-15.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Net; +using System.Text; +using System.Xml.Serialization; + +using Amazon.EC2.Model; +using Amazon.Runtime; +using Amazon.Runtime.Internal; +using Amazon.Runtime.Internal.Transform; +using Amazon.Runtime.Internal.Util; +namespace Amazon.EC2.Model.Internal.MarshallTransformations +{ + /// + /// Response Unmarshaller for DescribeElasticGpus operation + /// + public class DescribeElasticGpusResponseUnmarshaller : EC2ResponseUnmarshaller + { + /// + /// Unmarshaller the response from the service to the response class. + /// + /// + /// + public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) + { + DescribeElasticGpusResponse response = new DescribeElasticGpusResponse(); + + int originalDepth = context.CurrentDepth; + int targetDepth = originalDepth + 1; + if (context.IsStartOfDocument) + targetDepth = 2; + + while (context.ReadAtDepth(originalDepth)) + { + if (context.IsStartElement || context.IsAttribute) + { + + if (context.TestExpression("elasticGpuSet/member", targetDepth)) + { + var unmarshaller = ElasticGpusUnmarshaller.Instance; + var item = unmarshaller.Unmarshall(context); + response.ElasticGpuSet.Add(item); + continue; + } + if (context.TestExpression("maxResults", targetDepth)) + { + var unmarshaller = IntUnmarshaller.Instance; + response.MaxResults = unmarshaller.Unmarshall(context); + continue; + } + if (context.TestExpression("nextToken", targetDepth)) + { + var unmarshaller = StringUnmarshaller.Instance; + response.NextToken = unmarshaller.Unmarshall(context); + continue; + } + } + } + + return response; + } + + /// + /// Unmarshaller error response to exception. + /// + /// + /// + /// + /// + public override AmazonServiceException UnmarshallException(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) + { + ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); + return new AmazonEC2Exception(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); + } + private static DescribeElasticGpusResponseUnmarshaller _instance = new DescribeElasticGpusResponseUnmarshaller(); + + internal static DescribeElasticGpusResponseUnmarshaller GetInstance() + { + return _instance; + } + + /// + /// Gets the singleton. + /// + public static DescribeElasticGpusResponseUnmarshaller Instance + { + get + { + return _instance; + } + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/EC2/Generated/Model/Internal/MarshallTransformations/ElasticGpuAssociationUnmarshaller.cs b/sdk/src/Services/EC2/Generated/Model/Internal/MarshallTransformations/ElasticGpuAssociationUnmarshaller.cs new file mode 100644 index 000000000000..333f24dabb23 --- /dev/null +++ b/sdk/src/Services/EC2/Generated/Model/Internal/MarshallTransformations/ElasticGpuAssociationUnmarshaller.cs @@ -0,0 +1,115 @@ +/* + * Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file 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. + */ + +/* + * Do not modify this file. This file is generated from the ec2-2016-11-15.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Net; +using System.Text; +using System.Xml.Serialization; + +using Amazon.EC2.Model; +using Amazon.Runtime; +using Amazon.Runtime.Internal; +using Amazon.Runtime.Internal.Transform; +using Amazon.Runtime.Internal.Util; +namespace Amazon.EC2.Model.Internal.MarshallTransformations +{ + /// + /// Response Unmarshaller for ElasticGpuAssociation Object + /// + public class ElasticGpuAssociationUnmarshaller : IUnmarshaller, IUnmarshaller + { + /// + /// Unmarshaller the response from the service to the response class. + /// + /// + /// + public ElasticGpuAssociation Unmarshall(XmlUnmarshallerContext context) + { + ElasticGpuAssociation unmarshalledObject = new ElasticGpuAssociation(); + int originalDepth = context.CurrentDepth; + int targetDepth = originalDepth + 1; + + if (context.IsStartOfDocument) + targetDepth += 2; + + while (context.ReadAtDepth(originalDepth)) + { + if (context.IsStartElement || context.IsAttribute) + { + if (context.TestExpression("elasticGpuAssociationId", targetDepth)) + { + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.ElasticGpuAssociationId = unmarshaller.Unmarshall(context); + continue; + } + if (context.TestExpression("elasticGpuAssociationState", targetDepth)) + { + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.ElasticGpuAssociationState = unmarshaller.Unmarshall(context); + continue; + } + if (context.TestExpression("elasticGpuAssociationTime", targetDepth)) + { + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.ElasticGpuAssociationTime = unmarshaller.Unmarshall(context); + continue; + } + if (context.TestExpression("elasticGpuId", targetDepth)) + { + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.ElasticGpuId = unmarshaller.Unmarshall(context); + continue; + } + } + else if (context.IsEndElement && context.CurrentDepth < originalDepth) + { + return unmarshalledObject; + } + } + + return unmarshalledObject; + } + + /// + /// Unmarshaller error response to exception. + /// + /// + /// + public ElasticGpuAssociation Unmarshall(JsonUnmarshallerContext context) + { + return null; + } + + + private static ElasticGpuAssociationUnmarshaller _instance = new ElasticGpuAssociationUnmarshaller(); + + /// + /// Gets the singleton. + /// + public static ElasticGpuAssociationUnmarshaller Instance + { + get + { + return _instance; + } + } + } +} \ No newline at end of file diff --git a/sdk/src/Services/EC2/Generated/Model/Internal/MarshallTransformations/ElasticGpuHealthUnmarshaller.cs b/sdk/src/Services/EC2/Generated/Model/Internal/MarshallTransformations/ElasticGpuHealthUnmarshaller.cs new file mode 100644 index 000000000000..35a9af4f76f9 --- /dev/null +++ b/sdk/src/Services/EC2/Generated/Model/Internal/MarshallTransformations/ElasticGpuHealthUnmarshaller.cs @@ -0,0 +1,97 @@ +/* + * Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file 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. + */ + +/* + * Do not modify this file. This file is generated from the ec2-2016-11-15.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Net; +using System.Text; +using System.Xml.Serialization; + +using Amazon.EC2.Model; +using Amazon.Runtime; +using Amazon.Runtime.Internal; +using Amazon.Runtime.Internal.Transform; +using Amazon.Runtime.Internal.Util; +namespace Amazon.EC2.Model.Internal.MarshallTransformations +{ + /// + /// Response Unmarshaller for ElasticGpuHealth Object + /// + public class ElasticGpuHealthUnmarshaller : IUnmarshaller, IUnmarshaller + { + /// + /// Unmarshaller the response from the service to the response class. + /// + /// + /// + public ElasticGpuHealth Unmarshall(XmlUnmarshallerContext context) + { + ElasticGpuHealth unmarshalledObject = new ElasticGpuHealth(); + int originalDepth = context.CurrentDepth; + int targetDepth = originalDepth + 1; + + if (context.IsStartOfDocument) + targetDepth += 2; + + while (context.ReadAtDepth(originalDepth)) + { + if (context.IsStartElement || context.IsAttribute) + { + if (context.TestExpression("status", targetDepth)) + { + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.Status = unmarshaller.Unmarshall(context); + continue; + } + } + else if (context.IsEndElement && context.CurrentDepth < originalDepth) + { + return unmarshalledObject; + } + } + + return unmarshalledObject; + } + + /// + /// Unmarshaller error response to exception. + /// + /// + /// + public ElasticGpuHealth Unmarshall(JsonUnmarshallerContext context) + { + return null; + } + + + private static ElasticGpuHealthUnmarshaller _instance = new ElasticGpuHealthUnmarshaller(); + + /// + /// Gets the singleton. + /// + public static ElasticGpuHealthUnmarshaller Instance + { + get + { + return _instance; + } + } + } +} \ No newline at end of file diff --git a/sdk/src/Services/EC2/Generated/Model/Internal/MarshallTransformations/ElasticGpusUnmarshaller.cs b/sdk/src/Services/EC2/Generated/Model/Internal/MarshallTransformations/ElasticGpusUnmarshaller.cs new file mode 100644 index 000000000000..d1c16b9c2288 --- /dev/null +++ b/sdk/src/Services/EC2/Generated/Model/Internal/MarshallTransformations/ElasticGpusUnmarshaller.cs @@ -0,0 +1,127 @@ +/* + * Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file 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. + */ + +/* + * Do not modify this file. This file is generated from the ec2-2016-11-15.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Net; +using System.Text; +using System.Xml.Serialization; + +using Amazon.EC2.Model; +using Amazon.Runtime; +using Amazon.Runtime.Internal; +using Amazon.Runtime.Internal.Transform; +using Amazon.Runtime.Internal.Util; +namespace Amazon.EC2.Model.Internal.MarshallTransformations +{ + /// + /// Response Unmarshaller for ElasticGpus Object + /// + public class ElasticGpusUnmarshaller : IUnmarshaller, IUnmarshaller + { + /// + /// Unmarshaller the response from the service to the response class. + /// + /// + /// + public ElasticGpus Unmarshall(XmlUnmarshallerContext context) + { + ElasticGpus unmarshalledObject = new ElasticGpus(); + int originalDepth = context.CurrentDepth; + int targetDepth = originalDepth + 1; + + if (context.IsStartOfDocument) + targetDepth += 2; + + while (context.ReadAtDepth(originalDepth)) + { + if (context.IsStartElement || context.IsAttribute) + { + if (context.TestExpression("availabilityZone", targetDepth)) + { + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.AvailabilityZone = unmarshaller.Unmarshall(context); + continue; + } + if (context.TestExpression("elasticGpuHealth", targetDepth)) + { + var unmarshaller = ElasticGpuHealthUnmarshaller.Instance; + unmarshalledObject.ElasticGpuHealth = unmarshaller.Unmarshall(context); + continue; + } + if (context.TestExpression("elasticGpuId", targetDepth)) + { + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.ElasticGpuId = unmarshaller.Unmarshall(context); + continue; + } + if (context.TestExpression("elasticGpuState", targetDepth)) + { + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.ElasticGpuState = unmarshaller.Unmarshall(context); + continue; + } + if (context.TestExpression("elasticGpuType", targetDepth)) + { + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.ElasticGpuType = unmarshaller.Unmarshall(context); + continue; + } + if (context.TestExpression("instanceId", targetDepth)) + { + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.InstanceId = unmarshaller.Unmarshall(context); + continue; + } + } + else if (context.IsEndElement && context.CurrentDepth < originalDepth) + { + return unmarshalledObject; + } + } + + return unmarshalledObject; + } + + /// + /// Unmarshaller error response to exception. + /// + /// + /// + public ElasticGpus Unmarshall(JsonUnmarshallerContext context) + { + return null; + } + + + private static ElasticGpusUnmarshaller _instance = new ElasticGpusUnmarshaller(); + + /// + /// Gets the singleton. + /// + public static ElasticGpusUnmarshaller Instance + { + get + { + return _instance; + } + } + } +} \ No newline at end of file diff --git a/sdk/src/Services/EC2/Generated/Model/Internal/MarshallTransformations/InstanceUnmarshaller.cs b/sdk/src/Services/EC2/Generated/Model/Internal/MarshallTransformations/InstanceUnmarshaller.cs index f6f7a26d40e0..46ed143720be 100644 --- a/sdk/src/Services/EC2/Generated/Model/Internal/MarshallTransformations/InstanceUnmarshaller.cs +++ b/sdk/src/Services/EC2/Generated/Model/Internal/MarshallTransformations/InstanceUnmarshaller.cs @@ -85,6 +85,13 @@ public Instance Unmarshall(XmlUnmarshallerContext context) unmarshalledObject.EbsOptimized = unmarshaller.Unmarshall(context); continue; } + if (context.TestExpression("elasticGpuAssociationSet/item", targetDepth)) + { + var unmarshaller = ElasticGpuAssociationUnmarshaller.Instance; + var item = unmarshaller.Unmarshall(context); + unmarshalledObject.ElasticGpuAssociations.Add(item); + continue; + } if (context.TestExpression("enaSupport", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; diff --git a/sdk/src/Services/EC2/Generated/Model/Internal/MarshallTransformations/RunInstancesRequestMarshaller.cs b/sdk/src/Services/EC2/Generated/Model/Internal/MarshallTransformations/RunInstancesRequestMarshaller.cs index 031ddb0fda27..08ca0c035a96 100644 --- a/sdk/src/Services/EC2/Generated/Model/Internal/MarshallTransformations/RunInstancesRequestMarshaller.cs +++ b/sdk/src/Services/EC2/Generated/Model/Internal/MarshallTransformations/RunInstancesRequestMarshaller.cs @@ -121,6 +121,18 @@ public IRequest Marshall(RunInstancesRequest publicRequest) { request.Parameters.Add("EbsOptimized", StringUtils.FromBool(publicRequest.EbsOptimized)); } + if(publicRequest.IsSetElasticGpuSpecification()) + { + int publicRequestlistValueIndex = 1; + foreach(var publicRequestlistValue in publicRequest.ElasticGpuSpecification) + { + if(publicRequestlistValue.IsSetType()) + { + request.Parameters.Add("ElasticGpuSpecification" + "." + publicRequestlistValueIndex + "." + "Type", StringUtils.FromString(publicRequestlistValue.Type)); + } + publicRequestlistValueIndex++; + } + } if(publicRequest.IsSetIamInstanceProfile()) { if(publicRequest.IamInstanceProfile.IsSetArn()) diff --git a/sdk/src/Services/EC2/Generated/Model/RunInstancesRequest.cs b/sdk/src/Services/EC2/Generated/Model/RunInstancesRequest.cs index 0df89146f35b..9f502d9fa382 100644 --- a/sdk/src/Services/EC2/Generated/Model/RunInstancesRequest.cs +++ b/sdk/src/Services/EC2/Generated/Model/RunInstancesRequest.cs @@ -110,6 +110,7 @@ public partial class RunInstancesRequest : AmazonEC2Request private string _clientToken; private bool? _disableApiTermination; private bool? _ebsOptimized; + private List _elasticGpuSpecification = new List(); private IamInstanceProfileSpecification _iamInstanceProfile; private string _imageId; private ShutdownBehavior _instanceInitiatedShutdownBehavior; @@ -269,6 +270,24 @@ internal bool IsSetEbsOptimized() return this._ebsOptimized.HasValue; } + /// + /// Gets and sets the property ElasticGpuSpecification. + /// + /// An Elastic GPU to associate with the instance. + /// + /// + public List ElasticGpuSpecification + { + get { return this._elasticGpuSpecification; } + set { this._elasticGpuSpecification = value; } + } + + // Check to see if ElasticGpuSpecification property is set + internal bool IsSetElasticGpuSpecification() + { + return this._elasticGpuSpecification != null && this._elasticGpuSpecification.Count > 0; + } + /// /// Gets and sets the property IamInstanceProfile. /// diff --git a/sdk/src/Services/EC2/Generated/ServiceEnumerations.cs b/sdk/src/Services/EC2/Generated/ServiceEnumerations.cs index 16f10743dd61..b3c856daf971 100644 --- a/sdk/src/Services/EC2/Generated/ServiceEnumerations.cs +++ b/sdk/src/Services/EC2/Generated/ServiceEnumerations.cs @@ -1124,6 +1124,102 @@ public static implicit operator DomainType(string value) } + /// + /// Constants used for properties of type ElasticGpuState. + /// + public class ElasticGpuState : ConstantClass + { + + /// + /// Constant ATTACHED for ElasticGpuState + /// + public static readonly ElasticGpuState ATTACHED = new ElasticGpuState("ATTACHED"); + + /// + /// This constant constructor does not need to be called if the constant + /// you are attempting to use is already defined as a static instance of + /// this class. + /// This constructor should be used to construct constants that are not + /// defined as statics, for instance if attempting to use a feature that is + /// newer than the current version of the SDK. + /// + public ElasticGpuState(string value) + : base(value) + { + } + + /// + /// Finds the constant for the unique value. + /// + /// The unique value for the constant + /// The constant for the unique value + public static ElasticGpuState FindValue(string value) + { + return FindValue(value); + } + + /// + /// Utility method to convert strings to the constant class. + /// + /// The string value to convert to the constant class. + /// + public static implicit operator ElasticGpuState(string value) + { + return FindValue(value); + } + } + + + /// + /// Constants used for properties of type ElasticGpuStatus. + /// + public class ElasticGpuStatus : ConstantClass + { + + /// + /// Constant IMPAIRED for ElasticGpuStatus + /// + public static readonly ElasticGpuStatus IMPAIRED = new ElasticGpuStatus("IMPAIRED"); + /// + /// Constant OK for ElasticGpuStatus + /// + public static readonly ElasticGpuStatus OK = new ElasticGpuStatus("OK"); + + /// + /// This constant constructor does not need to be called if the constant + /// you are attempting to use is already defined as a static instance of + /// this class. + /// This constructor should be used to construct constants that are not + /// defined as statics, for instance if attempting to use a feature that is + /// newer than the current version of the SDK. + /// + public ElasticGpuStatus(string value) + : base(value) + { + } + + /// + /// Finds the constant for the unique value. + /// + /// The unique value for the constant + /// The constant for the unique value + public static ElasticGpuStatus FindValue(string value) + { + return FindValue(value); + } + + /// + /// Utility method to convert strings to the constant class. + /// + /// The string value to convert to the constant class. + /// + public static implicit operator ElasticGpuStatus(string value) + { + return FindValue(value); + } + } + + /// /// Constants used for properties of type EventCode. /// diff --git a/sdk/src/Services/EC2/Generated/_bcl35/AmazonEC2Client.cs b/sdk/src/Services/EC2/Generated/_bcl35/AmazonEC2Client.cs index 8a2eb8ca6cc1..f664eeac52bb 100644 --- a/sdk/src/Services/EC2/Generated/_bcl35/AmazonEC2Client.cs +++ b/sdk/src/Services/EC2/Generated/_bcl35/AmazonEC2Client.cs @@ -6517,6 +6517,61 @@ public DescribeEgressOnlyInternetGatewaysResponse EndDescribeEgressOnlyInternet #endregion + #region DescribeElasticGpus + + /// + /// Describes the Elastic GPUs associated with your instances. For more information about + /// Elastic GPUs, see Amazon + /// EC2 Elastic GPUs. + /// + /// Container for the necessary parameters to execute the DescribeElasticGpus service method. + /// + /// The response from the DescribeElasticGpus service method, as returned by EC2. + /// REST API Reference for DescribeElasticGpus Operation + public DescribeElasticGpusResponse DescribeElasticGpus(DescribeElasticGpusRequest request) + { + var marshaller = new DescribeElasticGpusRequestMarshaller(); + var unmarshaller = DescribeElasticGpusResponseUnmarshaller.Instance; + + return Invoke(request, marshaller, unmarshaller); + } + + /// + /// Initiates the asynchronous execution of the DescribeElasticGpus operation. + /// + /// + /// Container for the necessary parameters to execute the DescribeElasticGpus operation on AmazonEC2Client. + /// An AsyncCallback delegate that is invoked when the operation completes. + /// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback + /// procedure using the AsyncState property. + /// + /// An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDescribeElasticGpus + /// operation. + /// REST API Reference for DescribeElasticGpus Operation + public IAsyncResult BeginDescribeElasticGpus(DescribeElasticGpusRequest request, AsyncCallback callback, object state) + { + var marshaller = new DescribeElasticGpusRequestMarshaller(); + var unmarshaller = DescribeElasticGpusResponseUnmarshaller.Instance; + + return BeginInvoke(request, marshaller, unmarshaller, + callback, state); + } + + /// + /// Finishes the asynchronous execution of the DescribeElasticGpus operation. + /// + /// + /// The IAsyncResult returned by the call to BeginDescribeElasticGpus. + /// + /// Returns a DescribeElasticGpusResult from EC2. + /// REST API Reference for DescribeElasticGpus Operation + public DescribeElasticGpusResponse EndDescribeElasticGpus(IAsyncResult asyncResult) + { + return EndInvoke(asyncResult); + } + + #endregion + #region DescribeExportTasks /// diff --git a/sdk/src/Services/EC2/Generated/_bcl35/IAmazonEC2.cs b/sdk/src/Services/EC2/Generated/_bcl35/IAmazonEC2.cs index 23cbd9dfc1a6..f6c458a9e240 100644 --- a/sdk/src/Services/EC2/Generated/_bcl35/IAmazonEC2.cs +++ b/sdk/src/Services/EC2/Generated/_bcl35/IAmazonEC2.cs @@ -5041,6 +5041,48 @@ public partial interface IAmazonEC2 : IAmazonService, IDisposable #endregion + #region DescribeElasticGpus + + + /// + /// Describes the Elastic GPUs associated with your instances. For more information about + /// Elastic GPUs, see Amazon + /// EC2 Elastic GPUs. + /// + /// Container for the necessary parameters to execute the DescribeElasticGpus service method. + /// + /// The response from the DescribeElasticGpus service method, as returned by EC2. + /// REST API Reference for DescribeElasticGpus Operation + DescribeElasticGpusResponse DescribeElasticGpus(DescribeElasticGpusRequest request); + + /// + /// Initiates the asynchronous execution of the DescribeElasticGpus operation. + /// + /// + /// Container for the necessary parameters to execute the DescribeElasticGpus operation on AmazonEC2Client. + /// An AsyncCallback delegate that is invoked when the operation completes. + /// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback + /// procedure using the AsyncState property. + /// + /// An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDescribeElasticGpus + /// operation. + /// REST API Reference for DescribeElasticGpus Operation + IAsyncResult BeginDescribeElasticGpus(DescribeElasticGpusRequest request, AsyncCallback callback, object state); + + + + /// + /// Finishes the asynchronous execution of the DescribeElasticGpus operation. + /// + /// + /// The IAsyncResult returned by the call to BeginDescribeElasticGpus. + /// + /// Returns a DescribeElasticGpusResult from EC2. + /// REST API Reference for DescribeElasticGpus Operation + DescribeElasticGpusResponse EndDescribeElasticGpus(IAsyncResult asyncResult); + + #endregion + #region DescribeExportTasks diff --git a/sdk/src/Services/EC2/Generated/_bcl45/AmazonEC2Client.cs b/sdk/src/Services/EC2/Generated/_bcl45/AmazonEC2Client.cs index 31906fee9603..d65e0b73b0d5 100644 --- a/sdk/src/Services/EC2/Generated/_bcl45/AmazonEC2Client.cs +++ b/sdk/src/Services/EC2/Generated/_bcl45/AmazonEC2Client.cs @@ -5416,6 +5416,47 @@ public DescribeEgressOnlyInternetGatewaysResponse DescribeEgressOnlyInternetGate #endregion + #region DescribeElasticGpus + + + /// + /// Describes the Elastic GPUs associated with your instances. For more information about + /// Elastic GPUs, see Amazon + /// EC2 Elastic GPUs. + /// + /// Container for the necessary parameters to execute the DescribeElasticGpus service method. + /// + /// The response from the DescribeElasticGpus service method, as returned by EC2. + /// REST API Reference for DescribeElasticGpus Operation + public DescribeElasticGpusResponse DescribeElasticGpus(DescribeElasticGpusRequest request) + { + var marshaller = new DescribeElasticGpusRequestMarshaller(); + var unmarshaller = DescribeElasticGpusResponseUnmarshaller.Instance; + + return Invoke(request, marshaller, unmarshaller); + } + + /// + /// Initiates the asynchronous execution of the DescribeElasticGpus operation. + /// + /// + /// Container for the necessary parameters to execute the DescribeElasticGpus operation. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// The task object representing the asynchronous operation. + /// REST API Reference for DescribeElasticGpus Operation + public Task DescribeElasticGpusAsync(DescribeElasticGpusRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) + { + var marshaller = new DescribeElasticGpusRequestMarshaller(); + var unmarshaller = DescribeElasticGpusResponseUnmarshaller.Instance; + + return InvokeAsync(request, marshaller, + unmarshaller, cancellationToken); + } + + #endregion + #region DescribeExportTasks diff --git a/sdk/src/Services/EC2/Generated/_bcl45/IAmazonEC2.cs b/sdk/src/Services/EC2/Generated/_bcl45/IAmazonEC2.cs index 1ef3bd44eaae..153324154779 100644 --- a/sdk/src/Services/EC2/Generated/_bcl45/IAmazonEC2.cs +++ b/sdk/src/Services/EC2/Generated/_bcl45/IAmazonEC2.cs @@ -4016,6 +4016,35 @@ public partial interface IAmazonEC2 : IAmazonService, IDisposable #endregion + #region DescribeElasticGpus + + + /// + /// Describes the Elastic GPUs associated with your instances. For more information about + /// Elastic GPUs, see Amazon + /// EC2 Elastic GPUs. + /// + /// Container for the necessary parameters to execute the DescribeElasticGpus service method. + /// + /// The response from the DescribeElasticGpus service method, as returned by EC2. + /// REST API Reference for DescribeElasticGpus Operation + DescribeElasticGpusResponse DescribeElasticGpus(DescribeElasticGpusRequest request); + + + /// + /// Initiates the asynchronous execution of the DescribeElasticGpus operation. + /// + /// + /// Container for the necessary parameters to execute the DescribeElasticGpus operation. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// The task object representing the asynchronous operation. + /// REST API Reference for DescribeElasticGpus Operation + Task DescribeElasticGpusAsync(DescribeElasticGpusRequest request, CancellationToken cancellationToken = default(CancellationToken)); + + #endregion + #region DescribeExportTasks diff --git a/sdk/src/Services/EC2/Generated/_mobile/AmazonEC2Client.cs b/sdk/src/Services/EC2/Generated/_mobile/AmazonEC2Client.cs index 59e04af2dfab..9bc2325c914a 100644 --- a/sdk/src/Services/EC2/Generated/_mobile/AmazonEC2Client.cs +++ b/sdk/src/Services/EC2/Generated/_mobile/AmazonEC2Client.cs @@ -3598,6 +3598,38 @@ internal DescribeEgressOnlyInternetGatewaysResponse DescribeEgressOnlyInternetGa #endregion + #region DescribeElasticGpus + + internal DescribeElasticGpusResponse DescribeElasticGpus(DescribeElasticGpusRequest request) + { + var marshaller = new DescribeElasticGpusRequestMarshaller(); + var unmarshaller = DescribeElasticGpusResponseUnmarshaller.Instance; + + return Invoke(request, marshaller, unmarshaller); + } + + + /// + /// Initiates the asynchronous execution of the DescribeElasticGpus operation. + /// + /// + /// Container for the necessary parameters to execute the DescribeElasticGpus operation. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// The task object representing the asynchronous operation. + /// REST API Reference for DescribeElasticGpus Operation + public Task DescribeElasticGpusAsync(DescribeElasticGpusRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) + { + var marshaller = new DescribeElasticGpusRequestMarshaller(); + var unmarshaller = DescribeElasticGpusResponseUnmarshaller.Instance; + + return InvokeAsync(request, marshaller, + unmarshaller, cancellationToken); + } + + #endregion + #region DescribeExportTasks internal DescribeExportTasksResponse DescribeExportTasks() diff --git a/sdk/src/Services/EC2/Generated/_mobile/IAmazonEC2.cs b/sdk/src/Services/EC2/Generated/_mobile/IAmazonEC2.cs index e7caaa466729..b5ba5b46003d 100644 --- a/sdk/src/Services/EC2/Generated/_mobile/IAmazonEC2.cs +++ b/sdk/src/Services/EC2/Generated/_mobile/IAmazonEC2.cs @@ -1884,6 +1884,23 @@ public partial interface IAmazonEC2 : IAmazonService, IDisposable #endregion + #region DescribeElasticGpus + + + /// + /// Initiates the asynchronous execution of the DescribeElasticGpus operation. + /// + /// + /// Container for the necessary parameters to execute the DescribeElasticGpus operation. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// The task object representing the asynchronous operation. + /// REST API Reference for DescribeElasticGpus Operation + Task DescribeElasticGpusAsync(DescribeElasticGpusRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); + + #endregion + #region DescribeExportTasks diff --git a/sdk/test/UnitTests/Generated/Marshalling/EC2MarshallingTests.cs b/sdk/test/UnitTests/Generated/Marshalling/EC2MarshallingTests.cs index 56b805b99dbc..d8e1fa7cc06f 100644 --- a/sdk/test/UnitTests/Generated/Marshalling/EC2MarshallingTests.cs +++ b/sdk/test/UnitTests/Generated/Marshalling/EC2MarshallingTests.cs @@ -2185,6 +2185,30 @@ public void DescribeEgressOnlyInternetGatewaysMarshallTest() + [TestMethod] + [TestCategory("UnitTest")] + [TestCategory("Query")] + [TestCategory("EC2")] + public void DescribeElasticGpusMarshallTest() + { + var operation = service_model.FindOperation("DescribeElasticGpus"); + + var request = InstantiateClassGenerator.Execute(); + var marshaller = new DescribeElasticGpusRequestMarshaller(); + var internalRequest = marshaller.Marshall(request); + var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); + validator.Validate(); + + + var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); + UnmarshallerContext context = new EC2UnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, new WebResponseData()); + var response = DescribeElasticGpusResponseUnmarshaller.Instance.Unmarshall(context) + as DescribeElasticGpusResponse; + InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); + } + + + [TestMethod] [TestCategory("UnitTest")] [TestCategory("Query")]