Documentation ¶
Overview ¶
Package usagereportsv4 : Operations and models for the UsageReportsV4 service
Index ¶
- Constants
- func GetServiceURLForRegion(region string) (string, error)
- func UnmarshalAccountSummary(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalAccountUsage(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalDiscount(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalInstanceUsage(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalInstancesUsage(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalInstancesUsageFirst(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalInstancesUsageNext(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalMetric(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalOffer(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalOfferCredits(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalOrgUsage(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalPlan(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalResource(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalResourceGroupUsage(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalResourcesSummary(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalSubscription(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalSubscriptionSummary(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalSubscriptionTerm(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalSubscriptionTermCredits(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalSupportSummary(m map[string]json.RawMessage, result interface{}) (err error)
- type AccountSummary
- type AccountUsage
- type Discount
- type GetAccountSummaryOptions
- func (_options *GetAccountSummaryOptions) SetAccountID(accountID string) *GetAccountSummaryOptions
- func (_options *GetAccountSummaryOptions) SetBillingmonth(billingmonth string) *GetAccountSummaryOptions
- func (options *GetAccountSummaryOptions) SetHeaders(param map[string]string) *GetAccountSummaryOptions
- type GetAccountUsageOptions
- func (_options *GetAccountUsageOptions) SetAcceptLanguage(acceptLanguage string) *GetAccountUsageOptions
- func (_options *GetAccountUsageOptions) SetAccountID(accountID string) *GetAccountUsageOptions
- func (_options *GetAccountUsageOptions) SetBillingmonth(billingmonth string) *GetAccountUsageOptions
- func (options *GetAccountUsageOptions) SetHeaders(param map[string]string) *GetAccountUsageOptions
- func (_options *GetAccountUsageOptions) SetNames(names bool) *GetAccountUsageOptions
- type GetOrgUsageOptions
- func (_options *GetOrgUsageOptions) SetAcceptLanguage(acceptLanguage string) *GetOrgUsageOptions
- func (_options *GetOrgUsageOptions) SetAccountID(accountID string) *GetOrgUsageOptions
- func (_options *GetOrgUsageOptions) SetBillingmonth(billingmonth string) *GetOrgUsageOptions
- func (options *GetOrgUsageOptions) SetHeaders(param map[string]string) *GetOrgUsageOptions
- func (_options *GetOrgUsageOptions) SetNames(names bool) *GetOrgUsageOptions
- func (_options *GetOrgUsageOptions) SetOrganizationID(organizationID string) *GetOrgUsageOptions
- type GetResourceGroupUsageOptions
- func (_options *GetResourceGroupUsageOptions) SetAcceptLanguage(acceptLanguage string) *GetResourceGroupUsageOptions
- func (_options *GetResourceGroupUsageOptions) SetAccountID(accountID string) *GetResourceGroupUsageOptions
- func (_options *GetResourceGroupUsageOptions) SetBillingmonth(billingmonth string) *GetResourceGroupUsageOptions
- func (options *GetResourceGroupUsageOptions) SetHeaders(param map[string]string) *GetResourceGroupUsageOptions
- func (_options *GetResourceGroupUsageOptions) SetNames(names bool) *GetResourceGroupUsageOptions
- func (_options *GetResourceGroupUsageOptions) SetResourceGroupID(resourceGroupID string) *GetResourceGroupUsageOptions
- type GetResourceUsageAccountOptions
- func (_options *GetResourceUsageAccountOptions) SetAcceptLanguage(acceptLanguage string) *GetResourceUsageAccountOptions
- func (_options *GetResourceUsageAccountOptions) SetAccountID(accountID string) *GetResourceUsageAccountOptions
- func (_options *GetResourceUsageAccountOptions) SetBillingmonth(billingmonth string) *GetResourceUsageAccountOptions
- func (options *GetResourceUsageAccountOptions) SetHeaders(param map[string]string) *GetResourceUsageAccountOptions
- func (_options *GetResourceUsageAccountOptions) SetLimit(limit int64) *GetResourceUsageAccountOptions
- func (_options *GetResourceUsageAccountOptions) SetNames(names bool) *GetResourceUsageAccountOptions
- func (_options *GetResourceUsageAccountOptions) SetOrganizationID(organizationID string) *GetResourceUsageAccountOptions
- func (_options *GetResourceUsageAccountOptions) SetPlanID(planID string) *GetResourceUsageAccountOptions
- func (_options *GetResourceUsageAccountOptions) SetRegion(region string) *GetResourceUsageAccountOptions
- func (_options *GetResourceUsageAccountOptions) SetResourceGroupID(resourceGroupID string) *GetResourceUsageAccountOptions
- func (_options *GetResourceUsageAccountOptions) SetResourceID(resourceID string) *GetResourceUsageAccountOptions
- func (_options *GetResourceUsageAccountOptions) SetResourceInstanceID(resourceInstanceID string) *GetResourceUsageAccountOptions
- func (_options *GetResourceUsageAccountOptions) SetStart(start string) *GetResourceUsageAccountOptions
- type GetResourceUsageOrgOptions
- func (_options *GetResourceUsageOrgOptions) SetAcceptLanguage(acceptLanguage string) *GetResourceUsageOrgOptions
- func (_options *GetResourceUsageOrgOptions) SetAccountID(accountID string) *GetResourceUsageOrgOptions
- func (_options *GetResourceUsageOrgOptions) SetBillingmonth(billingmonth string) *GetResourceUsageOrgOptions
- func (options *GetResourceUsageOrgOptions) SetHeaders(param map[string]string) *GetResourceUsageOrgOptions
- func (_options *GetResourceUsageOrgOptions) SetLimit(limit int64) *GetResourceUsageOrgOptions
- func (_options *GetResourceUsageOrgOptions) SetNames(names bool) *GetResourceUsageOrgOptions
- func (_options *GetResourceUsageOrgOptions) SetOrganizationID(organizationID string) *GetResourceUsageOrgOptions
- func (_options *GetResourceUsageOrgOptions) SetPlanID(planID string) *GetResourceUsageOrgOptions
- func (_options *GetResourceUsageOrgOptions) SetRegion(region string) *GetResourceUsageOrgOptions
- func (_options *GetResourceUsageOrgOptions) SetResourceID(resourceID string) *GetResourceUsageOrgOptions
- func (_options *GetResourceUsageOrgOptions) SetResourceInstanceID(resourceInstanceID string) *GetResourceUsageOrgOptions
- func (_options *GetResourceUsageOrgOptions) SetStart(start string) *GetResourceUsageOrgOptions
- type GetResourceUsageResourceGroupOptions
- func (_options *GetResourceUsageResourceGroupOptions) SetAcceptLanguage(acceptLanguage string) *GetResourceUsageResourceGroupOptions
- func (_options *GetResourceUsageResourceGroupOptions) SetAccountID(accountID string) *GetResourceUsageResourceGroupOptions
- func (_options *GetResourceUsageResourceGroupOptions) SetBillingmonth(billingmonth string) *GetResourceUsageResourceGroupOptions
- func (options *GetResourceUsageResourceGroupOptions) SetHeaders(param map[string]string) *GetResourceUsageResourceGroupOptions
- func (_options *GetResourceUsageResourceGroupOptions) SetLimit(limit int64) *GetResourceUsageResourceGroupOptions
- func (_options *GetResourceUsageResourceGroupOptions) SetNames(names bool) *GetResourceUsageResourceGroupOptions
- func (_options *GetResourceUsageResourceGroupOptions) SetPlanID(planID string) *GetResourceUsageResourceGroupOptions
- func (_options *GetResourceUsageResourceGroupOptions) SetRegion(region string) *GetResourceUsageResourceGroupOptions
- func (_options *GetResourceUsageResourceGroupOptions) SetResourceGroupID(resourceGroupID string) *GetResourceUsageResourceGroupOptions
- func (_options *GetResourceUsageResourceGroupOptions) SetResourceID(resourceID string) *GetResourceUsageResourceGroupOptions
- func (_options *GetResourceUsageResourceGroupOptions) SetResourceInstanceID(resourceInstanceID string) *GetResourceUsageResourceGroupOptions
- func (_options *GetResourceUsageResourceGroupOptions) SetStart(start string) *GetResourceUsageResourceGroupOptions
- type InstanceUsage
- type InstancesUsage
- type InstancesUsageFirst
- type InstancesUsageNext
- type Metric
- type Offer
- type OfferCredits
- type OrgUsage
- type Plan
- type Resource
- type ResourceGroupUsage
- type ResourcesSummary
- type Subscription
- type SubscriptionSummary
- type SubscriptionTerm
- type SubscriptionTermCredits
- type SupportSummary
- type UsageReportsV4
- func (usageReports *UsageReportsV4) Clone() *UsageReportsV4
- func (usageReports *UsageReportsV4) DisableRetries()
- func (usageReports *UsageReportsV4) EnableRetries(maxRetries int, maxRetryInterval time.Duration)
- func (usageReports *UsageReportsV4) GetAccountSummary(getAccountSummaryOptions *GetAccountSummaryOptions) (result *AccountSummary, response *core.DetailedResponse, err error)
- func (usageReports *UsageReportsV4) GetAccountSummaryWithContext(ctx context.Context, getAccountSummaryOptions *GetAccountSummaryOptions) (result *AccountSummary, response *core.DetailedResponse, err error)
- func (usageReports *UsageReportsV4) GetAccountUsage(getAccountUsageOptions *GetAccountUsageOptions) (result *AccountUsage, response *core.DetailedResponse, err error)
- func (usageReports *UsageReportsV4) GetAccountUsageWithContext(ctx context.Context, getAccountUsageOptions *GetAccountUsageOptions) (result *AccountUsage, response *core.DetailedResponse, err error)
- func (usageReports *UsageReportsV4) GetEnableGzipCompression() bool
- func (usageReports *UsageReportsV4) GetOrgUsage(getOrgUsageOptions *GetOrgUsageOptions) (result *OrgUsage, response *core.DetailedResponse, err error)
- func (usageReports *UsageReportsV4) GetOrgUsageWithContext(ctx context.Context, getOrgUsageOptions *GetOrgUsageOptions) (result *OrgUsage, response *core.DetailedResponse, err error)
- func (usageReports *UsageReportsV4) GetResourceGroupUsage(getResourceGroupUsageOptions *GetResourceGroupUsageOptions) (result *ResourceGroupUsage, response *core.DetailedResponse, err error)
- func (usageReports *UsageReportsV4) GetResourceGroupUsageWithContext(ctx context.Context, ...) (result *ResourceGroupUsage, response *core.DetailedResponse, err error)
- func (usageReports *UsageReportsV4) GetResourceUsageAccount(getResourceUsageAccountOptions *GetResourceUsageAccountOptions) (result *InstancesUsage, response *core.DetailedResponse, err error)
- func (usageReports *UsageReportsV4) GetResourceUsageAccountWithContext(ctx context.Context, ...) (result *InstancesUsage, response *core.DetailedResponse, err error)
- func (usageReports *UsageReportsV4) GetResourceUsageOrg(getResourceUsageOrgOptions *GetResourceUsageOrgOptions) (result *InstancesUsage, response *core.DetailedResponse, err error)
- func (usageReports *UsageReportsV4) GetResourceUsageOrgWithContext(ctx context.Context, getResourceUsageOrgOptions *GetResourceUsageOrgOptions) (result *InstancesUsage, response *core.DetailedResponse, err error)
- func (usageReports *UsageReportsV4) GetResourceUsageResourceGroup(getResourceUsageResourceGroupOptions *GetResourceUsageResourceGroupOptions) (result *InstancesUsage, response *core.DetailedResponse, err error)
- func (usageReports *UsageReportsV4) GetResourceUsageResourceGroupWithContext(ctx context.Context, ...) (result *InstancesUsage, response *core.DetailedResponse, err error)
- func (usageReports *UsageReportsV4) GetServiceURL() string
- func (*UsageReportsV4) NewGetAccountSummaryOptions(accountID string, billingmonth string) *GetAccountSummaryOptions
- func (*UsageReportsV4) NewGetAccountUsageOptions(accountID string, billingmonth string) *GetAccountUsageOptions
- func (*UsageReportsV4) NewGetOrgUsageOptions(accountID string, organizationID string, billingmonth string) *GetOrgUsageOptions
- func (*UsageReportsV4) NewGetResourceGroupUsageOptions(accountID string, resourceGroupID string, billingmonth string) *GetResourceGroupUsageOptions
- func (*UsageReportsV4) NewGetResourceUsageAccountOptions(accountID string, billingmonth string) *GetResourceUsageAccountOptions
- func (*UsageReportsV4) NewGetResourceUsageOrgOptions(accountID string, organizationID string, billingmonth string) *GetResourceUsageOrgOptions
- func (*UsageReportsV4) NewGetResourceUsageResourceGroupOptions(accountID string, resourceGroupID string, billingmonth string) *GetResourceUsageResourceGroupOptions
- func (usageReports *UsageReportsV4) SetDefaultHeaders(headers http.Header)
- func (usageReports *UsageReportsV4) SetEnableGzipCompression(enableGzip bool)
- func (usageReports *UsageReportsV4) SetServiceURL(url string) error
- type UsageReportsV4Options
Constants ¶
const DefaultServiceName = "usage_reports"
DefaultServiceName is the default key used to find external configuration information.
const DefaultServiceURL = "https://billing.cloud.ibm.com"
DefaultServiceURL is the default URL to make service requests to.
Variables ¶
This section is empty.
Functions ¶
func GetServiceURLForRegion ¶ added in v0.17.2
GetServiceURLForRegion returns the service URL to be used for the specified region
func UnmarshalAccountSummary ¶
func UnmarshalAccountSummary(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalAccountSummary unmarshals an instance of AccountSummary from the specified map of raw messages.
func UnmarshalAccountUsage ¶
func UnmarshalAccountUsage(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalAccountUsage unmarshals an instance of AccountUsage from the specified map of raw messages.
func UnmarshalDiscount ¶
func UnmarshalDiscount(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalDiscount unmarshals an instance of Discount from the specified map of raw messages.
func UnmarshalInstanceUsage ¶
func UnmarshalInstanceUsage(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalInstanceUsage unmarshals an instance of InstanceUsage from the specified map of raw messages.
func UnmarshalInstancesUsage ¶
func UnmarshalInstancesUsage(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalInstancesUsage unmarshals an instance of InstancesUsage from the specified map of raw messages.
func UnmarshalInstancesUsageFirst ¶
func UnmarshalInstancesUsageFirst(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalInstancesUsageFirst unmarshals an instance of InstancesUsageFirst from the specified map of raw messages.
func UnmarshalInstancesUsageNext ¶
func UnmarshalInstancesUsageNext(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalInstancesUsageNext unmarshals an instance of InstancesUsageNext from the specified map of raw messages.
func UnmarshalMetric ¶
func UnmarshalMetric(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalMetric unmarshals an instance of Metric from the specified map of raw messages.
func UnmarshalOffer ¶
func UnmarshalOffer(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalOffer unmarshals an instance of Offer from the specified map of raw messages.
func UnmarshalOfferCredits ¶
func UnmarshalOfferCredits(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalOfferCredits unmarshals an instance of OfferCredits from the specified map of raw messages.
func UnmarshalOrgUsage ¶
func UnmarshalOrgUsage(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalOrgUsage unmarshals an instance of OrgUsage from the specified map of raw messages.
func UnmarshalPlan ¶
func UnmarshalPlan(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalPlan unmarshals an instance of Plan from the specified map of raw messages.
func UnmarshalResource ¶
func UnmarshalResource(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalResource unmarshals an instance of Resource from the specified map of raw messages.
func UnmarshalResourceGroupUsage ¶
func UnmarshalResourceGroupUsage(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalResourceGroupUsage unmarshals an instance of ResourceGroupUsage from the specified map of raw messages.
func UnmarshalResourcesSummary ¶
func UnmarshalResourcesSummary(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalResourcesSummary unmarshals an instance of ResourcesSummary from the specified map of raw messages.
func UnmarshalSubscription ¶
func UnmarshalSubscription(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalSubscription unmarshals an instance of Subscription from the specified map of raw messages.
func UnmarshalSubscriptionSummary ¶
func UnmarshalSubscriptionSummary(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalSubscriptionSummary unmarshals an instance of SubscriptionSummary from the specified map of raw messages.
func UnmarshalSubscriptionTerm ¶
func UnmarshalSubscriptionTerm(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalSubscriptionTerm unmarshals an instance of SubscriptionTerm from the specified map of raw messages.
func UnmarshalSubscriptionTermCredits ¶
func UnmarshalSubscriptionTermCredits(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalSubscriptionTermCredits unmarshals an instance of SubscriptionTermCredits from the specified map of raw messages.
func UnmarshalSupportSummary ¶
func UnmarshalSupportSummary(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalSupportSummary unmarshals an instance of SupportSummary from the specified map of raw messages.
Types ¶
type AccountSummary ¶
type AccountSummary struct { // The ID of the account. AccountID *string `json:"account_id" validate:"required"` // The month in which usages were incurred. Represented in yyyy-mm format. BillingMonth *string `json:"billing_month" validate:"required"` // Country. BillingCountryCode *string `json:"billing_country_code" validate:"required"` // The currency in which the account is billed. BillingCurrencyCode *string `json:"billing_currency_code" validate:"required"` // Charges related to cloud resources. Resources *ResourcesSummary `json:"resources" validate:"required"` // The list of offers applicable for the account for the month. Offers []Offer `json:"offers" validate:"required"` // Support-related charges. Support []SupportSummary `json:"support" validate:"required"` // A summary of charges and credits related to a subscription. Subscription *SubscriptionSummary `json:"subscription" validate:"required"` }
AccountSummary : A summary of charges and credits for an account.
type AccountUsage ¶
type AccountUsage struct { // The ID of the account. AccountID *string `json:"account_id" validate:"required"` // The target country pricing that should be used. PricingCountry *string `json:"pricing_country" validate:"required"` // The currency for the cost fields in the resources, plans and metrics. CurrencyCode *string `json:"currency_code" validate:"required"` // The month. Month *string `json:"month" validate:"required"` // All the resource used in the account. Resources []Resource `json:"resources" validate:"required"` }
AccountUsage : The aggregated usage and charges for all the plans in the account.
type Discount ¶
type Discount struct { // The reference ID of the discount. Ref *string `json:"ref" validate:"required"` // The name of the discount indicating category. Name *string `json:"name,omitempty"` // The name of the discount. DisplayName *string `json:"display_name,omitempty"` // The discount percentage. Discount *float64 `json:"discount" validate:"required"` }
Discount : Information about a discount that is associated with a metric.
type GetAccountSummaryOptions ¶
type GetAccountSummaryOptions struct { // Account ID for which the usage report is requested. AccountID *string `validate:"required,ne="` // The billing month for which the usage report is requested. Format is yyyy-mm. Billingmonth *string `validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string }
GetAccountSummaryOptions : The GetAccountSummary options.
func (*GetAccountSummaryOptions) SetAccountID ¶
func (_options *GetAccountSummaryOptions) SetAccountID(accountID string) *GetAccountSummaryOptions
SetAccountID : Allow user to set AccountID
func (*GetAccountSummaryOptions) SetBillingmonth ¶
func (_options *GetAccountSummaryOptions) SetBillingmonth(billingmonth string) *GetAccountSummaryOptions
SetBillingmonth : Allow user to set Billingmonth
func (*GetAccountSummaryOptions) SetHeaders ¶
func (options *GetAccountSummaryOptions) SetHeaders(param map[string]string) *GetAccountSummaryOptions
SetHeaders : Allow user to set Headers
type GetAccountUsageOptions ¶
type GetAccountUsageOptions struct { // Account ID for which the usage report is requested. AccountID *string `validate:"required,ne="` // The billing month for which the usage report is requested. Format is yyyy-mm. Billingmonth *string `validate:"required,ne="` // Include the name of every resource, plan, resource instance, organization, and resource group. Names *bool // Prioritize the names returned in the order of the specified languages. Language will default to English. AcceptLanguage *string // Allows users to set headers on API requests Headers map[string]string }
GetAccountUsageOptions : The GetAccountUsage options.
func (*GetAccountUsageOptions) SetAcceptLanguage ¶
func (_options *GetAccountUsageOptions) SetAcceptLanguage(acceptLanguage string) *GetAccountUsageOptions
SetAcceptLanguage : Allow user to set AcceptLanguage
func (*GetAccountUsageOptions) SetAccountID ¶
func (_options *GetAccountUsageOptions) SetAccountID(accountID string) *GetAccountUsageOptions
SetAccountID : Allow user to set AccountID
func (*GetAccountUsageOptions) SetBillingmonth ¶
func (_options *GetAccountUsageOptions) SetBillingmonth(billingmonth string) *GetAccountUsageOptions
SetBillingmonth : Allow user to set Billingmonth
func (*GetAccountUsageOptions) SetHeaders ¶
func (options *GetAccountUsageOptions) SetHeaders(param map[string]string) *GetAccountUsageOptions
SetHeaders : Allow user to set Headers
func (*GetAccountUsageOptions) SetNames ¶
func (_options *GetAccountUsageOptions) SetNames(names bool) *GetAccountUsageOptions
SetNames : Allow user to set Names
type GetOrgUsageOptions ¶
type GetOrgUsageOptions struct { // Account ID for which the usage report is requested. AccountID *string `validate:"required,ne="` // ID of the organization. OrganizationID *string `validate:"required,ne="` // The billing month for which the usage report is requested. Format is yyyy-mm. Billingmonth *string `validate:"required,ne="` // Include the name of every resource, plan, resource instance, organization, and resource group. Names *bool // Prioritize the names returned in the order of the specified languages. Language will default to English. AcceptLanguage *string // Allows users to set headers on API requests Headers map[string]string }
GetOrgUsageOptions : The GetOrgUsage options.
func (*GetOrgUsageOptions) SetAcceptLanguage ¶
func (_options *GetOrgUsageOptions) SetAcceptLanguage(acceptLanguage string) *GetOrgUsageOptions
SetAcceptLanguage : Allow user to set AcceptLanguage
func (*GetOrgUsageOptions) SetAccountID ¶
func (_options *GetOrgUsageOptions) SetAccountID(accountID string) *GetOrgUsageOptions
SetAccountID : Allow user to set AccountID
func (*GetOrgUsageOptions) SetBillingmonth ¶
func (_options *GetOrgUsageOptions) SetBillingmonth(billingmonth string) *GetOrgUsageOptions
SetBillingmonth : Allow user to set Billingmonth
func (*GetOrgUsageOptions) SetHeaders ¶
func (options *GetOrgUsageOptions) SetHeaders(param map[string]string) *GetOrgUsageOptions
SetHeaders : Allow user to set Headers
func (*GetOrgUsageOptions) SetNames ¶
func (_options *GetOrgUsageOptions) SetNames(names bool) *GetOrgUsageOptions
SetNames : Allow user to set Names
func (*GetOrgUsageOptions) SetOrganizationID ¶
func (_options *GetOrgUsageOptions) SetOrganizationID(organizationID string) *GetOrgUsageOptions
SetOrganizationID : Allow user to set OrganizationID
type GetResourceGroupUsageOptions ¶
type GetResourceGroupUsageOptions struct { // Account ID for which the usage report is requested. AccountID *string `validate:"required,ne="` // Resource group for which the usage report is requested. ResourceGroupID *string `validate:"required,ne="` // The billing month for which the usage report is requested. Format is yyyy-mm. Billingmonth *string `validate:"required,ne="` // Include the name of every resource, plan, resource instance, organization, and resource group. Names *bool // Prioritize the names returned in the order of the specified languages. Language will default to English. AcceptLanguage *string // Allows users to set headers on API requests Headers map[string]string }
GetResourceGroupUsageOptions : The GetResourceGroupUsage options.
func (*GetResourceGroupUsageOptions) SetAcceptLanguage ¶
func (_options *GetResourceGroupUsageOptions) SetAcceptLanguage(acceptLanguage string) *GetResourceGroupUsageOptions
SetAcceptLanguage : Allow user to set AcceptLanguage
func (*GetResourceGroupUsageOptions) SetAccountID ¶
func (_options *GetResourceGroupUsageOptions) SetAccountID(accountID string) *GetResourceGroupUsageOptions
SetAccountID : Allow user to set AccountID
func (*GetResourceGroupUsageOptions) SetBillingmonth ¶
func (_options *GetResourceGroupUsageOptions) SetBillingmonth(billingmonth string) *GetResourceGroupUsageOptions
SetBillingmonth : Allow user to set Billingmonth
func (*GetResourceGroupUsageOptions) SetHeaders ¶
func (options *GetResourceGroupUsageOptions) SetHeaders(param map[string]string) *GetResourceGroupUsageOptions
SetHeaders : Allow user to set Headers
func (*GetResourceGroupUsageOptions) SetNames ¶
func (_options *GetResourceGroupUsageOptions) SetNames(names bool) *GetResourceGroupUsageOptions
SetNames : Allow user to set Names
func (*GetResourceGroupUsageOptions) SetResourceGroupID ¶
func (_options *GetResourceGroupUsageOptions) SetResourceGroupID(resourceGroupID string) *GetResourceGroupUsageOptions
SetResourceGroupID : Allow user to set ResourceGroupID
type GetResourceUsageAccountOptions ¶
type GetResourceUsageAccountOptions struct { // Account ID for which the usage report is requested. AccountID *string `validate:"required,ne="` // The billing month for which the usage report is requested. Format is yyyy-mm. Billingmonth *string `validate:"required,ne="` // Include the name of every resource, plan, resource instance, organization, and resource group. Names *bool // Prioritize the names returned in the order of the specified languages. Language will default to English. AcceptLanguage *string // Number of usage records returned. The default value is 10. Maximum value is 20. Limit *int64 // The offset from which the records must be fetched. Offset information is included in the response. Start *string // Filter by resource group. ResourceGroupID *string // Filter by organization_id. OrganizationID *string // Filter by resource instance_id. ResourceInstanceID *string // Filter by resource_id. ResourceID *string // Filter by plan_id. PlanID *string // Region in which the resource instance is provisioned. Region *string // Allows users to set headers on API requests Headers map[string]string }
GetResourceUsageAccountOptions : The GetResourceUsageAccount options.
func (*GetResourceUsageAccountOptions) SetAcceptLanguage ¶
func (_options *GetResourceUsageAccountOptions) SetAcceptLanguage(acceptLanguage string) *GetResourceUsageAccountOptions
SetAcceptLanguage : Allow user to set AcceptLanguage
func (*GetResourceUsageAccountOptions) SetAccountID ¶
func (_options *GetResourceUsageAccountOptions) SetAccountID(accountID string) *GetResourceUsageAccountOptions
SetAccountID : Allow user to set AccountID
func (*GetResourceUsageAccountOptions) SetBillingmonth ¶
func (_options *GetResourceUsageAccountOptions) SetBillingmonth(billingmonth string) *GetResourceUsageAccountOptions
SetBillingmonth : Allow user to set Billingmonth
func (*GetResourceUsageAccountOptions) SetHeaders ¶
func (options *GetResourceUsageAccountOptions) SetHeaders(param map[string]string) *GetResourceUsageAccountOptions
SetHeaders : Allow user to set Headers
func (*GetResourceUsageAccountOptions) SetLimit ¶
func (_options *GetResourceUsageAccountOptions) SetLimit(limit int64) *GetResourceUsageAccountOptions
SetLimit : Allow user to set Limit
func (*GetResourceUsageAccountOptions) SetNames ¶
func (_options *GetResourceUsageAccountOptions) SetNames(names bool) *GetResourceUsageAccountOptions
SetNames : Allow user to set Names
func (*GetResourceUsageAccountOptions) SetOrganizationID ¶
func (_options *GetResourceUsageAccountOptions) SetOrganizationID(organizationID string) *GetResourceUsageAccountOptions
SetOrganizationID : Allow user to set OrganizationID
func (*GetResourceUsageAccountOptions) SetPlanID ¶
func (_options *GetResourceUsageAccountOptions) SetPlanID(planID string) *GetResourceUsageAccountOptions
SetPlanID : Allow user to set PlanID
func (*GetResourceUsageAccountOptions) SetRegion ¶
func (_options *GetResourceUsageAccountOptions) SetRegion(region string) *GetResourceUsageAccountOptions
SetRegion : Allow user to set Region
func (*GetResourceUsageAccountOptions) SetResourceGroupID ¶
func (_options *GetResourceUsageAccountOptions) SetResourceGroupID(resourceGroupID string) *GetResourceUsageAccountOptions
SetResourceGroupID : Allow user to set ResourceGroupID
func (*GetResourceUsageAccountOptions) SetResourceID ¶
func (_options *GetResourceUsageAccountOptions) SetResourceID(resourceID string) *GetResourceUsageAccountOptions
SetResourceID : Allow user to set ResourceID
func (*GetResourceUsageAccountOptions) SetResourceInstanceID ¶
func (_options *GetResourceUsageAccountOptions) SetResourceInstanceID(resourceInstanceID string) *GetResourceUsageAccountOptions
SetResourceInstanceID : Allow user to set ResourceInstanceID
func (*GetResourceUsageAccountOptions) SetStart ¶
func (_options *GetResourceUsageAccountOptions) SetStart(start string) *GetResourceUsageAccountOptions
SetStart : Allow user to set Start
type GetResourceUsageOrgOptions ¶
type GetResourceUsageOrgOptions struct { // Account ID for which the usage report is requested. AccountID *string `validate:"required,ne="` // ID of the organization. OrganizationID *string `validate:"required,ne="` // The billing month for which the usage report is requested. Format is yyyy-mm. Billingmonth *string `validate:"required,ne="` // Include the name of every resource, plan, resource instance, organization, and resource group. Names *bool // Prioritize the names returned in the order of the specified languages. Language will default to English. AcceptLanguage *string // Number of usage records returned. The default value is 10. Maximum value is 20. Limit *int64 // The offset from which the records must be fetched. Offset information is included in the response. Start *string // Filter by resource instance id. ResourceInstanceID *string // Filter by resource_id. ResourceID *string // Filter by plan_id. PlanID *string // Region in which the resource instance is provisioned. Region *string // Allows users to set headers on API requests Headers map[string]string }
GetResourceUsageOrgOptions : The GetResourceUsageOrg options.
func (*GetResourceUsageOrgOptions) SetAcceptLanguage ¶
func (_options *GetResourceUsageOrgOptions) SetAcceptLanguage(acceptLanguage string) *GetResourceUsageOrgOptions
SetAcceptLanguage : Allow user to set AcceptLanguage
func (*GetResourceUsageOrgOptions) SetAccountID ¶
func (_options *GetResourceUsageOrgOptions) SetAccountID(accountID string) *GetResourceUsageOrgOptions
SetAccountID : Allow user to set AccountID
func (*GetResourceUsageOrgOptions) SetBillingmonth ¶
func (_options *GetResourceUsageOrgOptions) SetBillingmonth(billingmonth string) *GetResourceUsageOrgOptions
SetBillingmonth : Allow user to set Billingmonth
func (*GetResourceUsageOrgOptions) SetHeaders ¶
func (options *GetResourceUsageOrgOptions) SetHeaders(param map[string]string) *GetResourceUsageOrgOptions
SetHeaders : Allow user to set Headers
func (*GetResourceUsageOrgOptions) SetLimit ¶
func (_options *GetResourceUsageOrgOptions) SetLimit(limit int64) *GetResourceUsageOrgOptions
SetLimit : Allow user to set Limit
func (*GetResourceUsageOrgOptions) SetNames ¶
func (_options *GetResourceUsageOrgOptions) SetNames(names bool) *GetResourceUsageOrgOptions
SetNames : Allow user to set Names
func (*GetResourceUsageOrgOptions) SetOrganizationID ¶
func (_options *GetResourceUsageOrgOptions) SetOrganizationID(organizationID string) *GetResourceUsageOrgOptions
SetOrganizationID : Allow user to set OrganizationID
func (*GetResourceUsageOrgOptions) SetPlanID ¶
func (_options *GetResourceUsageOrgOptions) SetPlanID(planID string) *GetResourceUsageOrgOptions
SetPlanID : Allow user to set PlanID
func (*GetResourceUsageOrgOptions) SetRegion ¶
func (_options *GetResourceUsageOrgOptions) SetRegion(region string) *GetResourceUsageOrgOptions
SetRegion : Allow user to set Region
func (*GetResourceUsageOrgOptions) SetResourceID ¶
func (_options *GetResourceUsageOrgOptions) SetResourceID(resourceID string) *GetResourceUsageOrgOptions
SetResourceID : Allow user to set ResourceID
func (*GetResourceUsageOrgOptions) SetResourceInstanceID ¶
func (_options *GetResourceUsageOrgOptions) SetResourceInstanceID(resourceInstanceID string) *GetResourceUsageOrgOptions
SetResourceInstanceID : Allow user to set ResourceInstanceID
func (*GetResourceUsageOrgOptions) SetStart ¶
func (_options *GetResourceUsageOrgOptions) SetStart(start string) *GetResourceUsageOrgOptions
SetStart : Allow user to set Start
type GetResourceUsageResourceGroupOptions ¶
type GetResourceUsageResourceGroupOptions struct { // Account ID for which the usage report is requested. AccountID *string `validate:"required,ne="` // Resource group for which the usage report is requested. ResourceGroupID *string `validate:"required,ne="` // The billing month for which the usage report is requested. Format is yyyy-mm. Billingmonth *string `validate:"required,ne="` // Include the name of every resource, plan, resource instance, organization, and resource group. Names *bool // Prioritize the names returned in the order of the specified languages. Language will default to English. AcceptLanguage *string // Number of usage records returned. The default value is 10. Maximum value is 20. Limit *int64 // The offset from which the records must be fetched. Offset information is included in the response. Start *string // Filter by resource instance id. ResourceInstanceID *string // Filter by resource_id. ResourceID *string // Filter by plan_id. PlanID *string // Region in which the resource instance is provisioned. Region *string // Allows users to set headers on API requests Headers map[string]string }
GetResourceUsageResourceGroupOptions : The GetResourceUsageResourceGroup options.
func (*GetResourceUsageResourceGroupOptions) SetAcceptLanguage ¶
func (_options *GetResourceUsageResourceGroupOptions) SetAcceptLanguage(acceptLanguage string) *GetResourceUsageResourceGroupOptions
SetAcceptLanguage : Allow user to set AcceptLanguage
func (*GetResourceUsageResourceGroupOptions) SetAccountID ¶
func (_options *GetResourceUsageResourceGroupOptions) SetAccountID(accountID string) *GetResourceUsageResourceGroupOptions
SetAccountID : Allow user to set AccountID
func (*GetResourceUsageResourceGroupOptions) SetBillingmonth ¶
func (_options *GetResourceUsageResourceGroupOptions) SetBillingmonth(billingmonth string) *GetResourceUsageResourceGroupOptions
SetBillingmonth : Allow user to set Billingmonth
func (*GetResourceUsageResourceGroupOptions) SetHeaders ¶
func (options *GetResourceUsageResourceGroupOptions) SetHeaders(param map[string]string) *GetResourceUsageResourceGroupOptions
SetHeaders : Allow user to set Headers
func (*GetResourceUsageResourceGroupOptions) SetLimit ¶
func (_options *GetResourceUsageResourceGroupOptions) SetLimit(limit int64) *GetResourceUsageResourceGroupOptions
SetLimit : Allow user to set Limit
func (*GetResourceUsageResourceGroupOptions) SetNames ¶
func (_options *GetResourceUsageResourceGroupOptions) SetNames(names bool) *GetResourceUsageResourceGroupOptions
SetNames : Allow user to set Names
func (*GetResourceUsageResourceGroupOptions) SetPlanID ¶
func (_options *GetResourceUsageResourceGroupOptions) SetPlanID(planID string) *GetResourceUsageResourceGroupOptions
SetPlanID : Allow user to set PlanID
func (*GetResourceUsageResourceGroupOptions) SetRegion ¶
func (_options *GetResourceUsageResourceGroupOptions) SetRegion(region string) *GetResourceUsageResourceGroupOptions
SetRegion : Allow user to set Region
func (*GetResourceUsageResourceGroupOptions) SetResourceGroupID ¶
func (_options *GetResourceUsageResourceGroupOptions) SetResourceGroupID(resourceGroupID string) *GetResourceUsageResourceGroupOptions
SetResourceGroupID : Allow user to set ResourceGroupID
func (*GetResourceUsageResourceGroupOptions) SetResourceID ¶
func (_options *GetResourceUsageResourceGroupOptions) SetResourceID(resourceID string) *GetResourceUsageResourceGroupOptions
SetResourceID : Allow user to set ResourceID
func (*GetResourceUsageResourceGroupOptions) SetResourceInstanceID ¶
func (_options *GetResourceUsageResourceGroupOptions) SetResourceInstanceID(resourceInstanceID string) *GetResourceUsageResourceGroupOptions
SetResourceInstanceID : Allow user to set ResourceInstanceID
func (*GetResourceUsageResourceGroupOptions) SetStart ¶
func (_options *GetResourceUsageResourceGroupOptions) SetStart(start string) *GetResourceUsageResourceGroupOptions
SetStart : Allow user to set Start
type InstanceUsage ¶
type InstanceUsage struct { // The ID of the account. AccountID *string `json:"account_id" validate:"required"` // The ID of the resource instance. ResourceInstanceID *string `json:"resource_instance_id" validate:"required"` // The name of the resource instance. ResourceInstanceName *string `json:"resource_instance_name,omitempty"` // The ID of the resource. ResourceID *string `json:"resource_id" validate:"required"` // The name of the resource. ResourceName *string `json:"resource_name,omitempty"` // The ID of the resource group. ResourceGroupID *string `json:"resource_group_id,omitempty"` // The name of the resource group. ResourceGroupName *string `json:"resource_group_name,omitempty"` // The ID of the organization. OrganizationID *string `json:"organization_id,omitempty"` // The name of the organization. OrganizationName *string `json:"organization_name,omitempty"` // The ID of the space. SpaceID *string `json:"space_id,omitempty"` // The name of the space. SpaceName *string `json:"space_name,omitempty"` // The ID of the consumer. ConsumerID *string `json:"consumer_id,omitempty"` // The region where instance was provisioned. Region *string `json:"region,omitempty"` // The pricing region where the usage that was submitted was rated. PricingRegion *string `json:"pricing_region,omitempty"` // The target country pricing that should be used. PricingCountry *string `json:"pricing_country" validate:"required"` // The currency for the cost fields in the resources, plans and metrics. CurrencyCode *string `json:"currency_code" validate:"required"` // Is the cost charged to the account. Billable *bool `json:"billable" validate:"required"` // The ID of the plan where the instance was provisioned and rated. PlanID *string `json:"plan_id" validate:"required"` // The name of the plan where the instance was provisioned and rated. PlanName *string `json:"plan_name,omitempty"` // The month. Month *string `json:"month" validate:"required"` // All the resource used in the account. Usage []Metric `json:"usage" validate:"required"` }
InstanceUsage : The aggregated usage and charges for an instance.
type InstancesUsage ¶
type InstancesUsage struct { // The max number of reports in the response. Limit *int64 `json:"limit,omitempty"` // The number of reports in the response. Count *int64 `json:"count,omitempty"` // The link to the first page of the search query. First *InstancesUsageFirst `json:"first,omitempty"` // The link to the next page of the search query. Next *InstancesUsageNext `json:"next,omitempty"` // The list of instance usage reports. Resources []InstanceUsage `json:"resources,omitempty"` }
InstancesUsage : The list of instance usage reports.
type InstancesUsageFirst ¶
type InstancesUsageFirst struct { // A link to a page of query results. Href *string `json:"href,omitempty"` }
InstancesUsageFirst : The link to the first page of the search query.
type InstancesUsageNext ¶
type InstancesUsageNext struct { // A link to a page of query results. Href *string `json:"href,omitempty"` // The value of the `_start` query parameter to fetch the next page. Offset *string `json:"offset,omitempty"` }
InstancesUsageNext : The link to the next page of the search query.
type Metric ¶
type Metric struct { // The ID of the metric. Metric *string `json:"metric" validate:"required"` // The name of the metric. MetricName *string `json:"metric_name,omitempty"` // The aggregated value for the metric. Quantity *float64 `json:"quantity" validate:"required"` // The quantity that is used for calculating charges. RateableQuantity *float64 `json:"rateable_quantity,omitempty"` // The cost incurred by the metric. Cost *float64 `json:"cost" validate:"required"` // Pre-discounted cost incurred by the metric. RatedCost *float64 `json:"rated_cost" validate:"required"` // The price with which the cost was calculated. Price []interface{} `json:"price,omitempty"` // The unit that qualifies the quantity. Unit *string `json:"unit,omitempty"` // The name of the unit. UnitName *string `json:"unit_name,omitempty"` // When set to `true`, the cost is for informational purpose and is not included while calculating the plan charges. NonChargeable *bool `json:"non_chargeable,omitempty"` // All the discounts applicable to the metric. Discounts []Discount `json:"discounts" validate:"required"` }
Metric : Information about a metric.
type Offer ¶
type Offer struct { // The ID of the offer. OfferID *string `json:"offer_id" validate:"required"` // The total credits before applying the offer. CreditsTotal *float64 `json:"credits_total" validate:"required"` // The template with which the offer was generated. OfferTemplate *string `json:"offer_template" validate:"required"` // The date from which the offer is valid. ValidFrom *strfmt.DateTime `json:"valid_from" validate:"required"` // The date until the offer is valid. ExpiresOn *strfmt.DateTime `json:"expires_on" validate:"required"` // Credit information related to an offer. Credits *OfferCredits `json:"credits" validate:"required"` }
Offer : Information about an individual offer.
type OfferCredits ¶
type OfferCredits struct { // The available credits in the offer at the beginning of the month. StartingBalance *float64 `json:"starting_balance" validate:"required"` // The credits used in this month. Used *float64 `json:"used" validate:"required"` // The remaining credits in the offer. Balance *float64 `json:"balance" validate:"required"` }
OfferCredits : Credit information related to an offer.
type OrgUsage ¶
type OrgUsage struct { // The ID of the account. AccountID *string `json:"account_id" validate:"required"` // The ID of the organization. OrganizationID *string `json:"organization_id" validate:"required"` // The name of the organization. OrganizationName *string `json:"organization_name,omitempty"` // The target country pricing that should be used. PricingCountry *string `json:"pricing_country" validate:"required"` // The currency for the cost fields in the resources, plans and metrics. CurrencyCode *string `json:"currency_code" validate:"required"` // The month. Month *string `json:"month" validate:"required"` // All the resource used in the account. Resources []Resource `json:"resources" validate:"required"` }
OrgUsage : The aggregated usage and charges for all the plans in the org.
type Plan ¶
type Plan struct { // The ID of the plan. PlanID *string `json:"plan_id" validate:"required"` // The name of the plan. PlanName *string `json:"plan_name,omitempty"` // The pricing region for the plan. PricingRegion *string `json:"pricing_region,omitempty"` // Indicates if the plan charges are billed to the customer. Billable *bool `json:"billable" validate:"required"` // The total cost incurred by the plan. Cost *float64 `json:"cost" validate:"required"` // Total pre-discounted cost incurred by the plan. RatedCost *float64 `json:"rated_cost" validate:"required"` // All the metrics in the plan. Usage []Metric `json:"usage" validate:"required"` // All the discounts applicable to the plan. Discounts []Discount `json:"discounts" validate:"required"` }
Plan : The aggregated values for the plan.
type Resource ¶
type Resource struct { // The ID of the resource. ResourceID *string `json:"resource_id" validate:"required"` // The name of the resource. ResourceName *string `json:"resource_name,omitempty"` // The billable charges for the account. BillableCost *float64 `json:"billable_cost" validate:"required"` // The pre-discounted billable charges for the account. BillableRatedCost *float64 `json:"billable_rated_cost" validate:"required"` // The non-billable charges for the account. NonBillableCost *float64 `json:"non_billable_cost" validate:"required"` // The pre-discounted non-billable charges for the account. NonBillableRatedCost *float64 `json:"non_billable_rated_cost" validate:"required"` // All the plans in the resource. Plans []Plan `json:"plans" validate:"required"` // All the discounts applicable to the resource. Discounts []Discount `json:"discounts" validate:"required"` }
Resource : The container for all the plans in the resource.
type ResourceGroupUsage ¶
type ResourceGroupUsage struct { // The ID of the account. AccountID *string `json:"account_id" validate:"required"` // The ID of the resource group. ResourceGroupID *string `json:"resource_group_id" validate:"required"` // The name of the resource group. ResourceGroupName *string `json:"resource_group_name,omitempty"` // The target country pricing that should be used. PricingCountry *string `json:"pricing_country" validate:"required"` // The currency for the cost fields in the resources, plans and metrics. CurrencyCode *string `json:"currency_code" validate:"required"` // The month. Month *string `json:"month" validate:"required"` // All the resource used in the account. Resources []Resource `json:"resources" validate:"required"` }
ResourceGroupUsage : The aggregated usage and charges for all the plans in the resource group.
type ResourcesSummary ¶
type ResourcesSummary struct { // The billable charges for all cloud resources used in the account. BillableCost *float64 `json:"billable_cost" validate:"required"` // Non-billable charges for all cloud resources used in the account. NonBillableCost *float64 `json:"non_billable_cost" validate:"required"` }
ResourcesSummary : Charges related to cloud resources.
type Subscription ¶
type Subscription struct { // The ID of the subscription. SubscriptionID *string `json:"subscription_id" validate:"required"` // The charge agreement number of the subsciption. ChargeAgreementNumber *string `json:"charge_agreement_number" validate:"required"` // Type of the subscription. Type *string `json:"type" validate:"required"` // The credits available in the subscription for the month. SubscriptionAmount *float64 `json:"subscription_amount" validate:"required"` // The date from which the subscription was active. Start *strfmt.DateTime `json:"start" validate:"required"` // The date until which the subscription is active. End time is unavailable for PayGO accounts. End *strfmt.DateTime `json:"end,omitempty"` // The total credits available in the subscription. CreditsTotal *float64 `json:"credits_total" validate:"required"` // The terms through which the subscription is split into. Terms []SubscriptionTerm `json:"terms" validate:"required"` }
Subscription : Subscription struct
type SubscriptionSummary ¶
type SubscriptionSummary struct { // The charges after exhausting subscription credits and offers credits. Overage *float64 `json:"overage,omitempty"` // The list of subscriptions applicable for the month. Subscriptions []Subscription `json:"subscriptions,omitempty"` }
SubscriptionSummary : A summary of charges and credits related to a subscription.
type SubscriptionTerm ¶
type SubscriptionTerm struct { // The start date of the term. Start *strfmt.DateTime `json:"start" validate:"required"` // The end date of the term. End *strfmt.DateTime `json:"end" validate:"required"` // Information about credits related to a subscription. Credits *SubscriptionTermCredits `json:"credits" validate:"required"` }
SubscriptionTerm : SubscriptionTerm struct
type SubscriptionTermCredits ¶
type SubscriptionTermCredits struct { // The total credits available for the term. Total *float64 `json:"total" validate:"required"` // The unused credits in the term at the beginning of the month. StartingBalance *float64 `json:"starting_balance" validate:"required"` // The credits used in this month. Used *float64 `json:"used" validate:"required"` // The remaining credits in this term. Balance *float64 `json:"balance" validate:"required"` }
SubscriptionTermCredits : Information about credits related to a subscription.
type SupportSummary ¶
type SupportSummary struct { // The monthly support cost. Cost *float64 `json:"cost" validate:"required"` // The type of support. Type *string `json:"type" validate:"required"` // Additional support cost for the month. Overage *float64 `json:"overage" validate:"required"` }
SupportSummary : SupportSummary struct
type UsageReportsV4 ¶
type UsageReportsV4 struct {
Service *core.BaseService
}
UsageReportsV4 : Usage reports for IBM Cloud accounts
Version: 4.0.6
func NewUsageReportsV4 ¶
func NewUsageReportsV4(options *UsageReportsV4Options) (service *UsageReportsV4, err error)
NewUsageReportsV4 : constructs an instance of UsageReportsV4 with passed in options.
func NewUsageReportsV4UsingExternalConfig ¶
func NewUsageReportsV4UsingExternalConfig(options *UsageReportsV4Options) (usageReports *UsageReportsV4, err error)
NewUsageReportsV4UsingExternalConfig : constructs an instance of UsageReportsV4 with passed in options and external configuration.
func (*UsageReportsV4) Clone ¶ added in v0.17.2
func (usageReports *UsageReportsV4) Clone() *UsageReportsV4
Clone makes a copy of "usageReports" suitable for processing requests.
func (*UsageReportsV4) DisableRetries ¶
func (usageReports *UsageReportsV4) DisableRetries()
DisableRetries disables automatic retries for requests invoked for this service instance.
func (*UsageReportsV4) EnableRetries ¶
func (usageReports *UsageReportsV4) EnableRetries(maxRetries int, maxRetryInterval time.Duration)
EnableRetries enables automatic retries for requests invoked for this service instance. If either parameter is specified as 0, then a default value is used instead.
func (*UsageReportsV4) GetAccountSummary ¶
func (usageReports *UsageReportsV4) GetAccountSummary(getAccountSummaryOptions *GetAccountSummaryOptions) (result *AccountSummary, response *core.DetailedResponse, err error)
GetAccountSummary : Get account summary Returns the summary for the account for a given month. Account billing managers are authorized to access this report.
func (*UsageReportsV4) GetAccountSummaryWithContext ¶
func (usageReports *UsageReportsV4) GetAccountSummaryWithContext(ctx context.Context, getAccountSummaryOptions *GetAccountSummaryOptions) (result *AccountSummary, response *core.DetailedResponse, err error)
GetAccountSummaryWithContext is an alternate form of the GetAccountSummary method which supports a Context parameter
func (*UsageReportsV4) GetAccountUsage ¶
func (usageReports *UsageReportsV4) GetAccountUsage(getAccountUsageOptions *GetAccountUsageOptions) (result *AccountUsage, response *core.DetailedResponse, err error)
GetAccountUsage : Get account usage Usage for all the resources and plans in an account for a given month. Account billing managers are authorized to access this report.
func (*UsageReportsV4) GetAccountUsageWithContext ¶
func (usageReports *UsageReportsV4) GetAccountUsageWithContext(ctx context.Context, getAccountUsageOptions *GetAccountUsageOptions) (result *AccountUsage, response *core.DetailedResponse, err error)
GetAccountUsageWithContext is an alternate form of the GetAccountUsage method which supports a Context parameter
func (*UsageReportsV4) GetEnableGzipCompression ¶
func (usageReports *UsageReportsV4) GetEnableGzipCompression() bool
GetEnableGzipCompression returns the service's EnableGzipCompression field
func (*UsageReportsV4) GetOrgUsage ¶
func (usageReports *UsageReportsV4) GetOrgUsage(getOrgUsageOptions *GetOrgUsageOptions) (result *OrgUsage, response *core.DetailedResponse, err error)
GetOrgUsage : Get organization usage Usage for all the resources and plans in an organization in a given month. Account billing managers or organization billing managers are authorized to access this report.
func (*UsageReportsV4) GetOrgUsageWithContext ¶
func (usageReports *UsageReportsV4) GetOrgUsageWithContext(ctx context.Context, getOrgUsageOptions *GetOrgUsageOptions) (result *OrgUsage, response *core.DetailedResponse, err error)
GetOrgUsageWithContext is an alternate form of the GetOrgUsage method which supports a Context parameter
func (*UsageReportsV4) GetResourceGroupUsage ¶
func (usageReports *UsageReportsV4) GetResourceGroupUsage(getResourceGroupUsageOptions *GetResourceGroupUsageOptions) (result *ResourceGroupUsage, response *core.DetailedResponse, err error)
GetResourceGroupUsage : Get resource group usage Usage for all the resources and plans in a resource group in a given month. Account billing managers or resource group billing managers are authorized to access this report.
func (*UsageReportsV4) GetResourceGroupUsageWithContext ¶
func (usageReports *UsageReportsV4) GetResourceGroupUsageWithContext(ctx context.Context, getResourceGroupUsageOptions *GetResourceGroupUsageOptions) (result *ResourceGroupUsage, response *core.DetailedResponse, err error)
GetResourceGroupUsageWithContext is an alternate form of the GetResourceGroupUsage method which supports a Context parameter
func (*UsageReportsV4) GetResourceUsageAccount ¶
func (usageReports *UsageReportsV4) GetResourceUsageAccount(getResourceUsageAccountOptions *GetResourceUsageAccountOptions) (result *InstancesUsage, response *core.DetailedResponse, err error)
GetResourceUsageAccount : Get resource instance usage in an account Query for resource instance usage in an account. Filter the results with query parameters. Account billing administrator is authorized to access this report.
func (*UsageReportsV4) GetResourceUsageAccountWithContext ¶
func (usageReports *UsageReportsV4) GetResourceUsageAccountWithContext(ctx context.Context, getResourceUsageAccountOptions *GetResourceUsageAccountOptions) (result *InstancesUsage, response *core.DetailedResponse, err error)
GetResourceUsageAccountWithContext is an alternate form of the GetResourceUsageAccount method which supports a Context parameter
func (*UsageReportsV4) GetResourceUsageOrg ¶
func (usageReports *UsageReportsV4) GetResourceUsageOrg(getResourceUsageOrgOptions *GetResourceUsageOrgOptions) (result *InstancesUsage, response *core.DetailedResponse, err error)
GetResourceUsageOrg : Get resource instance usage in an organization Query for resource instance usage in an organization. Filter the results with query parameters. Account billing administrator and organization billing administrators are authorized to access this report.
func (*UsageReportsV4) GetResourceUsageOrgWithContext ¶
func (usageReports *UsageReportsV4) GetResourceUsageOrgWithContext(ctx context.Context, getResourceUsageOrgOptions *GetResourceUsageOrgOptions) (result *InstancesUsage, response *core.DetailedResponse, err error)
GetResourceUsageOrgWithContext is an alternate form of the GetResourceUsageOrg method which supports a Context parameter
func (*UsageReportsV4) GetResourceUsageResourceGroup ¶
func (usageReports *UsageReportsV4) GetResourceUsageResourceGroup(getResourceUsageResourceGroupOptions *GetResourceUsageResourceGroupOptions) (result *InstancesUsage, response *core.DetailedResponse, err error)
GetResourceUsageResourceGroup : Get resource instance usage in a resource group Query for resource instance usage in a resource group. Filter the results with query parameters. Account billing administrator and resource group billing administrators are authorized to access this report.
func (*UsageReportsV4) GetResourceUsageResourceGroupWithContext ¶
func (usageReports *UsageReportsV4) GetResourceUsageResourceGroupWithContext(ctx context.Context, getResourceUsageResourceGroupOptions *GetResourceUsageResourceGroupOptions) (result *InstancesUsage, response *core.DetailedResponse, err error)
GetResourceUsageResourceGroupWithContext is an alternate form of the GetResourceUsageResourceGroup method which supports a Context parameter
func (*UsageReportsV4) GetServiceURL ¶
func (usageReports *UsageReportsV4) GetServiceURL() string
GetServiceURL returns the service URL
func (*UsageReportsV4) NewGetAccountSummaryOptions ¶
func (*UsageReportsV4) NewGetAccountSummaryOptions(accountID string, billingmonth string) *GetAccountSummaryOptions
NewGetAccountSummaryOptions : Instantiate GetAccountSummaryOptions
func (*UsageReportsV4) NewGetAccountUsageOptions ¶
func (*UsageReportsV4) NewGetAccountUsageOptions(accountID string, billingmonth string) *GetAccountUsageOptions
NewGetAccountUsageOptions : Instantiate GetAccountUsageOptions
func (*UsageReportsV4) NewGetOrgUsageOptions ¶
func (*UsageReportsV4) NewGetOrgUsageOptions(accountID string, organizationID string, billingmonth string) *GetOrgUsageOptions
NewGetOrgUsageOptions : Instantiate GetOrgUsageOptions
func (*UsageReportsV4) NewGetResourceGroupUsageOptions ¶
func (*UsageReportsV4) NewGetResourceGroupUsageOptions(accountID string, resourceGroupID string, billingmonth string) *GetResourceGroupUsageOptions
NewGetResourceGroupUsageOptions : Instantiate GetResourceGroupUsageOptions
func (*UsageReportsV4) NewGetResourceUsageAccountOptions ¶
func (*UsageReportsV4) NewGetResourceUsageAccountOptions(accountID string, billingmonth string) *GetResourceUsageAccountOptions
NewGetResourceUsageAccountOptions : Instantiate GetResourceUsageAccountOptions
func (*UsageReportsV4) NewGetResourceUsageOrgOptions ¶
func (*UsageReportsV4) NewGetResourceUsageOrgOptions(accountID string, organizationID string, billingmonth string) *GetResourceUsageOrgOptions
NewGetResourceUsageOrgOptions : Instantiate GetResourceUsageOrgOptions
func (*UsageReportsV4) NewGetResourceUsageResourceGroupOptions ¶
func (*UsageReportsV4) NewGetResourceUsageResourceGroupOptions(accountID string, resourceGroupID string, billingmonth string) *GetResourceUsageResourceGroupOptions
NewGetResourceUsageResourceGroupOptions : Instantiate GetResourceUsageResourceGroupOptions
func (*UsageReportsV4) SetDefaultHeaders ¶
func (usageReports *UsageReportsV4) SetDefaultHeaders(headers http.Header)
SetDefaultHeaders sets HTTP headers to be sent in every request
func (*UsageReportsV4) SetEnableGzipCompression ¶
func (usageReports *UsageReportsV4) SetEnableGzipCompression(enableGzip bool)
SetEnableGzipCompression sets the service's EnableGzipCompression field
func (*UsageReportsV4) SetServiceURL ¶
func (usageReports *UsageReportsV4) SetServiceURL(url string) error
SetServiceURL sets the service URL
type UsageReportsV4Options ¶
type UsageReportsV4Options struct { ServiceName string URL string Authenticator core.Authenticator }
UsageReportsV4Options : Service options