/* * 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 autoscaling-plans-2018-01-06.normal.json service model. */ using System; using System.Collections.Generic; using System.Net; using Amazon.AutoScalingPlans.Model; using Amazon.AutoScalingPlans.Model.Internal.MarshallTransformations; using Amazon.AutoScalingPlans.Internal; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Auth; using Amazon.Runtime.Internal.Transform; namespace Amazon.AutoScalingPlans { /// /// Implementation for accessing AutoScalingPlans /// /// AWS Auto Scaling /// /// Use AWS Auto Scaling to create scaling plans for your applications to automatically /// scale your scalable AWS resources. /// /// /// /// API Summary /// /// /// /// You can use the AWS Auto Scaling service API to accomplish the following tasks: /// /// /// /// To learn more about AWS Auto Scaling, including information about granting IAM users /// required permissions for AWS Auto Scaling actions, see the AWS /// Auto Scaling User Guide. /// /// public partial class AmazonAutoScalingPlansClient : AmazonServiceClient, IAmazonAutoScalingPlans { private static IServiceMetadata serviceMetadata = new AmazonAutoScalingPlansMetadata(); #region Constructors /// /// Constructs AmazonAutoScalingPlansClient 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 AmazonAutoScalingPlansClient() : base(FallbackCredentialsFactory.GetCredentials(), new AmazonAutoScalingPlansConfig()) { } /// /// Constructs AmazonAutoScalingPlansClient 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 AmazonAutoScalingPlansClient(RegionEndpoint region) : base(FallbackCredentialsFactory.GetCredentials(), new AmazonAutoScalingPlansConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonAutoScalingPlansClient 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 AmazonAutoScalingPlansClient Configuration Object public AmazonAutoScalingPlansClient(AmazonAutoScalingPlansConfig config) : base(FallbackCredentialsFactory.GetCredentials(config), config){} /// /// Constructs AmazonAutoScalingPlansClient with AWS Credentials /// /// AWS Credentials public AmazonAutoScalingPlansClient(AWSCredentials credentials) : this(credentials, new AmazonAutoScalingPlansConfig()) { } /// /// Constructs AmazonAutoScalingPlansClient with AWS Credentials /// /// AWS Credentials /// The region to connect. public AmazonAutoScalingPlansClient(AWSCredentials credentials, RegionEndpoint region) : this(credentials, new AmazonAutoScalingPlansConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonAutoScalingPlansClient with AWS Credentials and an /// AmazonAutoScalingPlansClient Configuration object. /// /// AWS Credentials /// The AmazonAutoScalingPlansClient Configuration Object public AmazonAutoScalingPlansClient(AWSCredentials credentials, AmazonAutoScalingPlansConfig clientConfig) : base(credentials, clientConfig) { } /// /// Constructs AmazonAutoScalingPlansClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key public AmazonAutoScalingPlansClient(string awsAccessKeyId, string awsSecretAccessKey) : this(awsAccessKeyId, awsSecretAccessKey, new AmazonAutoScalingPlansConfig()) { } /// /// Constructs AmazonAutoScalingPlansClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// The region to connect. public AmazonAutoScalingPlansClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region) : this(awsAccessKeyId, awsSecretAccessKey, new AmazonAutoScalingPlansConfig() {RegionEndpoint=region}) { } /// /// Constructs AmazonAutoScalingPlansClient with AWS Access Key ID, AWS Secret Key and an /// AmazonAutoScalingPlansClient Configuration object. /// /// AWS Access Key ID /// AWS Secret Access Key /// The AmazonAutoScalingPlansClient Configuration Object public AmazonAutoScalingPlansClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonAutoScalingPlansConfig clientConfig) : base(awsAccessKeyId, awsSecretAccessKey, clientConfig) { } /// /// Constructs AmazonAutoScalingPlansClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token public AmazonAutoScalingPlansClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken) : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonAutoScalingPlansConfig()) { } /// /// Constructs AmazonAutoScalingPlansClient 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 AmazonAutoScalingPlansClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region) : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonAutoScalingPlansConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonAutoScalingPlansClient with AWS Access Key ID, AWS Secret Key and an /// AmazonAutoScalingPlansClient Configuration object. /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token /// The AmazonAutoScalingPlansClient Configuration Object public AmazonAutoScalingPlansClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonAutoScalingPlansConfig 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 AmazonAutoScalingPlansEndpointResolver()); } /// /// 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 CreateScalingPlan /// /// Creates a scaling plan. /// /// Container for the necessary parameters to execute the CreateScalingPlan service method. /// /// The response from the CreateScalingPlan service method, as returned by AutoScalingPlans. /// /// Concurrent updates caused an exception, for example, if you request an update to a /// scaling plan that already has a pending update. /// /// /// The service encountered an internal error. /// /// /// Your account exceeded a limit. This exception is thrown when a per-account resource /// limit is exceeded. /// /// /// An exception was thrown for a validation issue. Review the parameters provided. /// /// REST API Reference for CreateScalingPlan Operation public virtual CreateScalingPlanResponse CreateScalingPlan(CreateScalingPlanRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = CreateScalingPlanRequestMarshaller.Instance; options.ResponseUnmarshaller = CreateScalingPlanResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Initiates the asynchronous execution of the CreateScalingPlan operation. /// /// /// Container for the necessary parameters to execute the CreateScalingPlan operation on AmazonAutoScalingPlansClient. /// 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 EndCreateScalingPlan /// operation. /// REST API Reference for CreateScalingPlan Operation public virtual IAsyncResult BeginCreateScalingPlan(CreateScalingPlanRequest request, AsyncCallback callback, object state) { var options = new InvokeOptions(); options.RequestMarshaller = CreateScalingPlanRequestMarshaller.Instance; options.ResponseUnmarshaller = CreateScalingPlanResponseUnmarshaller.Instance; return BeginInvoke(request, options, callback, state); } /// /// Finishes the asynchronous execution of the CreateScalingPlan operation. /// /// /// The IAsyncResult returned by the call to BeginCreateScalingPlan. /// /// Returns a CreateScalingPlanResult from AutoScalingPlans. /// REST API Reference for CreateScalingPlan Operation public virtual CreateScalingPlanResponse EndCreateScalingPlan(IAsyncResult asyncResult) { return EndInvoke(asyncResult); } #endregion #region DeleteScalingPlan /// /// Deletes the specified scaling plan. /// /// /// /// Deleting a scaling plan deletes the underlying ScalingInstruction for all of /// the scalable resources that are covered by the plan. /// /// /// /// If the plan has launched resources or has scaling activities in progress, you must /// delete those resources separately. /// /// /// Container for the necessary parameters to execute the DeleteScalingPlan service method. /// /// The response from the DeleteScalingPlan service method, as returned by AutoScalingPlans. /// /// Concurrent updates caused an exception, for example, if you request an update to a /// scaling plan that already has a pending update. /// /// /// The service encountered an internal error. /// /// /// The specified object could not be found. /// /// /// An exception was thrown for a validation issue. Review the parameters provided. /// /// REST API Reference for DeleteScalingPlan Operation public virtual DeleteScalingPlanResponse DeleteScalingPlan(DeleteScalingPlanRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = DeleteScalingPlanRequestMarshaller.Instance; options.ResponseUnmarshaller = DeleteScalingPlanResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Initiates the asynchronous execution of the DeleteScalingPlan operation. /// /// /// Container for the necessary parameters to execute the DeleteScalingPlan operation on AmazonAutoScalingPlansClient. /// 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 EndDeleteScalingPlan /// operation. /// REST API Reference for DeleteScalingPlan Operation public virtual IAsyncResult BeginDeleteScalingPlan(DeleteScalingPlanRequest request, AsyncCallback callback, object state) { var options = new InvokeOptions(); options.RequestMarshaller = DeleteScalingPlanRequestMarshaller.Instance; options.ResponseUnmarshaller = DeleteScalingPlanResponseUnmarshaller.Instance; return BeginInvoke(request, options, callback, state); } /// /// Finishes the asynchronous execution of the DeleteScalingPlan operation. /// /// /// The IAsyncResult returned by the call to BeginDeleteScalingPlan. /// /// Returns a DeleteScalingPlanResult from AutoScalingPlans. /// REST API Reference for DeleteScalingPlan Operation public virtual DeleteScalingPlanResponse EndDeleteScalingPlan(IAsyncResult asyncResult) { return EndInvoke(asyncResult); } #endregion #region DescribeScalingPlanResources /// /// Describes the scalable resources in the specified scaling plan. /// /// Container for the necessary parameters to execute the DescribeScalingPlanResources service method. /// /// The response from the DescribeScalingPlanResources service method, as returned by AutoScalingPlans. /// /// Concurrent updates caused an exception, for example, if you request an update to a /// scaling plan that already has a pending update. /// /// /// The service encountered an internal error. /// /// /// The token provided is not valid. /// /// /// An exception was thrown for a validation issue. Review the parameters provided. /// /// REST API Reference for DescribeScalingPlanResources Operation public virtual DescribeScalingPlanResourcesResponse DescribeScalingPlanResources(DescribeScalingPlanResourcesRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeScalingPlanResourcesRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeScalingPlanResourcesResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Initiates the asynchronous execution of the DescribeScalingPlanResources operation. /// /// /// Container for the necessary parameters to execute the DescribeScalingPlanResources operation on AmazonAutoScalingPlansClient. /// 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 EndDescribeScalingPlanResources /// operation. /// REST API Reference for DescribeScalingPlanResources Operation public virtual IAsyncResult BeginDescribeScalingPlanResources(DescribeScalingPlanResourcesRequest request, AsyncCallback callback, object state) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeScalingPlanResourcesRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeScalingPlanResourcesResponseUnmarshaller.Instance; return BeginInvoke(request, options, callback, state); } /// /// Finishes the asynchronous execution of the DescribeScalingPlanResources operation. /// /// /// The IAsyncResult returned by the call to BeginDescribeScalingPlanResources. /// /// Returns a DescribeScalingPlanResourcesResult from AutoScalingPlans. /// REST API Reference for DescribeScalingPlanResources Operation public virtual DescribeScalingPlanResourcesResponse EndDescribeScalingPlanResources(IAsyncResult asyncResult) { return EndInvoke(asyncResult); } #endregion #region DescribeScalingPlans /// /// Describes one or more of your scaling plans. /// /// Container for the necessary parameters to execute the DescribeScalingPlans service method. /// /// The response from the DescribeScalingPlans service method, as returned by AutoScalingPlans. /// /// Concurrent updates caused an exception, for example, if you request an update to a /// scaling plan that already has a pending update. /// /// /// The service encountered an internal error. /// /// /// The token provided is not valid. /// /// /// An exception was thrown for a validation issue. Review the parameters provided. /// /// REST API Reference for DescribeScalingPlans Operation public virtual DescribeScalingPlansResponse DescribeScalingPlans(DescribeScalingPlansRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeScalingPlansRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeScalingPlansResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Initiates the asynchronous execution of the DescribeScalingPlans operation. /// /// /// Container for the necessary parameters to execute the DescribeScalingPlans operation on AmazonAutoScalingPlansClient. /// 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 EndDescribeScalingPlans /// operation. /// REST API Reference for DescribeScalingPlans Operation public virtual IAsyncResult BeginDescribeScalingPlans(DescribeScalingPlansRequest request, AsyncCallback callback, object state) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeScalingPlansRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeScalingPlansResponseUnmarshaller.Instance; return BeginInvoke(request, options, callback, state); } /// /// Finishes the asynchronous execution of the DescribeScalingPlans operation. /// /// /// The IAsyncResult returned by the call to BeginDescribeScalingPlans. /// /// Returns a DescribeScalingPlansResult from AutoScalingPlans. /// REST API Reference for DescribeScalingPlans Operation public virtual DescribeScalingPlansResponse EndDescribeScalingPlans(IAsyncResult asyncResult) { return EndInvoke(asyncResult); } #endregion #region GetScalingPlanResourceForecastData /// /// Retrieves the forecast data for a scalable resource. /// /// /// /// Capacity forecasts are represented as predicted values, or data points, that are calculated /// using historical data points from a specified CloudWatch load metric. Data points /// are available for up to 56 days. /// /// /// Container for the necessary parameters to execute the GetScalingPlanResourceForecastData service method. /// /// The response from the GetScalingPlanResourceForecastData service method, as returned by AutoScalingPlans. /// /// The service encountered an internal error. /// /// /// An exception was thrown for a validation issue. Review the parameters provided. /// /// REST API Reference for GetScalingPlanResourceForecastData Operation public virtual GetScalingPlanResourceForecastDataResponse GetScalingPlanResourceForecastData(GetScalingPlanResourceForecastDataRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = GetScalingPlanResourceForecastDataRequestMarshaller.Instance; options.ResponseUnmarshaller = GetScalingPlanResourceForecastDataResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Initiates the asynchronous execution of the GetScalingPlanResourceForecastData operation. /// /// /// Container for the necessary parameters to execute the GetScalingPlanResourceForecastData operation on AmazonAutoScalingPlansClient. /// 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 EndGetScalingPlanResourceForecastData /// operation. /// REST API Reference for GetScalingPlanResourceForecastData Operation public virtual IAsyncResult BeginGetScalingPlanResourceForecastData(GetScalingPlanResourceForecastDataRequest request, AsyncCallback callback, object state) { var options = new InvokeOptions(); options.RequestMarshaller = GetScalingPlanResourceForecastDataRequestMarshaller.Instance; options.ResponseUnmarshaller = GetScalingPlanResourceForecastDataResponseUnmarshaller.Instance; return BeginInvoke(request, options, callback, state); } /// /// Finishes the asynchronous execution of the GetScalingPlanResourceForecastData operation. /// /// /// The IAsyncResult returned by the call to BeginGetScalingPlanResourceForecastData. /// /// Returns a GetScalingPlanResourceForecastDataResult from AutoScalingPlans. /// REST API Reference for GetScalingPlanResourceForecastData Operation public virtual GetScalingPlanResourceForecastDataResponse EndGetScalingPlanResourceForecastData(IAsyncResult asyncResult) { return EndInvoke(asyncResult); } #endregion #region UpdateScalingPlan /// /// Updates the specified scaling plan. /// /// /// /// You cannot update a scaling plan if it is in the process of being created, updated, /// or deleted. /// /// /// Container for the necessary parameters to execute the UpdateScalingPlan service method. /// /// The response from the UpdateScalingPlan service method, as returned by AutoScalingPlans. /// /// Concurrent updates caused an exception, for example, if you request an update to a /// scaling plan that already has a pending update. /// /// /// The service encountered an internal error. /// /// /// The specified object could not be found. /// /// /// An exception was thrown for a validation issue. Review the parameters provided. /// /// REST API Reference for UpdateScalingPlan Operation public virtual UpdateScalingPlanResponse UpdateScalingPlan(UpdateScalingPlanRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = UpdateScalingPlanRequestMarshaller.Instance; options.ResponseUnmarshaller = UpdateScalingPlanResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Initiates the asynchronous execution of the UpdateScalingPlan operation. /// /// /// Container for the necessary parameters to execute the UpdateScalingPlan operation on AmazonAutoScalingPlansClient. /// 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 EndUpdateScalingPlan /// operation. /// REST API Reference for UpdateScalingPlan Operation public virtual IAsyncResult BeginUpdateScalingPlan(UpdateScalingPlanRequest request, AsyncCallback callback, object state) { var options = new InvokeOptions(); options.RequestMarshaller = UpdateScalingPlanRequestMarshaller.Instance; options.ResponseUnmarshaller = UpdateScalingPlanResponseUnmarshaller.Instance; return BeginInvoke(request, options, callback, state); } /// /// Finishes the asynchronous execution of the UpdateScalingPlan operation. /// /// /// The IAsyncResult returned by the call to BeginUpdateScalingPlan. /// /// Returns a UpdateScalingPlanResult from AutoScalingPlans. /// REST API Reference for UpdateScalingPlan Operation public virtual UpdateScalingPlanResponse EndUpdateScalingPlan(IAsyncResult asyncResult) { return EndInvoke(asyncResult); } #endregion } }