Documentation ¶
Overview ¶
Package costandusagereportservice provides the client and types for making API requests to AWS Cost and Usage Report Service.
All public APIs for AWS Cost and Usage Report service ¶
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 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
- type AWSRegion
- type AdditionalArtifact
- type CompressionFormat
- type CostAndUsageReportService
- func (c *CostAndUsageReportService) DeleteReportDefinitionRequest(input *DeleteReportDefinitionInput) DeleteReportDefinitionRequest
- func (c *CostAndUsageReportService) DescribeReportDefinitionsPages(input *DescribeReportDefinitionsInput, ...) error
- func (c *CostAndUsageReportService) DescribeReportDefinitionsPagesWithContext(ctx aws.Context, input *DescribeReportDefinitionsInput, ...) error
- func (c *CostAndUsageReportService) DescribeReportDefinitionsRequest(input *DescribeReportDefinitionsInput) DescribeReportDefinitionsRequest
- func (c *CostAndUsageReportService) PutReportDefinitionRequest(input *PutReportDefinitionInput) PutReportDefinitionRequest
- type DeleteReportDefinitionInput
- type DeleteReportDefinitionOutput
- type DeleteReportDefinitionRequest
- 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) SDKResponseMetadata() aws.Response
- func (s *DescribeReportDefinitionsOutput) SetNextToken(v string) *DescribeReportDefinitionsOutput
- func (s *DescribeReportDefinitionsOutput) SetReportDefinitions(v []ReportDefinition) *DescribeReportDefinitionsOutput
- func (s DescribeReportDefinitionsOutput) String() string
- type DescribeReportDefinitionsRequest
- type PutReportDefinitionInput
- type PutReportDefinitionOutput
- type PutReportDefinitionRequest
- type ReportDefinition
- func (s ReportDefinition) GoString() string
- func (s *ReportDefinition) SetAdditionalArtifacts(v []AdditionalArtifact) *ReportDefinition
- func (s *ReportDefinition) SetAdditionalSchemaElements(v []SchemaElement) *ReportDefinition
- func (s *ReportDefinition) SetCompression(v CompressionFormat) *ReportDefinition
- func (s *ReportDefinition) SetFormat(v ReportFormat) *ReportDefinition
- func (s *ReportDefinition) SetReportName(v string) *ReportDefinition
- func (s *ReportDefinition) SetS3Bucket(v string) *ReportDefinition
- func (s *ReportDefinition) SetS3Prefix(v string) *ReportDefinition
- func (s *ReportDefinition) SetS3Region(v AWSRegion) *ReportDefinition
- func (s *ReportDefinition) SetTimeUnit(v TimeUnit) *ReportDefinition
- func (s ReportDefinition) String() string
- func (s *ReportDefinition) Validate() error
- type ReportFormat
- type SchemaElement
- type TimeUnit
Constants ¶
const ( // ErrCodeDuplicateReportNameException for service response error code // "DuplicateReportNameException". // // This exception is thrown when putting a report preference with a name that // already exists. ErrCodeDuplicateReportNameException = "DuplicateReportNameException" // ErrCodeInternalErrorException for service response error code // "InternalErrorException". // // This exception is thrown on a known dependency failure. ErrCodeInternalErrorException = "InternalErrorException" // ErrCodeReportLimitReachedException for service response error code // "ReportLimitReachedException". // // This exception is thrown when the number of report preference reaches max // limit. The max number is 5. ErrCodeReportLimitReachedException = "ReportLimitReachedException" // ErrCodeValidationException for service response error code // "ValidationException". // // This exception is thrown when providing an invalid input. eg. Put a report // preference with an invalid report name, or Delete a report preference with // an empty report name. ErrCodeValidationException = "ValidationException" )
const ( ServiceName = "cur" // Service endpoint prefix API calls made to. EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. )
Service information constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSRegion ¶
type AWSRegion string
Region of customer S3 bucket.
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" )
Enum values for AWSRegion
type AdditionalArtifact ¶
type AdditionalArtifact string
Enable support for Redshift and/or QuickSight.
const ( AdditionalArtifactRedshift AdditionalArtifact = "REDSHIFT" AdditionalArtifactQuicksight AdditionalArtifact = "QUICKSIGHT" )
Enum values for AdditionalArtifact
type CompressionFormat ¶
type CompressionFormat string
Preferred compression format for report.
const ( CompressionFormatZip CompressionFormat = "ZIP" CompressionFormatGzip CompressionFormat = "GZIP" )
Enum values for CompressionFormat
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(config aws.Config) *CostAndUsageReportService
New creates a new instance of the CostAndUsageReportService client with a config. If additional configuration is needed for the client instance use the optional aws.Config parameter to add your extra config.
Example:
// Create a CostAndUsageReportService client from just a config. svc := costandusagereportservice.New(myConfig) // Create a CostAndUsageReportService client with additional configuration svc := costandusagereportservice.New(myConfig, aws.NewConfig().WithRegion("us-west-2"))
func (*CostAndUsageReportService) DeleteReportDefinitionRequest ¶
func (c *CostAndUsageReportService) DeleteReportDefinitionRequest(input *DeleteReportDefinitionInput) DeleteReportDefinitionRequest
DeleteReportDefinitionRequest returns a request value for making API operation for AWS Cost and Usage Report Service.
Delete a specified report definition
// Example sending a request using the DeleteReportDefinitionRequest method. req := client.DeleteReportDefinitionRequest(params) resp, err := req.Send() if err == nil { fmt.Println(resp) }
Please also see https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DeleteReportDefinition
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 *DescribeReportDefinitionsOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })
func (*CostAndUsageReportService) DescribeReportDefinitionsPagesWithContext ¶
func (c *CostAndUsageReportService) DescribeReportDefinitionsPagesWithContext(ctx aws.Context, input *DescribeReportDefinitionsInput, fn func(*DescribeReportDefinitionsOutput, bool) bool, opts ...aws.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) DescribeReportDefinitionsRequest
DescribeReportDefinitionsRequest returns a request value for making API operation for AWS Cost and Usage Report Service.
Describe a list of report definitions owned by the account
// Example sending a request using the DescribeReportDefinitionsRequest method. req := client.DescribeReportDefinitionsRequest(params) resp, err := req.Send() if err == nil { fmt.Println(resp) }
Please also see https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DescribeReportDefinitions
func (*CostAndUsageReportService) PutReportDefinitionRequest ¶
func (c *CostAndUsageReportService) PutReportDefinitionRequest(input *PutReportDefinitionInput) PutReportDefinitionRequest
PutReportDefinitionRequest returns a request value for making API operation for AWS Cost and Usage Report Service.
Create a new report definition
// Example sending a request using the PutReportDefinitionRequest method. req := client.PutReportDefinitionRequest(params) resp, err := req.Send() if err == nil { fmt.Println(resp) }
Please also see https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/PutReportDefinition
type DeleteReportDefinitionInput ¶
type DeleteReportDefinitionInput struct { // Preferred name for a report, it has to be unique. Must starts with a number/letter, // case sensitive. Limited to 256 characters. ReportName *string `type:"string"` // contains filtered or unexported fields }
Request of DeleteReportDefinition Please also see https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DeleteReportDefinitionRequest
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 { // A message indicates if the deletion is successful. ResponseMessage *string `type:"string"` // contains filtered or unexported fields }
Response of DeleteReportDefinition Please also see https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DeleteReportDefinitionResponse
func (DeleteReportDefinitionOutput) GoString ¶
func (s DeleteReportDefinitionOutput) GoString() string
GoString returns the string representation
func (DeleteReportDefinitionOutput) SDKResponseMetadata ¶
func (s DeleteReportDefinitionOutput) SDKResponseMetadata() aws.Response
SDKResponseMetdata return sthe response metadata for the API.
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 DeleteReportDefinitionRequest ¶
type DeleteReportDefinitionRequest struct { *aws.Request Input *DeleteReportDefinitionInput }
DeleteReportDefinitionRequest is a API request type for the DeleteReportDefinition API operation.
func (DeleteReportDefinitionRequest) Send ¶
func (r DeleteReportDefinitionRequest) Send() (*DeleteReportDefinitionOutput, error)
Send marshals and sends the DeleteReportDefinition API request.
type DescribeReportDefinitionsInput ¶
type DescribeReportDefinitionsInput struct { // The max number of results returned by the operation. MaxResults *int64 `min:"5" type:"integer"` // A generic string. NextToken *string `type:"string"` // contains filtered or unexported fields }
Request of DescribeReportDefinitions Please also see https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DescribeReportDefinitionsRequest
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 report definitions. ReportDefinitions []ReportDefinition `type:"list"` // contains filtered or unexported fields }
Response of DescribeReportDefinitions Please also see https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DescribeReportDefinitionsResponse
func (DescribeReportDefinitionsOutput) GoString ¶
func (s DescribeReportDefinitionsOutput) GoString() string
GoString returns the string representation
func (DescribeReportDefinitionsOutput) SDKResponseMetadata ¶
func (s DescribeReportDefinitionsOutput) SDKResponseMetadata() aws.Response
SDKResponseMetdata return sthe response metadata for the API.
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 DescribeReportDefinitionsRequest ¶
type DescribeReportDefinitionsRequest struct { *aws.Request Input *DescribeReportDefinitionsInput }
DescribeReportDefinitionsRequest is a API request type for the DescribeReportDefinitions API operation.
func (DescribeReportDefinitionsRequest) Send ¶
func (r DescribeReportDefinitionsRequest) Send() (*DescribeReportDefinitionsOutput, error)
Send marshals and sends the DescribeReportDefinitions API request.
type PutReportDefinitionInput ¶
type PutReportDefinitionInput struct { // The definition of AWS Cost and Usage Report. Customer can specify the report // name, time unit, report format, compression format, S3 bucket and additional // artifacts and schema elements in the definition. // // ReportDefinition is a required field ReportDefinition *ReportDefinition `type:"structure" required:"true"` // contains filtered or unexported fields }
Request of PutReportDefinition Please also see https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/PutReportDefinitionRequest
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
}
Response of PutReportDefinition Please also see https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/PutReportDefinitionResponse
func (PutReportDefinitionOutput) GoString ¶
func (s PutReportDefinitionOutput) GoString() string
GoString returns the string representation
func (PutReportDefinitionOutput) SDKResponseMetadata ¶
func (s PutReportDefinitionOutput) SDKResponseMetadata() aws.Response
SDKResponseMetdata return sthe response metadata for the API.
func (PutReportDefinitionOutput) String ¶
func (s PutReportDefinitionOutput) String() string
String returns the string representation
type PutReportDefinitionRequest ¶
type PutReportDefinitionRequest struct { *aws.Request Input *PutReportDefinitionInput }
PutReportDefinitionRequest is a API request type for the PutReportDefinition API operation.
func (PutReportDefinitionRequest) Send ¶
func (r PutReportDefinitionRequest) Send() (*PutReportDefinitionOutput, error)
Send marshals and sends the PutReportDefinition API request.
type ReportDefinition ¶
type ReportDefinition struct { // A list of additional artifacts. AdditionalArtifacts []AdditionalArtifact `type:"list"` // A list of schema elements. // // AdditionalSchemaElements is a required field AdditionalSchemaElements []SchemaElement `type:"list" required:"true"` // Preferred compression format for report. // // Compression is a required field Compression CompressionFormat `type:"string" required:"true" enum:"true"` // Preferred format for report. // // Format is a required field Format ReportFormat `type:"string" required:"true" enum:"true"` // Preferred name for a report, it has to be unique. Must starts with a number/letter, // case sensitive. Limited to 256 characters. // // ReportName is a required field ReportName *string `type:"string" required:"true"` // Name of customer S3 bucket. // // S3Bucket is a required field S3Bucket *string `type:"string" required:"true"` // Preferred report path prefix. Limited to 256 characters. // // S3Prefix is a required field S3Prefix *string `type:"string" required:"true"` // Region of customer S3 bucket. // // S3Region is a required field S3Region AWSRegion `type:"string" required:"true" enum:"true"` // The frequency on which report data are measured and displayed. // // 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. Customer can specify the report name, time unit, report format, compression format, S3 bucket and additional artifacts and schema elements in the definition. Please also see https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/ReportDefinition
func (ReportDefinition) GoString ¶
func (s ReportDefinition) GoString() string
GoString returns the string representation
func (*ReportDefinition) SetAdditionalArtifacts ¶
func (s *ReportDefinition) SetAdditionalArtifacts(v []AdditionalArtifact) *ReportDefinition
SetAdditionalArtifacts sets the AdditionalArtifacts field's value.
func (*ReportDefinition) SetAdditionalSchemaElements ¶
func (s *ReportDefinition) SetAdditionalSchemaElements(v []SchemaElement) *ReportDefinition
SetAdditionalSchemaElements sets the AdditionalSchemaElements field's value.
func (*ReportDefinition) SetCompression ¶
func (s *ReportDefinition) SetCompression(v CompressionFormat) *ReportDefinition
SetCompression sets the Compression field's value.
func (*ReportDefinition) SetFormat ¶
func (s *ReportDefinition) SetFormat(v ReportFormat) *ReportDefinition
SetFormat sets the Format field's value.
func (*ReportDefinition) SetReportName ¶
func (s *ReportDefinition) SetReportName(v string) *ReportDefinition
SetReportName sets the ReportName 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 AWSRegion) *ReportDefinition
SetS3Region sets the S3Region field's value.
func (*ReportDefinition) SetTimeUnit ¶
func (s *ReportDefinition) SetTimeUnit(v TimeUnit) *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 ReportFormat ¶
type ReportFormat string
Preferred format for report.
const (
ReportFormatTextOrcsv ReportFormat = "textORcsv"
)
Enum values for ReportFormat
type SchemaElement ¶
type SchemaElement string
Preference of including Resource IDs. You can include additional details about individual resource IDs in your report.
const (
SchemaElementResources SchemaElement = "RESOURCES"
)
Enum values for SchemaElement
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. |