/* * 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 applicationcostprofiler-2020-09-10.normal.json service model. */ using System; using System.Collections.Generic; using System.Net; using Amazon.ApplicationCostProfiler.Model; using Amazon.ApplicationCostProfiler.Model.Internal.MarshallTransformations; using Amazon.ApplicationCostProfiler.Internal; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Auth; using Amazon.Runtime.Internal.Transform; namespace Amazon.ApplicationCostProfiler { /// /// Implementation for accessing ApplicationCostProfiler /// /// This reference provides descriptions of the AWS Application Cost Profiler API. /// /// /// /// The AWS Application Cost Profiler API provides programmatic access to view, create, /// update, and delete application cost report definitions, as well as to import your /// usage data into the Application Cost Profiler service. /// /// /// /// For more information about using this service, see the AWS /// Application Cost Profiler User Guide. /// /// public partial class AmazonApplicationCostProfilerClient : AmazonServiceClient, IAmazonApplicationCostProfiler { private static IServiceMetadata serviceMetadata = new AmazonApplicationCostProfilerMetadata(); #if BCL45 || AWS_ASYNC_ENUMERABLES_API private IApplicationCostProfilerPaginatorFactory _paginators; /// /// Paginators for the service /// public IApplicationCostProfilerPaginatorFactory Paginators { get { if (this._paginators == null) { this._paginators = new ApplicationCostProfilerPaginatorFactory(this); } return this._paginators; } } #endif #region Constructors /// /// Constructs AmazonApplicationCostProfilerClient 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 AmazonApplicationCostProfilerClient() : base(FallbackCredentialsFactory.GetCredentials(), new AmazonApplicationCostProfilerConfig()) { } /// /// Constructs AmazonApplicationCostProfilerClient 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 AmazonApplicationCostProfilerClient(RegionEndpoint region) : base(FallbackCredentialsFactory.GetCredentials(), new AmazonApplicationCostProfilerConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonApplicationCostProfilerClient 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 AmazonApplicationCostProfilerClient Configuration Object public AmazonApplicationCostProfilerClient(AmazonApplicationCostProfilerConfig config) : base(FallbackCredentialsFactory.GetCredentials(config), config){} /// /// Constructs AmazonApplicationCostProfilerClient with AWS Credentials /// /// AWS Credentials public AmazonApplicationCostProfilerClient(AWSCredentials credentials) : this(credentials, new AmazonApplicationCostProfilerConfig()) { } /// /// Constructs AmazonApplicationCostProfilerClient with AWS Credentials /// /// AWS Credentials /// The region to connect. public AmazonApplicationCostProfilerClient(AWSCredentials credentials, RegionEndpoint region) : this(credentials, new AmazonApplicationCostProfilerConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonApplicationCostProfilerClient with AWS Credentials and an /// AmazonApplicationCostProfilerClient Configuration object. /// /// AWS Credentials /// The AmazonApplicationCostProfilerClient Configuration Object public AmazonApplicationCostProfilerClient(AWSCredentials credentials, AmazonApplicationCostProfilerConfig clientConfig) : base(credentials, clientConfig) { } /// /// Constructs AmazonApplicationCostProfilerClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key public AmazonApplicationCostProfilerClient(string awsAccessKeyId, string awsSecretAccessKey) : this(awsAccessKeyId, awsSecretAccessKey, new AmazonApplicationCostProfilerConfig()) { } /// /// Constructs AmazonApplicationCostProfilerClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// The region to connect. public AmazonApplicationCostProfilerClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region) : this(awsAccessKeyId, awsSecretAccessKey, new AmazonApplicationCostProfilerConfig() {RegionEndpoint=region}) { } /// /// Constructs AmazonApplicationCostProfilerClient with AWS Access Key ID, AWS Secret Key and an /// AmazonApplicationCostProfilerClient Configuration object. /// /// AWS Access Key ID /// AWS Secret Access Key /// The AmazonApplicationCostProfilerClient Configuration Object public AmazonApplicationCostProfilerClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonApplicationCostProfilerConfig clientConfig) : base(awsAccessKeyId, awsSecretAccessKey, clientConfig) { } /// /// Constructs AmazonApplicationCostProfilerClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token public AmazonApplicationCostProfilerClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken) : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonApplicationCostProfilerConfig()) { } /// /// Constructs AmazonApplicationCostProfilerClient 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 AmazonApplicationCostProfilerClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region) : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonApplicationCostProfilerConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonApplicationCostProfilerClient with AWS Access Key ID, AWS Secret Key and an /// AmazonApplicationCostProfilerClient Configuration object. /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token /// The AmazonApplicationCostProfilerClient Configuration Object public AmazonApplicationCostProfilerClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonApplicationCostProfilerConfig 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 AmazonApplicationCostProfilerEndpointResolver()); } /// /// 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 DeleteReportDefinition /// /// Deletes the specified report definition in AWS Application Cost Profiler. This stops /// the report from being generated. /// /// Container for the necessary parameters to execute the DeleteReportDefinition service method. /// /// The response from the DeleteReportDefinition service method, as returned by ApplicationCostProfiler. /// /// You do not have permission to perform this action. /// /// /// An internal server error occurred. Retry your request. /// /// /// The calls to AWS Application Cost Profiler API are throttled. The request was denied. /// /// /// The input fails to satisfy the constraints for the API. /// /// REST API Reference for DeleteReportDefinition Operation public virtual DeleteReportDefinitionResponse DeleteReportDefinition(DeleteReportDefinitionRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = DeleteReportDefinitionRequestMarshaller.Instance; options.ResponseUnmarshaller = DeleteReportDefinitionResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Initiates the asynchronous execution of the DeleteReportDefinition operation. /// /// /// Container for the necessary parameters to execute the DeleteReportDefinition operation on AmazonApplicationCostProfilerClient. /// 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 EndDeleteReportDefinition /// operation. /// REST API Reference for DeleteReportDefinition Operation public virtual IAsyncResult BeginDeleteReportDefinition(DeleteReportDefinitionRequest request, AsyncCallback callback, object state) { var options = new InvokeOptions(); options.RequestMarshaller = DeleteReportDefinitionRequestMarshaller.Instance; options.ResponseUnmarshaller = DeleteReportDefinitionResponseUnmarshaller.Instance; return BeginInvoke(request, options, callback, state); } /// /// Finishes the asynchronous execution of the DeleteReportDefinition operation. /// /// /// The IAsyncResult returned by the call to BeginDeleteReportDefinition. /// /// Returns a DeleteReportDefinitionResult from ApplicationCostProfiler. /// REST API Reference for DeleteReportDefinition Operation public virtual DeleteReportDefinitionResponse EndDeleteReportDefinition(IAsyncResult asyncResult) { return EndInvoke(asyncResult); } #endregion #region GetReportDefinition /// /// Retrieves the definition of a report already configured in AWS Application Cost Profiler. /// /// Container for the necessary parameters to execute the GetReportDefinition service method. /// /// The response from the GetReportDefinition service method, as returned by ApplicationCostProfiler. /// /// You do not have permission to perform this action. /// /// /// An internal server error occurred. Retry your request. /// /// /// The calls to AWS Application Cost Profiler API are throttled. The request was denied. /// /// /// The input fails to satisfy the constraints for the API. /// /// REST API Reference for GetReportDefinition Operation public virtual GetReportDefinitionResponse GetReportDefinition(GetReportDefinitionRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = GetReportDefinitionRequestMarshaller.Instance; options.ResponseUnmarshaller = GetReportDefinitionResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Initiates the asynchronous execution of the GetReportDefinition operation. /// /// /// Container for the necessary parameters to execute the GetReportDefinition operation on AmazonApplicationCostProfilerClient. /// 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 EndGetReportDefinition /// operation. /// REST API Reference for GetReportDefinition Operation public virtual IAsyncResult BeginGetReportDefinition(GetReportDefinitionRequest request, AsyncCallback callback, object state) { var options = new InvokeOptions(); options.RequestMarshaller = GetReportDefinitionRequestMarshaller.Instance; options.ResponseUnmarshaller = GetReportDefinitionResponseUnmarshaller.Instance; return BeginInvoke(request, options, callback, state); } /// /// Finishes the asynchronous execution of the GetReportDefinition operation. /// /// /// The IAsyncResult returned by the call to BeginGetReportDefinition. /// /// Returns a GetReportDefinitionResult from ApplicationCostProfiler. /// REST API Reference for GetReportDefinition Operation public virtual GetReportDefinitionResponse EndGetReportDefinition(IAsyncResult asyncResult) { return EndInvoke(asyncResult); } #endregion #region ImportApplicationUsage /// /// Ingests application usage data from Amazon Simple Storage Service (Amazon S3). /// /// /// /// The data must already exist in the S3 location. As part of the action, AWS Application /// Cost Profiler copies the object from your S3 bucket to an S3 bucket owned by Amazon /// for processing asynchronously. /// /// /// Container for the necessary parameters to execute the ImportApplicationUsage service method. /// /// The response from the ImportApplicationUsage service method, as returned by ApplicationCostProfiler. /// /// You do not have permission to perform this action. /// /// /// An internal server error occurred. Retry your request. /// /// /// The calls to AWS Application Cost Profiler API are throttled. The request was denied. /// /// /// The input fails to satisfy the constraints for the API. /// /// REST API Reference for ImportApplicationUsage Operation public virtual ImportApplicationUsageResponse ImportApplicationUsage(ImportApplicationUsageRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ImportApplicationUsageRequestMarshaller.Instance; options.ResponseUnmarshaller = ImportApplicationUsageResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Initiates the asynchronous execution of the ImportApplicationUsage operation. /// /// /// Container for the necessary parameters to execute the ImportApplicationUsage operation on AmazonApplicationCostProfilerClient. /// 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 EndImportApplicationUsage /// operation. /// REST API Reference for ImportApplicationUsage Operation public virtual IAsyncResult BeginImportApplicationUsage(ImportApplicationUsageRequest request, AsyncCallback callback, object state) { var options = new InvokeOptions(); options.RequestMarshaller = ImportApplicationUsageRequestMarshaller.Instance; options.ResponseUnmarshaller = ImportApplicationUsageResponseUnmarshaller.Instance; return BeginInvoke(request, options, callback, state); } /// /// Finishes the asynchronous execution of the ImportApplicationUsage operation. /// /// /// The IAsyncResult returned by the call to BeginImportApplicationUsage. /// /// Returns a ImportApplicationUsageResult from ApplicationCostProfiler. /// REST API Reference for ImportApplicationUsage Operation public virtual ImportApplicationUsageResponse EndImportApplicationUsage(IAsyncResult asyncResult) { return EndInvoke(asyncResult); } #endregion #region ListReportDefinitions /// /// Retrieves a list of all reports and their configurations for your AWS account. /// /// /// /// The maximum number of reports is one. /// /// /// Container for the necessary parameters to execute the ListReportDefinitions service method. /// /// The response from the ListReportDefinitions service method, as returned by ApplicationCostProfiler. /// /// You do not have permission to perform this action. /// /// /// An internal server error occurred. Retry your request. /// /// /// The calls to AWS Application Cost Profiler API are throttled. The request was denied. /// /// /// The input fails to satisfy the constraints for the API. /// /// REST API Reference for ListReportDefinitions Operation public virtual ListReportDefinitionsResponse ListReportDefinitions(ListReportDefinitionsRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ListReportDefinitionsRequestMarshaller.Instance; options.ResponseUnmarshaller = ListReportDefinitionsResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Initiates the asynchronous execution of the ListReportDefinitions operation. /// /// /// Container for the necessary parameters to execute the ListReportDefinitions operation on AmazonApplicationCostProfilerClient. /// 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 EndListReportDefinitions /// operation. /// REST API Reference for ListReportDefinitions Operation public virtual IAsyncResult BeginListReportDefinitions(ListReportDefinitionsRequest request, AsyncCallback callback, object state) { var options = new InvokeOptions(); options.RequestMarshaller = ListReportDefinitionsRequestMarshaller.Instance; options.ResponseUnmarshaller = ListReportDefinitionsResponseUnmarshaller.Instance; return BeginInvoke(request, options, callback, state); } /// /// Finishes the asynchronous execution of the ListReportDefinitions operation. /// /// /// The IAsyncResult returned by the call to BeginListReportDefinitions. /// /// Returns a ListReportDefinitionsResult from ApplicationCostProfiler. /// REST API Reference for ListReportDefinitions Operation public virtual ListReportDefinitionsResponse EndListReportDefinitions(IAsyncResult asyncResult) { return EndInvoke(asyncResult); } #endregion #region PutReportDefinition /// /// Creates the report definition for a report in Application Cost Profiler. /// /// Container for the necessary parameters to execute the PutReportDefinition service method. /// /// The response from the PutReportDefinition service method, as returned by ApplicationCostProfiler. /// /// You do not have permission to perform this action. /// /// /// An internal server error occurred. Retry your request. /// /// /// Your request exceeds one or more of the service quotas. /// /// /// The calls to AWS Application Cost Profiler API are throttled. The request was denied. /// /// /// The input fails to satisfy the constraints for the API. /// /// REST API Reference for PutReportDefinition Operation public virtual PutReportDefinitionResponse PutReportDefinition(PutReportDefinitionRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = PutReportDefinitionRequestMarshaller.Instance; options.ResponseUnmarshaller = PutReportDefinitionResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Initiates the asynchronous execution of the PutReportDefinition operation. /// /// /// Container for the necessary parameters to execute the PutReportDefinition operation on AmazonApplicationCostProfilerClient. /// 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 EndPutReportDefinition /// operation. /// REST API Reference for PutReportDefinition Operation public virtual IAsyncResult BeginPutReportDefinition(PutReportDefinitionRequest request, AsyncCallback callback, object state) { var options = new InvokeOptions(); options.RequestMarshaller = PutReportDefinitionRequestMarshaller.Instance; options.ResponseUnmarshaller = PutReportDefinitionResponseUnmarshaller.Instance; return BeginInvoke(request, options, callback, state); } /// /// Finishes the asynchronous execution of the PutReportDefinition operation. /// /// /// The IAsyncResult returned by the call to BeginPutReportDefinition. /// /// Returns a PutReportDefinitionResult from ApplicationCostProfiler. /// REST API Reference for PutReportDefinition Operation public virtual PutReportDefinitionResponse EndPutReportDefinition(IAsyncResult asyncResult) { return EndInvoke(asyncResult); } #endregion #region UpdateReportDefinition /// /// Updates existing report in AWS Application Cost Profiler. /// /// Container for the necessary parameters to execute the UpdateReportDefinition service method. /// /// The response from the UpdateReportDefinition service method, as returned by ApplicationCostProfiler. /// /// You do not have permission to perform this action. /// /// /// An internal server error occurred. Retry your request. /// /// /// The calls to AWS Application Cost Profiler API are throttled. The request was denied. /// /// /// The input fails to satisfy the constraints for the API. /// /// REST API Reference for UpdateReportDefinition Operation public virtual UpdateReportDefinitionResponse UpdateReportDefinition(UpdateReportDefinitionRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = UpdateReportDefinitionRequestMarshaller.Instance; options.ResponseUnmarshaller = UpdateReportDefinitionResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Initiates the asynchronous execution of the UpdateReportDefinition operation. /// /// /// Container for the necessary parameters to execute the UpdateReportDefinition operation on AmazonApplicationCostProfilerClient. /// 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 EndUpdateReportDefinition /// operation. /// REST API Reference for UpdateReportDefinition Operation public virtual IAsyncResult BeginUpdateReportDefinition(UpdateReportDefinitionRequest request, AsyncCallback callback, object state) { var options = new InvokeOptions(); options.RequestMarshaller = UpdateReportDefinitionRequestMarshaller.Instance; options.ResponseUnmarshaller = UpdateReportDefinitionResponseUnmarshaller.Instance; return BeginInvoke(request, options, callback, state); } /// /// Finishes the asynchronous execution of the UpdateReportDefinition operation. /// /// /// The IAsyncResult returned by the call to BeginUpdateReportDefinition. /// /// Returns a UpdateReportDefinitionResult from ApplicationCostProfiler. /// REST API Reference for UpdateReportDefinition Operation public virtual UpdateReportDefinitionResponse EndUpdateReportDefinition(IAsyncResult asyncResult) { return EndInvoke(asyncResult); } #endregion } }