roles

package
v0.20240524.1090207 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: MPL-2.0 Imports: 13 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       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Role
}

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

type ListByClusterOperationResponse

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

type ProvisioningState

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

func (*ProvisioningState) UnmarshalJSON

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

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

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

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 *resourcemanager.Client
}

func NewRolesClientWithBaseURI

func NewRolesClientWithBaseURI(sdkApi sdkEnv.Api) (*RolesClient, error)

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

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

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