Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Derived from API version 2017-01-06
of the AWS service descriptions, licensed under Apache 2.0.
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
Synopsis
- defaultService :: Service
- _ValidationException :: AsError a => Getting (First ServiceError) a ServiceError
- _InternalErrorException :: AsError a => Getting (First ServiceError) a ServiceError
- _DuplicateReportNameException :: AsError a => Getting (First ServiceError) a ServiceError
- _ReportLimitReachedException :: AsError a => Getting (First ServiceError) a ServiceError
- data PutReportDefinition = PutReportDefinition' ReportDefinition
- newPutReportDefinition :: ReportDefinition -> PutReportDefinition
- data PutReportDefinitionResponse = PutReportDefinitionResponse' Int
- newPutReportDefinitionResponse :: Int -> PutReportDefinitionResponse
- data DeleteReportDefinition = DeleteReportDefinition' (Maybe Text)
- newDeleteReportDefinition :: DeleteReportDefinition
- data DeleteReportDefinitionResponse = DeleteReportDefinitionResponse' (Maybe Text) Int
- newDeleteReportDefinitionResponse :: Int -> DeleteReportDefinitionResponse
- data ModifyReportDefinition = ModifyReportDefinition' Text ReportDefinition
- newModifyReportDefinition :: Text -> ReportDefinition -> ModifyReportDefinition
- data ModifyReportDefinitionResponse = ModifyReportDefinitionResponse' Int
- newModifyReportDefinitionResponse :: Int -> ModifyReportDefinitionResponse
- data DescribeReportDefinitions = DescribeReportDefinitions' (Maybe Text) (Maybe Natural)
- newDescribeReportDefinitions :: DescribeReportDefinitions
- data DescribeReportDefinitionsResponse = DescribeReportDefinitionsResponse' (Maybe Text) (Maybe [ReportDefinition]) Int
- newDescribeReportDefinitionsResponse :: Int -> DescribeReportDefinitionsResponse
- newtype AWSRegion where
- AWSRegion' { }
- pattern AWSRegion_Af_south_1 :: AWSRegion
- pattern AWSRegion_Ap_east_1 :: AWSRegion
- pattern AWSRegion_Ap_northeast_1 :: AWSRegion
- pattern AWSRegion_Ap_northeast_2 :: AWSRegion
- pattern AWSRegion_Ap_northeast_3 :: AWSRegion
- pattern AWSRegion_Ap_south_1 :: AWSRegion
- pattern AWSRegion_Ap_southeast_1 :: AWSRegion
- pattern AWSRegion_Ap_southeast_2 :: AWSRegion
- pattern AWSRegion_Ca_central_1 :: AWSRegion
- pattern AWSRegion_Cn_north_1 :: AWSRegion
- pattern AWSRegion_Cn_northwest_1 :: AWSRegion
- pattern AWSRegion_Eu_central_1 :: AWSRegion
- pattern AWSRegion_Eu_north_1 :: AWSRegion
- pattern AWSRegion_Eu_south_1 :: AWSRegion
- pattern AWSRegion_Eu_west_1 :: AWSRegion
- pattern AWSRegion_Eu_west_2 :: AWSRegion
- pattern AWSRegion_Eu_west_3 :: AWSRegion
- pattern AWSRegion_Me_south_1 :: AWSRegion
- pattern AWSRegion_Sa_east_1 :: AWSRegion
- pattern AWSRegion_Us_east_1 :: AWSRegion
- pattern AWSRegion_Us_east_2 :: AWSRegion
- pattern AWSRegion_Us_west_1 :: AWSRegion
- pattern AWSRegion_Us_west_2 :: AWSRegion
- newtype AdditionalArtifact where
- AdditionalArtifact' { }
- pattern AdditionalArtifact_ATHENA :: AdditionalArtifact
- pattern AdditionalArtifact_QUICKSIGHT :: AdditionalArtifact
- pattern AdditionalArtifact_REDSHIFT :: AdditionalArtifact
- newtype CompressionFormat where
- CompressionFormat' { }
- pattern CompressionFormat_GZIP :: CompressionFormat
- pattern CompressionFormat_Parquet :: CompressionFormat
- pattern CompressionFormat_ZIP :: CompressionFormat
- newtype ReportFormat where
- ReportFormat' { }
- pattern ReportFormat_Parquet :: ReportFormat
- pattern ReportFormat_TextORcsv :: ReportFormat
- newtype ReportVersioning where
- newtype SchemaElement where
- SchemaElement' { }
- pattern SchemaElement_RESOURCES :: SchemaElement
- newtype TimeUnit where
- TimeUnit' {
- fromTimeUnit :: Text
- pattern TimeUnit_DAILY :: TimeUnit
- pattern TimeUnit_HOURLY :: TimeUnit
- pattern TimeUnit_MONTHLY :: TimeUnit
- TimeUnit' {
- data ReportDefinition = ReportDefinition' (Maybe ReportVersioning) (Maybe Text) (Maybe [AdditionalArtifact]) (Maybe Bool) Text TimeUnit ReportFormat CompressionFormat [SchemaElement] Text Text AWSRegion
- newReportDefinition :: Text -> TimeUnit -> ReportFormat -> CompressionFormat -> Text -> Text -> AWSRegion -> ReportDefinition
Service Configuration
defaultService :: Service Source #
API version 2017-01-06
of the Amazon Cost and Usage Report Service SDK configuration.
Errors
Error matchers are designed for use with the functions provided by
Control.Exception.Lens.
This allows catching (and rethrowing) service specific errors returned
by CostAndUsageReport
.
ValidationException
_ValidationException :: AsError a => Getting (First ServiceError) a ServiceError Source #
The input fails to satisfy the constraints specified by an AWS service.
InternalErrorException
_InternalErrorException :: AsError a => Getting (First ServiceError) a ServiceError Source #
An error on the server occurred during the processing of your request. Try again later.
DuplicateReportNameException
_DuplicateReportNameException :: AsError a => Getting (First ServiceError) a ServiceError Source #
A report with the specified name already exists in the account. Specify a different report name.
ReportLimitReachedException
_ReportLimitReachedException :: AsError a => Getting (First ServiceError) a ServiceError Source #
This account already has five reports defined. To define a new report, you must delete an existing report.
Waiters
Waiters poll by repeatedly sending a request until some remote success condition
configured by the Wait
specification is fulfilled. The Wait
specification
determines how many attempts should be made, in addition to delay and retry strategies.
Operations
Some AWS operations return results that are incomplete and require subsequent
requests in order to obtain the entire result set. The process of sending
subsequent requests to continue where a previous request left off is called
pagination. For example, the ListObjects
operation of Amazon S3 returns up to
1000 objects at a time, and you must send subsequent requests with the
appropriate Marker in order to retrieve the next page of results.
Operations that have an AWSPager
instance can transparently perform subsequent
requests, correctly setting Markers and other request facets to iterate through
the entire result set of a truncated API operation. Operations which support
this have an additional note in the documentation.
Many operations have the ability to filter results on the server side. See the individual operation parameters for details.
PutReportDefinition
data PutReportDefinition Source #
Creates a Cost and Usage Report.
See: newPutReportDefinition
smart constructor.
Instances
newPutReportDefinition Source #
Create a value of PutReportDefinition
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:reportDefinition:PutReportDefinition'
, putReportDefinition_reportDefinition
- Represents the output of the PutReportDefinition operation. The content
consists of the detailed metadata and data file information.
data PutReportDefinitionResponse Source #
If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.
See: newPutReportDefinitionResponse
smart constructor.
Instances
newPutReportDefinitionResponse Source #
Create a value of PutReportDefinitionResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:httpStatus:PutReportDefinitionResponse'
, putReportDefinitionResponse_httpStatus
- The response's http status code.
DeleteReportDefinition
data DeleteReportDefinition Source #
Deletes the specified report.
See: newDeleteReportDefinition
smart constructor.
Instances
newDeleteReportDefinition :: DeleteReportDefinition Source #
Create a value of DeleteReportDefinition
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:reportName:DeleteReportDefinition'
, deleteReportDefinition_reportName
- The name of the report that you want to delete. The name must be unique,
is case sensitive, and can't include spaces.
data DeleteReportDefinitionResponse Source #
If the action is successful, the service sends back an HTTP 200 response.
See: newDeleteReportDefinitionResponse
smart constructor.
Instances
Eq DeleteReportDefinitionResponse Source # | |
Read DeleteReportDefinitionResponse Source # | |
Show DeleteReportDefinitionResponse Source # | |
Generic DeleteReportDefinitionResponse Source # | |
NFData DeleteReportDefinitionResponse Source # | |
Defined in Amazonka.CostAndUsageReport.DeleteReportDefinition rnf :: DeleteReportDefinitionResponse -> () # | |
type Rep DeleteReportDefinitionResponse Source # | |
Defined in Amazonka.CostAndUsageReport.DeleteReportDefinition type Rep DeleteReportDefinitionResponse = D1 ('MetaData "DeleteReportDefinitionResponse" "Amazonka.CostAndUsageReport.DeleteReportDefinition" "libZSservicesZSamazonka-curZSamazonka-cur" 'False) (C1 ('MetaCons "DeleteReportDefinitionResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "responseMessage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))) |
newDeleteReportDefinitionResponse Source #
Create a value of DeleteReportDefinitionResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:responseMessage:DeleteReportDefinitionResponse'
, deleteReportDefinitionResponse_responseMessage
- Undocumented member.
$sel:httpStatus:DeleteReportDefinitionResponse'
, deleteReportDefinitionResponse_httpStatus
- The response's http status code.
ModifyReportDefinition
data ModifyReportDefinition Source #
See: newModifyReportDefinition
smart constructor.
Instances
newModifyReportDefinition Source #
Create a value of ModifyReportDefinition
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:reportName:ModifyReportDefinition'
, modifyReportDefinition_reportName
- Undocumented member.
$sel:reportDefinition:ModifyReportDefinition'
, modifyReportDefinition_reportDefinition
- Undocumented member.
data ModifyReportDefinitionResponse Source #
See: newModifyReportDefinitionResponse
smart constructor.
Instances
Eq ModifyReportDefinitionResponse Source # | |
Read ModifyReportDefinitionResponse Source # | |
Show ModifyReportDefinitionResponse Source # | |
Generic ModifyReportDefinitionResponse Source # | |
NFData ModifyReportDefinitionResponse Source # | |
Defined in Amazonka.CostAndUsageReport.ModifyReportDefinition rnf :: ModifyReportDefinitionResponse -> () # | |
type Rep ModifyReportDefinitionResponse Source # | |
Defined in Amazonka.CostAndUsageReport.ModifyReportDefinition type Rep ModifyReportDefinitionResponse = D1 ('MetaData "ModifyReportDefinitionResponse" "Amazonka.CostAndUsageReport.ModifyReportDefinition" "libZSservicesZSamazonka-curZSamazonka-cur" 'False) (C1 ('MetaCons "ModifyReportDefinitionResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))) |
newModifyReportDefinitionResponse Source #
Create a value of ModifyReportDefinitionResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:httpStatus:ModifyReportDefinitionResponse'
, modifyReportDefinitionResponse_httpStatus
- The response's http status code.
DescribeReportDefinitions (Paginated)
data DescribeReportDefinitions Source #
Requests a list of AWS Cost and Usage reports owned by the account.
See: newDescribeReportDefinitions
smart constructor.
Instances
newDescribeReportDefinitions :: DescribeReportDefinitions Source #
Create a value of DescribeReportDefinitions
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:nextToken:DescribeReportDefinitions'
, describeReportDefinitions_nextToken
- Undocumented member.
$sel:maxResults:DescribeReportDefinitions'
, describeReportDefinitions_maxResults
- Undocumented member.
data DescribeReportDefinitionsResponse Source #
If the action is successful, the service sends back an HTTP 200 response.
See: newDescribeReportDefinitionsResponse
smart constructor.
Instances
newDescribeReportDefinitionsResponse Source #
Create a value of DescribeReportDefinitionsResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:nextToken:DescribeReportDefinitions'
, describeReportDefinitionsResponse_nextToken
- Undocumented member.
$sel:reportDefinitions:DescribeReportDefinitionsResponse'
, describeReportDefinitionsResponse_reportDefinitions
- A list of AWS Cost and Usage reports owned by the account.
$sel:httpStatus:DescribeReportDefinitionsResponse'
, describeReportDefinitionsResponse_httpStatus
- The response's http status code.
Types
AWSRegion
The region of the S3 bucket that AWS delivers the report into.
pattern AWSRegion_Af_south_1 :: AWSRegion | |
pattern AWSRegion_Ap_east_1 :: AWSRegion | |
pattern AWSRegion_Ap_northeast_1 :: AWSRegion | |
pattern AWSRegion_Ap_northeast_2 :: AWSRegion | |
pattern AWSRegion_Ap_northeast_3 :: AWSRegion | |
pattern AWSRegion_Ap_south_1 :: AWSRegion | |
pattern AWSRegion_Ap_southeast_1 :: AWSRegion | |
pattern AWSRegion_Ap_southeast_2 :: AWSRegion | |
pattern AWSRegion_Ca_central_1 :: AWSRegion | |
pattern AWSRegion_Cn_north_1 :: AWSRegion | |
pattern AWSRegion_Cn_northwest_1 :: AWSRegion | |
pattern AWSRegion_Eu_central_1 :: AWSRegion | |
pattern AWSRegion_Eu_north_1 :: AWSRegion | |
pattern AWSRegion_Eu_south_1 :: AWSRegion | |
pattern AWSRegion_Eu_west_1 :: AWSRegion | |
pattern AWSRegion_Eu_west_2 :: AWSRegion | |
pattern AWSRegion_Eu_west_3 :: AWSRegion | |
pattern AWSRegion_Me_south_1 :: AWSRegion | |
pattern AWSRegion_Sa_east_1 :: AWSRegion | |
pattern AWSRegion_Us_east_1 :: AWSRegion | |
pattern AWSRegion_Us_east_2 :: AWSRegion | |
pattern AWSRegion_Us_west_1 :: AWSRegion | |
pattern AWSRegion_Us_west_2 :: AWSRegion |
Instances
AdditionalArtifact
newtype AdditionalArtifact Source #
The types of manifest that you want AWS to create for this report.
pattern AdditionalArtifact_ATHENA :: AdditionalArtifact | |
pattern AdditionalArtifact_QUICKSIGHT :: AdditionalArtifact | |
pattern AdditionalArtifact_REDSHIFT :: AdditionalArtifact |
Instances
CompressionFormat
newtype CompressionFormat Source #
The compression format that AWS uses for the report.
pattern CompressionFormat_GZIP :: CompressionFormat | |
pattern CompressionFormat_Parquet :: CompressionFormat | |
pattern CompressionFormat_ZIP :: CompressionFormat |
Instances
ReportFormat
newtype ReportFormat Source #
The format that AWS saves the report in.
pattern ReportFormat_Parquet :: ReportFormat | |
pattern ReportFormat_TextORcsv :: ReportFormat |
Instances
ReportVersioning
newtype ReportVersioning Source #
pattern ReportVersioning_CREATE_NEW_REPORT :: ReportVersioning | |
pattern ReportVersioning_OVERWRITE_REPORT :: ReportVersioning |
Instances
SchemaElement
newtype SchemaElement Source #
Whether or not AWS includes resource IDs in the report.
pattern SchemaElement_RESOURCES :: SchemaElement |
Instances
TimeUnit
The length of time covered by the report.
pattern TimeUnit_DAILY :: TimeUnit | |
pattern TimeUnit_HOURLY :: TimeUnit | |
pattern TimeUnit_MONTHLY :: TimeUnit |
Instances
ReportDefinition
data ReportDefinition Source #
The definition of AWS Cost and Usage Report. You can specify the report name, time unit, report format, compression format, S3 bucket, additional artifacts, and schema elements in the definition.
See: newReportDefinition
smart constructor.
ReportDefinition' (Maybe ReportVersioning) (Maybe Text) (Maybe [AdditionalArtifact]) (Maybe Bool) Text TimeUnit ReportFormat CompressionFormat [SchemaElement] Text Text AWSRegion |
Instances
:: Text | |
-> TimeUnit | |
-> ReportFormat | |
-> CompressionFormat | |
-> Text | |
-> Text | |
-> AWSRegion | |
-> ReportDefinition |
Create a value of ReportDefinition
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:reportVersioning:ReportDefinition'
, reportDefinition_reportVersioning
- Whether you want Amazon Web Services to overwrite the previous version
of each report or to deliver the report in addition to the previous
versions.
$sel:billingViewArn:ReportDefinition'
, reportDefinition_billingViewArn
- The Amazon resource name of the billing view. You can get this value by
using the billing view service public APIs.
$sel:additionalArtifacts:ReportDefinition'
, reportDefinition_additionalArtifacts
- A list of manifests that you want Amazon Web Services to create for this
report.
$sel:refreshClosedReports:ReportDefinition'
, reportDefinition_refreshClosedReports
- Whether you want Amazon Web Services to update your reports after they
have been finalized if Amazon Web Services detects charges related to
previous months. These charges can include refunds, credits, or support
fees.
$sel:reportName:ReportDefinition'
, reportDefinition_reportName
- Undocumented member.
$sel:timeUnit:ReportDefinition'
, reportDefinition_timeUnit
- Undocumented member.
$sel:format:ReportDefinition'
, reportDefinition_format
- Undocumented member.
$sel:compression:ReportDefinition'
, reportDefinition_compression
- Undocumented member.
$sel:additionalSchemaElements:ReportDefinition'
, reportDefinition_additionalSchemaElements
- A list of strings that indicate additional content that Amazon Web
Services includes in the report, such as individual resource IDs.
$sel:s3Bucket:ReportDefinition'
, reportDefinition_s3Bucket
- Undocumented member.
$sel:s3Prefix:ReportDefinition'
, reportDefinition_s3Prefix
- Undocumented member.
$sel:s3Region:ReportDefinition'
, reportDefinition_s3Region
- Undocumented member.