README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/costdetails
Documentation
The costdetails
SDK allows for interaction with Azure Resource Manager costmanagement
(API Version 2022-10-01
).
This readme covers example usages, but further information on using this SDK can be found in the project root.
Import Path
import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/costdetails"
Client Initialization
client := costdetails.NewCostDetailsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: CostDetailsClient.GenerateCostDetailsReportCreateOperation
ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")
payload := costdetails.GenerateCostDetailsReportRequestDefinition{
// ...
}
if err := client.GenerateCostDetailsReportCreateOperationThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Documentation ¶
Index ¶
- func PossibleValuesForCostDetailsDataFormat() []string
- func PossibleValuesForCostDetailsMetricType() []string
- func PossibleValuesForCostDetailsStatusType() []string
- type BlobInfo
- type CostDetailsClient
- func (c CostDetailsClient) GenerateCostDetailsReportCreateOperation(ctx context.Context, id commonids.ScopeId, ...) (result GenerateCostDetailsReportCreateOperationOperationResponse, err error)
- func (c CostDetailsClient) GenerateCostDetailsReportCreateOperationThenPoll(ctx context.Context, id commonids.ScopeId, ...) error
- type CostDetailsDataFormat
- type CostDetailsMetricType
- type CostDetailsOperationResults
- type CostDetailsStatusType
- type CostDetailsTimePeriod
- type ErrorDetails
- type GenerateCostDetailsReportCreateOperationOperationResponse
- type GenerateCostDetailsReportRequestDefinition
- type ReportManifest
- type RequestContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PossibleValuesForCostDetailsDataFormat ¶
func PossibleValuesForCostDetailsDataFormat() []string
func PossibleValuesForCostDetailsMetricType ¶
func PossibleValuesForCostDetailsMetricType() []string
func PossibleValuesForCostDetailsStatusType ¶
func PossibleValuesForCostDetailsStatusType() []string
Types ¶
type CostDetailsClient ¶
type CostDetailsClient struct {
Client *resourcemanager.Client
}
func NewCostDetailsClientWithBaseURI ¶
func NewCostDetailsClientWithBaseURI(sdkApi sdkEnv.Api) (*CostDetailsClient, error)
func (CostDetailsClient) GenerateCostDetailsReportCreateOperation ¶
func (c CostDetailsClient) GenerateCostDetailsReportCreateOperation(ctx context.Context, id commonids.ScopeId, input GenerateCostDetailsReportRequestDefinition) (result GenerateCostDetailsReportCreateOperationOperationResponse, err error)
GenerateCostDetailsReportCreateOperation ...
func (CostDetailsClient) GenerateCostDetailsReportCreateOperationThenPoll ¶
func (c CostDetailsClient) GenerateCostDetailsReportCreateOperationThenPoll(ctx context.Context, id commonids.ScopeId, input GenerateCostDetailsReportRequestDefinition) error
GenerateCostDetailsReportCreateOperationThenPoll performs GenerateCostDetailsReportCreateOperation then polls until it's completed
type CostDetailsDataFormat ¶
type CostDetailsDataFormat string
const (
CostDetailsDataFormatCsv CostDetailsDataFormat = "Csv"
)
func (*CostDetailsDataFormat) UnmarshalJSON ¶
func (s *CostDetailsDataFormat) UnmarshalJSON(bytes []byte) error
type CostDetailsMetricType ¶
type CostDetailsMetricType string
const ( CostDetailsMetricTypeActualCost CostDetailsMetricType = "ActualCost" CostDetailsMetricTypeAmortizedCost CostDetailsMetricType = "AmortizedCost" )
func (*CostDetailsMetricType) UnmarshalJSON ¶
func (s *CostDetailsMetricType) UnmarshalJSON(bytes []byte) error
type CostDetailsOperationResults ¶
type CostDetailsOperationResults struct { Error *ErrorDetails `json:"error,omitempty"` Id *string `json:"id,omitempty"` Manifest *ReportManifest `json:"manifest,omitempty"` Name *string `json:"name,omitempty"` Status *CostDetailsStatusType `json:"status,omitempty"` Type *string `json:"type,omitempty"` ValidTill *string `json:"validTill,omitempty"` }
func (*CostDetailsOperationResults) GetValidTillAsTime ¶
func (o *CostDetailsOperationResults) GetValidTillAsTime() (*time.Time, error)
func (*CostDetailsOperationResults) SetValidTillAsTime ¶
func (o *CostDetailsOperationResults) SetValidTillAsTime(input time.Time)
type CostDetailsStatusType ¶
type CostDetailsStatusType string
const ( CostDetailsStatusTypeCompleted CostDetailsStatusType = "Completed" CostDetailsStatusTypeFailed CostDetailsStatusType = "Failed" CostDetailsStatusTypeNoDataFound CostDetailsStatusType = "NoDataFound" )
func (*CostDetailsStatusType) UnmarshalJSON ¶
func (s *CostDetailsStatusType) UnmarshalJSON(bytes []byte) error
type CostDetailsTimePeriod ¶
type ErrorDetails ¶
type GenerateCostDetailsReportRequestDefinition ¶
type GenerateCostDetailsReportRequestDefinition struct { BillingPeriod *string `json:"billingPeriod,omitempty"` InvoiceId *string `json:"invoiceId,omitempty"` Metric *CostDetailsMetricType `json:"metric,omitempty"` TimePeriod *CostDetailsTimePeriod `json:"timePeriod,omitempty"` }
type ReportManifest ¶
type ReportManifest struct { BlobCount *int64 `json:"blobCount,omitempty"` Blobs *[]BlobInfo `json:"blobs,omitempty"` ByteCount *int64 `json:"byteCount,omitempty"` CompressData *bool `json:"compressData,omitempty"` DataFormat *CostDetailsDataFormat `json:"dataFormat,omitempty"` ManifestVersion *string `json:"manifestVersion,omitempty"` RequestContext *RequestContext `json:"requestContext,omitempty"` }
type RequestContext ¶
type RequestContext struct { RequestBody *GenerateCostDetailsReportRequestDefinition `json:"requestBody,omitempty"` RequestScope *string `json:"requestScope,omitempty"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.