/*
* 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 savingsplans-2019-06-28.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Net;
using Amazon.SavingsPlans.Model;
using Amazon.SavingsPlans.Model.Internal.MarshallTransformations;
using Amazon.SavingsPlans.Internal;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Auth;
using Amazon.Runtime.Internal.Transform;
namespace Amazon.SavingsPlans
{
///
/// Implementation for accessing SavingsPlans
///
/// Savings Plans are a pricing model that offer significant savings on AWS usage (for
/// example, on Amazon EC2 instances). You commit to a consistent amount of usage, in
/// USD per hour, for a term of 1 or 3 years, and receive a lower price for that usage.
/// For more information, see the AWS
/// Savings Plans User Guide.
///
public partial class AmazonSavingsPlansClient : AmazonServiceClient, IAmazonSavingsPlans
{
private static IServiceMetadata serviceMetadata = new AmazonSavingsPlansMetadata();
#region Constructors
///
/// Constructs AmazonSavingsPlansClient 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 AmazonSavingsPlansClient()
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonSavingsPlansConfig()) { }
///
/// Constructs AmazonSavingsPlansClient 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 AmazonSavingsPlansClient(RegionEndpoint region)
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonSavingsPlansConfig{RegionEndpoint = region}) { }
///
/// Constructs AmazonSavingsPlansClient 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 AmazonSavingsPlansClient Configuration Object
public AmazonSavingsPlansClient(AmazonSavingsPlansConfig config)
: base(FallbackCredentialsFactory.GetCredentials(config), config){}
///
/// Constructs AmazonSavingsPlansClient with AWS Credentials
///
/// AWS Credentials
public AmazonSavingsPlansClient(AWSCredentials credentials)
: this(credentials, new AmazonSavingsPlansConfig())
{
}
///
/// Constructs AmazonSavingsPlansClient with AWS Credentials
///
/// AWS Credentials
/// The region to connect.
public AmazonSavingsPlansClient(AWSCredentials credentials, RegionEndpoint region)
: this(credentials, new AmazonSavingsPlansConfig{RegionEndpoint = region})
{
}
///
/// Constructs AmazonSavingsPlansClient with AWS Credentials and an
/// AmazonSavingsPlansClient Configuration object.
///
/// AWS Credentials
/// The AmazonSavingsPlansClient Configuration Object
public AmazonSavingsPlansClient(AWSCredentials credentials, AmazonSavingsPlansConfig clientConfig)
: base(credentials, clientConfig)
{
}
///
/// Constructs AmazonSavingsPlansClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
public AmazonSavingsPlansClient(string awsAccessKeyId, string awsSecretAccessKey)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonSavingsPlansConfig())
{
}
///
/// Constructs AmazonSavingsPlansClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// The region to connect.
public AmazonSavingsPlansClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonSavingsPlansConfig() {RegionEndpoint=region})
{
}
///
/// Constructs AmazonSavingsPlansClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonSavingsPlansClient Configuration object.
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// The AmazonSavingsPlansClient Configuration Object
public AmazonSavingsPlansClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonSavingsPlansConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, clientConfig)
{
}
///
/// Constructs AmazonSavingsPlansClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// AWS Session Token
public AmazonSavingsPlansClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonSavingsPlansConfig())
{
}
///
/// Constructs AmazonSavingsPlansClient 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 AmazonSavingsPlansClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonSavingsPlansConfig{RegionEndpoint = region})
{
}
///
/// Constructs AmazonSavingsPlansClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonSavingsPlansClient Configuration object.
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// AWS Session Token
/// The AmazonSavingsPlansClient Configuration Object
public AmazonSavingsPlansClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonSavingsPlansConfig 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 AmazonSavingsPlansEndpointResolver());
}
///
/// 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 CreateSavingsPlan
///
/// Creates a Savings Plan.
///
/// Container for the necessary parameters to execute the CreateSavingsPlan service method.
///
/// The response from the CreateSavingsPlan service method, as returned by SavingsPlans.
///
/// An unexpected error occurred.
///
///
/// The specified resource was not found.
///
///
/// A service quota has been exceeded.
///
///
/// One of the input parameters is not valid.
///
/// REST API Reference for CreateSavingsPlan Operation
public virtual CreateSavingsPlanResponse CreateSavingsPlan(CreateSavingsPlanRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateSavingsPlanRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateSavingsPlanResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Initiates the asynchronous execution of the CreateSavingsPlan operation.
///
///
/// Container for the necessary parameters to execute the CreateSavingsPlan operation on AmazonSavingsPlansClient.
/// 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 EndCreateSavingsPlan
/// operation.
/// REST API Reference for CreateSavingsPlan Operation
public virtual IAsyncResult BeginCreateSavingsPlan(CreateSavingsPlanRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateSavingsPlanRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateSavingsPlanResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
///
/// Finishes the asynchronous execution of the CreateSavingsPlan operation.
///
///
/// The IAsyncResult returned by the call to BeginCreateSavingsPlan.
///
/// Returns a CreateSavingsPlanResult from SavingsPlans.
/// REST API Reference for CreateSavingsPlan Operation
public virtual CreateSavingsPlanResponse EndCreateSavingsPlan(IAsyncResult asyncResult)
{
return EndInvoke(asyncResult);
}
#endregion
#region DeleteQueuedSavingsPlan
///
/// Deletes the queued purchase for the specified Savings Plan.
///
/// Container for the necessary parameters to execute the DeleteQueuedSavingsPlan service method.
///
/// The response from the DeleteQueuedSavingsPlan service method, as returned by SavingsPlans.
///
/// An unexpected error occurred.
///
///
/// The specified resource was not found.
///
///
/// A service quota has been exceeded.
///
///
/// One of the input parameters is not valid.
///
/// REST API Reference for DeleteQueuedSavingsPlan Operation
public virtual DeleteQueuedSavingsPlanResponse DeleteQueuedSavingsPlan(DeleteQueuedSavingsPlanRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteQueuedSavingsPlanRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteQueuedSavingsPlanResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Initiates the asynchronous execution of the DeleteQueuedSavingsPlan operation.
///
///
/// Container for the necessary parameters to execute the DeleteQueuedSavingsPlan operation on AmazonSavingsPlansClient.
/// 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 EndDeleteQueuedSavingsPlan
/// operation.
/// REST API Reference for DeleteQueuedSavingsPlan Operation
public virtual IAsyncResult BeginDeleteQueuedSavingsPlan(DeleteQueuedSavingsPlanRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteQueuedSavingsPlanRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteQueuedSavingsPlanResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
///
/// Finishes the asynchronous execution of the DeleteQueuedSavingsPlan operation.
///
///
/// The IAsyncResult returned by the call to BeginDeleteQueuedSavingsPlan.
///
/// Returns a DeleteQueuedSavingsPlanResult from SavingsPlans.
/// REST API Reference for DeleteQueuedSavingsPlan Operation
public virtual DeleteQueuedSavingsPlanResponse EndDeleteQueuedSavingsPlan(IAsyncResult asyncResult)
{
return EndInvoke(asyncResult);
}
#endregion
#region DescribeSavingsPlanRates
///
/// Describes the specified Savings Plans rates.
///
/// Container for the necessary parameters to execute the DescribeSavingsPlanRates service method.
///
/// The response from the DescribeSavingsPlanRates service method, as returned by SavingsPlans.
///
/// The specified resource was not found.
///
///
/// One of the input parameters is not valid.
///
/// REST API Reference for DescribeSavingsPlanRates Operation
public virtual DescribeSavingsPlanRatesResponse DescribeSavingsPlanRates(DescribeSavingsPlanRatesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeSavingsPlanRatesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeSavingsPlanRatesResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Initiates the asynchronous execution of the DescribeSavingsPlanRates operation.
///
///
/// Container for the necessary parameters to execute the DescribeSavingsPlanRates operation on AmazonSavingsPlansClient.
/// 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 EndDescribeSavingsPlanRates
/// operation.
/// REST API Reference for DescribeSavingsPlanRates Operation
public virtual IAsyncResult BeginDescribeSavingsPlanRates(DescribeSavingsPlanRatesRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeSavingsPlanRatesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeSavingsPlanRatesResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
///
/// Finishes the asynchronous execution of the DescribeSavingsPlanRates operation.
///
///
/// The IAsyncResult returned by the call to BeginDescribeSavingsPlanRates.
///
/// Returns a DescribeSavingsPlanRatesResult from SavingsPlans.
/// REST API Reference for DescribeSavingsPlanRates Operation
public virtual DescribeSavingsPlanRatesResponse EndDescribeSavingsPlanRates(IAsyncResult asyncResult)
{
return EndInvoke(asyncResult);
}
#endregion
#region DescribeSavingsPlans
///
/// Describes the specified Savings Plans.
///
/// Container for the necessary parameters to execute the DescribeSavingsPlans service method.
///
/// The response from the DescribeSavingsPlans service method, as returned by SavingsPlans.
///
/// An unexpected error occurred.
///
///
/// One of the input parameters is not valid.
///
/// REST API Reference for DescribeSavingsPlans Operation
public virtual DescribeSavingsPlansResponse DescribeSavingsPlans(DescribeSavingsPlansRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeSavingsPlansRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeSavingsPlansResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Initiates the asynchronous execution of the DescribeSavingsPlans operation.
///
///
/// Container for the necessary parameters to execute the DescribeSavingsPlans operation on AmazonSavingsPlansClient.
/// 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 EndDescribeSavingsPlans
/// operation.
/// REST API Reference for DescribeSavingsPlans Operation
public virtual IAsyncResult BeginDescribeSavingsPlans(DescribeSavingsPlansRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeSavingsPlansRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeSavingsPlansResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
///
/// Finishes the asynchronous execution of the DescribeSavingsPlans operation.
///
///
/// The IAsyncResult returned by the call to BeginDescribeSavingsPlans.
///
/// Returns a DescribeSavingsPlansResult from SavingsPlans.
/// REST API Reference for DescribeSavingsPlans Operation
public virtual DescribeSavingsPlansResponse EndDescribeSavingsPlans(IAsyncResult asyncResult)
{
return EndInvoke(asyncResult);
}
#endregion
#region DescribeSavingsPlansOfferingRates
///
/// Describes the specified Savings Plans offering rates.
///
/// Container for the necessary parameters to execute the DescribeSavingsPlansOfferingRates service method.
///
/// The response from the DescribeSavingsPlansOfferingRates service method, as returned by SavingsPlans.
///
/// An unexpected error occurred.
///
///
/// One of the input parameters is not valid.
///
/// REST API Reference for DescribeSavingsPlansOfferingRates Operation
public virtual DescribeSavingsPlansOfferingRatesResponse DescribeSavingsPlansOfferingRates(DescribeSavingsPlansOfferingRatesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeSavingsPlansOfferingRatesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeSavingsPlansOfferingRatesResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Initiates the asynchronous execution of the DescribeSavingsPlansOfferingRates operation.
///
///
/// Container for the necessary parameters to execute the DescribeSavingsPlansOfferingRates operation on AmazonSavingsPlansClient.
/// 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 EndDescribeSavingsPlansOfferingRates
/// operation.
/// REST API Reference for DescribeSavingsPlansOfferingRates Operation
public virtual IAsyncResult BeginDescribeSavingsPlansOfferingRates(DescribeSavingsPlansOfferingRatesRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeSavingsPlansOfferingRatesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeSavingsPlansOfferingRatesResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
///
/// Finishes the asynchronous execution of the DescribeSavingsPlansOfferingRates operation.
///
///
/// The IAsyncResult returned by the call to BeginDescribeSavingsPlansOfferingRates.
///
/// Returns a DescribeSavingsPlansOfferingRatesResult from SavingsPlans.
/// REST API Reference for DescribeSavingsPlansOfferingRates Operation
public virtual DescribeSavingsPlansOfferingRatesResponse EndDescribeSavingsPlansOfferingRates(IAsyncResult asyncResult)
{
return EndInvoke(asyncResult);
}
#endregion
#region DescribeSavingsPlansOfferings
///
/// Describes the specified Savings Plans offerings.
///
/// Container for the necessary parameters to execute the DescribeSavingsPlansOfferings service method.
///
/// The response from the DescribeSavingsPlansOfferings service method, as returned by SavingsPlans.
///
/// An unexpected error occurred.
///
///
/// One of the input parameters is not valid.
///
/// REST API Reference for DescribeSavingsPlansOfferings Operation
public virtual DescribeSavingsPlansOfferingsResponse DescribeSavingsPlansOfferings(DescribeSavingsPlansOfferingsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeSavingsPlansOfferingsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeSavingsPlansOfferingsResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Initiates the asynchronous execution of the DescribeSavingsPlansOfferings operation.
///
///
/// Container for the necessary parameters to execute the DescribeSavingsPlansOfferings operation on AmazonSavingsPlansClient.
/// 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 EndDescribeSavingsPlansOfferings
/// operation.
/// REST API Reference for DescribeSavingsPlansOfferings Operation
public virtual IAsyncResult BeginDescribeSavingsPlansOfferings(DescribeSavingsPlansOfferingsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeSavingsPlansOfferingsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeSavingsPlansOfferingsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
///
/// Finishes the asynchronous execution of the DescribeSavingsPlansOfferings operation.
///
///
/// The IAsyncResult returned by the call to BeginDescribeSavingsPlansOfferings.
///
/// Returns a DescribeSavingsPlansOfferingsResult from SavingsPlans.
/// REST API Reference for DescribeSavingsPlansOfferings Operation
public virtual DescribeSavingsPlansOfferingsResponse EndDescribeSavingsPlansOfferings(IAsyncResult asyncResult)
{
return EndInvoke(asyncResult);
}
#endregion
#region ListTagsForResource
///
/// Lists the tags for the specified resource.
///
/// Container for the necessary parameters to execute the ListTagsForResource service method.
///
/// The response from the ListTagsForResource service method, as returned by SavingsPlans.
///
/// An unexpected error occurred.
///
///
/// The specified resource was not found.
///
///
/// One of the input parameters is not valid.
///
/// REST API Reference for ListTagsForResource Operation
public virtual ListTagsForResourceResponse ListTagsForResource(ListTagsForResourceRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListTagsForResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListTagsForResourceResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Initiates the asynchronous execution of the ListTagsForResource operation.
///
///
/// Container for the necessary parameters to execute the ListTagsForResource operation on AmazonSavingsPlansClient.
/// 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 EndListTagsForResource
/// operation.
/// REST API Reference for ListTagsForResource Operation
public virtual IAsyncResult BeginListTagsForResource(ListTagsForResourceRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListTagsForResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListTagsForResourceResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
///
/// Finishes the asynchronous execution of the ListTagsForResource operation.
///
///
/// The IAsyncResult returned by the call to BeginListTagsForResource.
///
/// Returns a ListTagsForResourceResult from SavingsPlans.
/// REST API Reference for ListTagsForResource Operation
public virtual ListTagsForResourceResponse EndListTagsForResource(IAsyncResult asyncResult)
{
return EndInvoke(asyncResult);
}
#endregion
#region TagResource
///
/// Adds the specified tags to the specified resource.
///
/// Container for the necessary parameters to execute the TagResource service method.
///
/// The response from the TagResource service method, as returned by SavingsPlans.
///
/// An unexpected error occurred.
///
///
/// The specified resource was not found.
///
///
/// A service quota has been exceeded.
///
///
/// One of the input parameters is not valid.
///
/// REST API Reference for TagResource Operation
public virtual TagResourceResponse TagResource(TagResourceRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = TagResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = TagResourceResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Initiates the asynchronous execution of the TagResource operation.
///
///
/// Container for the necessary parameters to execute the TagResource operation on AmazonSavingsPlansClient.
/// 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 EndTagResource
/// operation.
/// REST API Reference for TagResource Operation
public virtual IAsyncResult BeginTagResource(TagResourceRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = TagResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = TagResourceResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
///
/// Finishes the asynchronous execution of the TagResource operation.
///
///
/// The IAsyncResult returned by the call to BeginTagResource.
///
/// Returns a TagResourceResult from SavingsPlans.
/// REST API Reference for TagResource Operation
public virtual TagResourceResponse EndTagResource(IAsyncResult asyncResult)
{
return EndInvoke(asyncResult);
}
#endregion
#region UntagResource
///
/// Removes the specified tags from the specified resource.
///
/// Container for the necessary parameters to execute the UntagResource service method.
///
/// The response from the UntagResource service method, as returned by SavingsPlans.
///
/// An unexpected error occurred.
///
///
/// The specified resource was not found.
///
///
/// One of the input parameters is not valid.
///
/// REST API Reference for UntagResource Operation
public virtual UntagResourceResponse UntagResource(UntagResourceRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = UntagResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = UntagResourceResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Initiates the asynchronous execution of the UntagResource operation.
///
///
/// Container for the necessary parameters to execute the UntagResource operation on AmazonSavingsPlansClient.
/// 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 EndUntagResource
/// operation.
/// REST API Reference for UntagResource Operation
public virtual IAsyncResult BeginUntagResource(UntagResourceRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = UntagResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = UntagResourceResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
///
/// Finishes the asynchronous execution of the UntagResource operation.
///
///
/// The IAsyncResult returned by the call to BeginUntagResource.
///
/// Returns a UntagResourceResult from SavingsPlans.
/// REST API Reference for UntagResource Operation
public virtual UntagResourceResponse EndUntagResource(IAsyncResult asyncResult)
{
return EndInvoke(asyncResult);
}
#endregion
}
}