appliances

package
v0.20240524.1090207 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: MPL-2.0 Imports: 15 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/resourceconnector/2022-10-27/appliances Documentation

The appliances SDK allows for interaction with the Azure Resource Manager Service resourceconnector (API Version 2022-10-27).

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/resourceconnector/2022-10-27/appliances"

Client Initialization

client := appliances.NewAppliancesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AppliancesClient.CreateOrUpdate

ctx := context.TODO()
id := appliances.NewApplianceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applianceValue")

payload := appliances.Appliance{
	// ...
}


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

Example Usage: AppliancesClient.Delete

ctx := context.TODO()
id := appliances.NewApplianceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applianceValue")

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

Example Usage: AppliancesClient.Get

ctx := context.TODO()
id := appliances.NewApplianceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applianceValue")

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: AppliancesClient.GetTelemetryConfig

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

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

Example Usage: AppliancesClient.GetUpgradeGraph

ctx := context.TODO()
id := appliances.NewUpgradeGraphID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applianceValue", "upgradeGraphValue")

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

Example Usage: AppliancesClient.ListByResourceGroup

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

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

Example Usage: AppliancesClient.ListBySubscription

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

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

Example Usage: AppliancesClient.ListClusterUserCredential

ctx := context.TODO()
id := appliances.NewApplianceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applianceValue")

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

Example Usage: AppliancesClient.ListKeys

ctx := context.TODO()
id := appliances.NewApplianceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applianceValue")

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

Example Usage: AppliancesClient.Update

ctx := context.TODO()
id := appliances.NewApplianceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applianceValue")

payload := appliances.PatchableAppliance{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForAccessProfileType

func PossibleValuesForAccessProfileType() []string

func PossibleValuesForDistro

func PossibleValuesForDistro() []string

func PossibleValuesForProvider

func PossibleValuesForProvider() []string

func PossibleValuesForStatus

func PossibleValuesForStatus() []string

func ValidateApplianceID

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

ValidateApplianceID checks that 'input' can be parsed as a Appliance ID

func ValidateUpgradeGraphID

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

ValidateUpgradeGraphID checks that 'input' can be parsed as a Upgrade Graph ID

Types

type AccessProfileType

type AccessProfileType string
const (
	AccessProfileTypeClusterCustomerUser AccessProfileType = "clusterCustomerUser"
	AccessProfileTypeClusterUser         AccessProfileType = "clusterUser"
)

func (*AccessProfileType) UnmarshalJSON

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

type Appliance

type Appliance struct {
	Id         *string                  `json:"id,omitempty"`
	Identity   *identity.SystemAssigned `json:"identity,omitempty"`
	Location   string                   `json:"location"`
	Name       *string                  `json:"name,omitempty"`
	Properties *ApplianceProperties     `json:"properties,omitempty"`
	SystemData *systemdata.SystemData   `json:"systemData,omitempty"`
	Tags       *map[string]string       `json:"tags,omitempty"`
	Type       *string                  `json:"type,omitempty"`
}

type ApplianceCredentialKubeconfig

type ApplianceCredentialKubeconfig struct {
	Name  *AccessProfileType `json:"name,omitempty"`
	Value *string            `json:"value,omitempty"`
}

type ApplianceGetTelemetryConfigResult

type ApplianceGetTelemetryConfigResult struct {
	TelemetryInstrumentationKey *string `json:"telemetryInstrumentationKey,omitempty"`
}

type ApplianceId

type ApplianceId struct {
	SubscriptionId    string
	ResourceGroupName string
	ApplianceName     string
}

ApplianceId is a struct representing the Resource ID for a Appliance

func NewApplianceID

func NewApplianceID(subscriptionId string, resourceGroupName string, applianceName string) ApplianceId

NewApplianceID returns a new ApplianceId struct

func ParseApplianceID

func ParseApplianceID(input string) (*ApplianceId, error)

ParseApplianceID parses 'input' into a ApplianceId

func ParseApplianceIDInsensitively

func ParseApplianceIDInsensitively(input string) (*ApplianceId, error)

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

func (*ApplianceId) FromParseResult

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

func (ApplianceId) ID

func (id ApplianceId) ID() string

ID returns the formatted Appliance ID

func (ApplianceId) Segments

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

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

func (ApplianceId) String

func (id ApplianceId) String() string

String returns a human-readable description of this Appliance ID

type ApplianceListCredentialResults

type ApplianceListCredentialResults struct {
	HybridConnectionConfig *HybridConnectionConfig          `json:"hybridConnectionConfig,omitempty"`
	Kubeconfigs            *[]ApplianceCredentialKubeconfig `json:"kubeconfigs,omitempty"`
}

type ApplianceListKeysResults

type ApplianceListKeysResults struct {
	ArtifactProfiles *map[string]ArtifactProfile      `json:"artifactProfiles,omitempty"`
	Kubeconfigs      *[]ApplianceCredentialKubeconfig `json:"kubeconfigs,omitempty"`
	SshKeys          *map[string]SSHKey               `json:"sshKeys,omitempty"`
}

type ApplianceOperationPredicate

type ApplianceOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (ApplianceOperationPredicate) Matches

func (p ApplianceOperationPredicate) Matches(input Appliance) bool

type ApplianceProperties

type ApplianceProperties struct {
	Distro               *Distro                                  `json:"distro,omitempty"`
	InfrastructureConfig *AppliancePropertiesInfrastructureConfig `json:"infrastructureConfig,omitempty"`
	ProvisioningState    *string                                  `json:"provisioningState,omitempty"`
	PublicKey            *string                                  `json:"publicKey,omitempty"`
	Status               *Status                                  `json:"status,omitempty"`
	Version              *string                                  `json:"version,omitempty"`
}

type AppliancePropertiesInfrastructureConfig

type AppliancePropertiesInfrastructureConfig struct {
	Provider *Provider `json:"provider,omitempty"`
}

type AppliancesClient

type AppliancesClient struct {
	Client *resourcemanager.Client
}

func NewAppliancesClientWithBaseURI

func NewAppliancesClientWithBaseURI(sdkApi sdkEnv.Api) (*AppliancesClient, error)

func (AppliancesClient) CreateOrUpdate

func (c AppliancesClient) CreateOrUpdate(ctx context.Context, id ApplianceId, input Appliance) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (AppliancesClient) CreateOrUpdateThenPoll

func (c AppliancesClient) CreateOrUpdateThenPoll(ctx context.Context, id ApplianceId, input Appliance) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (AppliancesClient) Delete

func (c AppliancesClient) Delete(ctx context.Context, id ApplianceId) (result DeleteOperationResponse, err error)

Delete ...

func (AppliancesClient) DeleteThenPoll

func (c AppliancesClient) DeleteThenPoll(ctx context.Context, id ApplianceId) error

DeleteThenPoll performs Delete then polls until it's completed

func (AppliancesClient) Get

Get ...

func (AppliancesClient) GetTelemetryConfig

GetTelemetryConfig ...

func (AppliancesClient) GetUpgradeGraph

func (c AppliancesClient) GetUpgradeGraph(ctx context.Context, id UpgradeGraphId) (result GetUpgradeGraphOperationResponse, err error)

GetUpgradeGraph ...

func (AppliancesClient) ListByResourceGroup

ListByResourceGroup ...

func (AppliancesClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (AppliancesClient) ListByResourceGroupCompleteMatchingPredicate

func (c AppliancesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ApplianceOperationPredicate) (result ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (AppliancesClient) ListBySubscription

ListBySubscription ...

func (AppliancesClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all the results into a single object

func (AppliancesClient) ListBySubscriptionCompleteMatchingPredicate

func (c AppliancesClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ApplianceOperationPredicate) (result ListBySubscriptionCompleteResult, err error)

ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (AppliancesClient) ListClusterUserCredential

func (c AppliancesClient) ListClusterUserCredential(ctx context.Context, id ApplianceId) (result ListClusterUserCredentialOperationResponse, err error)

ListClusterUserCredential ...

func (AppliancesClient) ListKeys

ListKeys ...

func (AppliancesClient) Update

Update ...

type ArtifactProfile

type ArtifactProfile struct {
	Endpoint *string `json:"endpoint,omitempty"`
}

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type Distro

type Distro string
const (
	DistroAKSEdge Distro = "AKSEdge"
)

func (*Distro) UnmarshalJSON

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

type GetOperationResponse

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

type GetTelemetryConfigOperationResponse

type GetTelemetryConfigOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ApplianceGetTelemetryConfigResult
}

type GetUpgradeGraphOperationResponse

type GetUpgradeGraphOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *UpgradeGraph
}

type HybridConnectionConfig

type HybridConnectionConfig struct {
	ExpirationTime       *int64  `json:"expirationTime,omitempty"`
	HybridConnectionName *string `json:"hybridConnectionName,omitempty"`
	Relay                *string `json:"relay,omitempty"`
	Token                *string `json:"token,omitempty"`
}

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Appliance
}

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Appliance
}

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Appliance
}

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Appliance
}

type ListClusterUserCredentialOperationResponse

type ListClusterUserCredentialOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ApplianceListCredentialResults
}

type ListKeysOperationOptions

type ListKeysOperationOptions struct {
	ArtifactType *string
}

func DefaultListKeysOperationOptions

func DefaultListKeysOperationOptions() ListKeysOperationOptions

func (ListKeysOperationOptions) ToHeaders

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

func (ListKeysOperationOptions) ToOData

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

func (ListKeysOperationOptions) ToQuery

type ListKeysOperationResponse

type ListKeysOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ApplianceListKeysResults
}

type PatchableAppliance

type PatchableAppliance struct {
	Tags *map[string]string `json:"tags,omitempty"`
}

type Provider

type Provider string
const (
	ProviderHCI    Provider = "HCI"
	ProviderSCVMM  Provider = "SCVMM"
	ProviderVMWare Provider = "VMWare"
)

func (*Provider) UnmarshalJSON

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

type SSHKey

type SSHKey struct {
	Certificate         *string `json:"certificate,omitempty"`
	CreationTimeStamp   *int64  `json:"creationTimeStamp,omitempty"`
	ExpirationTimeStamp *int64  `json:"expirationTimeStamp,omitempty"`
	PrivateKey          *string `json:"privateKey,omitempty"`
	PublicKey           *string `json:"publicKey,omitempty"`
}

type Status

type Status string
const (
	StatusConnected                             Status = "Connected"
	StatusConnecting                            Status = "Connecting"
	StatusETCDSnapshotFailed                    Status = "ETCDSnapshotFailed"
	StatusImageDeprovisioning                   Status = "ImageDeprovisioning"
	StatusImageDownloaded                       Status = "ImageDownloaded"
	StatusImageDownloading                      Status = "ImageDownloading"
	StatusImagePending                          Status = "ImagePending"
	StatusImageProvisioned                      Status = "ImageProvisioned"
	StatusImageProvisioning                     Status = "ImageProvisioning"
	StatusImageUnknown                          Status = "ImageUnknown"
	StatusNone                                  Status = "None"
	StatusOffline                               Status = "Offline"
	StatusPostUpgrade                           Status = "PostUpgrade"
	StatusPreUpgrade                            Status = "PreUpgrade"
	StatusPreparingForUpgrade                   Status = "PreparingForUpgrade"
	StatusRunning                               Status = "Running"
	StatusUpdatingCAPI                          Status = "UpdatingCAPI"
	StatusUpdatingCloudOperator                 Status = "UpdatingCloudOperator"
	StatusUpdatingCluster                       Status = "UpdatingCluster"
	StatusUpgradeClusterExtensionFailedToDelete Status = "UpgradeClusterExtensionFailedToDelete"
	StatusUpgradeComplete                       Status = "UpgradeComplete"
	StatusUpgradeFailed                         Status = "UpgradeFailed"
	StatusUpgradePrerequisitesCompleted         Status = "UpgradePrerequisitesCompleted"
	StatusUpgradingKVAIO                        Status = "UpgradingKVAIO"
	StatusValidating                            Status = "Validating"
	StatusValidatingETCDHealth                  Status = "ValidatingETCDHealth"
	StatusValidatingImageDownload               Status = "ValidatingImageDownload"
	StatusValidatingImageUpload                 Status = "ValidatingImageUpload"
	StatusValidatingSFSConnectivity             Status = "ValidatingSFSConnectivity"
	StatusWaitingForCloudOperator               Status = "WaitingForCloudOperator"
	StatusWaitingForHeartbeat                   Status = "WaitingForHeartbeat"
	StatusWaitingForKVAIO                       Status = "WaitingForKVAIO"
)

func (*Status) UnmarshalJSON

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

type SupportedVersion

type SupportedVersion struct {
	Metadata *SupportedVersionMetadata `json:"metadata,omitempty"`
	Version  *string                   `json:"version,omitempty"`
}

type SupportedVersionCatalogVersion

type SupportedVersionCatalogVersion struct {
	Data      *SupportedVersionCatalogVersionData `json:"data,omitempty"`
	Name      *string                             `json:"name,omitempty"`
	Namespace *string                             `json:"namespace,omitempty"`
}

type SupportedVersionCatalogVersionData

type SupportedVersionCatalogVersionData struct {
	Audience *string `json:"audience,omitempty"`
	Catalog  *string `json:"catalog,omitempty"`
	Offer    *string `json:"offer,omitempty"`
	Version  *string `json:"version,omitempty"`
}

type SupportedVersionMetadata

type SupportedVersionMetadata struct {
	CatalogVersion *SupportedVersionCatalogVersion `json:"catalogVersion,omitempty"`
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Appliance
}

type UpgradeGraph

type UpgradeGraph struct {
	Id         *string                 `json:"id,omitempty"`
	Name       *string                 `json:"name,omitempty"`
	Properties *UpgradeGraphProperties `json:"properties,omitempty"`
}

type UpgradeGraphId

type UpgradeGraphId struct {
	SubscriptionId    string
	ResourceGroupName string
	ApplianceName     string
	UpgradeGraphName  string
}

UpgradeGraphId is a struct representing the Resource ID for a Upgrade Graph

func NewUpgradeGraphID

func NewUpgradeGraphID(subscriptionId string, resourceGroupName string, applianceName string, upgradeGraphName string) UpgradeGraphId

NewUpgradeGraphID returns a new UpgradeGraphId struct

func ParseUpgradeGraphID

func ParseUpgradeGraphID(input string) (*UpgradeGraphId, error)

ParseUpgradeGraphID parses 'input' into a UpgradeGraphId

func ParseUpgradeGraphIDInsensitively

func ParseUpgradeGraphIDInsensitively(input string) (*UpgradeGraphId, error)

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

func (*UpgradeGraphId) FromParseResult

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

func (UpgradeGraphId) ID

func (id UpgradeGraphId) ID() string

ID returns the formatted Upgrade Graph ID

func (UpgradeGraphId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Upgrade Graph ID

func (UpgradeGraphId) String

func (id UpgradeGraphId) String() string

String returns a human-readable description of this Upgrade Graph ID

type UpgradeGraphProperties

type UpgradeGraphProperties struct {
	ApplianceVersion  *string             `json:"applianceVersion,omitempty"`
	SupportedVersions *[]SupportedVersion `json:"supportedVersions,omitempty"`
}

Jump to

Keyboard shortcuts

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