virtualclusters

package
v0.20240318.1145438 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/virtualclusters Documentation

The virtualclusters SDK allows for interaction with the Azure Resource Manager Service sql (API Version 2023-05-01-preview).

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/sql/2023-05-01-preview/virtualclusters"

Client Initialization

client := virtualclusters.NewVirtualClustersClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: VirtualClustersClient.Delete

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

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

Example Usage: VirtualClustersClient.Get

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

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

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

// 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: VirtualClustersClient.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: VirtualClustersClient.Update

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

payload := virtualclusters.VirtualClusterUpdate{
	// ...
}


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

Example Usage: VirtualClustersClient.UpdateDnsServers

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForDNSRefreshOperationStatus

func PossibleValuesForDNSRefreshOperationStatus() []string

func ValidateVirtualClusterID

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

ValidateVirtualClusterID checks that 'input' can be parsed as a Virtual Cluster ID

Types

type DNSRefreshOperationStatus

type DNSRefreshOperationStatus string
const (
	DNSRefreshOperationStatusFailed     DNSRefreshOperationStatus = "Failed"
	DNSRefreshOperationStatusInProgress DNSRefreshOperationStatus = "InProgress"
	DNSRefreshOperationStatusSucceeded  DNSRefreshOperationStatus = "Succeeded"
)

func (*DNSRefreshOperationStatus) UnmarshalJSON

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

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

type ListByResourceGroupCompleteResult

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

type ListByResourceGroupOperationResponse

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

type ListCompleteResult

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

type ListOperationResponse

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

type UpdateDnsServersOperationResponse

type UpdateDnsServersOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *UpdateVirtualClusterDnsServersOperation
}

type UpdateOperationResponse

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

type UpdateVirtualClusterDnsServersOperation

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

type VirtualCluster

type VirtualCluster struct {
	Id         *string                   `json:"id,omitempty"`
	Location   string                    `json:"location"`
	Name       *string                   `json:"name,omitempty"`
	Properties *VirtualClusterProperties `json:"properties,omitempty"`
	Tags       *map[string]string        `json:"tags,omitempty"`
	Type       *string                   `json:"type,omitempty"`
}

type VirtualClusterDnsServersProperties

type VirtualClusterDnsServersProperties struct {
	Status *DNSRefreshOperationStatus `json:"status,omitempty"`
}

type VirtualClusterId

type VirtualClusterId struct {
	SubscriptionId     string
	ResourceGroupName  string
	VirtualClusterName string
}

VirtualClusterId is a struct representing the Resource ID for a Virtual Cluster

func NewVirtualClusterID

func NewVirtualClusterID(subscriptionId string, resourceGroupName string, virtualClusterName string) VirtualClusterId

NewVirtualClusterID returns a new VirtualClusterId struct

func ParseVirtualClusterID

func ParseVirtualClusterID(input string) (*VirtualClusterId, error)

ParseVirtualClusterID parses 'input' into a VirtualClusterId

func ParseVirtualClusterIDInsensitively

func ParseVirtualClusterIDInsensitively(input string) (*VirtualClusterId, error)

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

func (*VirtualClusterId) FromParseResult

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

func (VirtualClusterId) ID

func (id VirtualClusterId) ID() string

ID returns the formatted Virtual Cluster ID

func (VirtualClusterId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Virtual Cluster ID

func (VirtualClusterId) String

func (id VirtualClusterId) String() string

String returns a human-readable description of this Virtual Cluster ID

type VirtualClusterOperationPredicate

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

func (VirtualClusterOperationPredicate) Matches

type VirtualClusterProperties

type VirtualClusterProperties struct {
	ChildResources *[]string `json:"childResources,omitempty"`
	SubnetId       *string   `json:"subnetId,omitempty"`
	Version        *string   `json:"version,omitempty"`
}

type VirtualClusterUpdate

type VirtualClusterUpdate struct {
	Properties *VirtualClusterProperties `json:"properties,omitempty"`
	Tags       *map[string]string        `json:"tags,omitempty"`
}

type VirtualClustersClient

type VirtualClustersClient struct {
	Client *resourcemanager.Client
}

func NewVirtualClustersClientWithBaseURI

func NewVirtualClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualClustersClient, error)

func (VirtualClustersClient) Delete

Delete ...

func (VirtualClustersClient) DeleteThenPoll

func (c VirtualClustersClient) DeleteThenPoll(ctx context.Context, id VirtualClusterId) error

DeleteThenPoll performs Delete then polls until it's completed

func (VirtualClustersClient) Get

Get ...

func (VirtualClustersClient) List

List ...

func (VirtualClustersClient) ListByResourceGroup

ListByResourceGroup ...

func (VirtualClustersClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (VirtualClustersClient) ListByResourceGroupCompleteMatchingPredicate

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

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (VirtualClustersClient) ListComplete

ListComplete retrieves all the results into a single object

func (VirtualClustersClient) ListCompleteMatchingPredicate

func (c VirtualClustersClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate VirtualClusterOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (VirtualClustersClient) Update

Update ...

func (VirtualClustersClient) UpdateDnsServers

UpdateDnsServers ...

func (VirtualClustersClient) UpdateDnsServersThenPoll

func (c VirtualClustersClient) UpdateDnsServersThenPoll(ctx context.Context, id VirtualClusterId) error

UpdateDnsServersThenPoll performs UpdateDnsServers then polls until it's completed

func (VirtualClustersClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

Jump to

Keyboard shortcuts

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