extensions

package
v0.20241126.1723 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/kubernetesconfiguration/2023-05-01/extensions Documentation

The extensions SDK allows for interaction with Azure Resource Manager kubernetesconfiguration (API Version 2023-05-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/kubernetesconfiguration/2023-05-01/extensions"

Client Initialization

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

Example Usage: ExtensionsClient.Create

ctx := context.TODO()
id := extensions.NewScopedExtensionID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "extensionName")

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


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

Example Usage: ExtensionsClient.Delete

ctx := context.TODO()
id := extensions.NewScopedExtensionID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "extensionName")

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

Example Usage: ExtensionsClient.Get

ctx := context.TODO()
id := extensions.NewScopedExtensionID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "extensionName")

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.List

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

// 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
}

Example Usage: ExtensionsClient.Update

ctx := context.TODO()
id := extensions.NewScopedExtensionID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "extensionName")

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


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForAKSIdentityType

func PossibleValuesForAKSIdentityType() []string

func PossibleValuesForLevelType

func PossibleValuesForLevelType() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateScopedExtensionID

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

ValidateScopedExtensionID checks that 'input' can be parsed as a Scoped Extension ID

Types

type AKSIdentityType

type AKSIdentityType string
const (
	AKSIdentityTypeSystemAssigned AKSIdentityType = "SystemAssigned"
	AKSIdentityTypeUserAssigned   AKSIdentityType = "UserAssigned"
)

func (*AKSIdentityType) UnmarshalJSON

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

type CreateOperationResponse

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

type DeleteOperationOptions

type DeleteOperationOptions struct {
	ForceDelete *bool
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

func (DeleteOperationOptions) ToHeaders

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

func (DeleteOperationOptions) ToOData

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

func (DeleteOperationOptions) ToQuery

type DeleteOperationResponse

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

type ErrorAdditionalInfo

type ErrorAdditionalInfo struct {
	Info *interface{} `json:"info,omitempty"`
	Type *string      `json:"type,omitempty"`
}

type ErrorDetail

type ErrorDetail struct {
	AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"`
	Code           *string                `json:"code,omitempty"`
	Details        *[]ErrorDetail         `json:"details,omitempty"`
	Message        *string                `json:"message,omitempty"`
	Target         *string                `json:"target,omitempty"`
}

type Extension

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

type ExtensionOperationPredicate

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

func (ExtensionOperationPredicate) Matches

func (p ExtensionOperationPredicate) Matches(input Extension) bool

type ExtensionProperties

type ExtensionProperties struct {
	AksAssignedIdentity            *ExtensionPropertiesAksAssignedIdentity `json:"aksAssignedIdentity,omitempty"`
	AutoUpgradeMinorVersion        *bool                                   `json:"autoUpgradeMinorVersion,omitempty"`
	ConfigurationProtectedSettings *map[string]string                      `json:"configurationProtectedSettings,omitempty"`
	ConfigurationSettings          *map[string]string                      `json:"configurationSettings,omitempty"`
	CurrentVersion                 *string                                 `json:"currentVersion,omitempty"`
	CustomLocationSettings         *map[string]string                      `json:"customLocationSettings,omitempty"`
	ErrorInfo                      *ErrorDetail                            `json:"errorInfo,omitempty"`
	ExtensionType                  *string                                 `json:"extensionType,omitempty"`
	IsSystemExtension              *bool                                   `json:"isSystemExtension,omitempty"`
	PackageUri                     *string                                 `json:"packageUri,omitempty"`
	ProvisioningState              *ProvisioningState                      `json:"provisioningState,omitempty"`
	ReleaseTrain                   *string                                 `json:"releaseTrain,omitempty"`
	Scope                          *Scope                                  `json:"scope,omitempty"`
	Statuses                       *[]ExtensionStatus                      `json:"statuses,omitempty"`
	Version                        *string                                 `json:"version,omitempty"`
}

type ExtensionPropertiesAksAssignedIdentity

type ExtensionPropertiesAksAssignedIdentity struct {
	PrincipalId *string          `json:"principalId,omitempty"`
	TenantId    *string          `json:"tenantId,omitempty"`
	Type        *AKSIdentityType `json:"type,omitempty"`
}

type ExtensionStatus

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

type ExtensionsClient

type ExtensionsClient struct {
	Client *resourcemanager.Client
}

func NewExtensionsClientWithBaseURI

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

func (ExtensionsClient) Create

Create ...

func (ExtensionsClient) CreateThenPoll

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

CreateThenPoll performs Create then polls until it's completed

func (ExtensionsClient) Delete

Delete ...

func (ExtensionsClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (ExtensionsClient) Get

Get ...

func (ExtensionsClient) List

List ...

func (ExtensionsClient) ListComplete

ListComplete retrieves all the results into a single object

func (ExtensionsClient) ListCompleteMatchingPredicate

func (c ExtensionsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, predicate ExtensionOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ExtensionsClient) Update

Update ...

func (ExtensionsClient) UpdateThenPoll

func (c ExtensionsClient) UpdateThenPoll(ctx context.Context, id ScopedExtensionId, input PatchExtension) error

UpdateThenPoll performs Update then polls until it's completed

type GetOperationResponse

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

type LevelType

type LevelType string
const (
	LevelTypeError       LevelType = "Error"
	LevelTypeInformation LevelType = "Information"
	LevelTypeWarning     LevelType = "Warning"
)

func (*LevelType) UnmarshalJSON

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

type ListCompleteResult

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

type ListCustomPager

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        *[]Extension
}

type PatchExtension

type PatchExtension struct {
	Properties *PatchExtensionProperties `json:"properties,omitempty"`
}

type PatchExtensionProperties

type PatchExtensionProperties struct {
	AutoUpgradeMinorVersion        *bool              `json:"autoUpgradeMinorVersion,omitempty"`
	ConfigurationProtectedSettings *map[string]string `json:"configurationProtectedSettings,omitempty"`
	ConfigurationSettings          *map[string]string `json:"configurationSettings,omitempty"`
	ReleaseTrain                   *string            `json:"releaseTrain,omitempty"`
	Version                        *string            `json:"version,omitempty"`
}

type Plan

type Plan struct {
	Name          string  `json:"name"`
	Product       string  `json:"product"`
	PromotionCode *string `json:"promotionCode,omitempty"`
	Publisher     string  `json:"publisher"`
	Version       *string `json:"version,omitempty"`
}

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateCanceled  ProvisioningState = "Canceled"
	ProvisioningStateCreating  ProvisioningState = "Creating"
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	ProvisioningStateUpdating  ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

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

type Scope

type Scope struct {
	Cluster   *ScopeCluster   `json:"cluster,omitempty"`
	Namespace *ScopeNamespace `json:"namespace,omitempty"`
}

type ScopeCluster

type ScopeCluster struct {
	ReleaseNamespace *string `json:"releaseNamespace,omitempty"`
}

type ScopeNamespace

type ScopeNamespace struct {
	TargetNamespace *string `json:"targetNamespace,omitempty"`
}

type ScopedExtensionId

type ScopedExtensionId struct {
	Scope         string
	ExtensionName string
}

ScopedExtensionId is a struct representing the Resource ID for a Scoped Extension

func NewScopedExtensionID

func NewScopedExtensionID(scope string, extensionName string) ScopedExtensionId

NewScopedExtensionID returns a new ScopedExtensionId struct

func ParseScopedExtensionID

func ParseScopedExtensionID(input string) (*ScopedExtensionId, error)

ParseScopedExtensionID parses 'input' into a ScopedExtensionId

func ParseScopedExtensionIDInsensitively

func ParseScopedExtensionIDInsensitively(input string) (*ScopedExtensionId, error)

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

func (*ScopedExtensionId) FromParseResult

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

func (ScopedExtensionId) ID

func (id ScopedExtensionId) ID() string

ID returns the formatted Scoped Extension ID

func (ScopedExtensionId) Segments

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

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

func (ScopedExtensionId) String

func (id ScopedExtensionId) String() string

String returns a human-readable description of this Scoped Extension ID

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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