offers

package
v0.20231124.1163225 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-06-01/offers Documentation

The offers SDK allows for interaction with the Azure Resource Manager Service azurestackhci (API Version 2023-06-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-06-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) 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

type GetOperationOptions struct {
	Expand *string
}

func DefaultGetOperationOptions

func DefaultGetOperationOptions() GetOperationOptions

func (GetOperationOptions) ToHeaders

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

func (GetOperationOptions) ToOData

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

func (GetOperationOptions) ToQuery

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

type GetOperationResponse

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

type ListByClusterCompleteResult

type ListByClusterCompleteResult struct {
	Items []Offer
}

type ListByClusterOperationOptions

type ListByClusterOperationOptions struct {
	Expand *string
}

func DefaultListByClusterOperationOptions

func DefaultListByClusterOperationOptions() ListByClusterOperationOptions

func (ListByClusterOperationOptions) ToHeaders

func (ListByClusterOperationOptions) ToOData

func (ListByClusterOperationOptions) ToQuery

type ListByClusterOperationResponse

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

type ListByPublisherCompleteResult

type ListByPublisherCompleteResult struct {
	Items []Offer
}

type ListByPublisherOperationOptions

type ListByPublisherOperationOptions struct {
	Expand *string
}

func DefaultListByPublisherOperationOptions

func DefaultListByPublisherOperationOptions() ListByPublisherOperationOptions

func (ListByPublisherOperationOptions) ToHeaders

func (ListByPublisherOperationOptions) ToOData

func (ListByPublisherOperationOptions) ToQuery

type ListByPublisherOperationResponse

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) 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

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

Get ...

func (OffersClient) ListByCluster

ListByCluster ...

func (OffersClient) ListByClusterComplete

ListByClusterComplete retrieves all the results into a single object

func (OffersClient) ListByClusterCompleteMatchingPredicate

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

ListByPublisher ...

func (OffersClient) ListByPublisherComplete

ListByPublisherComplete retrieves all the results into a single object

func (OffersClient) ListByPublisherCompleteMatchingPredicate

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) 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