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 ¶
- func PossibleValuesForAdministratorType() []string
- func ValidateServerID(input interface{}, key string) (warnings []string, errors []error)
- type AdministratorType
- type CreateOrUpdateOperationResponse
- type DeleteOperationResponse
- type GetOperationResponse
- type ListOperationResponse
- type ServerAdministratorProperties
- type ServerAdministratorResource
- type ServerAdministratorResourceListResult
- type ServerAdministratorsClient
- func (c ServerAdministratorsClient) CreateOrUpdate(ctx context.Context, id ServerId, input ServerAdministratorResource) (result CreateOrUpdateOperationResponse, err error)
- func (c ServerAdministratorsClient) CreateOrUpdateThenPoll(ctx context.Context, id ServerId, input ServerAdministratorResource) error
- func (c ServerAdministratorsClient) Delete(ctx context.Context, id ServerId) (result DeleteOperationResponse, err error)
- func (c ServerAdministratorsClient) DeleteThenPoll(ctx context.Context, id ServerId) error
- func (c ServerAdministratorsClient) Get(ctx context.Context, id ServerId) (result GetOperationResponse, err error)
- func (c ServerAdministratorsClient) List(ctx context.Context, id ServerId) (result ListOperationResponse, err error)
- type ServerId
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PossibleValuesForAdministratorType ¶
func PossibleValuesForAdministratorType() []string
func ValidateServerID ¶
ValidateServerID checks that 'input' can be parsed as a Server ID
Types ¶
type AdministratorType ¶
type AdministratorType string
const (
AdministratorTypeActiveDirectory AdministratorType = "ActiveDirectory"
)
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 *ServerAdministratorResource }
type ListOperationResponse ¶
type ListOperationResponse struct { HttpResponse *http.Response 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 autorest.Client // contains filtered or unexported fields }
func NewServerAdministratorsClientWithBaseURI ¶
func NewServerAdministratorsClientWithBaseURI(endpoint string) ServerAdministratorsClient
func (ServerAdministratorsClient) CreateOrUpdate ¶
func (c ServerAdministratorsClient) CreateOrUpdate(ctx context.Context, id ServerId, input ServerAdministratorResource) (result CreateOrUpdateOperationResponse, err error)
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 ¶
func (c ServerAdministratorsClient) Delete(ctx context.Context, id ServerId) (result DeleteOperationResponse, err error)
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 ¶
func (c ServerAdministratorsClient) Get(ctx context.Context, id ServerId) (result GetOperationResponse, err error)
Get ...
func (ServerAdministratorsClient) List ¶
func (c ServerAdministratorsClient) List(ctx context.Context, id ServerId) (result ListOperationResponse, err error)
List ...
type ServerId ¶
ServerId is a struct representing the Resource ID for a Server
func NewServerID ¶
NewServerID returns a new ServerId struct
func ParseServerID ¶
ParseServerID parses 'input' into a ServerId
func ParseServerIDInsensitively ¶
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) Segments ¶
func (id ServerId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Server ID