README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2021-10-01/marketplaces
Documentation
The marketplaces
SDK allows for interaction with the Azure Resource Manager Service consumption
(API Version 2021-10-01
).
This readme covers example usages, but further information on using this SDK can be found in the project root.
Import Path
import "github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2021-10-01/marketplaces"
Client Initialization
client := marketplaces.NewMarketplacesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: MarketplacesClient.List
ctx := context.TODO()
id := marketplaces.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")
// alternatively `client.List(ctx, id, marketplaces.DefaultListOperationOptions())` can be used to do batched pagination
items, err := client.ListComplete(ctx, id, marketplaces.DefaultListOperationOptions())
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Documentation ¶
Index ¶
- type ListCompleteResult
- type ListOperationOptions
- type ListOperationResponse
- type Marketplace
- type MarketplaceOperationPredicate
- type MarketplaceProperties
- type MarketplacesClient
- func (c MarketplacesClient) List(ctx context.Context, id commonids.ScopeId, options ListOperationOptions) (result ListOperationResponse, err error)
- func (c MarketplacesClient) ListComplete(ctx context.Context, id commonids.ScopeId, options ListOperationOptions) (ListCompleteResult, error)
- func (c MarketplacesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, options ListOperationOptions, ...) (result ListCompleteResult, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ListCompleteResult ¶
type ListCompleteResult struct {
Items []Marketplace
}
type ListOperationOptions ¶
func DefaultListOperationOptions ¶
func DefaultListOperationOptions() ListOperationOptions
func (ListOperationOptions) ToHeaders ¶ added in v0.20230411.1183115
func (o ListOperationOptions) ToHeaders() *client.Headers
func (ListOperationOptions) ToOData ¶ added in v0.20230411.1183115
func (o ListOperationOptions) ToOData() *odata.Query
func (ListOperationOptions) ToQuery ¶ added in v0.20230411.1183115
func (o ListOperationOptions) ToQuery() *client.QueryParams
type ListOperationResponse ¶
type ListOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *[]Marketplace }
type Marketplace ¶
type MarketplaceOperationPredicate ¶
func (MarketplaceOperationPredicate) Matches ¶
func (p MarketplaceOperationPredicate) Matches(input Marketplace) bool
type MarketplaceProperties ¶
type MarketplaceProperties struct { AccountName *string `json:"accountName,omitempty"` AdditionalInfo *string `json:"additionalInfo,omitempty"` AdditionalProperties *string `json:"additionalProperties,omitempty"` BillingPeriodId *string `json:"billingPeriodId,omitempty"` ConsumedQuantity *float64 `json:"consumedQuantity,omitempty"` ConsumedService *string `json:"consumedService,omitempty"` CostCenter *string `json:"costCenter,omitempty"` Currency *string `json:"currency,omitempty"` DepartmentName *string `json:"departmentName,omitempty"` InstanceId *string `json:"instanceId,omitempty"` InstanceName *string `json:"instanceName,omitempty"` IsEstimated *bool `json:"isEstimated,omitempty"` IsRecurringCharge *bool `json:"isRecurringCharge,omitempty"` MeterId *string `json:"meterId,omitempty"` OfferName *string `json:"offerName,omitempty"` OrderNumber *string `json:"orderNumber,omitempty"` PlanName *string `json:"planName,omitempty"` PretaxCost *float64 `json:"pretaxCost,omitempty"` PublisherName *string `json:"publisherName,omitempty"` ResourceGroup *string `json:"resourceGroup,omitempty"` ResourceRate *float64 `json:"resourceRate,omitempty"` SubscriptionGuid *string `json:"subscriptionGuid,omitempty"` SubscriptionName *string `json:"subscriptionName,omitempty"` UnitOfMeasure *string `json:"unitOfMeasure,omitempty"` UsageEnd *string `json:"usageEnd,omitempty"` UsageStart *string `json:"usageStart,omitempty"` }
func (*MarketplaceProperties) GetUsageEndAsTime ¶
func (o *MarketplaceProperties) GetUsageEndAsTime() (*time.Time, error)
func (*MarketplaceProperties) GetUsageStartAsTime ¶
func (o *MarketplaceProperties) GetUsageStartAsTime() (*time.Time, error)
func (*MarketplaceProperties) SetUsageEndAsTime ¶
func (o *MarketplaceProperties) SetUsageEndAsTime(input time.Time)
func (*MarketplaceProperties) SetUsageStartAsTime ¶
func (o *MarketplaceProperties) SetUsageStartAsTime(input time.Time)
type MarketplacesClient ¶
type MarketplacesClient struct {
Client *resourcemanager.Client
}
func NewMarketplacesClientWithBaseURI ¶
func NewMarketplacesClientWithBaseURI(api environments.Api) (*MarketplacesClient, error)
func (MarketplacesClient) List ¶
func (c MarketplacesClient) List(ctx context.Context, id commonids.ScopeId, options ListOperationOptions) (result ListOperationResponse, err error)
List ...
func (MarketplacesClient) ListComplete ¶
func (c MarketplacesClient) ListComplete(ctx context.Context, id commonids.ScopeId, options ListOperationOptions) (ListCompleteResult, error)
ListComplete retrieves all the results into a single object
func (MarketplacesClient) ListCompleteMatchingPredicate ¶
func (c MarketplacesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, options ListOperationOptions, predicate MarketplaceOperationPredicate) (result ListCompleteResult, err error)
ListCompleteMatchingPredicate retrieves all the results and then applies the predicate
Click to show internal directories.
Click to hide internal directories.