skuses

package
v0.20240117.1113630 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-03-01/skuses Documentation

The skuses SDK allows for interaction with the Azure Resource Manager Service azurestackhci (API Version 2023-03-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/azurestackhci/2023-03-01/skuses"

Client Initialization

client := skuses.NewSkusesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SkusesClient.SkusGet

ctx := context.TODO()
id := skuses.NewSkuID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "publisherValue", "offerValue", "skuValue")

read, err := client.SkusGet(ctx, id, skuses.DefaultSkusGetOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: SkusesClient.SkusListByOffer

ctx := context.TODO()
id := skuses.NewOfferID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "publisherValue", "offerValue")

// alternatively `client.SkusListByOffer(ctx, id, skuses.DefaultSkusListByOfferOperationOptions())` can be used to do batched pagination
items, err := client.SkusListByOfferComplete(ctx, id, skuses.DefaultSkusListByOfferOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateOfferID

func ValidateOfferID(input interface{}, key string) (warnings []string, errors []error)

ValidateOfferID checks that 'input' can be parsed as a Offer ID

func ValidateSkuID

func ValidateSkuID(input interface{}, key string) (warnings []string, errors []error)

ValidateSkuID checks that 'input' can be parsed as a Sku ID

Types

type OfferId

type OfferId struct {
	SubscriptionId    string
	ResourceGroupName string
	ClusterName       string
	PublisherName     string
	OfferName         string
}

OfferId is a struct representing the Resource ID for a Offer

func NewOfferID

func NewOfferID(subscriptionId string, resourceGroupName string, clusterName string, publisherName string, offerName string) OfferId

NewOfferID returns a new OfferId struct

func ParseOfferID

func ParseOfferID(input string) (*OfferId, error)

ParseOfferID parses 'input' into a OfferId

func ParseOfferIDInsensitively

func ParseOfferIDInsensitively(input string) (*OfferId, error)

ParseOfferIDInsensitively parses 'input' case-insensitively into a OfferId note: this method should only be used for API response data and not user input

func (*OfferId) FromParseResult added in v0.20231127.1171502

func (id *OfferId) FromParseResult(input resourceids.ParseResult) error

func (OfferId) ID

func (id OfferId) ID() string

ID returns the formatted Offer ID

func (OfferId) Segments

func (id OfferId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Offer ID

func (OfferId) String

func (id OfferId) String() string

String returns a human-readable description of this Offer ID

type Sku

type Sku struct {
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *SkuProperties         `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type SkuId

type SkuId struct {
	SubscriptionId    string
	ResourceGroupName string
	ClusterName       string
	PublisherName     string
	OfferName         string
	SkuName           string
}

SkuId is a struct representing the Resource ID for a Sku

func NewSkuID

func NewSkuID(subscriptionId string, resourceGroupName string, clusterName string, publisherName string, offerName string, skuName string) SkuId

NewSkuID returns a new SkuId struct

func ParseSkuID

func ParseSkuID(input string) (*SkuId, error)

ParseSkuID parses 'input' into a SkuId

func ParseSkuIDInsensitively

func ParseSkuIDInsensitively(input string) (*SkuId, error)

ParseSkuIDInsensitively parses 'input' case-insensitively into a SkuId note: this method should only be used for API response data and not user input

func (*SkuId) FromParseResult added in v0.20231127.1171502

func (id *SkuId) FromParseResult(input resourceids.ParseResult) error

func (SkuId) ID

func (id SkuId) ID() string

ID returns the formatted Sku ID

func (SkuId) Segments

func (id SkuId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Sku ID

func (SkuId) String

func (id SkuId) String() string

String returns a human-readable description of this Sku ID

type SkuMappings

type SkuMappings struct {
	CatalogPlanId          *string   `json:"catalogPlanId,omitempty"`
	MarketplaceSkuId       *string   `json:"marketplaceSkuId,omitempty"`
	MarketplaceSkuVersions *[]string `json:"marketplaceSkuVersions,omitempty"`
}

type SkuOperationPredicate

type SkuOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (SkuOperationPredicate) Matches

func (p SkuOperationPredicate) Matches(input Sku) bool

type SkuProperties

type SkuProperties struct {
	Content           *string        `json:"content,omitempty"`
	ContentVersion    *string        `json:"contentVersion,omitempty"`
	OfferId           *string        `json:"offerId,omitempty"`
	ProvisioningState *string        `json:"provisioningState,omitempty"`
	PublisherId       *string        `json:"publisherId,omitempty"`
	SkuMappings       *[]SkuMappings `json:"skuMappings,omitempty"`
}

type SkusGetOperationOptions

type SkusGetOperationOptions struct {
	Expand *string
}

func DefaultSkusGetOperationOptions

func DefaultSkusGetOperationOptions() SkusGetOperationOptions

func (SkusGetOperationOptions) ToHeaders added in v0.20230731.1080956

func (o SkusGetOperationOptions) ToHeaders() *client.Headers

func (SkusGetOperationOptions) ToOData added in v0.20230731.1080956

func (o SkusGetOperationOptions) ToOData() *odata.Query

func (SkusGetOperationOptions) ToQuery added in v0.20230731.1080956

type SkusGetOperationResponse

type SkusGetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Sku
}

type SkusListByOfferCompleteResult

type SkusListByOfferCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Sku
}

type SkusListByOfferOperationOptions

type SkusListByOfferOperationOptions struct {
	Expand *string
}

func DefaultSkusListByOfferOperationOptions

func DefaultSkusListByOfferOperationOptions() SkusListByOfferOperationOptions

func (SkusListByOfferOperationOptions) ToHeaders added in v0.20230731.1080956

func (SkusListByOfferOperationOptions) ToOData added in v0.20230731.1080956

func (SkusListByOfferOperationOptions) ToQuery added in v0.20230731.1080956

type SkusListByOfferOperationResponse

type SkusListByOfferOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Sku
}

type SkusesClient

type SkusesClient struct {
	Client *resourcemanager.Client
}

func NewSkusesClientWithBaseURI

func NewSkusesClientWithBaseURI(sdkApi sdkEnv.Api) (*SkusesClient, error)

func (SkusesClient) SkusGet

func (c SkusesClient) SkusGet(ctx context.Context, id SkuId, options SkusGetOperationOptions) (result SkusGetOperationResponse, err error)

SkusGet ...

func (SkusesClient) SkusListByOffer

SkusListByOffer ...

func (SkusesClient) SkusListByOfferComplete

SkusListByOfferComplete retrieves all the results into a single object

func (SkusesClient) SkusListByOfferCompleteMatchingPredicate

func (c SkusesClient) SkusListByOfferCompleteMatchingPredicate(ctx context.Context, id OfferId, options SkusListByOfferOperationOptions, predicate SkuOperationPredicate) (result SkusListByOfferCompleteResult, err error)

SkusListByOfferCompleteMatchingPredicate retrieves all the results and then applies the predicate

Jump to

Keyboard shortcuts

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