serveradministrators

package
v0.20240112.1112256 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/serveradministrators Documentation

The serveradministrators SDK allows for interaction with the Azure Resource Manager Service postgresql (API Version 2017-12-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/postgresql/2017-12-01/serveradministrators"

Client Initialization

client := serveradministrators.NewServerAdministratorsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ServerAdministratorsClient.CreateOrUpdate

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

payload := serveradministrators.ServerAdministratorResource{
	// ...
}


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

Example Usage: ServerAdministratorsClient.Delete

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

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

Example Usage: ServerAdministratorsClient.Get

ctx := context.TODO()
id := serveradministrators.NewServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "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: ServerAdministratorsClient.List

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

read, err := client.List(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 PossibleValuesForAdministratorType

func PossibleValuesForAdministratorType() []string

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 AdministratorType

type AdministratorType string
const (
	AdministratorTypeActiveDirectory AdministratorType = "ActiveDirectory"
)

func (*AdministratorType) UnmarshalJSON added in v0.20230809.1081239

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

type CreateOrUpdateOperationResponse

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

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

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ServerAdministratorResourceListResult
}

type ServerAdministratorProperties

type ServerAdministratorProperties struct {
	AdministratorType AdministratorType `json:"administratorType"`
	Login             string            `json:"login"`
	Sid               string            `json:"sid"`
	TenantId          string            `json:"tenantId"`
}

type ServerAdministratorResource

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

type ServerAdministratorResourceListResult

type ServerAdministratorResourceListResult struct {
	Value *[]ServerAdministratorResource `json:"value,omitempty"`
}

type ServerAdministratorsClient

type ServerAdministratorsClient struct {
	Client *resourcemanager.Client
}

func NewServerAdministratorsClientWithBaseURI

func NewServerAdministratorsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerAdministratorsClient, error)

func (ServerAdministratorsClient) CreateOrUpdate

CreateOrUpdate ...

func (ServerAdministratorsClient) CreateOrUpdateThenPoll

func (c ServerAdministratorsClient) CreateOrUpdateThenPoll(ctx context.Context, id ServerId, input ServerAdministratorResource) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (ServerAdministratorsClient) Delete

Delete ...

func (ServerAdministratorsClient) DeleteThenPoll

func (c ServerAdministratorsClient) DeleteThenPoll(ctx context.Context, id ServerId) error

DeleteThenPoll performs Delete then polls until it's completed

func (ServerAdministratorsClient) Get

Get ...

func (ServerAdministratorsClient) List

List ...

type ServerId

type ServerId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
}

ServerId is a struct representing the Resource ID for a Server

func NewServerID

func NewServerID(subscriptionId string, resourceGroupName 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 added in v0.20231127.1171502

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

Jump to

Keyboard shortcuts

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