/*
* 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.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();
#if BCL45 || 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 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
#region Overrides
///
/// Creates the signer for the service.
///
protected override AbstractAWSSigner CreateSigner()
{
return new AWS4Signer();
}
///
/// Customize the pipeline
///
///
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
///
/// 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.
///
/// 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 CreateEndpointResponse CreateEndpoint(CreateEndpointRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateEndpointRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateEndpointResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Initiates the asynchronous execution of the CreateEndpoint operation.
///
///
/// Container for the necessary parameters to execute the CreateEndpoint operation on AmazonS3OutpostsClient.
/// 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 EndCreateEndpoint
/// operation.
/// REST API Reference for CreateEndpoint Operation
public virtual IAsyncResult BeginCreateEndpoint(CreateEndpointRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateEndpointRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateEndpointResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
///
/// Finishes the asynchronous execution of the CreateEndpoint operation.
///
///
/// The IAsyncResult returned by the call to BeginCreateEndpoint.
///
/// Returns a CreateEndpointResult from S3Outposts.
/// REST API Reference for CreateEndpoint Operation
public virtual CreateEndpointResponse EndCreateEndpoint(IAsyncResult asyncResult)
{
return EndInvoke(asyncResult);
}
#endregion
#region DeleteEndpoint
///
/// 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.
///
/// 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 DeleteEndpointResponse DeleteEndpoint(DeleteEndpointRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteEndpointRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteEndpointResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Initiates the asynchronous execution of the DeleteEndpoint operation.
///
///
/// Container for the necessary parameters to execute the DeleteEndpoint operation on AmazonS3OutpostsClient.
/// 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 EndDeleteEndpoint
/// operation.
/// REST API Reference for DeleteEndpoint Operation
public virtual IAsyncResult BeginDeleteEndpoint(DeleteEndpointRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteEndpointRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteEndpointResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
///
/// Finishes the asynchronous execution of the DeleteEndpoint operation.
///
///
/// The IAsyncResult returned by the call to BeginDeleteEndpoint.
///
/// Returns a DeleteEndpointResult from S3Outposts.
/// REST API Reference for DeleteEndpoint Operation
public virtual DeleteEndpointResponse EndDeleteEndpoint(IAsyncResult asyncResult)
{
return EndInvoke(asyncResult);
}
#endregion
#region ListEndpoints
///
/// Lists endpoints associated with the specified Outpost.
///
///
///
/// Related actions include:
///
///
///
/// Container for the necessary parameters to execute the ListEndpoints service method.
///
/// 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 ListEndpointsResponse ListEndpoints(ListEndpointsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListEndpointsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListEndpointsResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Initiates the asynchronous execution of the ListEndpoints operation.
///
///
/// Container for the necessary parameters to execute the ListEndpoints operation on AmazonS3OutpostsClient.
/// 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 EndListEndpoints
/// operation.
/// REST API Reference for ListEndpoints Operation
public virtual IAsyncResult BeginListEndpoints(ListEndpointsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListEndpointsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListEndpointsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
///
/// Finishes the asynchronous execution of the ListEndpoints operation.
///
///
/// The IAsyncResult returned by the call to BeginListEndpoints.
///
/// Returns a ListEndpointsResult from S3Outposts.
/// REST API Reference for ListEndpoints Operation
public virtual ListEndpointsResponse EndListEndpoints(IAsyncResult asyncResult)
{
return EndInvoke(asyncResult);
}
#endregion
#region ListOutpostsWithS3
///
/// 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.
///
/// 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 ListOutpostsWithS3Response ListOutpostsWithS3(ListOutpostsWithS3Request request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListOutpostsWithS3RequestMarshaller.Instance;
options.ResponseUnmarshaller = ListOutpostsWithS3ResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Initiates the asynchronous execution of the ListOutpostsWithS3 operation.
///
///
/// Container for the necessary parameters to execute the ListOutpostsWithS3 operation on AmazonS3OutpostsClient.
/// 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 EndListOutpostsWithS3
/// operation.
/// REST API Reference for ListOutpostsWithS3 Operation
public virtual IAsyncResult BeginListOutpostsWithS3(ListOutpostsWithS3Request request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListOutpostsWithS3RequestMarshaller.Instance;
options.ResponseUnmarshaller = ListOutpostsWithS3ResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
///
/// Finishes the asynchronous execution of the ListOutpostsWithS3 operation.
///
///
/// The IAsyncResult returned by the call to BeginListOutpostsWithS3.
///
/// Returns a ListOutpostsWithS3Result from S3Outposts.
/// REST API Reference for ListOutpostsWithS3 Operation
public virtual ListOutpostsWithS3Response EndListOutpostsWithS3(IAsyncResult asyncResult)
{
return EndInvoke(asyncResult);
}
#endregion
#region ListSharedEndpoints
///
/// 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.
///
/// 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 ListSharedEndpointsResponse ListSharedEndpoints(ListSharedEndpointsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListSharedEndpointsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListSharedEndpointsResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Initiates the asynchronous execution of the ListSharedEndpoints operation.
///
///
/// Container for the necessary parameters to execute the ListSharedEndpoints operation on AmazonS3OutpostsClient.
/// 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 EndListSharedEndpoints
/// operation.
/// REST API Reference for ListSharedEndpoints Operation
public virtual IAsyncResult BeginListSharedEndpoints(ListSharedEndpointsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListSharedEndpointsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListSharedEndpointsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
///
/// Finishes the asynchronous execution of the ListSharedEndpoints operation.
///
///
/// The IAsyncResult returned by the call to BeginListSharedEndpoints.
///
/// Returns a ListSharedEndpointsResult from S3Outposts.
/// REST API Reference for ListSharedEndpoints Operation
public virtual ListSharedEndpointsResponse EndListSharedEndpoints(IAsyncResult asyncResult)
{
return EndInvoke(asyncResult);
}
#endregion
}
}