costdetails

package
v0.20230307.1160632 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2023 License: MPL-2.0 Imports: 10 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/costdetails Documentation

The costdetails SDK allows for interaction with the Azure Resource Manager Service 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-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 := costdetails.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

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 BlobInfo

type BlobInfo struct {
	BlobLink  *string `json:"blobLink,omitempty"`
	ByteCount *int64  `json:"byteCount,omitempty"`
}

type CostDetailsClient

type CostDetailsClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewCostDetailsClientWithBaseURI

func NewCostDetailsClientWithBaseURI(endpoint string) CostDetailsClient

func (CostDetailsClient) GenerateCostDetailsReportCreateOperation

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"
)

type CostDetailsMetricType

type CostDetailsMetricType string
const (
	CostDetailsMetricTypeActualCost    CostDetailsMetricType = "ActualCost"
	CostDetailsMetricTypeAmortizedCost CostDetailsMetricType = "AmortizedCost"
)

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"
)

type CostDetailsTimePeriod

type CostDetailsTimePeriod struct {
	End   string `json:"end"`
	Start string `json:"start"`
}

type ErrorDetails

type ErrorDetails struct {
	Code    *string `json:"code,omitempty"`
	Message *string `json:"message,omitempty"`
}

type GenerateCostDetailsReportCreateOperationOperationResponse

type GenerateCostDetailsReportCreateOperationOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL