servergroups

package
v0.20230503.1130337 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: MPL-2.0 Imports: 13 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2020-10-05-privatepreview/servergroups Documentation

The servergroups SDK allows for interaction with the Azure Resource Manager Service postgresqlhsc (API Version 2020-10-05-privatepreview).

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/postgresqlhsc/2020-10-05-privatepreview/servergroups"

Client Initialization

client := servergroups.NewServerGroupsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ServerGroupsClient.CheckNameAvailability

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

payload := servergroups.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: ServerGroupsClient.CreateOrUpdate

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

payload := servergroups.ServerGroup{
	// ...
}


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

Example Usage: ServerGroupsClient.Delete

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

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

Example Usage: ServerGroupsClient.Get

ctx := context.TODO()
id := servergroups.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: ServerGroupsClient.List

ctx := context.TODO()
id := servergroups.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: ServerGroupsClient.ListByResourceGroup

ctx := context.TODO()
id := servergroups.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: ServerGroupsClient.Update

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

payload := servergroups.ServerGroupForUpdate{
	// ...
}


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 PossibleValuesForCitusVersion

func PossibleValuesForCitusVersion() []string

func PossibleValuesForCreateMode

func PossibleValuesForCreateMode() []string

func PossibleValuesForPostgreSQLVersion

func PossibleValuesForPostgreSQLVersion() []string

func PossibleValuesForResourceProviderType

func PossibleValuesForResourceProviderType() []string

func PossibleValuesForServerEdition

func PossibleValuesForServerEdition() []string

func PossibleValuesForServerRole

func PossibleValuesForServerRole() []string

func PossibleValuesForServerState

func PossibleValuesForServerState() []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
	Model        *NameAvailability
}

type CheckNameAvailabilityResourceType

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

type CitusVersion

type CitusVersion string
const (
	CitusVersionEightPointThree CitusVersion = "8.3"
	CitusVersionNinePointFive   CitusVersion = "9.5"
	CitusVersionNinePointFour   CitusVersion = "9.4"
	CitusVersionNinePointOne    CitusVersion = "9.1"
	CitusVersionNinePointThree  CitusVersion = "9.3"
	CitusVersionNinePointTwo    CitusVersion = "9.2"
	CitusVersionNinePointZero   CitusVersion = "9.0"
)

type CreateMode

type CreateMode string
const (
	CreateModeDefault            CreateMode = "Default"
	CreateModePointInTimeRestore CreateMode = "PointInTimeRestore"
	CreateModeReadReplica        CreateMode = "ReadReplica"
)

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *ServerGroup
}

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	Items []ServerGroup
}

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]ServerGroup
	// contains filtered or unexported fields
}

func (ListByResourceGroupOperationResponse) HasMore

func (ListByResourceGroupOperationResponse) LoadMore

type ListCompleteResult

type ListCompleteResult struct {
	Items []ServerGroup
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]ServerGroup
	// contains filtered or unexported fields
}

func (ListOperationResponse) HasMore

func (r ListOperationResponse) HasMore() bool

func (ListOperationResponse) LoadMore

func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error)

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 PostgreSQLVersion

type PostgreSQLVersion string
const (
	PostgreSQLVersionOneOne PostgreSQLVersion = "11"
	PostgreSQLVersionOneTwo PostgreSQLVersion = "12"
)

type ResourceProviderType

type ResourceProviderType string
const (
	ResourceProviderTypeMarlin ResourceProviderType = "Marlin"
	ResourceProviderTypeMeru   ResourceProviderType = "Meru"
)

type ServerEdition

type ServerEdition string
const (
	ServerEditionGeneralPurpose  ServerEdition = "GeneralPurpose"
	ServerEditionMemoryOptimized ServerEdition = "MemoryOptimized"
)

type ServerGroup

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

type ServerGroupForUpdate

type ServerGroupForUpdate struct {
	Location   *string                         `json:"location,omitempty"`
	Properties *ServerGroupPropertiesForUpdate `json:"properties,omitempty"`
	Tags       *map[string]string              `json:"tags,omitempty"`
}

type ServerGroupOperationPredicate

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

func (ServerGroupOperationPredicate) Matches

type ServerGroupProperties

type ServerGroupProperties struct {
	AdministratorLogin         *string                                        `json:"administratorLogin,omitempty"`
	AdministratorLoginPassword *string                                        `json:"administratorLoginPassword,omitempty"`
	AvailabilityZone           *string                                        `json:"availabilityZone,omitempty"`
	BackupRetentionDays        *int64                                         `json:"backupRetentionDays,omitempty"`
	CitusVersion               *CitusVersion                                  `json:"citusVersion,omitempty"`
	CreateMode                 *CreateMode                                    `json:"createMode,omitempty"`
	DelegatedSubnetArguments   *ServerGroupPropertiesDelegatedSubnetArguments `json:"delegatedSubnetArguments,omitempty"`
	EarliestRestoreTime        *string                                        `json:"earliestRestoreTime,omitempty"`
	EnableMx                   *bool                                          `json:"enableMx,omitempty"`
	EnableShardsOnCoordinator  *bool                                          `json:"enableShardsOnCoordinator,omitempty"`
	EnableZfs                  *bool                                          `json:"enableZfs,omitempty"`
	MaintenanceWindow          *MaintenanceWindow                             `json:"maintenanceWindow,omitempty"`
	PointInTimeUTC             *string                                        `json:"pointInTimeUTC,omitempty"`
	PostgresqlVersion          *PostgreSQLVersion                             `json:"postgresqlVersion,omitempty"`
	PrivateDnsZoneArguments    *ServerGroupPropertiesPrivateDnsZoneArguments  `json:"privateDnsZoneArguments,omitempty"`
	ReadReplicas               *[]string                                      `json:"readReplicas,omitempty"`
	ResourceProviderType       *ResourceProviderType                          `json:"resourceProviderType,omitempty"`
	ServerRoleGroups           *[]ServerRoleGroup                             `json:"serverRoleGroups,omitempty"`
	SourceLocation             *string                                        `json:"sourceLocation,omitempty"`
	SourceResourceGroupName    *string                                        `json:"sourceResourceGroupName,omitempty"`
	SourceServerGroup          *string                                        `json:"sourceServerGroup,omitempty"`
	SourceServerGroupName      *string                                        `json:"sourceServerGroupName,omitempty"`
	SourceSubscriptionId       *string                                        `json:"sourceSubscriptionId,omitempty"`
	StandbyAvailabilityZone    *string                                        `json:"standbyAvailabilityZone,omitempty"`
	State                      *ServerState                                   `json:"state,omitempty"`
}

func (*ServerGroupProperties) GetEarliestRestoreTimeAsTime

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

func (*ServerGroupProperties) GetPointInTimeUTCAsTime

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

func (*ServerGroupProperties) SetEarliestRestoreTimeAsTime

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

func (*ServerGroupProperties) SetPointInTimeUTCAsTime

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

type ServerGroupPropertiesDelegatedSubnetArguments

type ServerGroupPropertiesDelegatedSubnetArguments struct {
	SubnetArmResourceId *string `json:"subnetArmResourceId,omitempty"`
}

type ServerGroupPropertiesForUpdate

type ServerGroupPropertiesForUpdate struct {
	AdministratorLoginPassword *string            `json:"administratorLoginPassword,omitempty"`
	AvailabilityZone           *string            `json:"availabilityZone,omitempty"`
	BackupRetentionDays        *int64             `json:"backupRetentionDays,omitempty"`
	CitusVersion               *CitusVersion      `json:"citusVersion,omitempty"`
	EnableShardsOnCoordinator  *bool              `json:"enableShardsOnCoordinator,omitempty"`
	MaintenanceWindow          *MaintenanceWindow `json:"maintenanceWindow,omitempty"`
	PostgresqlVersion          *PostgreSQLVersion `json:"postgresqlVersion,omitempty"`
	ServerRoleGroups           *[]ServerRoleGroup `json:"serverRoleGroups,omitempty"`
	StandbyAvailabilityZone    *string            `json:"standbyAvailabilityZone,omitempty"`
}

type ServerGroupPropertiesPrivateDnsZoneArguments

type ServerGroupPropertiesPrivateDnsZoneArguments struct {
	PrivateDnsZoneArmResourceId *string `json:"privateDnsZoneArmResourceId,omitempty"`
}

type ServerGroupsClient

type ServerGroupsClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewServerGroupsClientWithBaseURI

func NewServerGroupsClientWithBaseURI(endpoint string) ServerGroupsClient

func (ServerGroupsClient) CheckNameAvailability

CheckNameAvailability ...

func (ServerGroupsClient) CreateOrUpdate

CreateOrUpdate ...

func (ServerGroupsClient) CreateOrUpdateThenPoll

func (c ServerGroupsClient) CreateOrUpdateThenPoll(ctx context.Context, id ServerGroupsv2Id, input ServerGroup) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (ServerGroupsClient) Delete

Delete ...

func (ServerGroupsClient) DeleteThenPoll

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

DeleteThenPoll performs Delete then polls until it's completed

func (ServerGroupsClient) Get

Get ...

func (ServerGroupsClient) List

List ...

func (ServerGroupsClient) ListByResourceGroup

ListByResourceGroup ...

func (ServerGroupsClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all of the results into a single object

func (ServerGroupsClient) ListByResourceGroupCompleteMatchingPredicate

func (c ServerGroupsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ServerGroupOperationPredicate) (resp ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (ServerGroupsClient) ListComplete

ListComplete retrieves all of the results into a single object

func (ServerGroupsClient) ListCompleteMatchingPredicate

func (c ServerGroupsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ServerGroupOperationPredicate) (resp ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (ServerGroupsClient) Update

Update ...

func (ServerGroupsClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

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) 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 ServerRole

type ServerRole string
const (
	ServerRoleCoordinator ServerRole = "Coordinator"
	ServerRoleWorker      ServerRole = "Worker"
)

type ServerRoleGroup

type ServerRoleGroup struct {
	EnableHa         *bool             `json:"enableHa,omitempty"`
	EnablePublicIP   *bool             `json:"enablePublicIp,omitempty"`
	Name             *string           `json:"name,omitempty"`
	Role             *ServerRole       `json:"role,omitempty"`
	ServerCount      *int64            `json:"serverCount,omitempty"`
	ServerEdition    *ServerEdition    `json:"serverEdition,omitempty"`
	ServerNames      *[]ServerNameItem `json:"serverNames,omitempty"`
	StorageQuotaInMb *int64            `json:"storageQuotaInMb,omitempty"`
	VCores           *int64            `json:"vCores,omitempty"`
}

type ServerState

type ServerState string
const (
	ServerStateDisabled     ServerState = "Disabled"
	ServerStateDropping     ServerState = "Dropping"
	ServerStateProvisioning ServerState = "Provisioning"
	ServerStateReady        ServerState = "Ready"
	ServerStateStarting     ServerState = "Starting"
	ServerStateStopped      ServerState = "Stopped"
	ServerStateStopping     ServerState = "Stopping"
	ServerStateUpdating     ServerState = "Updating"
)

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

Jump to

Keyboard shortcuts

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