administrators

package
v0.20231216.1000125 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: MPL-2.0 Imports: 12 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2023-03-01-preview/administrators Documentation

The administrators SDK allows for interaction with the Azure Resource Manager Service postgresql (API Version 2023-03-01-preview).

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/2023-03-01-preview/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 added in v0.20231127.1171502

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
}

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 added in v0.20231127.1171502

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 {
	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 added in v0.20230809.1081239

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