/* * 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.Runtime.ExceptionServices; using System.Threading; using System.Threading.Tasks; 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(); private IApplicationCostProfilerPaginatorFactory _paginators; /// /// Paginators for the service /// public IApplicationCostProfilerPaginatorFactory Paginators { get { if (this._paginators == null) { this._paginators = new ApplicationCostProfilerPaginatorFactory(this); } return this._paginators; } } #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); } /// /// 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. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// 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 Task DeleteReportDefinitionAsync(DeleteReportDefinitionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = DeleteReportDefinitionRequestMarshaller.Instance; options.ResponseUnmarshaller = DeleteReportDefinitionResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #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); } /// /// Retrieves the definition of a report already configured in AWS Application Cost Profiler. /// /// Container for the necessary parameters to execute the GetReportDefinition service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// 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 Task GetReportDefinitionAsync(GetReportDefinitionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = GetReportDefinitionRequestMarshaller.Instance; options.ResponseUnmarshaller = GetReportDefinitionResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #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); } /// /// 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. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// 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 Task ImportApplicationUsageAsync(ImportApplicationUsageRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ImportApplicationUsageRequestMarshaller.Instance; options.ResponseUnmarshaller = ImportApplicationUsageResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #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); } /// /// 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. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// 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 Task ListReportDefinitionsAsync(ListReportDefinitionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ListReportDefinitionsRequestMarshaller.Instance; options.ResponseUnmarshaller = ListReportDefinitionsResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #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); } /// /// Creates the report definition for a report in Application Cost Profiler. /// /// Container for the necessary parameters to execute the PutReportDefinition service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// 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 Task PutReportDefinitionAsync(PutReportDefinitionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = PutReportDefinitionRequestMarshaller.Instance; options.ResponseUnmarshaller = PutReportDefinitionResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #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); } /// /// Updates existing report in AWS Application Cost Profiler. /// /// Container for the necessary parameters to execute the UpdateReportDefinition service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// 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 Task UpdateReportDefinitionAsync(UpdateReportDefinitionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = UpdateReportDefinitionRequestMarshaller.Instance; options.ResponseUnmarshaller = UpdateReportDefinitionResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion } }