roles

package
v0.20240327.1133120 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MPL-2.0 Imports: 11 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2020-10-05-privatepreview/roles Documentation

The roles SDK allows for interaction with the Azure Resource Manager Service postgresqlhsc (API Version 2020-10-05-privatepreview).

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/2020-10-05-privatepreview/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.ListByServerGroup

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

read, err := client.ListByServerGroup(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 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 ListByServerGroupOperationResponse

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

type Role

type Role struct {
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *RoleProperties        `json:"properties,omitempty"`
	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"`
}

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

func (c RolesClient) ListByServerGroup(ctx context.Context, id ServerGroupsv2Id) (result ListByServerGroupOperationResponse, err error)

ListByServerGroup ...

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