offers

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/offers Documentation

The offers 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/offers"

Client Initialization

client := offers.NewOffersClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: OffersClient.Get

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

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

Example Usage: OffersClient.ListByCluster

ctx := context.TODO()
id := offers.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue")

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

Example Usage: OffersClient.ListByPublisher

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

// alternatively `client.ListByPublisher(ctx, id, offers.DefaultListByPublisherOperationOptions())` can be used to do batched pagination
items, err := client.ListByPublisherComplete(ctx, id, offers.DefaultListByPublisherOperationOptions())
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 ValidateClusterID

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

ValidateClusterID checks that 'input' can be parsed as a Cluster ID

func ValidateOfferID

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

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

func ValidatePublisherID

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

ValidatePublisherID checks that 'input' can be parsed as a Publisher ID

Types

type ClusterId

type ClusterId struct {
	SubscriptionId    string
	ResourceGroupName string
	ClusterName       string
}

ClusterId is a struct representing the Resource ID for a Cluster

func NewClusterID

func NewClusterID(subscriptionId string, resourceGroupName string, clusterName string) ClusterId

NewClusterID returns a new ClusterId struct

func ParseClusterID

func ParseClusterID(input string) (*ClusterId, error)

ParseClusterID parses 'input' into a ClusterId

func ParseClusterIDInsensitively

func ParseClusterIDInsensitively(input string) (*ClusterId, error)

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

func (*ClusterId) FromParseResult added in v0.20231127.1171502

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

func (ClusterId) ID

func (id ClusterId) ID() string

ID returns the formatted Cluster ID

func (ClusterId) Segments

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

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

func (ClusterId) String

func (id ClusterId) String() string

String returns a human-readable description of this Cluster ID

type GetOperationOptions added in v0.20230906.1160501

type GetOperationOptions struct {
	Expand *string
}

func DefaultGetOperationOptions added in v0.20230906.1160501

func DefaultGetOperationOptions() GetOperationOptions

func (GetOperationOptions) ToHeaders added in v0.20230906.1160501

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

func (GetOperationOptions) ToOData added in v0.20230906.1160501

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

func (GetOperationOptions) ToQuery added in v0.20230906.1160501

func (o GetOperationOptions) ToQuery() *client.QueryParams

type GetOperationResponse added in v0.20230906.1160501

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Offer
}

type ListByClusterCompleteResult added in v0.20230906.1160501

type ListByClusterCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Offer
}

type ListByClusterOperationOptions added in v0.20230906.1160501

type ListByClusterOperationOptions struct {
	Expand *string
}

func DefaultListByClusterOperationOptions added in v0.20230906.1160501

func DefaultListByClusterOperationOptions() ListByClusterOperationOptions

func (ListByClusterOperationOptions) ToHeaders added in v0.20230906.1160501

func (ListByClusterOperationOptions) ToOData added in v0.20230906.1160501

func (ListByClusterOperationOptions) ToQuery added in v0.20230906.1160501

type ListByClusterOperationResponse added in v0.20230906.1160501

type ListByClusterOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Offer
}

type ListByPublisherCompleteResult added in v0.20230906.1160501

type ListByPublisherCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Offer
}

type ListByPublisherOperationOptions added in v0.20230906.1160501

type ListByPublisherOperationOptions struct {
	Expand *string
}

func DefaultListByPublisherOperationOptions added in v0.20230906.1160501

func DefaultListByPublisherOperationOptions() ListByPublisherOperationOptions

func (ListByPublisherOperationOptions) ToHeaders added in v0.20230906.1160501

func (ListByPublisherOperationOptions) ToOData added in v0.20230906.1160501

func (ListByPublisherOperationOptions) ToQuery added in v0.20230906.1160501

type ListByPublisherOperationResponse added in v0.20230906.1160501

type ListByPublisherOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Offer
}

type Offer

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

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 OfferOperationPredicate

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

func (OfferOperationPredicate) Matches

func (p OfferOperationPredicate) Matches(input Offer) bool

type OfferProperties

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

type OffersClient

type OffersClient struct {
	Client *resourcemanager.Client
}

func NewOffersClientWithBaseURI

func NewOffersClientWithBaseURI(sdkApi sdkEnv.Api) (*OffersClient, error)

func (OffersClient) Get added in v0.20230906.1160501

func (c OffersClient) Get(ctx context.Context, id OfferId, options GetOperationOptions) (result GetOperationResponse, err error)

Get ...

func (OffersClient) ListByCluster added in v0.20230906.1160501

ListByCluster ...

func (OffersClient) ListByClusterComplete added in v0.20230906.1160501

ListByClusterComplete retrieves all the results into a single object

func (OffersClient) ListByClusterCompleteMatchingPredicate added in v0.20230906.1160501

func (c OffersClient) ListByClusterCompleteMatchingPredicate(ctx context.Context, id ClusterId, options ListByClusterOperationOptions, predicate OfferOperationPredicate) (result ListByClusterCompleteResult, err error)

ListByClusterCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (OffersClient) ListByPublisher added in v0.20230906.1160501

ListByPublisher ...

func (OffersClient) ListByPublisherComplete added in v0.20230906.1160501

ListByPublisherComplete retrieves all the results into a single object

func (OffersClient) ListByPublisherCompleteMatchingPredicate added in v0.20230906.1160501

func (c OffersClient) ListByPublisherCompleteMatchingPredicate(ctx context.Context, id PublisherId, options ListByPublisherOperationOptions, predicate OfferOperationPredicate) (result ListByPublisherCompleteResult, err error)

ListByPublisherCompleteMatchingPredicate retrieves all the results and then applies the predicate

type PublisherId

type PublisherId struct {
	SubscriptionId    string
	ResourceGroupName string
	ClusterName       string
	PublisherName     string
}

PublisherId is a struct representing the Resource ID for a Publisher

func NewPublisherID

func NewPublisherID(subscriptionId string, resourceGroupName string, clusterName string, publisherName string) PublisherId

NewPublisherID returns a new PublisherId struct

func ParsePublisherID

func ParsePublisherID(input string) (*PublisherId, error)

ParsePublisherID parses 'input' into a PublisherId

func ParsePublisherIDInsensitively

func ParsePublisherIDInsensitively(input string) (*PublisherId, error)

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

func (*PublisherId) FromParseResult added in v0.20231127.1171502

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

func (PublisherId) ID

func (id PublisherId) ID() string

ID returns the formatted Publisher ID

func (PublisherId) Segments

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

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

func (PublisherId) String

func (id PublisherId) String() string

String returns a human-readable description of this Publisher ID

type SkuMappings

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

Jump to

Keyboard shortcuts

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