/* * 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 s3outposts-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.S3Outposts.Model; using Amazon.S3Outposts.Model.Internal.MarshallTransformations; using Amazon.S3Outposts.Internal; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Auth; using Amazon.Runtime.Internal.Transform; namespace Amazon.S3Outposts { /// /// Implementation for accessing S3Outposts /// /// Amazon S3 on Outposts provides access to S3 on Outposts operations. /// public partial class AmazonS3OutpostsClient : AmazonServiceClient, IAmazonS3Outposts { private static IServiceMetadata serviceMetadata = new AmazonS3OutpostsMetadata(); #region Constructors /// /// Constructs AmazonS3OutpostsClient 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 AmazonS3OutpostsClient() : base(FallbackCredentialsFactory.GetCredentials(), new AmazonS3OutpostsConfig()) { } /// /// Constructs AmazonS3OutpostsClient 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 AmazonS3OutpostsClient(RegionEndpoint region) : base(FallbackCredentialsFactory.GetCredentials(), new AmazonS3OutpostsConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonS3OutpostsClient 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 AmazonS3OutpostsClient Configuration Object public AmazonS3OutpostsClient(AmazonS3OutpostsConfig config) : base(FallbackCredentialsFactory.GetCredentials(config), config){} /// /// Constructs AmazonS3OutpostsClient with AWS Credentials /// /// AWS Credentials public AmazonS3OutpostsClient(AWSCredentials credentials) : this(credentials, new AmazonS3OutpostsConfig()) { } /// /// Constructs AmazonS3OutpostsClient with AWS Credentials /// /// AWS Credentials /// The region to connect. public AmazonS3OutpostsClient(AWSCredentials credentials, RegionEndpoint region) : this(credentials, new AmazonS3OutpostsConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonS3OutpostsClient with AWS Credentials and an /// AmazonS3OutpostsClient Configuration object. /// /// AWS Credentials /// The AmazonS3OutpostsClient Configuration Object public AmazonS3OutpostsClient(AWSCredentials credentials, AmazonS3OutpostsConfig clientConfig) : base(credentials, clientConfig) { } /// /// Constructs AmazonS3OutpostsClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key public AmazonS3OutpostsClient(string awsAccessKeyId, string awsSecretAccessKey) : this(awsAccessKeyId, awsSecretAccessKey, new AmazonS3OutpostsConfig()) { } /// /// Constructs AmazonS3OutpostsClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// The region to connect. public AmazonS3OutpostsClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region) : this(awsAccessKeyId, awsSecretAccessKey, new AmazonS3OutpostsConfig() {RegionEndpoint=region}) { } /// /// Constructs AmazonS3OutpostsClient with AWS Access Key ID, AWS Secret Key and an /// AmazonS3OutpostsClient Configuration object. /// /// AWS Access Key ID /// AWS Secret Access Key /// The AmazonS3OutpostsClient Configuration Object public AmazonS3OutpostsClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonS3OutpostsConfig clientConfig) : base(awsAccessKeyId, awsSecretAccessKey, clientConfig) { } /// /// Constructs AmazonS3OutpostsClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token public AmazonS3OutpostsClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken) : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonS3OutpostsConfig()) { } /// /// Constructs AmazonS3OutpostsClient 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 AmazonS3OutpostsClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region) : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonS3OutpostsConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonS3OutpostsClient with AWS Access Key ID, AWS Secret Key and an /// AmazonS3OutpostsClient Configuration object. /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token /// The AmazonS3OutpostsClient Configuration Object public AmazonS3OutpostsClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonS3OutpostsConfig clientConfig) : base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, clientConfig) { } #endregion #if AWS_ASYNC_ENUMERABLES_API private IS3OutpostsPaginatorFactory _paginators; /// /// Paginators for the service /// public IS3OutpostsPaginatorFactory Paginators { get { if (this._paginators == null) { this._paginators = new S3OutpostsPaginatorFactory(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 AmazonS3OutpostsEndpointResolver()); } /// /// 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 CreateEndpoint internal virtual CreateEndpointResponse CreateEndpoint(CreateEndpointRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = CreateEndpointRequestMarshaller.Instance; options.ResponseUnmarshaller = CreateEndpointResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Creates an endpoint and associates it with the specified Outpost. /// /// /// /// It can take up to 5 minutes for this action to finish. /// /// /// /// Related actions include: /// /// /// /// Container for the necessary parameters to execute the CreateEndpoint service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the CreateEndpoint service method, as returned by S3Outposts. /// /// Access was denied for this action. /// /// /// There was a conflict with this action, and it could not be completed. /// /// /// There was an exception with the internal server. /// /// /// The service link connection to your Outposts home Region is down. Check your connection /// and try again. /// /// /// The requested resource was not found. /// /// /// The request was denied due to request throttling. /// /// /// There was an exception validating this data. /// /// REST API Reference for CreateEndpoint Operation public virtual Task CreateEndpointAsync(CreateEndpointRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = CreateEndpointRequestMarshaller.Instance; options.ResponseUnmarshaller = CreateEndpointResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region DeleteEndpoint internal virtual DeleteEndpointResponse DeleteEndpoint(DeleteEndpointRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = DeleteEndpointRequestMarshaller.Instance; options.ResponseUnmarshaller = DeleteEndpointResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Deletes an endpoint. /// /// /// /// It can take up to 5 minutes for this action to finish. /// /// /// /// Related actions include: /// /// /// /// Container for the necessary parameters to execute the DeleteEndpoint service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the DeleteEndpoint service method, as returned by S3Outposts. /// /// Access was denied for this action. /// /// /// There was an exception with the internal server. /// /// /// The service link connection to your Outposts home Region is down. Check your connection /// and try again. /// /// /// The requested resource was not found. /// /// /// The request was denied due to request throttling. /// /// /// There was an exception validating this data. /// /// REST API Reference for DeleteEndpoint Operation public virtual Task DeleteEndpointAsync(DeleteEndpointRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = DeleteEndpointRequestMarshaller.Instance; options.ResponseUnmarshaller = DeleteEndpointResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region ListEndpoints internal virtual ListEndpointsResponse ListEndpoints(ListEndpointsRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ListEndpointsRequestMarshaller.Instance; options.ResponseUnmarshaller = ListEndpointsResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Lists endpoints associated with the specified Outpost. /// /// /// /// Related actions include: /// /// /// /// Container for the necessary parameters to execute the ListEndpoints service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the ListEndpoints service method, as returned by S3Outposts. /// /// Access was denied for this action. /// /// /// There was an exception with the internal server. /// /// /// The requested resource was not found. /// /// /// The request was denied due to request throttling. /// /// /// There was an exception validating this data. /// /// REST API Reference for ListEndpoints Operation public virtual Task ListEndpointsAsync(ListEndpointsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ListEndpointsRequestMarshaller.Instance; options.ResponseUnmarshaller = ListEndpointsResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region ListOutpostsWithS3 internal virtual ListOutpostsWithS3Response ListOutpostsWithS3(ListOutpostsWithS3Request request) { var options = new InvokeOptions(); options.RequestMarshaller = ListOutpostsWithS3RequestMarshaller.Instance; options.ResponseUnmarshaller = ListOutpostsWithS3ResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Lists the Outposts with S3 on Outposts capacity for your Amazon Web Services account. /// Includes S3 on Outposts that you have access to as the Outposts owner, or as a shared /// user from Resource Access Manager (RAM). /// /// Container for the necessary parameters to execute the ListOutpostsWithS3 service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the ListOutpostsWithS3 service method, as returned by S3Outposts. /// /// Access was denied for this action. /// /// /// There was an exception with the internal server. /// /// /// The request was denied due to request throttling. /// /// /// There was an exception validating this data. /// /// REST API Reference for ListOutpostsWithS3 Operation public virtual Task ListOutpostsWithS3Async(ListOutpostsWithS3Request request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ListOutpostsWithS3RequestMarshaller.Instance; options.ResponseUnmarshaller = ListOutpostsWithS3ResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region ListSharedEndpoints internal virtual ListSharedEndpointsResponse ListSharedEndpoints(ListSharedEndpointsRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ListSharedEndpointsRequestMarshaller.Instance; options.ResponseUnmarshaller = ListSharedEndpointsResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Lists all endpoints associated with an Outpost that has been shared by Amazon Web /// Services Resource Access Manager (RAM). /// /// /// /// Related actions include: /// /// /// /// Container for the necessary parameters to execute the ListSharedEndpoints service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the ListSharedEndpoints service method, as returned by S3Outposts. /// /// Access was denied for this action. /// /// /// There was an exception with the internal server. /// /// /// The requested resource was not found. /// /// /// The request was denied due to request throttling. /// /// /// There was an exception validating this data. /// /// REST API Reference for ListSharedEndpoints Operation public virtual Task ListSharedEndpointsAsync(ListSharedEndpointsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ListSharedEndpointsRequestMarshaller.Instance; options.ResponseUnmarshaller = ListSharedEndpointsResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion } }