roles

package
v0.20230808.1103829 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: MPL-2.0 Imports: 9 Imported by: 1

README

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

The roles 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/roles"

Client Initialization

client := roles.NewRolesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: RolesClient.Create

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

payload := roles.Role{
	// ...
}


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

Example Usage: RolesClient.Delete

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

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

Example Usage: RolesClient.Get

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

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

ctx := context.TODO()
id := roles.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 PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateRoleID

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

ValidateRoleID checks that 'input' can be parsed as a Role ID

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

Types

type CreateOperationResponse

type CreateOperationResponse 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        *Role
}

type ListByClusterOperationResponse

type ListByClusterOperationResponse struct {
	HttpResponse *http.Response
	Model        *RoleListResult
}

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateCanceled   ProvisioningState = "Canceled"
	ProvisioningStateFailed     ProvisioningState = "Failed"
	ProvisioningStateInProgress ProvisioningState = "InProgress"
	ProvisioningStateSucceeded  ProvisioningState = "Succeeded"
)

type Role

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

type RoleId

type RoleId struct {
	SubscriptionId     string
	ResourceGroupName  string
	ServerGroupsv2Name string
	RoleName           string
}

RoleId is a struct representing the Resource ID for a Role

func NewRoleID

func NewRoleID(subscriptionId string, resourceGroupName string, serverGroupsv2Name string, roleName string) RoleId

NewRoleID returns a new RoleId struct

func ParseRoleID

func ParseRoleID(input string) (*RoleId, error)

ParseRoleID parses 'input' into a RoleId

func ParseRoleIDInsensitively

func ParseRoleIDInsensitively(input string) (*RoleId, error)

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

func (RoleId) ID

func (id RoleId) ID() string

ID returns the formatted Role ID

func (RoleId) Segments

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

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

func (RoleId) String

func (id RoleId) String() string

String returns a human-readable description of this Role ID

type RoleListResult

type RoleListResult struct {
	Value *[]Role `json:"value,omitempty"`
}

type RoleProperties

type RoleProperties struct {
	Password          string             `json:"password"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
}

type RolesClient

type RolesClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewRolesClientWithBaseURI

func NewRolesClientWithBaseURI(endpoint string) RolesClient

func (RolesClient) Create

func (c RolesClient) Create(ctx context.Context, id RoleId, input Role) (result CreateOperationResponse, err error)

Create ...

func (RolesClient) CreateThenPoll

func (c RolesClient) CreateThenPoll(ctx context.Context, id RoleId, input Role) error

CreateThenPoll performs Create then polls until it's completed

func (RolesClient) Delete

func (c RolesClient) Delete(ctx context.Context, id RoleId) (result DeleteOperationResponse, err error)

Delete ...

func (RolesClient) DeleteThenPoll

func (c RolesClient) DeleteThenPoll(ctx context.Context, id RoleId) error

DeleteThenPoll performs Delete then polls until it's completed

func (RolesClient) Get

func (c RolesClient) Get(ctx context.Context, id RoleId) (result GetOperationResponse, err error)

Get ...

func (RolesClient) ListByCluster

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

ListByCluster ...

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) 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

Jump to

Keyboard shortcuts

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