administrators

package
v0.20240325.1135512 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/administrators Documentation

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

Client Initialization

client := administrators.NewAdministratorsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AdministratorsClient.Create

ctx := context.TODO()
id := administrators.NewAdministratorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerValue", "objectIdValue")

payload := administrators.ActiveDirectoryAdministratorAdd{
	// ...
}


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

Example Usage: AdministratorsClient.Delete

ctx := context.TODO()
id := administrators.NewAdministratorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerValue", "objectIdValue")

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

Example Usage: AdministratorsClient.Get

ctx := context.TODO()
id := administrators.NewAdministratorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerValue", "objectIdValue")

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: AdministratorsClient.ListByServer

ctx := context.TODO()
id := administrators.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerValue")

// alternatively `client.ListByServer(ctx, id)` can be used to do batched pagination
items, err := client.ListByServerComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForPrincipalType

func PossibleValuesForPrincipalType() []string

func ValidateAdministratorID

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

ValidateAdministratorID checks that 'input' can be parsed as a Administrator ID

func ValidateFlexibleServerID

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

ValidateFlexibleServerID checks that 'input' can be parsed as a Flexible Server ID

Types

type ActiveDirectoryAdministrator

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

type ActiveDirectoryAdministratorAdd

type ActiveDirectoryAdministratorAdd struct {
	Properties *AdministratorPropertiesForAdd `json:"properties,omitempty"`
}

type ActiveDirectoryAdministratorOperationPredicate

type ActiveDirectoryAdministratorOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (ActiveDirectoryAdministratorOperationPredicate) Matches

type AdministratorId

type AdministratorId struct {
	SubscriptionId     string
	ResourceGroupName  string
	FlexibleServerName string
	ObjectId           string
}

AdministratorId is a struct representing the Resource ID for a Administrator

func NewAdministratorID

func NewAdministratorID(subscriptionId string, resourceGroupName string, flexibleServerName string, objectId string) AdministratorId

NewAdministratorID returns a new AdministratorId struct

func ParseAdministratorID

func ParseAdministratorID(input string) (*AdministratorId, error)

ParseAdministratorID parses 'input' into a AdministratorId

func ParseAdministratorIDInsensitively

func ParseAdministratorIDInsensitively(input string) (*AdministratorId, error)

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

func (*AdministratorId) FromParseResult

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

func (AdministratorId) ID

func (id AdministratorId) ID() string

ID returns the formatted Administrator ID

func (AdministratorId) Segments

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

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

func (AdministratorId) String

func (id AdministratorId) String() string

String returns a human-readable description of this Administrator ID

type AdministratorProperties

type AdministratorProperties struct {
	ObjectId      *string        `json:"objectId,omitempty"`
	PrincipalName *string        `json:"principalName,omitempty"`
	PrincipalType *PrincipalType `json:"principalType,omitempty"`
	TenantId      *string        `json:"tenantId,omitempty"`
}

type AdministratorPropertiesForAdd

type AdministratorPropertiesForAdd struct {
	PrincipalName *string        `json:"principalName,omitempty"`
	PrincipalType *PrincipalType `json:"principalType,omitempty"`
	TenantId      *string        `json:"tenantId,omitempty"`
}

type AdministratorsClient

type AdministratorsClient struct {
	Client *resourcemanager.Client
}

func NewAdministratorsClientWithBaseURI

func NewAdministratorsClientWithBaseURI(sdkApi sdkEnv.Api) (*AdministratorsClient, error)

func (AdministratorsClient) Create

Create ...

func (AdministratorsClient) CreateThenPoll

CreateThenPoll performs Create then polls until it's completed

func (AdministratorsClient) Delete

Delete ...

func (AdministratorsClient) DeleteThenPoll

func (c AdministratorsClient) DeleteThenPoll(ctx context.Context, id AdministratorId) error

DeleteThenPoll performs Delete then polls until it's completed

func (AdministratorsClient) Get

Get ...

func (AdministratorsClient) ListByServer

ListByServer ...

func (AdministratorsClient) ListByServerComplete

ListByServerComplete retrieves all the results into a single object

func (AdministratorsClient) ListByServerCompleteMatchingPredicate

func (c AdministratorsClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id FlexibleServerId, predicate ActiveDirectoryAdministratorOperationPredicate) (result ListByServerCompleteResult, err error)

ListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate

type CreateOperationResponse

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

type DeleteOperationResponse

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

type FlexibleServerId

type FlexibleServerId struct {
	SubscriptionId     string
	ResourceGroupName  string
	FlexibleServerName string
}

FlexibleServerId is a struct representing the Resource ID for a Flexible Server

func NewFlexibleServerID

func NewFlexibleServerID(subscriptionId string, resourceGroupName string, flexibleServerName string) FlexibleServerId

NewFlexibleServerID returns a new FlexibleServerId struct

func ParseFlexibleServerID

func ParseFlexibleServerID(input string) (*FlexibleServerId, error)

ParseFlexibleServerID parses 'input' into a FlexibleServerId

func ParseFlexibleServerIDInsensitively

func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error)

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

func (*FlexibleServerId) FromParseResult

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

func (FlexibleServerId) ID

func (id FlexibleServerId) ID() string

ID returns the formatted Flexible Server ID

func (FlexibleServerId) Segments

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

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

func (FlexibleServerId) String

func (id FlexibleServerId) String() string

String returns a human-readable description of this Flexible Server ID

type GetOperationResponse

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

type ListByServerCompleteResult

type ListByServerCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []ActiveDirectoryAdministrator
}

type ListByServerOperationResponse

type ListByServerOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ActiveDirectoryAdministrator
}

type PrincipalType

type PrincipalType string
const (
	PrincipalTypeGroup            PrincipalType = "Group"
	PrincipalTypeServicePrincipal PrincipalType = "ServicePrincipal"
	PrincipalTypeUnknown          PrincipalType = "Unknown"
	PrincipalTypeUser             PrincipalType = "User"
)

func (*PrincipalType) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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