/* * 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 ep2-parse-arn-2022-08-24.normal.json service model. */ using System; using System.Collections.Generic; using System.Net; using Amazon.Ep2parsearn.Model; using Amazon.Ep2parsearn.Model.Internal.MarshallTransformations; using Amazon.Ep2parsearn.Internal; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Auth; using Amazon.Runtime.Internal.Transform; namespace Amazon.Ep2parsearn { /// /// Implementation for accessing Ep2parsearn /// /// Endpoints 2.0 parse-arn tests /// public partial class AmazonEp2parsearnClient : AmazonServiceClient, IAmazonEp2parsearn { private static IServiceMetadata serviceMetadata = new AmazonEp2parsearnMetadata(); #region Constructors /// /// Constructs AmazonEp2parsearnClient 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 AmazonEp2parsearnClient() : base(FallbackCredentialsFactory.GetCredentials(), new AmazonEp2parsearnConfig()) { } /// /// Constructs AmazonEp2parsearnClient 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 AmazonEp2parsearnClient(RegionEndpoint region) : base(FallbackCredentialsFactory.GetCredentials(), new AmazonEp2parsearnConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonEp2parsearnClient 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 AmazonEp2parsearnClient Configuration Object public AmazonEp2parsearnClient(AmazonEp2parsearnConfig config) : base(FallbackCredentialsFactory.GetCredentials(config), config){} /// /// Constructs AmazonEp2parsearnClient with AWS Credentials /// /// AWS Credentials public AmazonEp2parsearnClient(AWSCredentials credentials) : this(credentials, new AmazonEp2parsearnConfig()) { } /// /// Constructs AmazonEp2parsearnClient with AWS Credentials /// /// AWS Credentials /// The region to connect. public AmazonEp2parsearnClient(AWSCredentials credentials, RegionEndpoint region) : this(credentials, new AmazonEp2parsearnConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonEp2parsearnClient with AWS Credentials and an /// AmazonEp2parsearnClient Configuration object. /// /// AWS Credentials /// The AmazonEp2parsearnClient Configuration Object public AmazonEp2parsearnClient(AWSCredentials credentials, AmazonEp2parsearnConfig clientConfig) : base(credentials, clientConfig) { } /// /// Constructs AmazonEp2parsearnClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key public AmazonEp2parsearnClient(string awsAccessKeyId, string awsSecretAccessKey) : this(awsAccessKeyId, awsSecretAccessKey, new AmazonEp2parsearnConfig()) { } /// /// Constructs AmazonEp2parsearnClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// The region to connect. public AmazonEp2parsearnClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region) : this(awsAccessKeyId, awsSecretAccessKey, new AmazonEp2parsearnConfig() {RegionEndpoint=region}) { } /// /// Constructs AmazonEp2parsearnClient with AWS Access Key ID, AWS Secret Key and an /// AmazonEp2parsearnClient Configuration object. /// /// AWS Access Key ID /// AWS Secret Access Key /// The AmazonEp2parsearnClient Configuration Object public AmazonEp2parsearnClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonEp2parsearnConfig clientConfig) : base(awsAccessKeyId, awsSecretAccessKey, clientConfig) { } /// /// Constructs AmazonEp2parsearnClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token public AmazonEp2parsearnClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken) : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonEp2parsearnConfig()) { } /// /// Constructs AmazonEp2parsearnClient 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 AmazonEp2parsearnClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region) : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonEp2parsearnConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonEp2parsearnClient with AWS Access Key ID, AWS Secret Key and an /// AmazonEp2parsearnClient Configuration object. /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token /// The AmazonEp2parsearnClient Configuration Object public AmazonEp2parsearnClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonEp2parsearnConfig 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 AmazonEp2parsearnEndpointResolver()); } /// /// 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 MyOperation /// /// /// /// Container for the necessary parameters to execute the MyOperation service method. /// /// The response from the MyOperation service method, as returned by Ep2parsearn. /// REST API Reference for MyOperation Operation public virtual MyOperationResponse MyOperation(MyOperationRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = MyOperationRequestMarshaller.Instance; options.ResponseUnmarshaller = MyOperationResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Initiates the asynchronous execution of the MyOperation operation. /// /// /// Container for the necessary parameters to execute the MyOperation operation on AmazonEp2parsearnClient. /// 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 EndMyOperation /// operation. /// REST API Reference for MyOperation Operation public virtual IAsyncResult BeginMyOperation(MyOperationRequest request, AsyncCallback callback, object state) { var options = new InvokeOptions(); options.RequestMarshaller = MyOperationRequestMarshaller.Instance; options.ResponseUnmarshaller = MyOperationResponseUnmarshaller.Instance; return BeginInvoke(request, options, callback, state); } /// /// Finishes the asynchronous execution of the MyOperation operation. /// /// /// The IAsyncResult returned by the call to BeginMyOperation. /// /// Returns a MyOperationResult from Ep2parsearn. /// REST API Reference for MyOperation Operation public virtual MyOperationResponse EndMyOperation(IAsyncResult asyncResult) { return EndInvoke(asyncResult); } #endregion } }