Soto icon

Soto

CostandUsageReportService

Service object for interacting with AWS CostandUsageReportService service.

public struct CostandUsageReportService: AWSService

The AWS Cost and Usage Report API enables you to programmatically create, query, and delete AWS Cost and Usage report definitions.

AWS Cost and Usage reports track the monthly AWS costs and usage associated with your AWS account. The report contains line items for each unique combination of AWS product, usage type, and operation that your AWS account uses. You can configure the AWS Cost and Usage report to show only the data that you want, using the AWS Cost and Usage API.

Service Endpoint

The AWS Cost and Usage Report API provides the following endpoint:

  • cur.us-east-1.amazonaws.com

Inheritance

AWSService

Initializers

init(client:region:partition:endpoint:timeout:byteBufferAllocator:options:)

Initialize the CostandUsageReportService client

public init(client: AWSClient, region: SotoCore.Region? = nil, partition: AWSPartition = .aws, endpoint: String? = nil, timeout: TimeAmount? = nil, byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(), options: AWSServiceConfig.Options = [])

Parameters

  • client: AWSClient used to process requests
  • region: Region of server you want to communicate with. This will override the partition parameter.
  • partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
  • endpoint: Custom endpoint URL to use instead of standard AWS servers
  • timeout: Timeout value for HTTP requests

init(from:patch:)

Initializer required by AWSService.with(middlewares:​timeout:​byteBufferAllocator:​options). You are not able to use this initializer directly as there are no public initializers for AWSServiceConfig.Patch. Please use AWSService.with(middlewares:​timeout:​byteBufferAllocator:​options) instead.

public init(from: CostandUsageReportService, patch: AWSServiceConfig.Patch)

Properties

client

Client used for communication with AWS

let client: AWSClient

config

Service configuration

let config: AWSServiceConfig

Methods

deleteReportDefinition(_:logger:on:)

public func deleteReportDefinition(_ input: DeleteReportDefinitionRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<DeleteReportDefinitionResponse>

Deletes the specified report.

describeReportDefinitions(_:logger:on:)

public func describeReportDefinitions(_ input: DescribeReportDefinitionsRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<DescribeReportDefinitionsResponse>

Lists the AWS Cost and Usage reports available to this account.

modifyReportDefinition(_:logger:on:)

public func modifyReportDefinition(_ input: ModifyReportDefinitionRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<ModifyReportDefinitionResponse>

Allows you to programatically update your report preferences.

putReportDefinition(_:logger:on:)

public func putReportDefinition(_ input: PutReportDefinitionRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<PutReportDefinitionResponse>

Creates a new report using the description that you provide.

describeReportDefinitionsPaginator(_:_:logger:on:onPage:)

public func describeReportDefinitionsPaginator<Result>(_ input: DescribeReportDefinitionsRequest, _ initialValue: Result, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil, onPage: @escaping (Result, DescribeReportDefinitionsResponse, EventLoop) -> EventLoopFuture<(Bool, Result)>) -> EventLoopFuture<Result>

Lists the AWS Cost and Usage reports available to this account.

Provide paginated results to closure onPage for it to combine them into one result. This works in a similar manner to Array.reduce<Result>(_:_:) -> Result.

Parameters:

  • input: Input for request
  • initialValue: The value to use as the initial accumulating value. initialValue is passed to onPage the first time it is called.
  • logger: Logger used for logging output
  • eventLoop: EventLoop to run this process on
  • onPage: closure called with each paginated response. It combines an accumulating result with the contents of response. This combined result is then returned along with a boolean indicating if the paginate operation should continue.

describeReportDefinitionsPaginator(_:logger:on:onPage:)

Provide paginated results to closure onPage.

public func describeReportDefinitionsPaginator(_ input: DescribeReportDefinitionsRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil, onPage: @escaping (DescribeReportDefinitionsResponse, EventLoop) -> EventLoopFuture<Bool>) -> EventLoopFuture<Void>

Parameters

  • input: Input for request
  • logger: Logger used for logging output
  • eventLoop: EventLoop to run this process on
  • onPage: closure called with each block of entries. Returns boolean indicating whether we should continue.