cloudlinks

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: 12 Imported by: 1

README

The cloudlinks SDK allows for interaction with the Azure Resource Manager Service vmware (API Version 2022-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-sdk/resource-manager/vmware/2022-05-01/cloudlinks"

Client Initialization

client := cloudlinks.NewCloudLinksClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: CloudLinksClient.CreateOrUpdate

ctx := context.TODO()
id := cloudlinks.NewCloudLinkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateCloudValue", "cloudLinkValue")

payload := cloudlinks.CloudLink{
	// ...
}


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

Example Usage: CloudLinksClient.Delete

ctx := context.TODO()
id := cloudlinks.NewCloudLinkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateCloudValue", "cloudLinkValue")

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

Example Usage: CloudLinksClient.Get

ctx := context.TODO()
id := cloudlinks.NewCloudLinkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateCloudValue", "cloudLinkValue")

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

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

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

func PossibleValuesForCloudLinkStatus() []string

func ValidateCloudLinkID

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

ValidateCloudLinkID checks that 'input' can be parsed as a Cloud Link 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 CloudLink struct {
	Id         *string              `json:"id,omitempty"`
	Name       *string              `json:"name,omitempty"`
	Properties *CloudLinkProperties `json:"properties,omitempty"`
	Type       *string              `json:"type,omitempty"`
}

type CloudLinkId

type CloudLinkId struct {
	SubscriptionId    string
	ResourceGroupName string
	PrivateCloudName  string
	CloudLinkName     string
}

CloudLinkId is a struct representing the Resource ID for a Cloud Link

func NewCloudLinkID

func NewCloudLinkID(subscriptionId string, resourceGroupName string, privateCloudName string, cloudLinkName string) CloudLinkId

NewCloudLinkID returns a new CloudLinkId struct

func ParseCloudLinkID

func ParseCloudLinkID(input string) (*CloudLinkId, error)

ParseCloudLinkID parses 'input' into a CloudLinkId

func ParseCloudLinkIDInsensitively

func ParseCloudLinkIDInsensitively(input string) (*CloudLinkId, error)

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

func (*CloudLinkId) FromParseResult

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

func (CloudLinkId) ID

func (id CloudLinkId) ID() string

ID returns the formatted Cloud Link ID

func (CloudLinkId) Segments

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

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

func (CloudLinkId) String

func (id CloudLinkId) String() string

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

type CloudLinkOperationPredicate

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

func (CloudLinkOperationPredicate) Matches

func (p CloudLinkOperationPredicate) Matches(input CloudLink) bool

type CloudLinkProperties

type CloudLinkProperties struct {
	LinkedCloud *string          `json:"linkedCloud,omitempty"`
	Status      *CloudLinkStatus `json:"status,omitempty"`
}

type CloudLinkStatus

type CloudLinkStatus string
const (
	CloudLinkStatusActive       CloudLinkStatus = "Active"
	CloudLinkStatusBuilding     CloudLinkStatus = "Building"
	CloudLinkStatusDeleting     CloudLinkStatus = "Deleting"
	CloudLinkStatusDisconnected CloudLinkStatus = "Disconnected"
	CloudLinkStatusFailed       CloudLinkStatus = "Failed"
)

func (*CloudLinkStatus) UnmarshalJSON

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

type CloudLinksClient

type CloudLinksClient struct {
	Client *resourcemanager.Client
}

func NewCloudLinksClientWithBaseURI

func NewCloudLinksClientWithBaseURI(sdkApi sdkEnv.Api) (*CloudLinksClient, error)

func (CloudLinksClient) CreateOrUpdate

func (c CloudLinksClient) CreateOrUpdate(ctx context.Context, id CloudLinkId, input CloudLink) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (CloudLinksClient) CreateOrUpdateThenPoll

func (c CloudLinksClient) CreateOrUpdateThenPoll(ctx context.Context, id CloudLinkId, input CloudLink) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (CloudLinksClient) Delete

func (c CloudLinksClient) Delete(ctx context.Context, id CloudLinkId) (result DeleteOperationResponse, err error)

Delete ...

func (CloudLinksClient) DeleteThenPoll

func (c CloudLinksClient) DeleteThenPoll(ctx context.Context, id CloudLinkId) error

DeleteThenPoll performs Delete then polls until it's completed

func (CloudLinksClient) Get

Get ...

func (CloudLinksClient) List

List ...

func (CloudLinksClient) ListComplete

ListComplete retrieves all the results into a single object

func (CloudLinksClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type CreateOrUpdateOperationResponse

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

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        *CloudLink
}

type ListCompleteResult

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

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

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

Jump to

Keyboard shortcuts

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