extensions

package
v0.20240903.1131440 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: MPL-2.0 Imports: 15 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions Documentation

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

Client Initialization

client := extensions.NewExtensionsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ExtensionsClient.Create

ctx := context.TODO()
id := extensions.NewExtensionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "arcSettingValue", "extensionValue")

payload := extensions.Extension{
	// ...
}


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

Example Usage: ExtensionsClient.Delete

ctx := context.TODO()
id := extensions.NewExtensionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "arcSettingValue", "extensionValue")

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

Example Usage: ExtensionsClient.Get

ctx := context.TODO()
id := extensions.NewExtensionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "arcSettingValue", "extensionValue")

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: ExtensionsClient.ListByArcSetting

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

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

Example Usage: ExtensionsClient.Update

ctx := context.TODO()
id := extensions.NewExtensionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "arcSettingValue", "extensionValue")

payload := extensions.ExtensionPatch{
	// ...
}


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

Example Usage: ExtensionsClient.Upgrade

ctx := context.TODO()
id := extensions.NewExtensionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "arcSettingValue", "extensionValue")

payload := extensions.ExtensionUpgradeParameters{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForExtensionAggregateState

func PossibleValuesForExtensionAggregateState() []string

func PossibleValuesForExtensionManagedBy

func PossibleValuesForExtensionManagedBy() []string

func PossibleValuesForNodeExtensionState

func PossibleValuesForNodeExtensionState() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForStatusLevelTypes

func PossibleValuesForStatusLevelTypes() []string

func ValidateArcSettingID

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

ValidateArcSettingID checks that 'input' can be parsed as a Arc Setting ID

func ValidateExtensionID

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

ValidateExtensionID checks that 'input' can be parsed as a Extension ID

Types

type ArcSettingId

type ArcSettingId struct {
	SubscriptionId    string
	ResourceGroupName string
	ClusterName       string
	ArcSettingName    string
}

ArcSettingId is a struct representing the Resource ID for a Arc Setting

func NewArcSettingID

func NewArcSettingID(subscriptionId string, resourceGroupName string, clusterName string, arcSettingName string) ArcSettingId

NewArcSettingID returns a new ArcSettingId struct

func ParseArcSettingID

func ParseArcSettingID(input string) (*ArcSettingId, error)

ParseArcSettingID parses 'input' into a ArcSettingId

func ParseArcSettingIDInsensitively

func ParseArcSettingIDInsensitively(input string) (*ArcSettingId, error)

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

func (*ArcSettingId) FromParseResult

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

func (ArcSettingId) ID

func (id ArcSettingId) ID() string

ID returns the formatted Arc Setting ID

func (ArcSettingId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Arc Setting ID

func (ArcSettingId) String

func (id ArcSettingId) String() string

String returns a human-readable description of this Arc Setting ID

type CreateOperationResponse

type CreateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Extension
}

type DeleteOperationResponse

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

type Extension

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

type ExtensionAggregateState

type ExtensionAggregateState string
const (
	ExtensionAggregateStateAccepted                       ExtensionAggregateState = "Accepted"
	ExtensionAggregateStateCanceled                       ExtensionAggregateState = "Canceled"
	ExtensionAggregateStateConnected                      ExtensionAggregateState = "Connected"
	ExtensionAggregateStateCreating                       ExtensionAggregateState = "Creating"
	ExtensionAggregateStateDeleted                        ExtensionAggregateState = "Deleted"
	ExtensionAggregateStateDeleting                       ExtensionAggregateState = "Deleting"
	ExtensionAggregateStateDisconnected                   ExtensionAggregateState = "Disconnected"
	ExtensionAggregateStateError                          ExtensionAggregateState = "Error"
	ExtensionAggregateStateFailed                         ExtensionAggregateState = "Failed"
	ExtensionAggregateStateInProgress                     ExtensionAggregateState = "InProgress"
	ExtensionAggregateStateMoving                         ExtensionAggregateState = "Moving"
	ExtensionAggregateStateNotSpecified                   ExtensionAggregateState = "NotSpecified"
	ExtensionAggregateStatePartiallyConnected             ExtensionAggregateState = "PartiallyConnected"
	ExtensionAggregateStatePartiallySucceeded             ExtensionAggregateState = "PartiallySucceeded"
	ExtensionAggregateStateProvisioning                   ExtensionAggregateState = "Provisioning"
	ExtensionAggregateStateSucceeded                      ExtensionAggregateState = "Succeeded"
	ExtensionAggregateStateUpdating                       ExtensionAggregateState = "Updating"
	ExtensionAggregateStateUpgradeFailedRollbackSucceeded ExtensionAggregateState = "UpgradeFailedRollbackSucceeded"
)

func (*ExtensionAggregateState) UnmarshalJSON

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

type ExtensionId

type ExtensionId struct {
	SubscriptionId    string
	ResourceGroupName string
	ClusterName       string
	ArcSettingName    string
	ExtensionName     string
}

ExtensionId is a struct representing the Resource ID for a Extension

func NewExtensionID

func NewExtensionID(subscriptionId string, resourceGroupName string, clusterName string, arcSettingName string, extensionName string) ExtensionId

NewExtensionID returns a new ExtensionId struct

func ParseExtensionID

func ParseExtensionID(input string) (*ExtensionId, error)

ParseExtensionID parses 'input' into a ExtensionId

func ParseExtensionIDInsensitively

func ParseExtensionIDInsensitively(input string) (*ExtensionId, error)

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

func (*ExtensionId) FromParseResult

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

func (ExtensionId) ID

func (id ExtensionId) ID() string

ID returns the formatted Extension ID

func (ExtensionId) Segments

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

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

func (ExtensionId) String

func (id ExtensionId) String() string

String returns a human-readable description of this Extension ID

type ExtensionInstanceView

type ExtensionInstanceView struct {
	Name               *string                      `json:"name,omitempty"`
	Status             *ExtensionInstanceViewStatus `json:"status,omitempty"`
	Type               *string                      `json:"type,omitempty"`
	TypeHandlerVersion *string                      `json:"typeHandlerVersion,omitempty"`
}

type ExtensionInstanceViewStatus

type ExtensionInstanceViewStatus struct {
	Code          *string           `json:"code,omitempty"`
	DisplayStatus *string           `json:"displayStatus,omitempty"`
	Level         *StatusLevelTypes `json:"level,omitempty"`
	Message       *string           `json:"message,omitempty"`
	Time          *string           `json:"time,omitempty"`
}

func (*ExtensionInstanceViewStatus) GetTimeAsTime

func (o *ExtensionInstanceViewStatus) GetTimeAsTime() (*time.Time, error)

func (*ExtensionInstanceViewStatus) SetTimeAsTime

func (o *ExtensionInstanceViewStatus) SetTimeAsTime(input time.Time)

type ExtensionManagedBy

type ExtensionManagedBy string
const (
	ExtensionManagedByAzure ExtensionManagedBy = "Azure"
	ExtensionManagedByUser  ExtensionManagedBy = "User"
)

func (*ExtensionManagedBy) UnmarshalJSON

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

type ExtensionOperationPredicate

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

func (ExtensionOperationPredicate) Matches

func (p ExtensionOperationPredicate) Matches(input Extension) bool

type ExtensionParameters

type ExtensionParameters struct {
	AutoUpgradeMinorVersion *bool        `json:"autoUpgradeMinorVersion,omitempty"`
	EnableAutomaticUpgrade  *bool        `json:"enableAutomaticUpgrade,omitempty"`
	ForceUpdateTag          *string      `json:"forceUpdateTag,omitempty"`
	ProtectedSettings       *interface{} `json:"protectedSettings,omitempty"`
	Publisher               *string      `json:"publisher,omitempty"`
	Settings                *interface{} `json:"settings,omitempty"`
	Type                    *string      `json:"type,omitempty"`
	TypeHandlerVersion      *string      `json:"typeHandlerVersion,omitempty"`
}

type ExtensionPatch

type ExtensionPatch struct {
	Properties *ExtensionPatchProperties `json:"properties,omitempty"`
}

type ExtensionPatchParameters

type ExtensionPatchParameters struct {
	EnableAutomaticUpgrade *bool        `json:"enableAutomaticUpgrade,omitempty"`
	ProtectedSettings      *interface{} `json:"protectedSettings,omitempty"`
	Settings               *interface{} `json:"settings,omitempty"`
	TypeHandlerVersion     *string      `json:"typeHandlerVersion,omitempty"`
}

type ExtensionPatchProperties

type ExtensionPatchProperties struct {
	ExtensionParameters *ExtensionPatchParameters `json:"extensionParameters,omitempty"`
}

type ExtensionProperties

type ExtensionProperties struct {
	AggregateState          *ExtensionAggregateState `json:"aggregateState,omitempty"`
	ExtensionParameters     *ExtensionParameters     `json:"extensionParameters,omitempty"`
	ManagedBy               *ExtensionManagedBy      `json:"managedBy,omitempty"`
	PerNodeExtensionDetails *[]PerNodeExtensionState `json:"perNodeExtensionDetails,omitempty"`
	ProvisioningState       *ProvisioningState       `json:"provisioningState,omitempty"`
}

type ExtensionUpgradeParameters

type ExtensionUpgradeParameters struct {
	TargetVersion *string `json:"targetVersion,omitempty"`
}

type ExtensionsClient

type ExtensionsClient struct {
	Client *resourcemanager.Client
}

func NewExtensionsClientWithBaseURI

func NewExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExtensionsClient, error)

func (ExtensionsClient) Create

func (c ExtensionsClient) Create(ctx context.Context, id ExtensionId, input Extension) (result CreateOperationResponse, err error)

Create ...

func (ExtensionsClient) CreateThenPoll

func (c ExtensionsClient) CreateThenPoll(ctx context.Context, id ExtensionId, input Extension) error

CreateThenPoll performs Create then polls until it's completed

func (ExtensionsClient) Delete

func (c ExtensionsClient) Delete(ctx context.Context, id ExtensionId) (result DeleteOperationResponse, err error)

Delete ...

func (ExtensionsClient) DeleteThenPoll

func (c ExtensionsClient) DeleteThenPoll(ctx context.Context, id ExtensionId) error

DeleteThenPoll performs Delete then polls until it's completed

func (ExtensionsClient) Get

Get ...

func (ExtensionsClient) ListByArcSetting

func (c ExtensionsClient) ListByArcSetting(ctx context.Context, id ArcSettingId) (result ListByArcSettingOperationResponse, err error)

ListByArcSetting ...

func (ExtensionsClient) ListByArcSettingComplete

func (c ExtensionsClient) ListByArcSettingComplete(ctx context.Context, id ArcSettingId) (ListByArcSettingCompleteResult, error)

ListByArcSettingComplete retrieves all the results into a single object

func (ExtensionsClient) ListByArcSettingCompleteMatchingPredicate

func (c ExtensionsClient) ListByArcSettingCompleteMatchingPredicate(ctx context.Context, id ArcSettingId, predicate ExtensionOperationPredicate) (result ListByArcSettingCompleteResult, err error)

ListByArcSettingCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ExtensionsClient) Update

Update ...

func (ExtensionsClient) UpdateThenPoll

func (c ExtensionsClient) UpdateThenPoll(ctx context.Context, id ExtensionId, input ExtensionPatch) error

UpdateThenPoll performs Update then polls until it's completed

func (ExtensionsClient) Upgrade

Upgrade ...

func (ExtensionsClient) UpgradeThenPoll

func (c ExtensionsClient) UpgradeThenPoll(ctx context.Context, id ExtensionId, input ExtensionUpgradeParameters) error

UpgradeThenPoll performs Upgrade then polls until it's completed

type GetOperationResponse

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

type ListByArcSettingCompleteResult

type ListByArcSettingCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Extension
}

type ListByArcSettingCustomPager added in v0.20240628.1153531

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

type ListByArcSettingOperationResponse

type ListByArcSettingOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Extension
}

type NodeExtensionState

type NodeExtensionState string
const (
	NodeExtensionStateAccepted           NodeExtensionState = "Accepted"
	NodeExtensionStateCanceled           NodeExtensionState = "Canceled"
	NodeExtensionStateConnected          NodeExtensionState = "Connected"
	NodeExtensionStateCreating           NodeExtensionState = "Creating"
	NodeExtensionStateDeleted            NodeExtensionState = "Deleted"
	NodeExtensionStateDeleting           NodeExtensionState = "Deleting"
	NodeExtensionStateDisconnected       NodeExtensionState = "Disconnected"
	NodeExtensionStateError              NodeExtensionState = "Error"
	NodeExtensionStateFailed             NodeExtensionState = "Failed"
	NodeExtensionStateInProgress         NodeExtensionState = "InProgress"
	NodeExtensionStateMoving             NodeExtensionState = "Moving"
	NodeExtensionStateNotSpecified       NodeExtensionState = "NotSpecified"
	NodeExtensionStatePartiallyConnected NodeExtensionState = "PartiallyConnected"
	NodeExtensionStatePartiallySucceeded NodeExtensionState = "PartiallySucceeded"
	NodeExtensionStateProvisioning       NodeExtensionState = "Provisioning"
	NodeExtensionStateSucceeded          NodeExtensionState = "Succeeded"
	NodeExtensionStateUpdating           NodeExtensionState = "Updating"
)

func (*NodeExtensionState) UnmarshalJSON

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

type PerNodeExtensionState

type PerNodeExtensionState struct {
	Extension          *string                `json:"extension,omitempty"`
	InstanceView       *ExtensionInstanceView `json:"instanceView,omitempty"`
	Name               *string                `json:"name,omitempty"`
	State              *NodeExtensionState    `json:"state,omitempty"`
	TypeHandlerVersion *string                `json:"typeHandlerVersion,omitempty"`
}

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAccepted           ProvisioningState = "Accepted"
	ProvisioningStateCanceled           ProvisioningState = "Canceled"
	ProvisioningStateConnected          ProvisioningState = "Connected"
	ProvisioningStateCreating           ProvisioningState = "Creating"
	ProvisioningStateDeleted            ProvisioningState = "Deleted"
	ProvisioningStateDeleting           ProvisioningState = "Deleting"
	ProvisioningStateDisconnected       ProvisioningState = "Disconnected"
	ProvisioningStateError              ProvisioningState = "Error"
	ProvisioningStateFailed             ProvisioningState = "Failed"
	ProvisioningStateInProgress         ProvisioningState = "InProgress"
	ProvisioningStateMoving             ProvisioningState = "Moving"
	ProvisioningStateNotSpecified       ProvisioningState = "NotSpecified"
	ProvisioningStatePartiallyConnected ProvisioningState = "PartiallyConnected"
	ProvisioningStatePartiallySucceeded ProvisioningState = "PartiallySucceeded"
	ProvisioningStateProvisioning       ProvisioningState = "Provisioning"
	ProvisioningStateSucceeded          ProvisioningState = "Succeeded"
	ProvisioningStateUpdating           ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

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

type StatusLevelTypes

type StatusLevelTypes string
const (
	StatusLevelTypesError   StatusLevelTypes = "Error"
	StatusLevelTypesInfo    StatusLevelTypes = "Info"
	StatusLevelTypesWarning StatusLevelTypes = "Warning"
)

func (*StatusLevelTypes) UnmarshalJSON

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

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Extension
}

type UpgradeOperationResponse

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

Jump to

Keyboard shortcuts

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