/* * 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 license-manager-linux-subscriptions-2018-05-10.normal.json service model. */ using System; using System.Collections.Generic; using System.Net; using Amazon.LicenseManagerLinuxSubscriptions.Model; using Amazon.LicenseManagerLinuxSubscriptions.Model.Internal.MarshallTransformations; using Amazon.LicenseManagerLinuxSubscriptions.Internal; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Auth; using Amazon.Runtime.Internal.Transform; namespace Amazon.LicenseManagerLinuxSubscriptions { /// /// Implementation for accessing LicenseManagerLinuxSubscriptions /// /// With License Manager, you can discover and track your commercial Linux subscriptions /// on running Amazon EC2 instances. /// public partial class AmazonLicenseManagerLinuxSubscriptionsClient : AmazonServiceClient, IAmazonLicenseManagerLinuxSubscriptions { private static IServiceMetadata serviceMetadata = new AmazonLicenseManagerLinuxSubscriptionsMetadata(); #if BCL45 || AWS_ASYNC_ENUMERABLES_API private ILicenseManagerLinuxSubscriptionsPaginatorFactory _paginators; /// /// Paginators for the service /// public ILicenseManagerLinuxSubscriptionsPaginatorFactory Paginators { get { if (this._paginators == null) { this._paginators = new LicenseManagerLinuxSubscriptionsPaginatorFactory(this); } return this._paginators; } } #endif #region Constructors /// /// Constructs AmazonLicenseManagerLinuxSubscriptionsClient 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 AmazonLicenseManagerLinuxSubscriptionsClient() : base(FallbackCredentialsFactory.GetCredentials(), new AmazonLicenseManagerLinuxSubscriptionsConfig()) { } /// /// Constructs AmazonLicenseManagerLinuxSubscriptionsClient 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 AmazonLicenseManagerLinuxSubscriptionsClient(RegionEndpoint region) : base(FallbackCredentialsFactory.GetCredentials(), new AmazonLicenseManagerLinuxSubscriptionsConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonLicenseManagerLinuxSubscriptionsClient 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 AmazonLicenseManagerLinuxSubscriptionsClient Configuration Object public AmazonLicenseManagerLinuxSubscriptionsClient(AmazonLicenseManagerLinuxSubscriptionsConfig config) : base(FallbackCredentialsFactory.GetCredentials(config), config){} /// /// Constructs AmazonLicenseManagerLinuxSubscriptionsClient with AWS Credentials /// /// AWS Credentials public AmazonLicenseManagerLinuxSubscriptionsClient(AWSCredentials credentials) : this(credentials, new AmazonLicenseManagerLinuxSubscriptionsConfig()) { } /// /// Constructs AmazonLicenseManagerLinuxSubscriptionsClient with AWS Credentials /// /// AWS Credentials /// The region to connect. public AmazonLicenseManagerLinuxSubscriptionsClient(AWSCredentials credentials, RegionEndpoint region) : this(credentials, new AmazonLicenseManagerLinuxSubscriptionsConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonLicenseManagerLinuxSubscriptionsClient with AWS Credentials and an /// AmazonLicenseManagerLinuxSubscriptionsClient Configuration object. /// /// AWS Credentials /// The AmazonLicenseManagerLinuxSubscriptionsClient Configuration Object public AmazonLicenseManagerLinuxSubscriptionsClient(AWSCredentials credentials, AmazonLicenseManagerLinuxSubscriptionsConfig clientConfig) : base(credentials, clientConfig) { } /// /// Constructs AmazonLicenseManagerLinuxSubscriptionsClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key public AmazonLicenseManagerLinuxSubscriptionsClient(string awsAccessKeyId, string awsSecretAccessKey) : this(awsAccessKeyId, awsSecretAccessKey, new AmazonLicenseManagerLinuxSubscriptionsConfig()) { } /// /// Constructs AmazonLicenseManagerLinuxSubscriptionsClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// The region to connect. public AmazonLicenseManagerLinuxSubscriptionsClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region) : this(awsAccessKeyId, awsSecretAccessKey, new AmazonLicenseManagerLinuxSubscriptionsConfig() {RegionEndpoint=region}) { } /// /// Constructs AmazonLicenseManagerLinuxSubscriptionsClient with AWS Access Key ID, AWS Secret Key and an /// AmazonLicenseManagerLinuxSubscriptionsClient Configuration object. /// /// AWS Access Key ID /// AWS Secret Access Key /// The AmazonLicenseManagerLinuxSubscriptionsClient Configuration Object public AmazonLicenseManagerLinuxSubscriptionsClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonLicenseManagerLinuxSubscriptionsConfig clientConfig) : base(awsAccessKeyId, awsSecretAccessKey, clientConfig) { } /// /// Constructs AmazonLicenseManagerLinuxSubscriptionsClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token public AmazonLicenseManagerLinuxSubscriptionsClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken) : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonLicenseManagerLinuxSubscriptionsConfig()) { } /// /// Constructs AmazonLicenseManagerLinuxSubscriptionsClient 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 AmazonLicenseManagerLinuxSubscriptionsClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region) : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonLicenseManagerLinuxSubscriptionsConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonLicenseManagerLinuxSubscriptionsClient with AWS Access Key ID, AWS Secret Key and an /// AmazonLicenseManagerLinuxSubscriptionsClient Configuration object. /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token /// The AmazonLicenseManagerLinuxSubscriptionsClient Configuration Object public AmazonLicenseManagerLinuxSubscriptionsClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonLicenseManagerLinuxSubscriptionsConfig 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 AmazonLicenseManagerLinuxSubscriptionsEndpointResolver()); } /// /// 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 GetServiceSettings /// /// Lists the Linux subscriptions service settings. /// /// Container for the necessary parameters to execute the GetServiceSettings service method. /// /// The response from the GetServiceSettings service method, as returned by LicenseManagerLinuxSubscriptions. /// /// An exception occurred with the service. /// /// /// The request was denied due to request throttling. /// /// /// The provided input is not valid. Try your request again. /// /// REST API Reference for GetServiceSettings Operation public virtual GetServiceSettingsResponse GetServiceSettings(GetServiceSettingsRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = GetServiceSettingsRequestMarshaller.Instance; options.ResponseUnmarshaller = GetServiceSettingsResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Initiates the asynchronous execution of the GetServiceSettings operation. /// /// /// Container for the necessary parameters to execute the GetServiceSettings operation on AmazonLicenseManagerLinuxSubscriptionsClient. /// 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 EndGetServiceSettings /// operation. /// REST API Reference for GetServiceSettings Operation public virtual IAsyncResult BeginGetServiceSettings(GetServiceSettingsRequest request, AsyncCallback callback, object state) { var options = new InvokeOptions(); options.RequestMarshaller = GetServiceSettingsRequestMarshaller.Instance; options.ResponseUnmarshaller = GetServiceSettingsResponseUnmarshaller.Instance; return BeginInvoke(request, options, callback, state); } /// /// Finishes the asynchronous execution of the GetServiceSettings operation. /// /// /// The IAsyncResult returned by the call to BeginGetServiceSettings. /// /// Returns a GetServiceSettingsResult from LicenseManagerLinuxSubscriptions. /// REST API Reference for GetServiceSettings Operation public virtual GetServiceSettingsResponse EndGetServiceSettings(IAsyncResult asyncResult) { return EndInvoke(asyncResult); } #endregion #region ListLinuxSubscriptionInstances /// /// Lists the running Amazon EC2 instances that were discovered with commercial Linux /// subscriptions. /// /// Container for the necessary parameters to execute the ListLinuxSubscriptionInstances service method. /// /// The response from the ListLinuxSubscriptionInstances service method, as returned by LicenseManagerLinuxSubscriptions. /// /// An exception occurred with the service. /// /// /// The request was denied due to request throttling. /// /// /// The provided input is not valid. Try your request again. /// /// REST API Reference for ListLinuxSubscriptionInstances Operation public virtual ListLinuxSubscriptionInstancesResponse ListLinuxSubscriptionInstances(ListLinuxSubscriptionInstancesRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ListLinuxSubscriptionInstancesRequestMarshaller.Instance; options.ResponseUnmarshaller = ListLinuxSubscriptionInstancesResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Initiates the asynchronous execution of the ListLinuxSubscriptionInstances operation. /// /// /// Container for the necessary parameters to execute the ListLinuxSubscriptionInstances operation on AmazonLicenseManagerLinuxSubscriptionsClient. /// 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 EndListLinuxSubscriptionInstances /// operation. /// REST API Reference for ListLinuxSubscriptionInstances Operation public virtual IAsyncResult BeginListLinuxSubscriptionInstances(ListLinuxSubscriptionInstancesRequest request, AsyncCallback callback, object state) { var options = new InvokeOptions(); options.RequestMarshaller = ListLinuxSubscriptionInstancesRequestMarshaller.Instance; options.ResponseUnmarshaller = ListLinuxSubscriptionInstancesResponseUnmarshaller.Instance; return BeginInvoke(request, options, callback, state); } /// /// Finishes the asynchronous execution of the ListLinuxSubscriptionInstances operation. /// /// /// The IAsyncResult returned by the call to BeginListLinuxSubscriptionInstances. /// /// Returns a ListLinuxSubscriptionInstancesResult from LicenseManagerLinuxSubscriptions. /// REST API Reference for ListLinuxSubscriptionInstances Operation public virtual ListLinuxSubscriptionInstancesResponse EndListLinuxSubscriptionInstances(IAsyncResult asyncResult) { return EndInvoke(asyncResult); } #endregion #region ListLinuxSubscriptions /// /// Lists the Linux subscriptions that have been discovered. If you have linked your organization, /// the returned results will include data aggregated across your accounts in Organizations. /// /// Container for the necessary parameters to execute the ListLinuxSubscriptions service method. /// /// The response from the ListLinuxSubscriptions service method, as returned by LicenseManagerLinuxSubscriptions. /// /// An exception occurred with the service. /// /// /// The request was denied due to request throttling. /// /// /// The provided input is not valid. Try your request again. /// /// REST API Reference for ListLinuxSubscriptions Operation public virtual ListLinuxSubscriptionsResponse ListLinuxSubscriptions(ListLinuxSubscriptionsRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ListLinuxSubscriptionsRequestMarshaller.Instance; options.ResponseUnmarshaller = ListLinuxSubscriptionsResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Initiates the asynchronous execution of the ListLinuxSubscriptions operation. /// /// /// Container for the necessary parameters to execute the ListLinuxSubscriptions operation on AmazonLicenseManagerLinuxSubscriptionsClient. /// 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 EndListLinuxSubscriptions /// operation. /// REST API Reference for ListLinuxSubscriptions Operation public virtual IAsyncResult BeginListLinuxSubscriptions(ListLinuxSubscriptionsRequest request, AsyncCallback callback, object state) { var options = new InvokeOptions(); options.RequestMarshaller = ListLinuxSubscriptionsRequestMarshaller.Instance; options.ResponseUnmarshaller = ListLinuxSubscriptionsResponseUnmarshaller.Instance; return BeginInvoke(request, options, callback, state); } /// /// Finishes the asynchronous execution of the ListLinuxSubscriptions operation. /// /// /// The IAsyncResult returned by the call to BeginListLinuxSubscriptions. /// /// Returns a ListLinuxSubscriptionsResult from LicenseManagerLinuxSubscriptions. /// REST API Reference for ListLinuxSubscriptions Operation public virtual ListLinuxSubscriptionsResponse EndListLinuxSubscriptions(IAsyncResult asyncResult) { return EndInvoke(asyncResult); } #endregion #region UpdateServiceSettings /// /// Updates the service settings for Linux subscriptions. /// /// Container for the necessary parameters to execute the UpdateServiceSettings service method. /// /// The response from the UpdateServiceSettings service method, as returned by LicenseManagerLinuxSubscriptions. /// /// An exception occurred with the service. /// /// /// The request was denied due to request throttling. /// /// /// The provided input is not valid. Try your request again. /// /// REST API Reference for UpdateServiceSettings Operation public virtual UpdateServiceSettingsResponse UpdateServiceSettings(UpdateServiceSettingsRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = UpdateServiceSettingsRequestMarshaller.Instance; options.ResponseUnmarshaller = UpdateServiceSettingsResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Initiates the asynchronous execution of the UpdateServiceSettings operation. /// /// /// Container for the necessary parameters to execute the UpdateServiceSettings operation on AmazonLicenseManagerLinuxSubscriptionsClient. /// 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 EndUpdateServiceSettings /// operation. /// REST API Reference for UpdateServiceSettings Operation public virtual IAsyncResult BeginUpdateServiceSettings(UpdateServiceSettingsRequest request, AsyncCallback callback, object state) { var options = new InvokeOptions(); options.RequestMarshaller = UpdateServiceSettingsRequestMarshaller.Instance; options.ResponseUnmarshaller = UpdateServiceSettingsResponseUnmarshaller.Instance; return BeginInvoke(request, options, callback, state); } /// /// Finishes the asynchronous execution of the UpdateServiceSettings operation. /// /// /// The IAsyncResult returned by the call to BeginUpdateServiceSettings. /// /// Returns a UpdateServiceSettingsResult from LicenseManagerLinuxSubscriptions. /// REST API Reference for UpdateServiceSettings Operation public virtual UpdateServiceSettingsResponse EndUpdateServiceSettings(IAsyncResult asyncResult) { return EndInvoke(asyncResult); } #endregion } }