Documentation ¶
Overview ¶
Package partnermanagementv1 : Operations and models for the PartnerManagementV1 service
Index ¶
- Constants
- func GetServiceURLForRegion(region string) (string, error)
- func UnmarshalBillingOption(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalBillingOptionsSummary(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalCreditPoolsReport(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalCreditPoolsReportSummary(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalMetricUsage(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalOverage(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalPartnerUsageReport(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalPartnerUsageReportSummary(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalPartnerUsageReportSummaryFirst(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalPartnerUsageReportSummaryNext(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalPlanUsage(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalResourceUsage(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalTermCredits(m map[string]json.RawMessage, result interface{}) (err error)
- type BillingOption
- type BillingOptionsSummary
- type CreditPoolsReport
- type CreditPoolsReportSummary
- type GetBillingOptionsOptions
- func (_options *GetBillingOptionsOptions) SetCustomerID(customerID string) *GetBillingOptionsOptions
- func (_options *GetBillingOptionsOptions) SetDate(date string) *GetBillingOptionsOptions
- func (options *GetBillingOptionsOptions) SetHeaders(param map[string]string) *GetBillingOptionsOptions
- func (_options *GetBillingOptionsOptions) SetLimit(limit int64) *GetBillingOptionsOptions
- func (_options *GetBillingOptionsOptions) SetPartnerID(partnerID string) *GetBillingOptionsOptions
- func (_options *GetBillingOptionsOptions) SetResellerID(resellerID string) *GetBillingOptionsOptions
- type GetCreditPoolsReportOptions
- func (_options *GetCreditPoolsReportOptions) SetCustomerID(customerID string) *GetCreditPoolsReportOptions
- func (_options *GetCreditPoolsReportOptions) SetDate(date string) *GetCreditPoolsReportOptions
- func (options *GetCreditPoolsReportOptions) SetHeaders(param map[string]string) *GetCreditPoolsReportOptions
- func (_options *GetCreditPoolsReportOptions) SetLimit(limit int64) *GetCreditPoolsReportOptions
- func (_options *GetCreditPoolsReportOptions) SetPartnerID(partnerID string) *GetCreditPoolsReportOptions
- func (_options *GetCreditPoolsReportOptions) SetResellerID(resellerID string) *GetCreditPoolsReportOptions
- type GetResourceUsageReportOptions
- func (_options *GetResourceUsageReportOptions) SetChildren(children bool) *GetResourceUsageReportOptions
- func (_options *GetResourceUsageReportOptions) SetCustomerID(customerID string) *GetResourceUsageReportOptions
- func (options *GetResourceUsageReportOptions) SetHeaders(param map[string]string) *GetResourceUsageReportOptions
- func (_options *GetResourceUsageReportOptions) SetLimit(limit int64) *GetResourceUsageReportOptions
- func (_options *GetResourceUsageReportOptions) SetMonth(month string) *GetResourceUsageReportOptions
- func (_options *GetResourceUsageReportOptions) SetOffset(offset string) *GetResourceUsageReportOptions
- func (_options *GetResourceUsageReportOptions) SetPartnerID(partnerID string) *GetResourceUsageReportOptions
- func (_options *GetResourceUsageReportOptions) SetRecurse(recurse bool) *GetResourceUsageReportOptions
- func (_options *GetResourceUsageReportOptions) SetResellerID(resellerID string) *GetResourceUsageReportOptions
- func (_options *GetResourceUsageReportOptions) SetViewpoint(viewpoint string) *GetResourceUsageReportOptions
- type GetResourceUsageReportPager
- func (pager *GetResourceUsageReportPager) GetAll() (allItems []PartnerUsageReport, err error)
- func (pager *GetResourceUsageReportPager) GetAllWithContext(ctx context.Context) (allItems []PartnerUsageReport, err error)
- func (pager *GetResourceUsageReportPager) GetNext() (page []PartnerUsageReport, err error)
- func (pager *GetResourceUsageReportPager) GetNextWithContext(ctx context.Context) (page []PartnerUsageReport, err error)
- func (pager *GetResourceUsageReportPager) HasNext() bool
- type MetricUsage
- type Overage
- type PartnerManagementV1
- func (partnerManagement *PartnerManagementV1) Clone() *PartnerManagementV1
- func (partnerManagement *PartnerManagementV1) DisableRetries()
- func (partnerManagement *PartnerManagementV1) EnableRetries(maxRetries int, maxRetryInterval time.Duration)
- func (partnerManagement *PartnerManagementV1) GetBillingOptions(getBillingOptionsOptions *GetBillingOptionsOptions) (result *BillingOptionsSummary, response *core.DetailedResponse, err error)
- func (partnerManagement *PartnerManagementV1) GetBillingOptionsWithContext(ctx context.Context, getBillingOptionsOptions *GetBillingOptionsOptions) (result *BillingOptionsSummary, response *core.DetailedResponse, err error)
- func (partnerManagement *PartnerManagementV1) GetCreditPoolsReport(getCreditPoolsReportOptions *GetCreditPoolsReportOptions) (result *CreditPoolsReportSummary, response *core.DetailedResponse, err error)
- func (partnerManagement *PartnerManagementV1) GetCreditPoolsReportWithContext(ctx context.Context, getCreditPoolsReportOptions *GetCreditPoolsReportOptions) (result *CreditPoolsReportSummary, response *core.DetailedResponse, err error)
- func (partnerManagement *PartnerManagementV1) GetEnableGzipCompression() bool
- func (partnerManagement *PartnerManagementV1) GetResourceUsageReport(getResourceUsageReportOptions *GetResourceUsageReportOptions) (result *PartnerUsageReportSummary, response *core.DetailedResponse, err error)
- func (partnerManagement *PartnerManagementV1) GetResourceUsageReportWithContext(ctx context.Context, ...) (result *PartnerUsageReportSummary, response *core.DetailedResponse, err error)
- func (partnerManagement *PartnerManagementV1) GetServiceURL() string
- func (*PartnerManagementV1) NewGetBillingOptionsOptions(partnerID string, billingMonth string) *GetBillingOptionsOptions
- func (*PartnerManagementV1) NewGetCreditPoolsReportOptions(partnerID string, billingMonth string) *GetCreditPoolsReportOptions
- func (*PartnerManagementV1) NewGetResourceUsageReportOptions(partnerID string) *GetResourceUsageReportOptions
- func (partnerManagement *PartnerManagementV1) NewGetResourceUsageReportPager(options *GetResourceUsageReportOptions) (pager *GetResourceUsageReportPager, err error)
- func (partnerManagement *PartnerManagementV1) SetDefaultHeaders(headers http.Header)
- func (partnerManagement *PartnerManagementV1) SetEnableGzipCompression(enableGzip bool)
- func (partnerManagement *PartnerManagementV1) SetServiceURL(url string) error
- type PartnerManagementV1Options
- type PartnerUsageReport
- type PartnerUsageReportSummary
- type PartnerUsageReportSummaryFirst
- type PartnerUsageReportSummaryNext
- type PlanUsage
- type ResourceUsage
- type TermCredits
Constants ¶
const ( BillingOptionCustomerTypeAccountConst = "ACCOUNT" BillingOptionCustomerTypeAccountGroupConst = "ACCOUNT_GROUP" BillingOptionCustomerTypeEnterpriseConst = "ENTERPRISE" )
Constants associated with the BillingOption.CustomerType property. The customer type. The valid values are `ENTERPRISE`, `ACCOUNT`, and `ACCOUNT_GROUP`.
const ( BillingOptionTypeOfferConst = "OFFER" BillingOptionTypeSubscriptionConst = "SUBSCRIPTION" )
Constants associated with the BillingOption.Type property. The type of billing option. The valid values are `SUBSCRIPTION` and `OFFER`.
const ( BillingOptionStateActiveConst = "ACTIVE" BillingOptionStateCanceledConst = "CANCELED" BillingOptionStateSuspendedConst = "SUSPENDED" )
Constants associated with the BillingOption.State property. The state of the billing option. The valid values include `ACTIVE, `SUSPENDED`, and `CANCELED`.
const ( BillingOptionCategoryPlatformConst = "PLATFORM" BillingOptionCategoryServiceConst = "SERVICE" BillingOptionCategorySupportConst = "SUPPORT" )
Constants associated with the BillingOption.Category property. The category of the billing option. The valid values are `PLATFORM`, `SERVICE`, and `SUPPORT`.
const ( CreditPoolsReportTypePlatformConst = "PLATFORM" CreditPoolsReportTypeServiceConst = "SERVICE" CreditPoolsReportTypeSupportConst = "SUPPORT" )
Constants associated with the CreditPoolsReport.Type property. The category of the billing option. The valid values are `PLATFORM`, `SERVICE` and `SUPPORT`.
const ( CreditPoolsReportCustomerTypeAccountConst = "ACCOUNT" CreditPoolsReportCustomerTypeAccountGroupConst = "ACCOUNT_GROUP" CreditPoolsReportCustomerTypeEnterpriseConst = "ENTERPRISE" )
Constants associated with the CreditPoolsReport.CustomerType property. The customer type. The valid values are `ENTERPRISE`, `ACCOUNT`, and `ACCOUNT_GROUP`.
const ( GetResourceUsageReportOptionsViewpointDistributorConst = "DISTRIBUTOR" GetResourceUsageReportOptionsViewpointEndCustomerConst = "END_CUSTOMER" GetResourceUsageReportOptionsViewpointResellerConst = "RESELLER" )
Constants associated with the GetResourceUsageReportOptions.Viewpoint property. Enables partner to view the cost of provisioned services as applicable at the given level. Defaults to the type of the calling partner. The valid values are `DISTRIBUTOR`, `RESELLER` and `END_CUSTOMER`.
const ( TermCreditsCategoryPlatformConst = "PLATFORM" TermCreditsCategoryServiceConst = "SERVICE" TermCreditsCategorySupportConst = "SUPPORT" )
Constants associated with the TermCredits.Category property. The category of the billing option. The valid values are `PLATFORM`, `SERVICE`, and `SUPPORT`.
const DefaultServiceName = "partner_management"
DefaultServiceName is the default key used to find external configuration information.
const DefaultServiceURL = "https://partner.cloud.ibm.com"
DefaultServiceURL is the default URL to make service requests to.
Variables ¶
This section is empty.
Functions ¶
func GetServiceURLForRegion ¶
GetServiceURLForRegion returns the service URL to be used for the specified region
func UnmarshalBillingOption ¶
func UnmarshalBillingOption(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalBillingOption unmarshals an instance of BillingOption from the specified map of raw messages.
func UnmarshalBillingOptionsSummary ¶
func UnmarshalBillingOptionsSummary(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalBillingOptionsSummary unmarshals an instance of BillingOptionsSummary from the specified map of raw messages.
func UnmarshalCreditPoolsReport ¶
func UnmarshalCreditPoolsReport(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalCreditPoolsReport unmarshals an instance of CreditPoolsReport from the specified map of raw messages.
func UnmarshalCreditPoolsReportSummary ¶
func UnmarshalCreditPoolsReportSummary(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalCreditPoolsReportSummary unmarshals an instance of CreditPoolsReportSummary from the specified map of raw messages.
func UnmarshalMetricUsage ¶
func UnmarshalMetricUsage(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalMetricUsage unmarshals an instance of MetricUsage from the specified map of raw messages.
func UnmarshalOverage ¶
func UnmarshalOverage(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalOverage unmarshals an instance of Overage from the specified map of raw messages.
func UnmarshalPartnerUsageReport ¶
func UnmarshalPartnerUsageReport(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalPartnerUsageReport unmarshals an instance of PartnerUsageReport from the specified map of raw messages.
func UnmarshalPartnerUsageReportSummary ¶
func UnmarshalPartnerUsageReportSummary(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalPartnerUsageReportSummary unmarshals an instance of PartnerUsageReportSummary from the specified map of raw messages.
func UnmarshalPartnerUsageReportSummaryFirst ¶
func UnmarshalPartnerUsageReportSummaryFirst(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalPartnerUsageReportSummaryFirst unmarshals an instance of PartnerUsageReportSummaryFirst from the specified map of raw messages.
func UnmarshalPartnerUsageReportSummaryNext ¶
func UnmarshalPartnerUsageReportSummaryNext(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalPartnerUsageReportSummaryNext unmarshals an instance of PartnerUsageReportSummaryNext from the specified map of raw messages.
func UnmarshalPlanUsage ¶
func UnmarshalPlanUsage(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalPlanUsage unmarshals an instance of PlanUsage from the specified map of raw messages.
func UnmarshalResourceUsage ¶
func UnmarshalResourceUsage(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalResourceUsage unmarshals an instance of ResourceUsage from the specified map of raw messages.
func UnmarshalTermCredits ¶
func UnmarshalTermCredits(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalTermCredits unmarshals an instance of TermCredits from the specified map of raw messages.
Types ¶
type BillingOption ¶
type BillingOption struct { // The ID of the billing option. ID *string `json:"id,omitempty"` // The ID of the billing unit that's associated with the billing option. BillingUnitID *string `json:"billing_unit_id,omitempty"` // Account ID of the customer. CustomerID *string `json:"customer_id,omitempty"` // The customer type. The valid values are `ENTERPRISE`, `ACCOUNT`, and `ACCOUNT_GROUP`. CustomerType *string `json:"customer_type,omitempty"` // A user-defined name for the customer. CustomerName *string `json:"customer_name,omitempty"` // ID of the reseller in the heirarchy of the requested customer. ResellerID *string `json:"reseller_id,omitempty"` // Name of the reseller in the heirarchy of the requested customer. ResellerName *string `json:"reseller_name,omitempty"` // The billing month for which the burn-down report is requested. Format is yyyy-mm. Defaults to current month. Month *string `json:"month,omitempty"` // Errors in the billing. Errors []map[string]interface{} `json:"errors,omitempty"` // The type of billing option. The valid values are `SUBSCRIPTION` and `OFFER`. Type *string `json:"type,omitempty"` // The start date of billing option. StartDate *strfmt.DateTime `json:"start_date,omitempty"` // The end date of billing option. EndDate *strfmt.DateTime `json:"end_date,omitempty"` // The state of the billing option. The valid values include `ACTIVE, `SUSPENDED`, and `CANCELED`. State *string `json:"state,omitempty"` // The category of the billing option. The valid values are `PLATFORM`, `SERVICE`, and `SUPPORT`. Category *string `json:"category,omitempty"` // The payment method for support. PaymentInstrument map[string]interface{} `json:"payment_instrument,omitempty"` // Part number of the offering. PartNumber *string `json:"part_number,omitempty"` // ID of the catalog containing this offering. CatalogID *string `json:"catalog_id,omitempty"` // ID of the order containing this offering. OrderID *string `json:"order_id,omitempty"` // PO Number of the offering. PoNumber *string `json:"po_number,omitempty"` // Subscription model. SubscriptionModel *string `json:"subscription_model,omitempty"` // The duration of the billing options in months. DurationInMonths *int64 `json:"duration_in_months,omitempty"` // Amount billed monthly for this offering. MonthlyAmount *float64 `json:"monthly_amount,omitempty"` // The support billing system. BillingSystem map[string]interface{} `json:"billing_system,omitempty"` // The country code for the billing unit. CountryCode *string `json:"country_code,omitempty"` // The currency code of the billing unit. CurrencyCode *string `json:"currency_code,omitempty"` }
BillingOption : Billing options report for the end customers.
type BillingOptionsSummary ¶
type BillingOptionsSummary struct { // The max number of reports in the response. RowsCount *int64 `json:"rows_count,omitempty"` // The link to the next page of the search query. NextURL *string `json:"next_url,omitempty"` // Aggregated usage report of all requested partners. Resources []BillingOption `json:"resources,omitempty"` }
BillingOptionsSummary : The billing options report for the customer.
type CreditPoolsReport ¶
type CreditPoolsReport struct { // The category of the billing option. The valid values are `PLATFORM`, `SERVICE` and `SUPPORT`. Type *string `json:"type,omitempty"` // The ID of the billing unit that's associated with the billing option. BillingUnitID *string `json:"billing_unit_id,omitempty"` // Account ID of the customer. CustomerID *string `json:"customer_id,omitempty"` // The customer type. The valid values are `ENTERPRISE`, `ACCOUNT`, and `ACCOUNT_GROUP`. CustomerType *string `json:"customer_type,omitempty"` // A user-defined name for the customer. CustomerName *string `json:"customer_name,omitempty"` // ID of the reseller in the heirarchy of the requested customer. ResellerID *string `json:"reseller_id,omitempty"` // Name of the reseller in the heirarchy of the requested customer. ResellerName *string `json:"reseller_name,omitempty"` // The billing month for which the burn-down report is requested. Format is yyyy-mm. Defaults to current month. Month *string `json:"month,omitempty"` // The currency code of the billing unit. CurrencyCode *string `json:"currency_code,omitempty"` // A list of active subscription terms available within a credit. TermCredits []TermCredits `json:"term_credits,omitempty"` // Overage that was generated on the credit pool. Overage *Overage `json:"overage,omitempty"` }
CreditPoolsReport : Aggregated subscription burn-down report for the end customers.
type CreditPoolsReportSummary ¶
type CreditPoolsReportSummary struct { // The max number of reports in the response. RowsCount *int64 `json:"rows_count,omitempty"` // The link to the next page of the search query. NextURL *string `json:"next_url,omitempty"` // Aggregated usage report of all requested partners. Resources []CreditPoolsReport `json:"resources,omitempty"` }
CreditPoolsReportSummary : The aggregated credit pools report.
type GetBillingOptionsOptions ¶
type GetBillingOptionsOptions struct { // Enterprise ID of the distributor or reseller for which the report is requested. PartnerID *string `json:"partner_id" validate:"required"` // Account ID/Enterprise ID of the end customer for which the report is requested. This parameter cannot be used along // with `reseller_id` query parameter. CustomerID *string `json:"customer_id,omitempty"` // Enterprise ID of the reseller for which the report is requested. This parameter cannot be used along with // `customer_id` query parameter. ResellerID *string `json:"reseller_id,omitempty"` // The billing month for which the report is requested. Format is yyyy-mm. Defaults to current month. Date *string `json:"date,omitempty"` // Number of billing option reports returned. The default value is 200. Maximum value is 200. Limit *int64 `json:"limit,omitempty"` // Allows users to set headers on API requests. Headers map[string]string }
GetBillingOptionsOptions : The GetBillingOptions options.
func (*GetBillingOptionsOptions) SetCustomerID ¶
func (_options *GetBillingOptionsOptions) SetCustomerID(customerID string) *GetBillingOptionsOptions
SetCustomerID : Allow user to set CustomerID
func (*GetBillingOptionsOptions) SetDate ¶
func (_options *GetBillingOptionsOptions) SetDate(date string) *GetBillingOptionsOptions
SetDate : Allow user to set Date
func (*GetBillingOptionsOptions) SetHeaders ¶
func (options *GetBillingOptionsOptions) SetHeaders(param map[string]string) *GetBillingOptionsOptions
SetHeaders : Allow user to set Headers
func (*GetBillingOptionsOptions) SetLimit ¶
func (_options *GetBillingOptionsOptions) SetLimit(limit int64) *GetBillingOptionsOptions
SetLimit : Allow user to set Limit
func (*GetBillingOptionsOptions) SetPartnerID ¶
func (_options *GetBillingOptionsOptions) SetPartnerID(partnerID string) *GetBillingOptionsOptions
SetPartnerID : Allow user to set PartnerID
func (*GetBillingOptionsOptions) SetResellerID ¶
func (_options *GetBillingOptionsOptions) SetResellerID(resellerID string) *GetBillingOptionsOptions
SetResellerID : Allow user to set ResellerID
type GetCreditPoolsReportOptions ¶
type GetCreditPoolsReportOptions struct { // Enterprise ID of the distributor or reseller for which the report is requested. PartnerID *string `json:"partner_id" validate:"required"` // Account ID/Enterprise ID of the end customer for which the report is requested. This parameter cannot be used along // with `reseller_id` query parameter. CustomerID *string `json:"customer_id,omitempty"` // Enterprise ID of the reseller for which the report is requested. This parameter cannot be used along with // `customer_id` query parameter. ResellerID *string `json:"reseller_id,omitempty"` // The billing month for which the report is requested. Format is yyyy-mm. Defaults to current month. Date *string `json:"date,omitempty"` // Number of billing units fetched to get the credit pools report. The default value is 30. Maximum value is 30. Limit *int64 `json:"limit,omitempty"` // Allows users to set headers on API requests. Headers map[string]string }
GetCreditPoolsReportOptions : The GetCreditPoolsReport options.
func (*GetCreditPoolsReportOptions) SetCustomerID ¶
func (_options *GetCreditPoolsReportOptions) SetCustomerID(customerID string) *GetCreditPoolsReportOptions
SetCustomerID : Allow user to set CustomerID
func (*GetCreditPoolsReportOptions) SetDate ¶
func (_options *GetCreditPoolsReportOptions) SetDate(date string) *GetCreditPoolsReportOptions
SetDate : Allow user to set Date
func (*GetCreditPoolsReportOptions) SetHeaders ¶
func (options *GetCreditPoolsReportOptions) SetHeaders(param map[string]string) *GetCreditPoolsReportOptions
SetHeaders : Allow user to set Headers
func (*GetCreditPoolsReportOptions) SetLimit ¶
func (_options *GetCreditPoolsReportOptions) SetLimit(limit int64) *GetCreditPoolsReportOptions
SetLimit : Allow user to set Limit
func (*GetCreditPoolsReportOptions) SetPartnerID ¶
func (_options *GetCreditPoolsReportOptions) SetPartnerID(partnerID string) *GetCreditPoolsReportOptions
SetPartnerID : Allow user to set PartnerID
func (*GetCreditPoolsReportOptions) SetResellerID ¶
func (_options *GetCreditPoolsReportOptions) SetResellerID(resellerID string) *GetCreditPoolsReportOptions
SetResellerID : Allow user to set ResellerID
type GetResourceUsageReportOptions ¶
type GetResourceUsageReportOptions struct { // Enterprise ID of the distributor or reseller for which the report is requested. PartnerID *string `json:"partner_id" validate:"required"` // Enterprise ID of the reseller for which the report is requested. This parameter cannot be used along with // `customer_id` query parameter. ResellerID *string `json:"reseller_id,omitempty"` // Account ID/Enterprise ID of the end customer for which the report is requested. This parameter cannot be used along // with `reseller_id` query parameter. CustomerID *string `json:"customer_id,omitempty"` // Get report rolled-up to the direct children of the requested entity. Defaults to false. This parameter cannot be // used along with `customer_id` query parameter. Children *bool `json:"children,omitempty"` // The billing month for which the usage report is requested. Format is `yyyy-mm`. Defaults to current month. Month *string `json:"month,omitempty"` // Enables partner to view the cost of provisioned services as applicable at the given level. Defaults to the type of // the calling partner. The valid values are `DISTRIBUTOR`, `RESELLER` and `END_CUSTOMER`. Viewpoint *string `json:"viewpoint,omitempty"` // Get usage report rolled-up to the end customers of the requesting partner. Defaults to false. This parameter cannot // be used along with `reseller_id` query parameter or `customer_id` query parameter. Recurse *bool `json:"recurse,omitempty"` // Number of usage records to be returned. The default value is 30. Maximum value is 100. Limit *int64 `json:"limit,omitempty"` // An opaque value representing the offset of the first item to be returned by a search query. If not specified, then // the first page of results is returned. To retrieve the next page of search results, use the 'offset' query parameter // value within the 'next.href' URL found within a prior search query response. Offset *string `json:"offset,omitempty"` // Allows users to set headers on API requests. Headers map[string]string }
GetResourceUsageReportOptions : The GetResourceUsageReport options.
func (*GetResourceUsageReportOptions) SetChildren ¶
func (_options *GetResourceUsageReportOptions) SetChildren(children bool) *GetResourceUsageReportOptions
SetChildren : Allow user to set Children
func (*GetResourceUsageReportOptions) SetCustomerID ¶
func (_options *GetResourceUsageReportOptions) SetCustomerID(customerID string) *GetResourceUsageReportOptions
SetCustomerID : Allow user to set CustomerID
func (*GetResourceUsageReportOptions) SetHeaders ¶
func (options *GetResourceUsageReportOptions) SetHeaders(param map[string]string) *GetResourceUsageReportOptions
SetHeaders : Allow user to set Headers
func (*GetResourceUsageReportOptions) SetLimit ¶
func (_options *GetResourceUsageReportOptions) SetLimit(limit int64) *GetResourceUsageReportOptions
SetLimit : Allow user to set Limit
func (*GetResourceUsageReportOptions) SetMonth ¶
func (_options *GetResourceUsageReportOptions) SetMonth(month string) *GetResourceUsageReportOptions
SetMonth : Allow user to set Month
func (*GetResourceUsageReportOptions) SetOffset ¶
func (_options *GetResourceUsageReportOptions) SetOffset(offset string) *GetResourceUsageReportOptions
SetOffset : Allow user to set Offset
func (*GetResourceUsageReportOptions) SetPartnerID ¶
func (_options *GetResourceUsageReportOptions) SetPartnerID(partnerID string) *GetResourceUsageReportOptions
SetPartnerID : Allow user to set PartnerID
func (*GetResourceUsageReportOptions) SetRecurse ¶
func (_options *GetResourceUsageReportOptions) SetRecurse(recurse bool) *GetResourceUsageReportOptions
SetRecurse : Allow user to set Recurse
func (*GetResourceUsageReportOptions) SetResellerID ¶
func (_options *GetResourceUsageReportOptions) SetResellerID(resellerID string) *GetResourceUsageReportOptions
SetResellerID : Allow user to set ResellerID
func (*GetResourceUsageReportOptions) SetViewpoint ¶
func (_options *GetResourceUsageReportOptions) SetViewpoint(viewpoint string) *GetResourceUsageReportOptions
SetViewpoint : Allow user to set Viewpoint
type GetResourceUsageReportPager ¶
type GetResourceUsageReportPager struct {
// contains filtered or unexported fields
}
GetResourceUsageReportPager can be used to simplify the use of the "GetResourceUsageReport" method.
func (*GetResourceUsageReportPager) GetAll ¶
func (pager *GetResourceUsageReportPager) GetAll() (allItems []PartnerUsageReport, err error)
GetAll invokes GetAllWithContext() using context.Background() as the Context parameter.
func (*GetResourceUsageReportPager) GetAllWithContext ¶
func (pager *GetResourceUsageReportPager) GetAllWithContext(ctx context.Context) (allItems []PartnerUsageReport, err error)
GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly until all pages of results have been retrieved.
func (*GetResourceUsageReportPager) GetNext ¶
func (pager *GetResourceUsageReportPager) GetNext() (page []PartnerUsageReport, err error)
GetNext invokes GetNextWithContext() using context.Background() as the Context parameter.
func (*GetResourceUsageReportPager) GetNextWithContext ¶
func (pager *GetResourceUsageReportPager) GetNextWithContext(ctx context.Context) (page []PartnerUsageReport, err error)
GetNextWithContext returns the next page of results using the specified Context.
func (*GetResourceUsageReportPager) HasNext ¶
func (pager *GetResourceUsageReportPager) HasNext() bool
HasNext returns true if there are potentially more results to be retrieved.
type MetricUsage ¶
type MetricUsage struct { // The name of the metric. Metric *string `json:"metric" validate:"required"` // A unit to qualify the quantity. Unit *string `json:"unit" validate:"required"` // 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" validate:"required"` // The cost that was incurred by the metric. Cost *float64 `json:"cost" validate:"required"` // The pre-discounted cost that was incurred by the metric. RatedCost *float64 `json:"rated_cost" validate:"required"` // The price with which cost was calculated. Price []map[string]interface{} `json:"price,omitempty"` }
MetricUsage : An object that represents a metric.
type Overage ¶
type Overage struct { // The number of credits used as overage. Cost *float64 `json:"cost,omitempty"` // A list of resources that generated overage. Resources []map[string]interface{} `json:"resources,omitempty"` }
Overage : Overage that was generated on the credit pool.
type PartnerManagementV1 ¶
type PartnerManagementV1 struct {
Service *core.BaseService
}
PartnerManagementV1 : The Partner Management APIs enable you to manage the IBM Cloud partner entities and fetch multiple reports in different formats.
API Version: 1.0.0
func NewPartnerManagementV1 ¶
func NewPartnerManagementV1(options *PartnerManagementV1Options) (service *PartnerManagementV1, err error)
NewPartnerManagementV1 : constructs an instance of PartnerManagementV1 with passed in options.
func NewPartnerManagementV1UsingExternalConfig ¶
func NewPartnerManagementV1UsingExternalConfig(options *PartnerManagementV1Options) (partnerManagement *PartnerManagementV1, err error)
NewPartnerManagementV1UsingExternalConfig : constructs an instance of PartnerManagementV1 with passed in options and external configuration.
func (*PartnerManagementV1) Clone ¶
func (partnerManagement *PartnerManagementV1) Clone() *PartnerManagementV1
Clone makes a copy of "partnerManagement" suitable for processing requests.
func (*PartnerManagementV1) DisableRetries ¶
func (partnerManagement *PartnerManagementV1) DisableRetries()
DisableRetries disables automatic retries for requests invoked for this service instance.
func (*PartnerManagementV1) EnableRetries ¶
func (partnerManagement *PartnerManagementV1) 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 (*PartnerManagementV1) GetBillingOptions ¶
func (partnerManagement *PartnerManagementV1) GetBillingOptions(getBillingOptionsOptions *GetBillingOptionsOptions) (result *BillingOptionsSummary, response *core.DetailedResponse, err error)
GetBillingOptions : Get customers billing options Returns the billing options for the requested customer for a given month.
func (*PartnerManagementV1) GetBillingOptionsWithContext ¶
func (partnerManagement *PartnerManagementV1) GetBillingOptionsWithContext(ctx context.Context, getBillingOptionsOptions *GetBillingOptionsOptions) (result *BillingOptionsSummary, response *core.DetailedResponse, err error)
GetBillingOptionsWithContext is an alternate form of the GetBillingOptions method which supports a Context parameter
func (*PartnerManagementV1) GetCreditPoolsReport ¶
func (partnerManagement *PartnerManagementV1) GetCreditPoolsReport(getCreditPoolsReportOptions *GetCreditPoolsReportOptions) (result *CreditPoolsReportSummary, response *core.DetailedResponse, err error)
GetCreditPoolsReport : Get credit pools report Returns the subscription or commitment burn-down reports for the end customers for a given month.
func (*PartnerManagementV1) GetCreditPoolsReportWithContext ¶
func (partnerManagement *PartnerManagementV1) GetCreditPoolsReportWithContext(ctx context.Context, getCreditPoolsReportOptions *GetCreditPoolsReportOptions) (result *CreditPoolsReportSummary, response *core.DetailedResponse, err error)
GetCreditPoolsReportWithContext is an alternate form of the GetCreditPoolsReport method which supports a Context parameter
func (*PartnerManagementV1) GetEnableGzipCompression ¶
func (partnerManagement *PartnerManagementV1) GetEnableGzipCompression() bool
GetEnableGzipCompression returns the service's EnableGzipCompression field
func (*PartnerManagementV1) GetResourceUsageReport ¶
func (partnerManagement *PartnerManagementV1) GetResourceUsageReport(getResourceUsageReportOptions *GetResourceUsageReportOptions) (result *PartnerUsageReportSummary, response *core.DetailedResponse, err error)
GetResourceUsageReport : Get partner resource usage report Returns the summary for the partner for a given month. Partner billing managers are authorized to access this report.
func (*PartnerManagementV1) GetResourceUsageReportWithContext ¶
func (partnerManagement *PartnerManagementV1) GetResourceUsageReportWithContext(ctx context.Context, getResourceUsageReportOptions *GetResourceUsageReportOptions) (result *PartnerUsageReportSummary, response *core.DetailedResponse, err error)
GetResourceUsageReportWithContext is an alternate form of the GetResourceUsageReport method which supports a Context parameter
func (*PartnerManagementV1) GetServiceURL ¶
func (partnerManagement *PartnerManagementV1) GetServiceURL() string
GetServiceURL returns the service URL
func (*PartnerManagementV1) NewGetBillingOptionsOptions ¶
func (*PartnerManagementV1) NewGetBillingOptionsOptions(partnerID string, billingMonth string) *GetBillingOptionsOptions
NewGetBillingOptionsOptions : Instantiate GetBillingOptionsOptions
func (*PartnerManagementV1) NewGetCreditPoolsReportOptions ¶
func (*PartnerManagementV1) NewGetCreditPoolsReportOptions(partnerID string, billingMonth string) *GetCreditPoolsReportOptions
NewGetCreditPoolsReportOptions : Instantiate GetCreditPoolsReportOptions
func (*PartnerManagementV1) NewGetResourceUsageReportOptions ¶
func (*PartnerManagementV1) NewGetResourceUsageReportOptions(partnerID string) *GetResourceUsageReportOptions
NewGetResourceUsageReportOptions : Instantiate GetResourceUsageReportOptions
func (*PartnerManagementV1) NewGetResourceUsageReportPager ¶
func (partnerManagement *PartnerManagementV1) NewGetResourceUsageReportPager(options *GetResourceUsageReportOptions) (pager *GetResourceUsageReportPager, err error)
NewGetResourceUsageReportPager returns a new GetResourceUsageReportPager instance.
func (*PartnerManagementV1) SetDefaultHeaders ¶
func (partnerManagement *PartnerManagementV1) SetDefaultHeaders(headers http.Header)
SetDefaultHeaders sets HTTP headers to be sent in every request
func (*PartnerManagementV1) SetEnableGzipCompression ¶
func (partnerManagement *PartnerManagementV1) SetEnableGzipCompression(enableGzip bool)
SetEnableGzipCompression sets the service's EnableGzipCompression field
func (*PartnerManagementV1) SetServiceURL ¶
func (partnerManagement *PartnerManagementV1) SetServiceURL(url string) error
SetServiceURL sets the service URL
type PartnerManagementV1Options ¶
type PartnerManagementV1Options struct { ServiceName string URL string Authenticator core.Authenticator }
PartnerManagementV1Options : Service options
type PartnerUsageReport ¶
type PartnerUsageReport struct { // The ID of the entity. EntityID *string `json:"entity_id,omitempty"` // The entity type. EntityType *string `json:"entity_type,omitempty"` // The Cloud Resource Name (CRN) of the entity towards which the resource usages were rolled up. EntityCRN *string `json:"entity_crn,omitempty"` // A user-defined name for the entity, such as the enterprise name or account name. EntityName *string `json:"entity_name,omitempty"` // Role of the `entity_id` for which the usage report is fetched. EntityPartnerType *string `json:"entity_partner_type,omitempty"` // Enables partner to view the cost of provisioned services as applicable at the given level. Viewpoint *string `json:"viewpoint,omitempty"` // The billing month for which the usage report is requested. Format is yyyy-mm. Month *string `json:"month,omitempty"` // The currency code of the billing unit. CurrencyCode *string `json:"currency_code,omitempty"` // The country code of the billing unit. CountryCode *string `json:"country_code,omitempty"` // Billable charges that are aggregated from all entities in the report. BillableCost *float64 `json:"billable_cost,omitempty"` // Aggregated billable charges before discounts. BillableRatedCost *float64 `json:"billable_rated_cost,omitempty"` // Non-billable charges that are aggregated from all entities in the report. NonBillableCost *float64 `json:"non_billable_cost,omitempty"` // Aggregated non-billable charges before discounts. NonBillableRatedCost *float64 `json:"non_billable_rated_cost,omitempty"` Resources []ResourceUsage `json:"resources,omitempty"` }
PartnerUsageReport : Aggregated usage report of a partner.
type PartnerUsageReportSummary ¶
type PartnerUsageReportSummary struct { // The maximum number of usage records in the response. Limit *int64 `json:"limit,omitempty"` // The link to the first page of the search query. First *PartnerUsageReportSummaryFirst `json:"first,omitempty"` // The link to the next page of the search query. Next *PartnerUsageReportSummaryNext `json:"next,omitempty"` // Aggregated usage report of all requested partners. Reports []PartnerUsageReport `json:"reports,omitempty"` }
PartnerUsageReportSummary : The aggregated partner usage report.
func (*PartnerUsageReportSummary) GetNextOffset ¶
func (resp *PartnerUsageReportSummary) GetNextOffset() (*string, error)
Retrieve the value to be passed to a request to access the next page of results
type PartnerUsageReportSummaryFirst ¶
type PartnerUsageReportSummaryFirst struct { // A link to a page of query results. Href *string `json:"href,omitempty"` }
PartnerUsageReportSummaryFirst : The link to the first page of the search query.
type PartnerUsageReportSummaryNext ¶
type PartnerUsageReportSummaryNext 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"` }
PartnerUsageReportSummaryNext : The link to the next page of the search query.
type PlanUsage ¶
type PlanUsage struct { // The ID of the plan. PlanID *string `json:"plan_id" validate:"required"` // The pricing region for the plan. PricingRegion *string `json:"pricing_region,omitempty"` // The pricing plan with which the usage was rated. PricingPlanID *string `json:"pricing_plan_id,omitempty"` // Whether the plan charges are billed to the customer. Billable *bool `json:"billable" validate:"required"` // The total cost that was incurred by the plan. Cost *float64 `json:"cost" validate:"required"` // The total pre-discounted cost that was incurred by the plan. RatedCost *float64 `json:"rated_cost" validate:"required"` // All of the metrics in the plan. Usage []MetricUsage `json:"usage" validate:"required"` }
PlanUsage : Aggregated values for the plan.
type ResourceUsage ¶
type ResourceUsage 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 partner. BillableCost *float64 `json:"billable_cost" validate:"required"` // The pre-discounted billable charges for the partner. BillableRatedCost *float64 `json:"billable_rated_cost" validate:"required"` // The non-billable charges for the partner. NonBillableCost *float64 `json:"non_billable_cost" validate:"required"` // The pre-discounted, non-billable charges for the partner. NonBillableRatedCost *float64 `json:"non_billable_rated_cost" validate:"required"` // All of the plans in the resource. Plans []PlanUsage `json:"plans" validate:"required"` }
ResourceUsage : A container for all the plans in the resource.
type TermCredits ¶
type TermCredits struct { // The ID of the billing option from which the subscription term is derived. BillingOptionID *string `json:"billing_option_id,omitempty"` // Billing option model. BillingOptionModel *string `json:"billing_option_model,omitempty"` // The category of the billing option. The valid values are `PLATFORM`, `SERVICE`, and `SUPPORT`. Category *string `json:"category,omitempty"` // The start date of the term in ISO format. StartDate *strfmt.DateTime `json:"start_date,omitempty"` // The end date of the term in ISO format. EndDate *strfmt.DateTime `json:"end_date,omitempty"` // The total credit available in this term. TotalCredits *float64 `json:"total_credits,omitempty"` // The balance of available credit at the start of the current month. StartingBalance *float64 `json:"starting_balance,omitempty"` // The amount of credit used during the current month. UsedCredits *float64 `json:"used_credits,omitempty"` // The balance of remaining credit in the subscription term. CurrentBalance *float64 `json:"current_balance,omitempty"` // A list of resources that used credit during the month. Resources []map[string]interface{} `json:"resources,omitempty"` }
TermCredits : The subscription term that is active in the requested month.