addons

package
v0.20241023.1122425 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-03-01/addons Documentation

The addons SDK allows for interaction with Azure Resource Manager vmware (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/vmware/2023-03-01/addons"

Client Initialization

client := addons.NewAddonsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AddonsClient.CreateOrUpdate

ctx := context.TODO()
id := addons.NewAddonID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateCloudName", "addonName")

payload := addons.Addon{
	// ...
}


if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: AddonsClient.Delete

ctx := context.TODO()
id := addons.NewAddonID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateCloudName", "addonName")

if err := client.DeleteThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: AddonsClient.Get

ctx := context.TODO()
id := addons.NewAddonID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateCloudName", "addonName")

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

Example Usage: AddonsClient.List

ctx := context.TODO()
id := addons.NewPrivateCloudID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateCloudName")

// alternatively `client.List(ctx, id)` can be used to do batched pagination
items, err := client.ListComplete(ctx, id)
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 PossibleValuesForAddonProvisioningState

func PossibleValuesForAddonProvisioningState() []string

func PossibleValuesForAddonType

func PossibleValuesForAddonType() []string

func ValidateAddonID

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

ValidateAddonID checks that 'input' can be parsed as a Addon ID

func ValidatePrivateCloudID

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

ValidatePrivateCloudID checks that 'input' can be parsed as a Private Cloud ID

Types

type Addon

type Addon struct {
	Id         *string         `json:"id,omitempty"`
	Name       *string         `json:"name,omitempty"`
	Properties AddonProperties `json:"properties"`
	Type       *string         `json:"type,omitempty"`
}

func (*Addon) UnmarshalJSON

func (s *Addon) UnmarshalJSON(bytes []byte) error

type AddonArcProperties

type AddonArcProperties struct {
	VCenter *string `json:"vCenter,omitempty"`

	AddonType         AddonType               `json:"addonType"`
	ProvisioningState *AddonProvisioningState `json:"provisioningState,omitempty"`
}

func (AddonArcProperties) AddonProperties added in v0.20240920.1135249

func (s AddonArcProperties) AddonProperties() BaseAddonPropertiesImpl

func (AddonArcProperties) MarshalJSON

func (s AddonArcProperties) MarshalJSON() ([]byte, error)

type AddonHcxProperties

type AddonHcxProperties struct {
	Offer string `json:"offer"`

	AddonType         AddonType               `json:"addonType"`
	ProvisioningState *AddonProvisioningState `json:"provisioningState,omitempty"`
}

func (AddonHcxProperties) AddonProperties added in v0.20240920.1135249

func (s AddonHcxProperties) AddonProperties() BaseAddonPropertiesImpl

func (AddonHcxProperties) MarshalJSON

func (s AddonHcxProperties) MarshalJSON() ([]byte, error)

type AddonId

type AddonId struct {
	SubscriptionId    string
	ResourceGroupName string
	PrivateCloudName  string
	AddonName         string
}

AddonId is a struct representing the Resource ID for a Addon

func NewAddonID

func NewAddonID(subscriptionId string, resourceGroupName string, privateCloudName string, addonName string) AddonId

NewAddonID returns a new AddonId struct

func ParseAddonID

func ParseAddonID(input string) (*AddonId, error)

ParseAddonID parses 'input' into a AddonId

func ParseAddonIDInsensitively

func ParseAddonIDInsensitively(input string) (*AddonId, error)

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

func (*AddonId) FromParseResult

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

func (AddonId) ID

func (id AddonId) ID() string

ID returns the formatted Addon ID

func (AddonId) Segments

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

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

func (AddonId) String

func (id AddonId) String() string

String returns a human-readable description of this Addon ID

type AddonOperationPredicate

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

func (AddonOperationPredicate) Matches

func (p AddonOperationPredicate) Matches(input Addon) bool

type AddonProperties

type AddonProperties interface {
	AddonProperties() BaseAddonPropertiesImpl
}

func UnmarshalAddonPropertiesImplementation added in v0.20240920.1135249

func UnmarshalAddonPropertiesImplementation(input []byte) (AddonProperties, error)

type AddonProvisioningState

type AddonProvisioningState string
const (
	AddonProvisioningStateBuilding  AddonProvisioningState = "Building"
	AddonProvisioningStateCanceled  AddonProvisioningState = "Canceled"
	AddonProvisioningStateCancelled AddonProvisioningState = "Cancelled"
	AddonProvisioningStateDeleting  AddonProvisioningState = "Deleting"
	AddonProvisioningStateFailed    AddonProvisioningState = "Failed"
	AddonProvisioningStateSucceeded AddonProvisioningState = "Succeeded"
	AddonProvisioningStateUpdating  AddonProvisioningState = "Updating"
)

func (*AddonProvisioningState) UnmarshalJSON

func (s *AddonProvisioningState) UnmarshalJSON(bytes []byte) error

type AddonSrmProperties

type AddonSrmProperties struct {
	LicenseKey *string `json:"licenseKey,omitempty"`

	AddonType         AddonType               `json:"addonType"`
	ProvisioningState *AddonProvisioningState `json:"provisioningState,omitempty"`
}

func (AddonSrmProperties) AddonProperties added in v0.20240920.1135249

func (s AddonSrmProperties) AddonProperties() BaseAddonPropertiesImpl

func (AddonSrmProperties) MarshalJSON

func (s AddonSrmProperties) MarshalJSON() ([]byte, error)

type AddonType

type AddonType string
const (
	AddonTypeArc AddonType = "Arc"
	AddonTypeHCX AddonType = "HCX"
	AddonTypeSRM AddonType = "SRM"
	AddonTypeVR  AddonType = "VR"
)

func (*AddonType) UnmarshalJSON

func (s *AddonType) UnmarshalJSON(bytes []byte) error

type AddonVrProperties

type AddonVrProperties struct {
	VrsCount int64 `json:"vrsCount"`

	AddonType         AddonType               `json:"addonType"`
	ProvisioningState *AddonProvisioningState `json:"provisioningState,omitempty"`
}

func (AddonVrProperties) AddonProperties added in v0.20240920.1135249

func (s AddonVrProperties) AddonProperties() BaseAddonPropertiesImpl

func (AddonVrProperties) MarshalJSON

func (s AddonVrProperties) MarshalJSON() ([]byte, error)

type AddonsClient

type AddonsClient struct {
	Client *resourcemanager.Client
}

func NewAddonsClientWithBaseURI

func NewAddonsClientWithBaseURI(sdkApi sdkEnv.Api) (*AddonsClient, error)

func (AddonsClient) CreateOrUpdate

func (c AddonsClient) CreateOrUpdate(ctx context.Context, id AddonId, input Addon) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (AddonsClient) CreateOrUpdateThenPoll

func (c AddonsClient) CreateOrUpdateThenPoll(ctx context.Context, id AddonId, input Addon) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (AddonsClient) Delete

func (c AddonsClient) Delete(ctx context.Context, id AddonId) (result DeleteOperationResponse, err error)

Delete ...

func (AddonsClient) DeleteThenPoll

func (c AddonsClient) DeleteThenPoll(ctx context.Context, id AddonId) error

DeleteThenPoll performs Delete then polls until it's completed

func (AddonsClient) Get

func (c AddonsClient) Get(ctx context.Context, id AddonId) (result GetOperationResponse, err error)

Get ...

func (AddonsClient) List

func (c AddonsClient) List(ctx context.Context, id PrivateCloudId) (result ListOperationResponse, err error)

List ...

func (AddonsClient) ListComplete

ListComplete retrieves all the results into a single object

func (AddonsClient) ListCompleteMatchingPredicate

func (c AddonsClient) ListCompleteMatchingPredicate(ctx context.Context, id PrivateCloudId, predicate AddonOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type BaseAddonPropertiesImpl added in v0.20240920.1135249

type BaseAddonPropertiesImpl struct {
	AddonType         AddonType               `json:"addonType"`
	ProvisioningState *AddonProvisioningState `json:"provisioningState,omitempty"`
}

func (BaseAddonPropertiesImpl) AddonProperties added in v0.20240920.1135249

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Addon
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetOperationResponse

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

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Addon
}

type ListCustomPager added in v0.20240628.1153531

type ListCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListCustomPager) NextPageLink() *odata.Link

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Addon
}

type PrivateCloudId

type PrivateCloudId struct {
	SubscriptionId    string
	ResourceGroupName string
	PrivateCloudName  string
}

PrivateCloudId is a struct representing the Resource ID for a Private Cloud

func NewPrivateCloudID

func NewPrivateCloudID(subscriptionId string, resourceGroupName string, privateCloudName string) PrivateCloudId

NewPrivateCloudID returns a new PrivateCloudId struct

func ParsePrivateCloudID

func ParsePrivateCloudID(input string) (*PrivateCloudId, error)

ParsePrivateCloudID parses 'input' into a PrivateCloudId

func ParsePrivateCloudIDInsensitively

func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error)

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

func (*PrivateCloudId) FromParseResult

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

func (PrivateCloudId) ID

func (id PrivateCloudId) ID() string

ID returns the formatted Private Cloud ID

func (PrivateCloudId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Private Cloud ID

func (PrivateCloudId) String

func (id PrivateCloudId) String() string

String returns a human-readable description of this Private Cloud ID

type RawAddonPropertiesImpl

type RawAddonPropertiesImpl struct {
	Type   string
	Values map[string]interface{}
	// contains filtered or unexported fields
}

RawAddonPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) and is used only for Deserialization (e.g. this cannot be used as a Request Payload).

func (RawAddonPropertiesImpl) AddonProperties added in v0.20240920.1135249

func (s RawAddonPropertiesImpl) AddonProperties() BaseAddonPropertiesImpl

Jump to

Keyboard shortcuts

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