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.</p>
     <p>Service Endpoint</p>
     <p>The AWS Cost and Usage Report API provides the following endpoint:</p>
     <ul>
        <li>
           <p>cur.us-east-1.amazonaws.com</p>
        </li>
     </ul>

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
public let client: AWSClient

config

Service configuration
public 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:)

compiler(>=5.5.2) && canImport(_Concurrency)
public func describeReportDefinitionsPaginator(
        _ input: DescribeReportDefinitionsRequest,
        logger: Logger = AWSClient.loggingDisabled,
        on eventLoop: EventLoop? = nil
    ) -> AWSClient.PaginatorSequence<DescribeReportDefinitionsRequest, DescribeReportDefinitionsResponse> 

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

Return PaginatorSequence for operation. - Parameters: - input: Input for request - logger: Logger used flot logging - eventLoop: EventLoop to run this process on

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

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

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 flot logging - 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 flot logging - eventLoop: EventLoop to run this process on - onPage: closure called with each block of entries. Returns boolean indicating whether we should continue.