package costandusagereportservice
import "github.com/aws/aws-sdk-go-v2/service/costandusagereportservice"
Package costandusagereportservice provides the client and types for making API requests to AWS Cost and Usage Report Service.
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
See https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06 for more information on this service.
See costandusagereportservice package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/costandusagereportservice/
Using the Client
To use AWS Cost and Usage Report Service with the SDK use the New function to create a new service client. With that client you can make API requests to the service. These clients are safe to use concurrently.
See the SDK's documentation for more information on how to use the SDK. https://docs.aws.amazon.com/sdk-for-go/api/
See aws.Config documentation for more information on configuring SDK clients. https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
See the AWS Cost and Usage Report Service client for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/costandusagereportservice/#New
Index ¶
- Constants
- type AWSRegion
- func (enum AWSRegion) MarshalValue() (string, error)
- func (enum AWSRegion) MarshalValueBuf(b []byte) ([]byte, error)
- type AdditionalArtifact
- func (enum AdditionalArtifact) MarshalValue() (string, error)
- func (enum AdditionalArtifact) MarshalValueBuf(b []byte) ([]byte, error)
- type Client
- func New(config aws.Config) *Client
- func (c *Client) DeleteReportDefinitionRequest(input *DeleteReportDefinitionInput) DeleteReportDefinitionRequest
- func (c *Client) DescribeReportDefinitionsRequest(input *DescribeReportDefinitionsInput) DescribeReportDefinitionsRequest
- func (c *Client) ModifyReportDefinitionRequest(input *ModifyReportDefinitionInput) ModifyReportDefinitionRequest
- func (c *Client) PutReportDefinitionRequest(input *PutReportDefinitionInput) PutReportDefinitionRequest
- type CompressionFormat
- func (enum CompressionFormat) MarshalValue() (string, error)
- func (enum CompressionFormat) MarshalValueBuf(b []byte) ([]byte, error)
- type DeleteReportDefinitionInput
- type DeleteReportDefinitionOutput
- type DeleteReportDefinitionRequest
- type DeleteReportDefinitionResponse
- type DescribeReportDefinitionsInput
- func (s DescribeReportDefinitionsInput) String() string
- func (s *DescribeReportDefinitionsInput) Validate() error
- type DescribeReportDefinitionsOutput
- type DescribeReportDefinitionsPaginator
- func NewDescribeReportDefinitionsPaginator(req DescribeReportDefinitionsRequest) DescribeReportDefinitionsPaginator
- func (p *DescribeReportDefinitionsPaginator) CurrentPage() *DescribeReportDefinitionsOutput
- type DescribeReportDefinitionsRequest
- type DescribeReportDefinitionsResponse
- type ModifyReportDefinitionInput
- func (s ModifyReportDefinitionInput) String() string
- func (s *ModifyReportDefinitionInput) Validate() error
- type ModifyReportDefinitionOutput
- type ModifyReportDefinitionRequest
- type ModifyReportDefinitionResponse
- type PutReportDefinitionInput
- func (s PutReportDefinitionInput) String() string
- func (s *PutReportDefinitionInput) Validate() error
- type PutReportDefinitionOutput
- type PutReportDefinitionRequest
- type PutReportDefinitionResponse
- type ReportDefinition
- type ReportFormat
- func (enum ReportFormat) MarshalValue() (string, error)
- func (enum ReportFormat) MarshalValueBuf(b []byte) ([]byte, error)
- type ReportVersioning
- func (enum ReportVersioning) MarshalValue() (string, error)
- func (enum ReportVersioning) MarshalValueBuf(b []byte) ([]byte, error)
- type SchemaElement
- func (enum SchemaElement) MarshalValue() (string, error)
- func (enum SchemaElement) MarshalValueBuf(b []byte) ([]byte, error)
- type TimeUnit
Examples ¶
- Client.DeleteReportDefinitionRequest (Shared00)
- Client.DescribeReportDefinitionsRequest (Shared00)
- Client.PutReportDefinitionRequest (Shared00)
Constants ¶
const ( ServiceName = "AWS Cost and Usage Report Service" // Service's name ServiceID = "CostAndUsageReportService" // Service's identifier EndpointsID = "cur" // Service's Endpoint identifier )
const ( // ErrCodeDuplicateReportNameException for service response error code // "DuplicateReportNameException". // // A report with the specified name already exists in the account. Specify a // different report name. ErrCodeDuplicateReportNameException = "DuplicateReportNameException" // ErrCodeInternalErrorException for service response error code // "InternalErrorException". // // An error on the server occurred during the processing of your request. Try // again later. ErrCodeInternalErrorException = "InternalErrorException" // ErrCodeReportLimitReachedException for service response error code // "ReportLimitReachedException". // // This account already has five reports defined. To define a new report, you // must delete an existing report. ErrCodeReportLimitReachedException = "ReportLimitReachedException" // ErrCodeValidationException for service response error code // "ValidationException". // // The input fails to satisfy the constraints specified by an AWS service. ErrCodeValidationException = "ValidationException" )
Types ¶
type AWSRegion ¶
type AWSRegion string
The region of the S3 bucket that AWS delivers the report into.
const ( AWSRegionUsEast1 AWSRegion = "us-east-1" AWSRegionUsWest1 AWSRegion = "us-west-1" AWSRegionUsWest2 AWSRegion = "us-west-2" AWSRegionEuCentral1 AWSRegion = "eu-central-1" AWSRegionEuWest1 AWSRegion = "eu-west-1" AWSRegionApSoutheast1 AWSRegion = "ap-southeast-1" AWSRegionApSoutheast2 AWSRegion = "ap-southeast-2" AWSRegionApNortheast1 AWSRegion = "ap-northeast-1" AWSRegionEuNorth1 AWSRegion = "eu-north-1" AWSRegionApNortheast3 AWSRegion = "ap-northeast-3" AWSRegionApEast1 AWSRegion = "ap-east-1" )
Enum values for AWSRegion
func (AWSRegion) MarshalValue ¶
func (AWSRegion) MarshalValueBuf ¶
type AdditionalArtifact ¶
type AdditionalArtifact string
The types of manifest that you want AWS to create for this report.
const ( AdditionalArtifactRedshift AdditionalArtifact = "REDSHIFT" AdditionalArtifactQuicksight AdditionalArtifact = "QUICKSIGHT" AdditionalArtifactAthena AdditionalArtifact = "ATHENA" )
Enum values for AdditionalArtifact
func (AdditionalArtifact) MarshalValue ¶
func (enum AdditionalArtifact) MarshalValue() (string, error)
func (AdditionalArtifact) MarshalValueBuf ¶
func (enum AdditionalArtifact) MarshalValueBuf(b []byte) ([]byte, error)
type Client ¶
Client provides the API operation methods for making requests to AWS Cost and Usage Report Service. See this package's package overview docs for details on the service.
The client's methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.
func New ¶
New creates a new instance of the client from the provided Config.
Example:
// Create a client from just a config. svc := costandusagereportservice.New(myConfig)
func (*Client) DeleteReportDefinitionRequest ¶
func (c *Client) DeleteReportDefinitionRequest(input *DeleteReportDefinitionInput) DeleteReportDefinitionRequest
DeleteReportDefinitionRequest returns a request value for making API operation for AWS Cost and Usage Report Service.
Deletes the specified report.
// Example sending a request using DeleteReportDefinitionRequest. req := client.DeleteReportDefinitionRequest(params) resp, err := req.Send(context.TODO()) if err == nil { fmt.Println(resp) }
Please also see https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DeleteReportDefinition
To delete the AWS Cost and Usage report named ExampleReport.
The following example deletes the AWS Cost and Usage report named ExampleReport.
Code:play
Example (Shared00)¶
package main
import (
"context"
"fmt"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/aws/awserr"
"github.com/aws/aws-sdk-go-v2/aws/external"
"github.com/aws/aws-sdk-go-v2/service/costandusagereportservice"
)
func main() {
cfg, err := external.LoadDefaultAWSConfig()
if err != nil {
panic("failed to load config, " + err.Error())
}
svc := costandusagereportservice.New(cfg)
input := &costandusagereportservice.DeleteReportDefinitionInput{
ReportName: aws.String("ExampleReport"),
}
req := svc.DeleteReportDefinitionRequest(input)
result, err := req.Send(context.Background())
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case costandusagereportservice.ErrCodeInternalErrorException:
fmt.Println(costandusagereportservice.ErrCodeInternalErrorException, aerr.Error())
case costandusagereportservice.ErrCodeValidationException:
fmt.Println(costandusagereportservice.ErrCodeValidationException, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
func (*Client) DescribeReportDefinitionsRequest ¶
func (c *Client) DescribeReportDefinitionsRequest(input *DescribeReportDefinitionsInput) DescribeReportDefinitionsRequest
DescribeReportDefinitionsRequest returns a request value for making API operation for AWS Cost and Usage Report Service.
Lists the AWS Cost and Usage reports available to this account.
// Example sending a request using DescribeReportDefinitionsRequest. req := client.DescribeReportDefinitionsRequest(params) resp, err := req.Send(context.TODO()) if err == nil { fmt.Println(resp) }
Please also see https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DescribeReportDefinitions
To list the AWS Cost and Usage reports for the account.
The following example lists the AWS Cost and Usage reports for the account.
Code:play
Example (Shared00)¶
package main
import (
"context"
"fmt"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/aws/awserr"
"github.com/aws/aws-sdk-go-v2/aws/external"
"github.com/aws/aws-sdk-go-v2/service/costandusagereportservice"
)
func main() {
cfg, err := external.LoadDefaultAWSConfig()
if err != nil {
panic("failed to load config, " + err.Error())
}
svc := costandusagereportservice.New(cfg)
input := &costandusagereportservice.DescribeReportDefinitionsInput{
MaxResults: aws.Int64(5),
}
req := svc.DescribeReportDefinitionsRequest(input)
result, err := req.Send(context.Background())
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case costandusagereportservice.ErrCodeInternalErrorException:
fmt.Println(costandusagereportservice.ErrCodeInternalErrorException, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
func (*Client) ModifyReportDefinitionRequest ¶
func (c *Client) ModifyReportDefinitionRequest(input *ModifyReportDefinitionInput) ModifyReportDefinitionRequest
ModifyReportDefinitionRequest returns a request value for making API operation for AWS Cost and Usage Report Service.
Allows you to programatically update your report preferences.
// Example sending a request using ModifyReportDefinitionRequest. req := client.ModifyReportDefinitionRequest(params) resp, err := req.Send(context.TODO()) if err == nil { fmt.Println(resp) }
Please also see https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/ModifyReportDefinition
func (*Client) PutReportDefinitionRequest ¶
func (c *Client) PutReportDefinitionRequest(input *PutReportDefinitionInput) PutReportDefinitionRequest
PutReportDefinitionRequest returns a request value for making API operation for AWS Cost and Usage Report Service.
Creates a new report using the description that you provide.
// Example sending a request using PutReportDefinitionRequest. req := client.PutReportDefinitionRequest(params) resp, err := req.Send(context.TODO()) if err == nil { fmt.Println(resp) }
Please also see https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/PutReportDefinition
To create a report named ExampleReport.
The following example creates a AWS Cost and Usage report named ExampleReport.
Code:play
Example (Shared00)¶
package main
import (
"context"
"fmt"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/aws/awserr"
"github.com/aws/aws-sdk-go-v2/aws/external"
"github.com/aws/aws-sdk-go-v2/service/costandusagereportservice"
)
func main() {
cfg, err := external.LoadDefaultAWSConfig()
if err != nil {
panic("failed to load config, " + err.Error())
}
svc := costandusagereportservice.New(cfg)
input := &costandusagereportservice.PutReportDefinitionInput{
ReportDefinition: &costandusagereportservice.ReportDefinition{
AdditionalArtifacts: []costandusagereportservice.AdditionalArtifact{
costandusagereportservice.AdditionalArtifact("REDSHIFT"),
costandusagereportservice.AdditionalArtifact("QUICKSIGHT"),
},
AdditionalSchemaElements: []costandusagereportservice.SchemaElement{
costandusagereportservice.SchemaElement("RESOURCES"),
},
Compression: costandusagereportservice.CompressionFormatZip,
Format: costandusagereportservice.ReportFormatTextOrcsv,
ReportName: aws.String("ExampleReport"),
S3Bucket: aws.String("example-s3-bucket"),
S3Prefix: aws.String("exampleprefix"),
S3Region: costandusagereportservice.AWSRegionUsEast1,
TimeUnit: costandusagereportservice.TimeUnitDaily,
},
}
req := svc.PutReportDefinitionRequest(input)
result, err := req.Send(context.Background())
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case costandusagereportservice.ErrCodeDuplicateReportNameException:
fmt.Println(costandusagereportservice.ErrCodeDuplicateReportNameException, aerr.Error())
case costandusagereportservice.ErrCodeReportLimitReachedException:
fmt.Println(costandusagereportservice.ErrCodeReportLimitReachedException, aerr.Error())
case costandusagereportservice.ErrCodeInternalErrorException:
fmt.Println(costandusagereportservice.ErrCodeInternalErrorException, aerr.Error())
case costandusagereportservice.ErrCodeValidationException:
fmt.Println(costandusagereportservice.ErrCodeValidationException, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
type CompressionFormat ¶
type CompressionFormat string
The compression format that AWS uses for the report.
const ( CompressionFormatZip CompressionFormat = "ZIP" CompressionFormatGzip CompressionFormat = "GZIP" CompressionFormatParquet CompressionFormat = "Parquet" )
Enum values for CompressionFormat
func (CompressionFormat) MarshalValue ¶
func (enum CompressionFormat) MarshalValue() (string, error)
func (CompressionFormat) MarshalValueBuf ¶
func (enum CompressionFormat) MarshalValueBuf(b []byte) ([]byte, error)
type DeleteReportDefinitionInput ¶
type DeleteReportDefinitionInput struct { // The name of the report that you want to create. The name must be unique, // is case sensitive, and can't include spaces. ReportName *string `type:"string"` // contains filtered or unexported fields }
Deletes the specified report.
func (DeleteReportDefinitionInput) String ¶
func (s DeleteReportDefinitionInput) String() string
String returns the string representation
type DeleteReportDefinitionOutput ¶
type DeleteReportDefinitionOutput struct { // Whether the deletion was successful or not. ResponseMessage *string `type:"string"` // contains filtered or unexported fields }
If the action is successful, the service sends back an HTTP 200 response.
func (DeleteReportDefinitionOutput) String ¶
func (s DeleteReportDefinitionOutput) String() string
String returns the string representation
type DeleteReportDefinitionRequest ¶
type DeleteReportDefinitionRequest struct { *aws.Request Input *DeleteReportDefinitionInput Copy func(*DeleteReportDefinitionInput) DeleteReportDefinitionRequest }
DeleteReportDefinitionRequest is the request type for the DeleteReportDefinition API operation.
func (DeleteReportDefinitionRequest) Send ¶
func (r DeleteReportDefinitionRequest) Send(ctx context.Context) (*DeleteReportDefinitionResponse, error)
Send marshals and sends the DeleteReportDefinition API request.
type DeleteReportDefinitionResponse ¶
type DeleteReportDefinitionResponse struct { *DeleteReportDefinitionOutput // contains filtered or unexported fields }
DeleteReportDefinitionResponse is the response type for the DeleteReportDefinition API operation.
func (*DeleteReportDefinitionResponse) SDKResponseMetdata ¶
func (r *DeleteReportDefinitionResponse) SDKResponseMetdata() *aws.Response
SDKResponseMetdata returns the response metadata for the DeleteReportDefinition request.
type DescribeReportDefinitionsInput ¶
type DescribeReportDefinitionsInput struct { // The maximum number of results that AWS returns for the operation. MaxResults *int64 `min:"5" type:"integer"` // A generic string. NextToken *string `type:"string"` // contains filtered or unexported fields }
Requests a list of AWS Cost and Usage reports owned by the account.
func (DescribeReportDefinitionsInput) String ¶
func (s DescribeReportDefinitionsInput) String() string
String returns the string representation
func (*DescribeReportDefinitionsInput) Validate ¶
func (s *DescribeReportDefinitionsInput) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type DescribeReportDefinitionsOutput ¶
type DescribeReportDefinitionsOutput struct { // A generic string. NextToken *string `type:"string"` // A list of AWS Cost and Usage reports owned by the account. ReportDefinitions []ReportDefinition `type:"list"` // contains filtered or unexported fields }
If the action is successful, the service sends back an HTTP 200 response.
func (DescribeReportDefinitionsOutput) String ¶
func (s DescribeReportDefinitionsOutput) String() string
String returns the string representation
type DescribeReportDefinitionsPaginator ¶
DescribeReportDefinitionsPaginator is used to paginate the request. This can be done by calling Next and CurrentPage.
func NewDescribeReportDefinitionsPaginator ¶
func NewDescribeReportDefinitionsPaginator(req DescribeReportDefinitionsRequest) DescribeReportDefinitionsPaginator
NewDescribeReportDefinitionsRequestPaginator returns a paginator for DescribeReportDefinitions. Use Next method to get the next page, and CurrentPage to get the current response page from the paginator. Next will return false, if there are no more pages, or an error was encountered.
Note: This operation can generate multiple requests to a service.
// Example iterating over pages. req := client.DescribeReportDefinitionsRequest(input) p := costandusagereportservice.NewDescribeReportDefinitionsRequestPaginator(req) for p.Next(context.TODO()) { page := p.CurrentPage() } if err := p.Err(); err != nil { return err }
func (*DescribeReportDefinitionsPaginator) CurrentPage ¶
func (p *DescribeReportDefinitionsPaginator) CurrentPage() *DescribeReportDefinitionsOutput
type DescribeReportDefinitionsRequest ¶
type DescribeReportDefinitionsRequest struct { *aws.Request Input *DescribeReportDefinitionsInput Copy func(*DescribeReportDefinitionsInput) DescribeReportDefinitionsRequest }
DescribeReportDefinitionsRequest is the request type for the DescribeReportDefinitions API operation.
func (DescribeReportDefinitionsRequest) Send ¶
func (r DescribeReportDefinitionsRequest) Send(ctx context.Context) (*DescribeReportDefinitionsResponse, error)
Send marshals and sends the DescribeReportDefinitions API request.
type DescribeReportDefinitionsResponse ¶
type DescribeReportDefinitionsResponse struct { *DescribeReportDefinitionsOutput // contains filtered or unexported fields }
DescribeReportDefinitionsResponse is the response type for the DescribeReportDefinitions API operation.
func (*DescribeReportDefinitionsResponse) SDKResponseMetdata ¶
func (r *DescribeReportDefinitionsResponse) SDKResponseMetdata() *aws.Response
SDKResponseMetdata returns the response metadata for the DescribeReportDefinitions request.
type ModifyReportDefinitionInput ¶
type ModifyReportDefinitionInput struct { // 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. // // ReportDefinition is a required field ReportDefinition *ReportDefinition `type:"structure" required:"true"` // The name of the report that you want to create. The name must be unique, // is case sensitive, and can't include spaces. // // ReportName is a required field ReportName *string `type:"string" required:"true"` // contains filtered or unexported fields }
func (ModifyReportDefinitionInput) String ¶
func (s ModifyReportDefinitionInput) String() string
String returns the string representation
func (*ModifyReportDefinitionInput) Validate ¶
func (s *ModifyReportDefinitionInput) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type ModifyReportDefinitionOutput ¶
type ModifyReportDefinitionOutput struct {
// contains filtered or unexported fields
}
func (ModifyReportDefinitionOutput) String ¶
func (s ModifyReportDefinitionOutput) String() string
String returns the string representation
type ModifyReportDefinitionRequest ¶
type ModifyReportDefinitionRequest struct { *aws.Request Input *ModifyReportDefinitionInput Copy func(*ModifyReportDefinitionInput) ModifyReportDefinitionRequest }
ModifyReportDefinitionRequest is the request type for the ModifyReportDefinition API operation.
func (ModifyReportDefinitionRequest) Send ¶
func (r ModifyReportDefinitionRequest) Send(ctx context.Context) (*ModifyReportDefinitionResponse, error)
Send marshals and sends the ModifyReportDefinition API request.
type ModifyReportDefinitionResponse ¶
type ModifyReportDefinitionResponse struct { *ModifyReportDefinitionOutput // contains filtered or unexported fields }
ModifyReportDefinitionResponse is the response type for the ModifyReportDefinition API operation.
func (*ModifyReportDefinitionResponse) SDKResponseMetdata ¶
func (r *ModifyReportDefinitionResponse) SDKResponseMetdata() *aws.Response
SDKResponseMetdata returns the response metadata for the ModifyReportDefinition request.
type PutReportDefinitionInput ¶
type PutReportDefinitionInput struct { // Represents the output of the PutReportDefinition operation. The content consists // of the detailed metadata and data file information. // // ReportDefinition is a required field ReportDefinition *ReportDefinition `type:"structure" required:"true"` // contains filtered or unexported fields }
Creates a Cost and Usage Report.
func (PutReportDefinitionInput) String ¶
func (s PutReportDefinitionInput) String() string
String returns the string representation
func (*PutReportDefinitionInput) Validate ¶
func (s *PutReportDefinitionInput) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type PutReportDefinitionOutput ¶
type PutReportDefinitionOutput struct {
// contains filtered or unexported fields
}
If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.
func (PutReportDefinitionOutput) String ¶
func (s PutReportDefinitionOutput) String() string
String returns the string representation
type PutReportDefinitionRequest ¶
type PutReportDefinitionRequest struct { *aws.Request Input *PutReportDefinitionInput Copy func(*PutReportDefinitionInput) PutReportDefinitionRequest }
PutReportDefinitionRequest is the request type for the PutReportDefinition API operation.
func (PutReportDefinitionRequest) Send ¶
func (r PutReportDefinitionRequest) Send(ctx context.Context) (*PutReportDefinitionResponse, error)
Send marshals and sends the PutReportDefinition API request.
type PutReportDefinitionResponse ¶
type PutReportDefinitionResponse struct { *PutReportDefinitionOutput // contains filtered or unexported fields }
PutReportDefinitionResponse is the response type for the PutReportDefinition API operation.
func (*PutReportDefinitionResponse) SDKResponseMetdata ¶
func (r *PutReportDefinitionResponse) SDKResponseMetdata() *aws.Response
SDKResponseMetdata returns the response metadata for the PutReportDefinition request.
type ReportDefinition ¶
type ReportDefinition struct { // A list of manifests that you want Amazon Web Services to create for this // report. AdditionalArtifacts []AdditionalArtifact `type:"list"` // A list of strings that indicate additional content that Amazon Web Services // includes in the report, such as individual resource IDs. // // AdditionalSchemaElements is a required field AdditionalSchemaElements []SchemaElement `type:"list" required:"true"` // The compression format that AWS uses for the report. // // Compression is a required field Compression CompressionFormat `type:"string" required:"true" enum:"true"` // The format that AWS saves the report in. // // Format is a required field Format ReportFormat `type:"string" required:"true" enum:"true"` // 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. RefreshClosedReports *bool `type:"boolean"` // The name of the report that you want to create. The name must be unique, // is case sensitive, and can't include spaces. // // ReportName is a required field ReportName *string `type:"string" required:"true"` // 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. ReportVersioning ReportVersioning `type:"string" enum:"true"` // The S3 bucket where AWS delivers the report. // // S3Bucket is a required field S3Bucket *string `type:"string" required:"true"` // The prefix that AWS adds to the report name when AWS delivers the report. // Your prefix can't include spaces. // // S3Prefix is a required field S3Prefix *string `type:"string" required:"true"` // The region of the S3 bucket that AWS delivers the report into. // // S3Region is a required field S3Region AWSRegion `type:"string" required:"true" enum:"true"` // The length of time covered by the report. // // TimeUnit is a required field TimeUnit TimeUnit `type:"string" required:"true" enum:"true"` // contains filtered or unexported fields }
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.
func (ReportDefinition) String ¶
func (s ReportDefinition) String() string
String returns the string representation
func (*ReportDefinition) Validate ¶
func (s *ReportDefinition) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type ReportFormat ¶
type ReportFormat string
The format that AWS saves the report in.
const ( ReportFormatTextOrcsv ReportFormat = "textORcsv" ReportFormatParquet ReportFormat = "Parquet" )
Enum values for ReportFormat
func (ReportFormat) MarshalValue ¶
func (enum ReportFormat) MarshalValue() (string, error)
func (ReportFormat) MarshalValueBuf ¶
func (enum ReportFormat) MarshalValueBuf(b []byte) ([]byte, error)
type ReportVersioning ¶
type ReportVersioning string
const ( ReportVersioningCreateNewReport ReportVersioning = "CREATE_NEW_REPORT" ReportVersioningOverwriteReport ReportVersioning = "OVERWRITE_REPORT" )
Enum values for ReportVersioning
func (ReportVersioning) MarshalValue ¶
func (enum ReportVersioning) MarshalValue() (string, error)
func (ReportVersioning) MarshalValueBuf ¶
func (enum ReportVersioning) MarshalValueBuf(b []byte) ([]byte, error)
type SchemaElement ¶
type SchemaElement string
Whether or not AWS includes resource IDs in the report.
const ( SchemaElementResources SchemaElement = "RESOURCES" )
Enum values for SchemaElement
func (SchemaElement) MarshalValue ¶
func (enum SchemaElement) MarshalValue() (string, error)
func (SchemaElement) MarshalValueBuf ¶
func (enum SchemaElement) MarshalValueBuf(b []byte) ([]byte, error)
type TimeUnit ¶
type TimeUnit string
The length of time covered by the report.
Enum values for TimeUnit
func (TimeUnit) MarshalValue ¶
func (TimeUnit) MarshalValueBuf ¶
Source Files ¶
api_client.go api_doc.go api_enums.go api_errors.go api_op_DeleteReportDefinition.go api_op_DescribeReportDefinitions.go api_op_ModifyReportDefinition.go api_op_PutReportDefinition.go api_types.go
Directories ¶
Path | Synopsis |
---|---|
service/costandusagereportservice/costandusagereportserviceiface | Package costandusagereportserviceiface provides an interface to enable mocking the AWS Cost and Usage Report Service service client for testing your code. |
- Version
- v0.13.0
- Published
- Oct 2, 2019
- Platform
- js/wasm
- Imports
- 5 packages
- Last checked
- 8 seconds ago –
Tools for package owners.