clusters

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/clusters Documentation

The clusters SDK allows for interaction with the Azure Resource Manager Service postgresqlhsc (API Version 2022-11-08).

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/postgresqlhsc/2022-11-08/clusters"

Client Initialization

client := clusters.NewClustersClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ClustersClient.CheckNameAvailability

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

payload := clusters.NameAvailabilityRequest{
	// ...
}


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

Example Usage: ClustersClient.Create

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

payload := clusters.Cluster{
	// ...
}


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

Example Usage: ClustersClient.Delete

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

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

Example Usage: ClustersClient.Get

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

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: ClustersClient.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: ClustersClient.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: ClustersClient.Update

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

payload := clusters.ClusterForUpdate{
	// ...
}


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 PossibleValuesForCheckNameAvailabilityResourceType

func PossibleValuesForCheckNameAvailabilityResourceType() []string

func PossibleValuesForPrivateEndpointServiceConnectionStatus

func PossibleValuesForPrivateEndpointServiceConnectionStatus() []string

func ValidateServerGroupsv2ID

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

ValidateServerGroupsv2ID checks that 'input' can be parsed as a Server Groupsv 2 ID

Types

type CheckNameAvailabilityOperationResponse

type CheckNameAvailabilityOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *NameAvailability
}

type CheckNameAvailabilityResourceType

type CheckNameAvailabilityResourceType string
const (
	CheckNameAvailabilityResourceTypeMicrosoftPointDBforPostgreSQLServerGroupsvTwo CheckNameAvailabilityResourceType = "Microsoft.DBforPostgreSQL/serverGroupsv2"
)

func (*CheckNameAvailabilityResourceType) UnmarshalJSON

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

type Cluster

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

type ClusterForUpdate

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

type ClusterOperationPredicate

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

func (ClusterOperationPredicate) Matches

func (p ClusterOperationPredicate) Matches(input Cluster) bool

type ClusterProperties

type ClusterProperties struct {
	AdministratorLogin              *string                            `json:"administratorLogin,omitempty"`
	AdministratorLoginPassword      *string                            `json:"administratorLoginPassword,omitempty"`
	CitusVersion                    *string                            `json:"citusVersion,omitempty"`
	CoordinatorEnablePublicIPAccess *bool                              `json:"coordinatorEnablePublicIpAccess,omitempty"`
	CoordinatorServerEdition        *string                            `json:"coordinatorServerEdition,omitempty"`
	CoordinatorStorageQuotaInMb     *int64                             `json:"coordinatorStorageQuotaInMb,omitempty"`
	CoordinatorVCores               *int64                             `json:"coordinatorVCores,omitempty"`
	EarliestRestoreTime             *string                            `json:"earliestRestoreTime,omitempty"`
	EnableHa                        *bool                              `json:"enableHa,omitempty"`
	EnableShardsOnCoordinator       *bool                              `json:"enableShardsOnCoordinator,omitempty"`
	MaintenanceWindow               *MaintenanceWindow                 `json:"maintenanceWindow,omitempty"`
	NodeCount                       *int64                             `json:"nodeCount,omitempty"`
	NodeEnablePublicIPAccess        *bool                              `json:"nodeEnablePublicIpAccess,omitempty"`
	NodeServerEdition               *string                            `json:"nodeServerEdition,omitempty"`
	NodeStorageQuotaInMb            *int64                             `json:"nodeStorageQuotaInMb,omitempty"`
	NodeVCores                      *int64                             `json:"nodeVCores,omitempty"`
	PointInTimeUTC                  *string                            `json:"pointInTimeUTC,omitempty"`
	PostgresqlVersion               *string                            `json:"postgresqlVersion,omitempty"`
	PreferredPrimaryZone            *string                            `json:"preferredPrimaryZone,omitempty"`
	PrivateEndpointConnections      *[]SimplePrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
	ProvisioningState               *string                            `json:"provisioningState,omitempty"`
	ReadReplicas                    *[]string                          `json:"readReplicas,omitempty"`
	ServerNames                     *[]ServerNameItem                  `json:"serverNames,omitempty"`
	SourceLocation                  *string                            `json:"sourceLocation,omitempty"`
	SourceResourceId                *string                            `json:"sourceResourceId,omitempty"`
	State                           *string                            `json:"state,omitempty"`
}

func (*ClusterProperties) GetEarliestRestoreTimeAsTime

func (o *ClusterProperties) GetEarliestRestoreTimeAsTime() (*time.Time, error)

func (*ClusterProperties) GetPointInTimeUTCAsTime

func (o *ClusterProperties) GetPointInTimeUTCAsTime() (*time.Time, error)

func (*ClusterProperties) SetEarliestRestoreTimeAsTime

func (o *ClusterProperties) SetEarliestRestoreTimeAsTime(input time.Time)

func (*ClusterProperties) SetPointInTimeUTCAsTime

func (o *ClusterProperties) SetPointInTimeUTCAsTime(input time.Time)

type ClusterPropertiesForUpdate

type ClusterPropertiesForUpdate struct {
	AdministratorLoginPassword      *string            `json:"administratorLoginPassword,omitempty"`
	CitusVersion                    *string            `json:"citusVersion,omitempty"`
	CoordinatorEnablePublicIPAccess *bool              `json:"coordinatorEnablePublicIpAccess,omitempty"`
	CoordinatorServerEdition        *string            `json:"coordinatorServerEdition,omitempty"`
	CoordinatorStorageQuotaInMb     *int64             `json:"coordinatorStorageQuotaInMb,omitempty"`
	CoordinatorVCores               *int64             `json:"coordinatorVCores,omitempty"`
	EnableHa                        *bool              `json:"enableHa,omitempty"`
	EnableShardsOnCoordinator       *bool              `json:"enableShardsOnCoordinator,omitempty"`
	MaintenanceWindow               *MaintenanceWindow `json:"maintenanceWindow,omitempty"`
	NodeCount                       *int64             `json:"nodeCount,omitempty"`
	NodeEnablePublicIPAccess        *bool              `json:"nodeEnablePublicIpAccess,omitempty"`
	NodeServerEdition               *string            `json:"nodeServerEdition,omitempty"`
	NodeStorageQuotaInMb            *int64             `json:"nodeStorageQuotaInMb,omitempty"`
	NodeVCores                      *int64             `json:"nodeVCores,omitempty"`
	PostgresqlVersion               *string            `json:"postgresqlVersion,omitempty"`
	PreferredPrimaryZone            *string            `json:"preferredPrimaryZone,omitempty"`
}

type ClustersClient

type ClustersClient struct {
	Client *resourcemanager.Client
}

func NewClustersClientWithBaseURI

func NewClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*ClustersClient, error)

func (ClustersClient) CheckNameAvailability

CheckNameAvailability ...

func (ClustersClient) Create

func (c ClustersClient) Create(ctx context.Context, id ServerGroupsv2Id, input Cluster) (result CreateOperationResponse, err error)

Create ...

func (ClustersClient) CreateThenPoll

func (c ClustersClient) CreateThenPoll(ctx context.Context, id ServerGroupsv2Id, input Cluster) error

CreateThenPoll performs Create then polls until it's completed

func (ClustersClient) Delete

Delete ...

func (ClustersClient) DeleteThenPoll

func (c ClustersClient) DeleteThenPoll(ctx context.Context, id ServerGroupsv2Id) error

DeleteThenPoll performs Delete then polls until it's completed

func (ClustersClient) Get

Get ...

func (ClustersClient) List

List ...

func (ClustersClient) ListByResourceGroup

ListByResourceGroup ...

func (ClustersClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (ClustersClient) ListByResourceGroupCompleteMatchingPredicate

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

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ClustersClient) ListComplete

ListComplete retrieves all the results into a single object

func (ClustersClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ClustersClient) Update

Update ...

func (ClustersClient) UpdateThenPoll

func (c ClustersClient) UpdateThenPoll(ctx context.Context, id ServerGroupsv2Id, input ClusterForUpdate) error

UpdateThenPoll performs Update then polls until it's completed

type CreateOperationResponse

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

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

type ListByResourceGroupCompleteResult

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

type ListByResourceGroupOperationResponse

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

type ListCompleteResult

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

type ListOperationResponse

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

type MaintenanceWindow

type MaintenanceWindow struct {
	CustomWindow *string `json:"customWindow,omitempty"`
	DayOfWeek    *int64  `json:"dayOfWeek,omitempty"`
	StartHour    *int64  `json:"startHour,omitempty"`
	StartMinute  *int64  `json:"startMinute,omitempty"`
}

type NameAvailability

type NameAvailability struct {
	Message       *string `json:"message,omitempty"`
	Name          *string `json:"name,omitempty"`
	NameAvailable *bool   `json:"nameAvailable,omitempty"`
	Type          *string `json:"type,omitempty"`
}

type NameAvailabilityRequest

type NameAvailabilityRequest struct {
	Name string                            `json:"name"`
	Type CheckNameAvailabilityResourceType `json:"type"`
}

type PrivateEndpointConnectionSimpleProperties

type PrivateEndpointConnectionSimpleProperties struct {
	GroupIds                          *[]string                          `json:"groupIds,omitempty"`
	PrivateEndpoint                   *PrivateEndpointProperty           `json:"privateEndpoint,omitempty"`
	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
}

type PrivateEndpointProperty

type PrivateEndpointProperty struct {
	Id *string `json:"id,omitempty"`
}

type PrivateEndpointServiceConnectionStatus

type PrivateEndpointServiceConnectionStatus string
const (
	PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved"
	PrivateEndpointServiceConnectionStatusPending  PrivateEndpointServiceConnectionStatus = "Pending"
	PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected"
)

func (*PrivateEndpointServiceConnectionStatus) UnmarshalJSON

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

type PrivateLinkServiceConnectionState

type PrivateLinkServiceConnectionState struct {
	ActionsRequired *string                                 `json:"actionsRequired,omitempty"`
	Description     *string                                 `json:"description,omitempty"`
	Status          *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"`
}

type ServerGroupsv2Id

type ServerGroupsv2Id struct {
	SubscriptionId     string
	ResourceGroupName  string
	ServerGroupsv2Name string
}

ServerGroupsv2Id is a struct representing the Resource ID for a Server Groupsv 2

func NewServerGroupsv2ID

func NewServerGroupsv2ID(subscriptionId string, resourceGroupName string, serverGroupsv2Name string) ServerGroupsv2Id

NewServerGroupsv2ID returns a new ServerGroupsv2Id struct

func ParseServerGroupsv2ID

func ParseServerGroupsv2ID(input string) (*ServerGroupsv2Id, error)

ParseServerGroupsv2ID parses 'input' into a ServerGroupsv2Id

func ParseServerGroupsv2IDInsensitively

func ParseServerGroupsv2IDInsensitively(input string) (*ServerGroupsv2Id, error)

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

func (*ServerGroupsv2Id) FromParseResult

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

func (ServerGroupsv2Id) ID

func (id ServerGroupsv2Id) ID() string

ID returns the formatted Server Groupsv 2 ID

func (ServerGroupsv2Id) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Server Groupsv 2 ID

func (ServerGroupsv2Id) String

func (id ServerGroupsv2Id) String() string

String returns a human-readable description of this Server Groupsv 2 ID

type ServerNameItem

type ServerNameItem struct {
	FullyQualifiedDomainName *string `json:"fullyQualifiedDomainName,omitempty"`
	Name                     *string `json:"name,omitempty"`
}

type SimplePrivateEndpointConnection

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

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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