Documentation ¶
Overview ¶
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 contact 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 CostandUsageReportService for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/costandusagereportservice/#New
Index ¶
- Constants
- func AWSRegion_Values() []string
- func AdditionalArtifact_Values() []string
- func CompressionFormat_Values() []string
- func ReportFormat_Values() []string
- func ReportVersioning_Values() []string
- func SchemaElement_Values() []string
- func TimeUnit_Values() []string
- type CostandUsageReportService
- func (c *CostandUsageReportService) DeleteReportDefinition(input *DeleteReportDefinitionInput) (*DeleteReportDefinitionOutput, error)
- func (c *CostandUsageReportService) DeleteReportDefinitionRequest(input *DeleteReportDefinitionInput) (req *request.Request, output *DeleteReportDefinitionOutput)
- func (c *CostandUsageReportService) DeleteReportDefinitionWithContext(ctx aws.Context, input *DeleteReportDefinitionInput, opts ...request.Option) (*DeleteReportDefinitionOutput, error)
- func (c *CostandUsageReportService) DescribeReportDefinitions(input *DescribeReportDefinitionsInput) (*DescribeReportDefinitionsOutput, error)
- func (c *CostandUsageReportService) DescribeReportDefinitionsPages(input *DescribeReportDefinitionsInput, ...) error
- func (c *CostandUsageReportService) DescribeReportDefinitionsPagesWithContext(ctx aws.Context, input *DescribeReportDefinitionsInput, ...) error
- func (c *CostandUsageReportService) DescribeReportDefinitionsRequest(input *DescribeReportDefinitionsInput) (req *request.Request, output *DescribeReportDefinitionsOutput)
- func (c *CostandUsageReportService) DescribeReportDefinitionsWithContext(ctx aws.Context, input *DescribeReportDefinitionsInput, opts ...request.Option) (*DescribeReportDefinitionsOutput, error)
- func (c *CostandUsageReportService) ModifyReportDefinition(input *ModifyReportDefinitionInput) (*ModifyReportDefinitionOutput, error)
- func (c *CostandUsageReportService) ModifyReportDefinitionRequest(input *ModifyReportDefinitionInput) (req *request.Request, output *ModifyReportDefinitionOutput)
- func (c *CostandUsageReportService) ModifyReportDefinitionWithContext(ctx aws.Context, input *ModifyReportDefinitionInput, opts ...request.Option) (*ModifyReportDefinitionOutput, error)
- func (c *CostandUsageReportService) PutReportDefinition(input *PutReportDefinitionInput) (*PutReportDefinitionOutput, error)
- func (c *CostandUsageReportService) PutReportDefinitionRequest(input *PutReportDefinitionInput) (req *request.Request, output *PutReportDefinitionOutput)
- func (c *CostandUsageReportService) PutReportDefinitionWithContext(ctx aws.Context, input *PutReportDefinitionInput, opts ...request.Option) (*PutReportDefinitionOutput, error)
- type DeleteReportDefinitionInput
- type DeleteReportDefinitionOutput
- type DescribeReportDefinitionsInput
- func (s DescribeReportDefinitionsInput) GoString() string
- func (s *DescribeReportDefinitionsInput) SetMaxResults(v int64) *DescribeReportDefinitionsInput
- func (s *DescribeReportDefinitionsInput) SetNextToken(v string) *DescribeReportDefinitionsInput
- func (s DescribeReportDefinitionsInput) String() string
- func (s *DescribeReportDefinitionsInput) Validate() error
- type DescribeReportDefinitionsOutput
- func (s DescribeReportDefinitionsOutput) GoString() string
- func (s *DescribeReportDefinitionsOutput) SetNextToken(v string) *DescribeReportDefinitionsOutput
- func (s *DescribeReportDefinitionsOutput) SetReportDefinitions(v []*ReportDefinition) *DescribeReportDefinitionsOutput
- func (s DescribeReportDefinitionsOutput) String() string
- type DuplicateReportNameException
- func (s *DuplicateReportNameException) Code() string
- func (s *DuplicateReportNameException) Error() string
- func (s DuplicateReportNameException) GoString() string
- func (s *DuplicateReportNameException) Message() string
- func (s *DuplicateReportNameException) OrigErr() error
- func (s *DuplicateReportNameException) RequestID() string
- func (s *DuplicateReportNameException) StatusCode() int
- func (s DuplicateReportNameException) String() string
- type InternalErrorException
- func (s *InternalErrorException) Code() string
- func (s *InternalErrorException) Error() string
- func (s InternalErrorException) GoString() string
- func (s *InternalErrorException) Message() string
- func (s *InternalErrorException) OrigErr() error
- func (s *InternalErrorException) RequestID() string
- func (s *InternalErrorException) StatusCode() int
- func (s InternalErrorException) String() string
- type ModifyReportDefinitionInput
- func (s ModifyReportDefinitionInput) GoString() string
- func (s *ModifyReportDefinitionInput) SetReportDefinition(v *ReportDefinition) *ModifyReportDefinitionInput
- func (s *ModifyReportDefinitionInput) SetReportName(v string) *ModifyReportDefinitionInput
- func (s ModifyReportDefinitionInput) String() string
- func (s *ModifyReportDefinitionInput) Validate() error
- type ModifyReportDefinitionOutput
- type PutReportDefinitionInput
- type PutReportDefinitionOutput
- type ReportDefinition
- func (s ReportDefinition) GoString() string
- func (s *ReportDefinition) SetAdditionalArtifacts(v []*string) *ReportDefinition
- func (s *ReportDefinition) SetAdditionalSchemaElements(v []*string) *ReportDefinition
- func (s *ReportDefinition) SetBillingViewArn(v string) *ReportDefinition
- func (s *ReportDefinition) SetCompression(v string) *ReportDefinition
- func (s *ReportDefinition) SetFormat(v string) *ReportDefinition
- func (s *ReportDefinition) SetRefreshClosedReports(v bool) *ReportDefinition
- func (s *ReportDefinition) SetReportName(v string) *ReportDefinition
- func (s *ReportDefinition) SetReportVersioning(v string) *ReportDefinition
- func (s *ReportDefinition) SetS3Bucket(v string) *ReportDefinition
- func (s *ReportDefinition) SetS3Prefix(v string) *ReportDefinition
- func (s *ReportDefinition) SetS3Region(v string) *ReportDefinition
- func (s *ReportDefinition) SetTimeUnit(v string) *ReportDefinition
- func (s ReportDefinition) String() string
- func (s *ReportDefinition) Validate() error
- type ReportLimitReachedException
- func (s *ReportLimitReachedException) Code() string
- func (s *ReportLimitReachedException) Error() string
- func (s ReportLimitReachedException) GoString() string
- func (s *ReportLimitReachedException) Message() string
- func (s *ReportLimitReachedException) OrigErr() error
- func (s *ReportLimitReachedException) RequestID() string
- func (s *ReportLimitReachedException) StatusCode() int
- func (s ReportLimitReachedException) String() string
- type ValidationException
- func (s *ValidationException) Code() string
- func (s *ValidationException) Error() string
- func (s ValidationException) GoString() string
- func (s *ValidationException) Message() string
- func (s *ValidationException) OrigErr() error
- func (s *ValidationException) RequestID() string
- func (s *ValidationException) StatusCode() int
- func (s ValidationException) String() string
Examples ¶
Constants ¶
const ( // AWSRegionAfSouth1 is a AWSRegion enum value AWSRegionAfSouth1 = "af-south-1" // AWSRegionApEast1 is a AWSRegion enum value AWSRegionApEast1 = "ap-east-1" // AWSRegionApSouth1 is a AWSRegion enum value AWSRegionApSouth1 = "ap-south-1" // AWSRegionApSoutheast1 is a AWSRegion enum value AWSRegionApSoutheast1 = "ap-southeast-1" // AWSRegionApSoutheast2 is a AWSRegion enum value AWSRegionApSoutheast2 = "ap-southeast-2" // AWSRegionApNortheast1 is a AWSRegion enum value AWSRegionApNortheast1 = "ap-northeast-1" // AWSRegionApNortheast2 is a AWSRegion enum value AWSRegionApNortheast2 = "ap-northeast-2" // AWSRegionApNortheast3 is a AWSRegion enum value AWSRegionApNortheast3 = "ap-northeast-3" // AWSRegionCaCentral1 is a AWSRegion enum value AWSRegionCaCentral1 = "ca-central-1" // AWSRegionEuCentral1 is a AWSRegion enum value AWSRegionEuCentral1 = "eu-central-1" // AWSRegionEuWest1 is a AWSRegion enum value AWSRegionEuWest1 = "eu-west-1" // AWSRegionEuWest2 is a AWSRegion enum value AWSRegionEuWest2 = "eu-west-2" // AWSRegionEuWest3 is a AWSRegion enum value AWSRegionEuWest3 = "eu-west-3" // AWSRegionEuNorth1 is a AWSRegion enum value AWSRegionEuNorth1 = "eu-north-1" // AWSRegionEuSouth1 is a AWSRegion enum value AWSRegionEuSouth1 = "eu-south-1" // AWSRegionMeSouth1 is a AWSRegion enum value AWSRegionMeSouth1 = "me-south-1" // AWSRegionSaEast1 is a AWSRegion enum value AWSRegionSaEast1 = "sa-east-1" // AWSRegionUsEast1 is a AWSRegion enum value AWSRegionUsEast1 = "us-east-1" // AWSRegionUsEast2 is a AWSRegion enum value AWSRegionUsEast2 = "us-east-2" // AWSRegionUsWest1 is a AWSRegion enum value AWSRegionUsWest1 = "us-west-1" // AWSRegionUsWest2 is a AWSRegion enum value AWSRegionUsWest2 = "us-west-2" // AWSRegionCnNorth1 is a AWSRegion enum value AWSRegionCnNorth1 = "cn-north-1" // AWSRegionCnNorthwest1 is a AWSRegion enum value AWSRegionCnNorthwest1 = "cn-northwest-1" )
The region of the S3 bucket that AWS delivers the report into.
const ( // AdditionalArtifactRedshift is a AdditionalArtifact enum value AdditionalArtifactRedshift = "REDSHIFT" // AdditionalArtifactQuicksight is a AdditionalArtifact enum value AdditionalArtifactQuicksight = "QUICKSIGHT" // AdditionalArtifactAthena is a AdditionalArtifact enum value AdditionalArtifactAthena = "ATHENA" )
The types of manifest that you want AWS to create for this report.
const ( // CompressionFormatZip is a CompressionFormat enum value CompressionFormatZip = "ZIP" // CompressionFormatGzip is a CompressionFormat enum value CompressionFormatGzip = "GZIP" // CompressionFormatParquet is a CompressionFormat enum value CompressionFormatParquet = "Parquet" )
The compression format that AWS uses for the report.
const ( // ReportFormatTextOrcsv is a ReportFormat enum value ReportFormatTextOrcsv = "textORcsv" // ReportFormatParquet is a ReportFormat enum value ReportFormatParquet = "Parquet" )
The format that AWS saves the report in.
const ( // ReportVersioningCreateNewReport is a ReportVersioning enum value ReportVersioningCreateNewReport = "CREATE_NEW_REPORT" // ReportVersioningOverwriteReport is a ReportVersioning enum value ReportVersioningOverwriteReport = "OVERWRITE_REPORT" )
const ( // TimeUnitHourly is a TimeUnit enum value TimeUnitHourly = "HOURLY" // TimeUnitDaily is a TimeUnit enum value TimeUnitDaily = "DAILY" // TimeUnitMonthly is a TimeUnit enum value TimeUnitMonthly = "MONTHLY" )
The length of time covered by the report.
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" )
const ( ServiceName = "cur" // Name of service. EndpointsID = ServiceName // ID to lookup a service endpoint with. ServiceID = "Cost and Usage Report Service" // ServiceID is a unique identifier of a specific service. )
Service information constants
const (
// SchemaElementResources is a SchemaElement enum value
SchemaElementResources = "RESOURCES"
)
Whether or not AWS includes resource IDs in the report.
Variables ¶
This section is empty.
Functions ¶
func AWSRegion_Values ¶ added in v1.34.3
func AWSRegion_Values() []string
AWSRegion_Values returns all elements of the AWSRegion enum
func AdditionalArtifact_Values ¶ added in v1.34.3
func AdditionalArtifact_Values() []string
AdditionalArtifact_Values returns all elements of the AdditionalArtifact enum
func CompressionFormat_Values ¶ added in v1.34.3
func CompressionFormat_Values() []string
CompressionFormat_Values returns all elements of the CompressionFormat enum
func ReportFormat_Values ¶ added in v1.34.3
func ReportFormat_Values() []string
ReportFormat_Values returns all elements of the ReportFormat enum
func ReportVersioning_Values ¶ added in v1.34.3
func ReportVersioning_Values() []string
ReportVersioning_Values returns all elements of the ReportVersioning enum
func SchemaElement_Values ¶ added in v1.34.3
func SchemaElement_Values() []string
SchemaElement_Values returns all elements of the SchemaElement enum
func TimeUnit_Values ¶ added in v1.34.3
func TimeUnit_Values() []string
TimeUnit_Values returns all elements of the TimeUnit enum
Types ¶
type CostandUsageReportService ¶
CostandUsageReportService 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.
CostandUsageReportService methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.
func New ¶
func New(p client.ConfigProvider, cfgs ...*aws.Config) *CostandUsageReportService
New creates a new instance of the CostandUsageReportService client with a session. If additional configuration is needed for the client instance use the optional aws.Config parameter to add your extra config.
Example:
mySession := session.Must(session.NewSession()) // Create a CostandUsageReportService client from just a session. svc := costandusagereportservice.New(mySession) // Create a CostandUsageReportService client with additional configuration svc := costandusagereportservice.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func (*CostandUsageReportService) DeleteReportDefinition ¶
func (c *CostandUsageReportService) DeleteReportDefinition(input *DeleteReportDefinitionInput) (*DeleteReportDefinitionOutput, error)
DeleteReportDefinition API operation for AWS Cost and Usage Report Service.
Deletes the specified report.
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for AWS Cost and Usage Report Service's API operation DeleteReportDefinition for usage and error information.
Returned Error Types:
InternalErrorException An error on the server occurred during the processing of your request. Try again later.
ValidationException The input fails to satisfy the constraints specified by an AWS service.
See also, https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DeleteReportDefinition
func (*CostandUsageReportService) DeleteReportDefinitionRequest ¶
func (c *CostandUsageReportService) DeleteReportDefinitionRequest(input *DeleteReportDefinitionInput) (req *request.Request, output *DeleteReportDefinitionOutput)
DeleteReportDefinitionRequest generates a "aws/request.Request" representing the client's request for the DeleteReportDefinition operation. The "output" return value will be populated with the request's response once the request completes successfully.
Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.
See DeleteReportDefinition for more information on using the DeleteReportDefinition API call, and error handling.
This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.
// Example sending a request using the DeleteReportDefinitionRequest method. req, resp := client.DeleteReportDefinitionRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }
See also, https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DeleteReportDefinition
func (*CostandUsageReportService) DeleteReportDefinitionWithContext ¶ added in v1.8.0
func (c *CostandUsageReportService) DeleteReportDefinitionWithContext(ctx aws.Context, input *DeleteReportDefinitionInput, opts ...request.Option) (*DeleteReportDefinitionOutput, error)
DeleteReportDefinitionWithContext is the same as DeleteReportDefinition with the addition of the ability to pass a context and additional request options.
See DeleteReportDefinition for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
func (*CostandUsageReportService) DescribeReportDefinitions ¶
func (c *CostandUsageReportService) DescribeReportDefinitions(input *DescribeReportDefinitionsInput) (*DescribeReportDefinitionsOutput, error)
DescribeReportDefinitions API operation for AWS Cost and Usage Report Service.
Lists the AWS Cost and Usage reports available to this account.
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for AWS Cost and Usage Report Service's API operation DescribeReportDefinitions for usage and error information.
Returned Error Types:
- InternalErrorException An error on the server occurred during the processing of your request. Try again later.
See also, https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DescribeReportDefinitions
func (*CostandUsageReportService) DescribeReportDefinitionsPages ¶
func (c *CostandUsageReportService) DescribeReportDefinitionsPages(input *DescribeReportDefinitionsInput, fn func(*DescribeReportDefinitionsOutput, bool) bool) error
DescribeReportDefinitionsPages iterates over the pages of a DescribeReportDefinitions operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.
See DescribeReportDefinitions method for more information on how to use this operation.
Note: This operation can generate multiple requests to a service.
// Example iterating over at most 3 pages of a DescribeReportDefinitions operation. pageNum := 0 err := client.DescribeReportDefinitionsPages(params, func(page *costandusagereportservice.DescribeReportDefinitionsOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })
func (*CostandUsageReportService) DescribeReportDefinitionsPagesWithContext ¶ added in v1.8.0
func (c *CostandUsageReportService) DescribeReportDefinitionsPagesWithContext(ctx aws.Context, input *DescribeReportDefinitionsInput, fn func(*DescribeReportDefinitionsOutput, bool) bool, opts ...request.Option) error
DescribeReportDefinitionsPagesWithContext same as DescribeReportDefinitionsPages except it takes a Context and allows setting request options on the pages.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
func (*CostandUsageReportService) DescribeReportDefinitionsRequest ¶
func (c *CostandUsageReportService) DescribeReportDefinitionsRequest(input *DescribeReportDefinitionsInput) (req *request.Request, output *DescribeReportDefinitionsOutput)
DescribeReportDefinitionsRequest generates a "aws/request.Request" representing the client's request for the DescribeReportDefinitions operation. The "output" return value will be populated with the request's response once the request completes successfully.
Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.
See DescribeReportDefinitions for more information on using the DescribeReportDefinitions API call, and error handling.
This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.
// Example sending a request using the DescribeReportDefinitionsRequest method. req, resp := client.DescribeReportDefinitionsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }
See also, https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DescribeReportDefinitions
func (*CostandUsageReportService) DescribeReportDefinitionsWithContext ¶ added in v1.8.0
func (c *CostandUsageReportService) DescribeReportDefinitionsWithContext(ctx aws.Context, input *DescribeReportDefinitionsInput, opts ...request.Option) (*DescribeReportDefinitionsOutput, error)
DescribeReportDefinitionsWithContext is the same as DescribeReportDefinitions with the addition of the ability to pass a context and additional request options.
See DescribeReportDefinitions for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
func (*CostandUsageReportService) ModifyReportDefinition ¶ added in v1.23.4
func (c *CostandUsageReportService) ModifyReportDefinition(input *ModifyReportDefinitionInput) (*ModifyReportDefinitionOutput, error)
ModifyReportDefinition API operation for AWS Cost and Usage Report Service.
Allows you to programatically update your report preferences.
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for AWS Cost and Usage Report Service's API operation ModifyReportDefinition for usage and error information.
Returned Error Types:
InternalErrorException An error on the server occurred during the processing of your request. Try again later.
ValidationException The input fails to satisfy the constraints specified by an AWS service.
See also, https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/ModifyReportDefinition
func (*CostandUsageReportService) ModifyReportDefinitionRequest ¶ added in v1.23.4
func (c *CostandUsageReportService) ModifyReportDefinitionRequest(input *ModifyReportDefinitionInput) (req *request.Request, output *ModifyReportDefinitionOutput)
ModifyReportDefinitionRequest generates a "aws/request.Request" representing the client's request for the ModifyReportDefinition operation. The "output" return value will be populated with the request's response once the request completes successfully.
Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.
See ModifyReportDefinition for more information on using the ModifyReportDefinition API call, and error handling.
This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.
// Example sending a request using the ModifyReportDefinitionRequest method. req, resp := client.ModifyReportDefinitionRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }
See also, https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/ModifyReportDefinition
func (*CostandUsageReportService) ModifyReportDefinitionWithContext ¶ added in v1.23.4
func (c *CostandUsageReportService) ModifyReportDefinitionWithContext(ctx aws.Context, input *ModifyReportDefinitionInput, opts ...request.Option) (*ModifyReportDefinitionOutput, error)
ModifyReportDefinitionWithContext is the same as ModifyReportDefinition with the addition of the ability to pass a context and additional request options.
See ModifyReportDefinition for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
func (*CostandUsageReportService) PutReportDefinition ¶
func (c *CostandUsageReportService) PutReportDefinition(input *PutReportDefinitionInput) (*PutReportDefinitionOutput, error)
PutReportDefinition API operation for AWS Cost and Usage Report Service.
Creates a new report using the description that you provide.
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for AWS Cost and Usage Report Service's API operation PutReportDefinition for usage and error information.
Returned Error Types:
DuplicateReportNameException A report with the specified name already exists in the account. Specify a different report name.
ReportLimitReachedException This account already has five reports defined. To define a new report, you must delete an existing report.
InternalErrorException An error on the server occurred during the processing of your request. Try again later.
ValidationException The input fails to satisfy the constraints specified by an AWS service.
See also, https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/PutReportDefinition
func (*CostandUsageReportService) PutReportDefinitionRequest ¶
func (c *CostandUsageReportService) PutReportDefinitionRequest(input *PutReportDefinitionInput) (req *request.Request, output *PutReportDefinitionOutput)
PutReportDefinitionRequest generates a "aws/request.Request" representing the client's request for the PutReportDefinition operation. The "output" return value will be populated with the request's response once the request completes successfully.
Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.
See PutReportDefinition for more information on using the PutReportDefinition API call, and error handling.
This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.
// Example sending a request using the PutReportDefinitionRequest method. req, resp := client.PutReportDefinitionRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }
See also, https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/PutReportDefinition
func (*CostandUsageReportService) PutReportDefinitionWithContext ¶ added in v1.8.0
func (c *CostandUsageReportService) PutReportDefinitionWithContext(ctx aws.Context, input *PutReportDefinitionInput, opts ...request.Option) (*PutReportDefinitionOutput, error)
PutReportDefinitionWithContext is the same as PutReportDefinition with the addition of the ability to pass a context and additional request options.
See PutReportDefinition for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
type DeleteReportDefinitionInput ¶
type DeleteReportDefinitionInput struct { // The name of the report that you want to delete. 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) GoString ¶
func (s DeleteReportDefinitionInput) GoString() string
GoString returns the string representation
func (*DeleteReportDefinitionInput) SetReportName ¶
func (s *DeleteReportDefinitionInput) SetReportName(v string) *DeleteReportDefinitionInput
SetReportName sets the ReportName field's value.
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) GoString ¶
func (s DeleteReportDefinitionOutput) GoString() string
GoString returns the string representation
func (*DeleteReportDefinitionOutput) SetResponseMessage ¶
func (s *DeleteReportDefinitionOutput) SetResponseMessage(v string) *DeleteReportDefinitionOutput
SetResponseMessage sets the ResponseMessage field's value.
func (DeleteReportDefinitionOutput) String ¶
func (s DeleteReportDefinitionOutput) String() string
String returns the string representation
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) GoString ¶
func (s DescribeReportDefinitionsInput) GoString() string
GoString returns the string representation
func (*DescribeReportDefinitionsInput) SetMaxResults ¶
func (s *DescribeReportDefinitionsInput) SetMaxResults(v int64) *DescribeReportDefinitionsInput
SetMaxResults sets the MaxResults field's value.
func (*DescribeReportDefinitionsInput) SetNextToken ¶
func (s *DescribeReportDefinitionsInput) SetNextToken(v string) *DescribeReportDefinitionsInput
SetNextToken sets the NextToken field's value.
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) GoString ¶
func (s DescribeReportDefinitionsOutput) GoString() string
GoString returns the string representation
func (*DescribeReportDefinitionsOutput) SetNextToken ¶
func (s *DescribeReportDefinitionsOutput) SetNextToken(v string) *DescribeReportDefinitionsOutput
SetNextToken sets the NextToken field's value.
func (*DescribeReportDefinitionsOutput) SetReportDefinitions ¶
func (s *DescribeReportDefinitionsOutput) SetReportDefinitions(v []*ReportDefinition) *DescribeReportDefinitionsOutput
SetReportDefinitions sets the ReportDefinitions field's value.
func (DescribeReportDefinitionsOutput) String ¶
func (s DescribeReportDefinitionsOutput) String() string
String returns the string representation
type DuplicateReportNameException ¶ added in v1.28.0
type DuplicateReportNameException struct { RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message to show the detail of the exception. Message_ *string `locationName:"Message" type:"string"` // contains filtered or unexported fields }
A report with the specified name already exists in the account. Specify a different report name.
func (*DuplicateReportNameException) Code ¶ added in v1.28.0
func (s *DuplicateReportNameException) Code() string
Code returns the exception type name.
func (*DuplicateReportNameException) Error ¶ added in v1.28.0
func (s *DuplicateReportNameException) Error() string
func (DuplicateReportNameException) GoString ¶ added in v1.28.0
func (s DuplicateReportNameException) GoString() string
GoString returns the string representation
func (*DuplicateReportNameException) Message ¶ added in v1.28.0
func (s *DuplicateReportNameException) Message() string
Message returns the exception's message.
func (*DuplicateReportNameException) OrigErr ¶ added in v1.28.0
func (s *DuplicateReportNameException) OrigErr() error
OrigErr always returns nil, satisfies awserr.Error interface.
func (*DuplicateReportNameException) RequestID ¶ added in v1.28.0
func (s *DuplicateReportNameException) RequestID() string
RequestID returns the service's response RequestID for request.
func (*DuplicateReportNameException) StatusCode ¶ added in v1.28.0
func (s *DuplicateReportNameException) StatusCode() int
Status code returns the HTTP status code for the request's response error.
func (DuplicateReportNameException) String ¶ added in v1.28.0
func (s DuplicateReportNameException) String() string
String returns the string representation
type InternalErrorException ¶ added in v1.28.0
type InternalErrorException struct { RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message to show the detail of the exception. Message_ *string `locationName:"Message" type:"string"` // contains filtered or unexported fields }
An error on the server occurred during the processing of your request. Try again later.
func (*InternalErrorException) Code ¶ added in v1.28.0
func (s *InternalErrorException) Code() string
Code returns the exception type name.
func (*InternalErrorException) Error ¶ added in v1.28.0
func (s *InternalErrorException) Error() string
func (InternalErrorException) GoString ¶ added in v1.28.0
func (s InternalErrorException) GoString() string
GoString returns the string representation
func (*InternalErrorException) Message ¶ added in v1.28.0
func (s *InternalErrorException) Message() string
Message returns the exception's message.
func (*InternalErrorException) OrigErr ¶ added in v1.28.0
func (s *InternalErrorException) OrigErr() error
OrigErr always returns nil, satisfies awserr.Error interface.
func (*InternalErrorException) RequestID ¶ added in v1.28.0
func (s *InternalErrorException) RequestID() string
RequestID returns the service's response RequestID for request.
func (*InternalErrorException) StatusCode ¶ added in v1.28.0
func (s *InternalErrorException) StatusCode() int
Status code returns the HTTP status code for the request's response error.
func (InternalErrorException) String ¶ added in v1.28.0
func (s InternalErrorException) String() string
String returns the string representation
type ModifyReportDefinitionInput ¶ added in v1.23.4
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) GoString ¶ added in v1.23.4
func (s ModifyReportDefinitionInput) GoString() string
GoString returns the string representation
func (*ModifyReportDefinitionInput) SetReportDefinition ¶ added in v1.23.4
func (s *ModifyReportDefinitionInput) SetReportDefinition(v *ReportDefinition) *ModifyReportDefinitionInput
SetReportDefinition sets the ReportDefinition field's value.
func (*ModifyReportDefinitionInput) SetReportName ¶ added in v1.23.4
func (s *ModifyReportDefinitionInput) SetReportName(v string) *ModifyReportDefinitionInput
SetReportName sets the ReportName field's value.
func (ModifyReportDefinitionInput) String ¶ added in v1.23.4
func (s ModifyReportDefinitionInput) String() string
String returns the string representation
func (*ModifyReportDefinitionInput) Validate ¶ added in v1.23.4
func (s *ModifyReportDefinitionInput) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type ModifyReportDefinitionOutput ¶ added in v1.23.4
type ModifyReportDefinitionOutput struct {
// contains filtered or unexported fields
}
func (ModifyReportDefinitionOutput) GoString ¶ added in v1.23.4
func (s ModifyReportDefinitionOutput) GoString() string
GoString returns the string representation
func (ModifyReportDefinitionOutput) String ¶ added in v1.23.4
func (s ModifyReportDefinitionOutput) String() string
String returns the string representation
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) GoString ¶
func (s PutReportDefinitionInput) GoString() string
GoString returns the string representation
func (*PutReportDefinitionInput) SetReportDefinition ¶
func (s *PutReportDefinitionInput) SetReportDefinition(v *ReportDefinition) *PutReportDefinitionInput
SetReportDefinition sets the ReportDefinition field's value.
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) GoString ¶
func (s PutReportDefinitionOutput) GoString() string
GoString returns the string representation
func (PutReportDefinitionOutput) String ¶
func (s PutReportDefinitionOutput) String() string
String returns the string representation
type ReportDefinition ¶
type ReportDefinition struct { // A list of manifests that you want Amazon Web Services to create for this // report. AdditionalArtifacts []*string `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 []*string `type:"list" required:"true"` // The Amazon resource name of the billing view. You can get this value by using // the billing view service public APIs. BillingViewArn *string `type:"string"` // The compression format that AWS uses for the report. // // Compression is a required field Compression *string `type:"string" required:"true" enum:"CompressionFormat"` // The format that AWS saves the report in. // // Format is a required field Format *string `type:"string" required:"true" enum:"ReportFormat"` // 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 *string `type:"string" enum:"ReportVersioning"` // 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 *string `type:"string" required:"true" enum:"AWSRegion"` // The length of time covered by the report. // // TimeUnit is a required field TimeUnit *string `type:"string" required:"true" enum:"TimeUnit"` // 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) GoString ¶
func (s ReportDefinition) GoString() string
GoString returns the string representation
func (*ReportDefinition) SetAdditionalArtifacts ¶
func (s *ReportDefinition) SetAdditionalArtifacts(v []*string) *ReportDefinition
SetAdditionalArtifacts sets the AdditionalArtifacts field's value.
func (*ReportDefinition) SetAdditionalSchemaElements ¶
func (s *ReportDefinition) SetAdditionalSchemaElements(v []*string) *ReportDefinition
SetAdditionalSchemaElements sets the AdditionalSchemaElements field's value.
func (*ReportDefinition) SetBillingViewArn ¶ added in v1.37.30
func (s *ReportDefinition) SetBillingViewArn(v string) *ReportDefinition
SetBillingViewArn sets the BillingViewArn field's value.
func (*ReportDefinition) SetCompression ¶
func (s *ReportDefinition) SetCompression(v string) *ReportDefinition
SetCompression sets the Compression field's value.
func (*ReportDefinition) SetFormat ¶
func (s *ReportDefinition) SetFormat(v string) *ReportDefinition
SetFormat sets the Format field's value.
func (*ReportDefinition) SetRefreshClosedReports ¶ added in v1.17.6
func (s *ReportDefinition) SetRefreshClosedReports(v bool) *ReportDefinition
SetRefreshClosedReports sets the RefreshClosedReports field's value.
func (*ReportDefinition) SetReportName ¶
func (s *ReportDefinition) SetReportName(v string) *ReportDefinition
SetReportName sets the ReportName field's value.
func (*ReportDefinition) SetReportVersioning ¶ added in v1.17.6
func (s *ReportDefinition) SetReportVersioning(v string) *ReportDefinition
SetReportVersioning sets the ReportVersioning field's value.
func (*ReportDefinition) SetS3Bucket ¶
func (s *ReportDefinition) SetS3Bucket(v string) *ReportDefinition
SetS3Bucket sets the S3Bucket field's value.
func (*ReportDefinition) SetS3Prefix ¶
func (s *ReportDefinition) SetS3Prefix(v string) *ReportDefinition
SetS3Prefix sets the S3Prefix field's value.
func (*ReportDefinition) SetS3Region ¶
func (s *ReportDefinition) SetS3Region(v string) *ReportDefinition
SetS3Region sets the S3Region field's value.
func (*ReportDefinition) SetTimeUnit ¶
func (s *ReportDefinition) SetTimeUnit(v string) *ReportDefinition
SetTimeUnit sets the TimeUnit field's value.
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 ReportLimitReachedException ¶ added in v1.28.0
type ReportLimitReachedException struct { RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message to show the detail of the exception. Message_ *string `locationName:"Message" type:"string"` // contains filtered or unexported fields }
This account already has five reports defined. To define a new report, you must delete an existing report.
func (*ReportLimitReachedException) Code ¶ added in v1.28.0
func (s *ReportLimitReachedException) Code() string
Code returns the exception type name.
func (*ReportLimitReachedException) Error ¶ added in v1.28.0
func (s *ReportLimitReachedException) Error() string
func (ReportLimitReachedException) GoString ¶ added in v1.28.0
func (s ReportLimitReachedException) GoString() string
GoString returns the string representation
func (*ReportLimitReachedException) Message ¶ added in v1.28.0
func (s *ReportLimitReachedException) Message() string
Message returns the exception's message.
func (*ReportLimitReachedException) OrigErr ¶ added in v1.28.0
func (s *ReportLimitReachedException) OrigErr() error
OrigErr always returns nil, satisfies awserr.Error interface.
func (*ReportLimitReachedException) RequestID ¶ added in v1.28.0
func (s *ReportLimitReachedException) RequestID() string
RequestID returns the service's response RequestID for request.
func (*ReportLimitReachedException) StatusCode ¶ added in v1.28.0
func (s *ReportLimitReachedException) StatusCode() int
Status code returns the HTTP status code for the request's response error.
func (ReportLimitReachedException) String ¶ added in v1.28.0
func (s ReportLimitReachedException) String() string
String returns the string representation
type ValidationException ¶ added in v1.28.0
type ValidationException struct { RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message to show the detail of the exception. Message_ *string `locationName:"Message" type:"string"` // contains filtered or unexported fields }
The input fails to satisfy the constraints specified by an AWS service.
func (*ValidationException) Code ¶ added in v1.28.0
func (s *ValidationException) Code() string
Code returns the exception type name.
func (*ValidationException) Error ¶ added in v1.28.0
func (s *ValidationException) Error() string
func (ValidationException) GoString ¶ added in v1.28.0
func (s ValidationException) GoString() string
GoString returns the string representation
func (*ValidationException) Message ¶ added in v1.28.0
func (s *ValidationException) Message() string
Message returns the exception's message.
func (*ValidationException) OrigErr ¶ added in v1.28.0
func (s *ValidationException) OrigErr() error
OrigErr always returns nil, satisfies awserr.Error interface.
func (*ValidationException) RequestID ¶ added in v1.28.0
func (s *ValidationException) RequestID() string
RequestID returns the service's response RequestID for request.
func (*ValidationException) StatusCode ¶ added in v1.28.0
func (s *ValidationException) StatusCode() int
Status code returns the HTTP status code for the request's response error.
func (ValidationException) String ¶ added in v1.28.0
func (s ValidationException) String() string
String returns the string representation
Directories ¶
Path | Synopsis |
---|---|
Package costandusagereportserviceiface provides an interface to enable mocking the AWS Cost and Usage Report Service service client for testing your code.
|
Package costandusagereportserviceiface provides an interface to enable mocking the AWS Cost and Usage Report Service service client for testing your code. |