servers

package
v0.20240815.1003113 Latest Latest
Warning

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

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

README

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

The servers 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-sdk/resource-manager/postgresqlhsc/2022-11-08/servers"

Client Initialization

client := servers.NewServersClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ServersClient.Get

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

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: ServersClient.ListByCluster

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

read, err := client.ListByCluster(ctx, id)
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 PossibleValuesForServerRole

func PossibleValuesForServerRole() []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

func ValidateServerID

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

ValidateServerID checks that 'input' can be parsed as a Server ID

Types

type ClusterServer

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

type ClusterServerListResult

type ClusterServerListResult struct {
	Value *[]ClusterServer `json:"value,omitempty"`
}

type ClusterServerProperties

type ClusterServerProperties struct {
	AdministratorLogin       *string     `json:"administratorLogin,omitempty"`
	AvailabilityZone         *string     `json:"availabilityZone,omitempty"`
	CitusVersion             *string     `json:"citusVersion,omitempty"`
	EnableHa                 *bool       `json:"enableHa,omitempty"`
	EnablePublicIPAccess     *bool       `json:"enablePublicIpAccess,omitempty"`
	FullyQualifiedDomainName *string     `json:"fullyQualifiedDomainName,omitempty"`
	HaState                  *string     `json:"haState,omitempty"`
	IsReadOnly               *bool       `json:"isReadOnly,omitempty"`
	PostgresqlVersion        *string     `json:"postgresqlVersion,omitempty"`
	Role                     *ServerRole `json:"role,omitempty"`
	ServerEdition            *string     `json:"serverEdition,omitempty"`
	State                    *string     `json:"state,omitempty"`
	StorageQuotaInMb         *int64      `json:"storageQuotaInMb,omitempty"`
	VCores                   *int64      `json:"vCores,omitempty"`
}

type GetOperationResponse

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

type ListByClusterOperationResponse

type ListByClusterOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ClusterServerListResult
}

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 ServerId

type ServerId struct {
	SubscriptionId     string
	ResourceGroupName  string
	ServerGroupsv2Name string
	ServerName         string
}

ServerId is a struct representing the Resource ID for a Server

func NewServerID

func NewServerID(subscriptionId string, resourceGroupName string, serverGroupsv2Name string, serverName string) ServerId

NewServerID returns a new ServerId struct

func ParseServerID

func ParseServerID(input string) (*ServerId, error)

ParseServerID parses 'input' into a ServerId

func ParseServerIDInsensitively

func ParseServerIDInsensitively(input string) (*ServerId, error)

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

func (*ServerId) FromParseResult

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

func (ServerId) ID

func (id ServerId) ID() string

ID returns the formatted Server ID

func (ServerId) Segments

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

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

func (ServerId) String

func (id ServerId) String() string

String returns a human-readable description of this Server ID

type ServerRole

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

func (*ServerRole) UnmarshalJSON

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

type ServersClient

type ServersClient struct {
	Client *resourcemanager.Client
}

func NewServersClientWithBaseURI

func NewServersClientWithBaseURI(sdkApi sdkEnv.Api) (*ServersClient, error)

func (ServersClient) Get

func (c ServersClient) Get(ctx context.Context, id ServerId) (result GetOperationResponse, err error)

Get ...

func (ServersClient) ListByCluster

func (c ServersClient) ListByCluster(ctx context.Context, id ServerGroupsv2Id) (result ListByClusterOperationResponse, err error)

ListByCluster ...

Jump to

Keyboard shortcuts

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