/* * Copyright 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 elastic-inference-2017-07-25.normal.json service model. */ using System; using System.Runtime.ExceptionServices; using System.Threading; using System.Threading.Tasks; using System.Collections.Generic; using System.Net; using Amazon.ElasticInference.Model; using Amazon.ElasticInference.Model.Internal.MarshallTransformations; using Amazon.ElasticInference.Internal; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Auth; using Amazon.Runtime.Internal.Transform; namespace Amazon.ElasticInference { /// /// Implementation for accessing ElasticInference /// /// Elastic Inference public APIs. /// /// /// /// February 15, 2023: Starting April 15, 2023, AWS will not onboard new customers to /// Amazon Elastic Inference (EI), and will help current customers migrate their workloads /// to options that offer better price and performance. After April 15, 2023, new customers /// will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, /// Amazon ECS, or Amazon EC2. However, customers who have used Amazon EI at least once /// during the past 30-day period are considered current customers and will be able to /// continue using the service. /// /// public partial class AmazonElasticInferenceClient : AmazonServiceClient, IAmazonElasticInference { private static IServiceMetadata serviceMetadata = new AmazonElasticInferenceMetadata(); #region Constructors /// /// Constructs AmazonElasticInferenceClient with the credentials loaded from the application's /// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. /// /// Example App.config with credentials set. /// /// <?xml version="1.0" encoding="utf-8" ?> /// <configuration> /// <appSettings> /// <add key="AWSProfileName" value="AWS Default"/> /// </appSettings> /// </configuration> /// /// /// public AmazonElasticInferenceClient() : base(FallbackCredentialsFactory.GetCredentials(), new AmazonElasticInferenceConfig()) { } /// /// Constructs AmazonElasticInferenceClient with the credentials loaded from the application's /// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. /// /// Example App.config with credentials set. /// /// <?xml version="1.0" encoding="utf-8" ?> /// <configuration> /// <appSettings> /// <add key="AWSProfileName" value="AWS Default"/> /// </appSettings> /// </configuration> /// /// /// /// The region to connect. public AmazonElasticInferenceClient(RegionEndpoint region) : base(FallbackCredentialsFactory.GetCredentials(), new AmazonElasticInferenceConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonElasticInferenceClient with the credentials loaded from the application's /// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. /// /// Example App.config with credentials set. /// /// <?xml version="1.0" encoding="utf-8" ?> /// <configuration> /// <appSettings> /// <add key="AWSProfileName" value="AWS Default"/> /// </appSettings> /// </configuration> /// /// /// /// The AmazonElasticInferenceClient Configuration Object public AmazonElasticInferenceClient(AmazonElasticInferenceConfig config) : base(FallbackCredentialsFactory.GetCredentials(config), config){} /// /// Constructs AmazonElasticInferenceClient with AWS Credentials /// /// AWS Credentials public AmazonElasticInferenceClient(AWSCredentials credentials) : this(credentials, new AmazonElasticInferenceConfig()) { } /// /// Constructs AmazonElasticInferenceClient with AWS Credentials /// /// AWS Credentials /// The region to connect. public AmazonElasticInferenceClient(AWSCredentials credentials, RegionEndpoint region) : this(credentials, new AmazonElasticInferenceConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonElasticInferenceClient with AWS Credentials and an /// AmazonElasticInferenceClient Configuration object. /// /// AWS Credentials /// The AmazonElasticInferenceClient Configuration Object public AmazonElasticInferenceClient(AWSCredentials credentials, AmazonElasticInferenceConfig clientConfig) : base(credentials, clientConfig) { } /// /// Constructs AmazonElasticInferenceClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key public AmazonElasticInferenceClient(string awsAccessKeyId, string awsSecretAccessKey) : this(awsAccessKeyId, awsSecretAccessKey, new AmazonElasticInferenceConfig()) { } /// /// Constructs AmazonElasticInferenceClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// The region to connect. public AmazonElasticInferenceClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region) : this(awsAccessKeyId, awsSecretAccessKey, new AmazonElasticInferenceConfig() {RegionEndpoint=region}) { } /// /// Constructs AmazonElasticInferenceClient with AWS Access Key ID, AWS Secret Key and an /// AmazonElasticInferenceClient Configuration object. /// /// AWS Access Key ID /// AWS Secret Access Key /// The AmazonElasticInferenceClient Configuration Object public AmazonElasticInferenceClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonElasticInferenceConfig clientConfig) : base(awsAccessKeyId, awsSecretAccessKey, clientConfig) { } /// /// Constructs AmazonElasticInferenceClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token public AmazonElasticInferenceClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken) : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonElasticInferenceConfig()) { } /// /// Constructs AmazonElasticInferenceClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token /// The region to connect. public AmazonElasticInferenceClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region) : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonElasticInferenceConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonElasticInferenceClient with AWS Access Key ID, AWS Secret Key and an /// AmazonElasticInferenceClient Configuration object. /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token /// The AmazonElasticInferenceClient Configuration Object public AmazonElasticInferenceClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonElasticInferenceConfig clientConfig) : base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, clientConfig) { } #endregion #if AWS_ASYNC_ENUMERABLES_API private IElasticInferencePaginatorFactory _paginators; /// /// Paginators for the service /// public IElasticInferencePaginatorFactory Paginators { get { if (this._paginators == null) { this._paginators = new ElasticInferencePaginatorFactory(this); } return this._paginators; } } #endif #region Overrides /// /// Creates the signer for the service. /// protected override AbstractAWSSigner CreateSigner() { return new AWS4Signer(); } /// /// Customizes the runtime pipeline. /// /// Runtime pipeline for the current client. protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline) { pipeline.RemoveHandler(); pipeline.AddHandlerAfter(new AmazonElasticInferenceEndpointResolver()); } /// /// Capture metadata for the service. /// protected override IServiceMetadata ServiceMetadata { get { return serviceMetadata; } } #endregion #region Dispose /// /// Disposes the service client. /// protected override void Dispose(bool disposing) { base.Dispose(disposing); } #endregion #region DescribeAcceleratorOfferings internal virtual DescribeAcceleratorOfferingsResponse DescribeAcceleratorOfferings(DescribeAcceleratorOfferingsRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeAcceleratorOfferingsRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeAcceleratorOfferingsResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Describes the locations in which a given accelerator type or set of types is present /// in a given region. /// /// /// /// February 15, 2023: Starting April 15, 2023, AWS will not onboard new customers to /// Amazon Elastic Inference (EI), and will help current customers migrate their workloads /// to options that offer better price and performance. After April 15, 2023, new customers /// will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, /// Amazon ECS, or Amazon EC2. However, customers who have used Amazon EI at least once /// during the past 30-day period are considered current customers and will be able to /// continue using the service. /// /// /// Container for the necessary parameters to execute the DescribeAcceleratorOfferings service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the DescribeAcceleratorOfferings service method, as returned by ElasticInference. /// /// Raised when a malformed input has been provided to the API. /// /// /// Raised when an unexpected error occurred during request processing. /// /// /// Raised when the requested resource cannot be found. /// /// REST API Reference for DescribeAcceleratorOfferings Operation public virtual Task DescribeAcceleratorOfferingsAsync(DescribeAcceleratorOfferingsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeAcceleratorOfferingsRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeAcceleratorOfferingsResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region DescribeAccelerators internal virtual DescribeAcceleratorsResponse DescribeAccelerators(DescribeAcceleratorsRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeAcceleratorsRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeAcceleratorsResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Describes information over a provided set of accelerators belonging to an account. /// /// /// /// /// February 15, 2023: Starting April 15, 2023, AWS will not onboard new customers to /// Amazon Elastic Inference (EI), and will help current customers migrate their workloads /// to options that offer better price and performance. After April 15, 2023, new customers /// will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, /// Amazon ECS, or Amazon EC2. However, customers who have used Amazon EI at least once /// during the past 30-day period are considered current customers and will be able to /// continue using the service. /// /// /// Container for the necessary parameters to execute the DescribeAccelerators service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the DescribeAccelerators service method, as returned by ElasticInference. /// /// Raised when a malformed input has been provided to the API. /// /// /// Raised when an unexpected error occurred during request processing. /// /// /// Raised when the requested resource cannot be found. /// /// REST API Reference for DescribeAccelerators Operation public virtual Task DescribeAcceleratorsAsync(DescribeAcceleratorsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeAcceleratorsRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeAcceleratorsResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region DescribeAcceleratorTypes internal virtual DescribeAcceleratorTypesResponse DescribeAcceleratorTypes(DescribeAcceleratorTypesRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeAcceleratorTypesRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeAcceleratorTypesResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Describes the accelerator types available in a given region, as well as their characteristics, /// such as memory and throughput. /// /// /// /// February 15, 2023: Starting April 15, 2023, AWS will not onboard new customers to /// Amazon Elastic Inference (EI), and will help current customers migrate their workloads /// to options that offer better price and performance. After April 15, 2023, new customers /// will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, /// Amazon ECS, or Amazon EC2. However, customers who have used Amazon EI at least once /// during the past 30-day period are considered current customers and will be able to /// continue using the service. /// /// /// Container for the necessary parameters to execute the DescribeAcceleratorTypes service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the DescribeAcceleratorTypes service method, as returned by ElasticInference. /// /// Raised when an unexpected error occurred during request processing. /// /// REST API Reference for DescribeAcceleratorTypes Operation public virtual Task DescribeAcceleratorTypesAsync(DescribeAcceleratorTypesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeAcceleratorTypesRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeAcceleratorTypesResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region ListTagsForResource internal virtual ListTagsForResourceResponse ListTagsForResource(ListTagsForResourceRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ListTagsForResourceRequestMarshaller.Instance; options.ResponseUnmarshaller = ListTagsForResourceResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Returns all tags of an Elastic Inference Accelerator. /// /// /// /// February 15, 2023: Starting April 15, 2023, AWS will not onboard new customers to /// Amazon Elastic Inference (EI), and will help current customers migrate their workloads /// to options that offer better price and performance. After April 15, 2023, new customers /// will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, /// Amazon ECS, or Amazon EC2. However, customers who have used Amazon EI at least once /// during the past 30-day period are considered current customers and will be able to /// continue using the service. /// /// /// Container for the necessary parameters to execute the ListTagsForResource service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the ListTagsForResource service method, as returned by ElasticInference. /// /// Raised when a malformed input has been provided to the API. /// /// /// Raised when an unexpected error occurred during request processing. /// /// /// Raised when the requested resource cannot be found. /// /// REST API Reference for ListTagsForResource Operation public virtual Task ListTagsForResourceAsync(ListTagsForResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ListTagsForResourceRequestMarshaller.Instance; options.ResponseUnmarshaller = ListTagsForResourceResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region TagResource internal virtual TagResourceResponse TagResource(TagResourceRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = TagResourceRequestMarshaller.Instance; options.ResponseUnmarshaller = TagResourceResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Adds the specified tags to an Elastic Inference Accelerator. /// /// /// /// February 15, 2023: Starting April 15, 2023, AWS will not onboard new customers to /// Amazon Elastic Inference (EI), and will help current customers migrate their workloads /// to options that offer better price and performance. After April 15, 2023, new customers /// will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, /// Amazon ECS, or Amazon EC2. However, customers who have used Amazon EI at least once /// during the past 30-day period are considered current customers and will be able to /// continue using the service. /// /// /// Container for the necessary parameters to execute the TagResource service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the TagResource service method, as returned by ElasticInference. /// /// Raised when a malformed input has been provided to the API. /// /// /// Raised when an unexpected error occurred during request processing. /// /// /// Raised when the requested resource cannot be found. /// /// REST API Reference for TagResource Operation public virtual Task TagResourceAsync(TagResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = TagResourceRequestMarshaller.Instance; options.ResponseUnmarshaller = TagResourceResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region UntagResource internal virtual UntagResourceResponse UntagResource(UntagResourceRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = UntagResourceRequestMarshaller.Instance; options.ResponseUnmarshaller = UntagResourceResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Removes the specified tags from an Elastic Inference Accelerator. /// /// /// /// February 15, 2023: Starting April 15, 2023, AWS will not onboard new customers to /// Amazon Elastic Inference (EI), and will help current customers migrate their workloads /// to options that offer better price and performance. After April 15, 2023, new customers /// will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, /// Amazon ECS, or Amazon EC2. However, customers who have used Amazon EI at least once /// during the past 30-day period are considered current customers and will be able to /// continue using the service. /// /// /// Container for the necessary parameters to execute the UntagResource service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the UntagResource service method, as returned by ElasticInference. /// /// Raised when a malformed input has been provided to the API. /// /// /// Raised when an unexpected error occurred during request processing. /// /// /// Raised when the requested resource cannot be found. /// /// REST API Reference for UntagResource Operation public virtual Task UntagResourceAsync(UntagResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = UntagResourceRequestMarshaller.Instance; options.ResponseUnmarshaller = UntagResourceResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion } }