rbacs

package
v0.20231214.1140441 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-09-15/rbacs Documentation

The rbacs SDK allows for interaction with the Azure Resource Manager Service cosmosdb (API Version 2023-09-15).

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/cosmosdb/2023-09-15/rbacs"

Client Initialization

client := rbacs.NewRbacsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: RbacsClient.SqlResourcesCreateUpdateSqlRoleAssignment

ctx := context.TODO()
id := rbacs.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "databaseAccountValue", "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

payload := rbacs.SqlRoleAssignmentCreateUpdateParameters{
	// ...
}


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

Example Usage: RbacsClient.SqlResourcesCreateUpdateSqlRoleDefinition

ctx := context.TODO()
id := rbacs.NewSqlRoleDefinitionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "databaseAccountValue", "roleDefinitionIdValue")

payload := rbacs.SqlRoleDefinitionCreateUpdateParameters{
	// ...
}


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

Example Usage: RbacsClient.SqlResourcesDeleteSqlRoleAssignment

ctx := context.TODO()
id := rbacs.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "databaseAccountValue", "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

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

Example Usage: RbacsClient.SqlResourcesDeleteSqlRoleDefinition

ctx := context.TODO()
id := rbacs.NewSqlRoleDefinitionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "databaseAccountValue", "roleDefinitionIdValue")

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

Example Usage: RbacsClient.SqlResourcesGetSqlRoleAssignment

ctx := context.TODO()
id := rbacs.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "databaseAccountValue", "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

read, err := client.SqlResourcesGetSqlRoleAssignment(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: RbacsClient.SqlResourcesGetSqlRoleDefinition

ctx := context.TODO()
id := rbacs.NewSqlRoleDefinitionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "databaseAccountValue", "roleDefinitionIdValue")

read, err := client.SqlResourcesGetSqlRoleDefinition(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: RbacsClient.SqlResourcesListSqlRoleAssignments

ctx := context.TODO()
id := rbacs.NewDatabaseAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "databaseAccountValue")

read, err := client.SqlResourcesListSqlRoleAssignments(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: RbacsClient.SqlResourcesListSqlRoleDefinitions

ctx := context.TODO()
id := rbacs.NewDatabaseAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "databaseAccountValue")

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

func PossibleValuesForRoleDefinitionType() []string

func ValidateAccountID

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

ValidateAccountID checks that 'input' can be parsed as a Account ID

func ValidateDatabaseAccountID

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

ValidateDatabaseAccountID checks that 'input' can be parsed as a Database Account ID

func ValidateSqlRoleDefinitionID

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

ValidateSqlRoleDefinitionID checks that 'input' can be parsed as a Sql Role Definition ID

Types

type AccountId

type AccountId struct {
	SubscriptionId      string
	ResourceGroupName   string
	DatabaseAccountName string
	RoleAssignmentId    string
}

AccountId is a struct representing the Resource ID for a Account

func NewAccountID

func NewAccountID(subscriptionId string, resourceGroupName string, databaseAccountName string, roleAssignmentId string) AccountId

NewAccountID returns a new AccountId struct

func ParseAccountID

func ParseAccountID(input string) (*AccountId, error)

ParseAccountID parses 'input' into a AccountId

func ParseAccountIDInsensitively

func ParseAccountIDInsensitively(input string) (*AccountId, error)

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

func (*AccountId) FromParseResult added in v0.20231127.1171502

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

func (AccountId) ID

func (id AccountId) ID() string

ID returns the formatted Account ID

func (AccountId) Segments

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

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

func (AccountId) String

func (id AccountId) String() string

String returns a human-readable description of this Account ID

type DatabaseAccountId

type DatabaseAccountId struct {
	SubscriptionId      string
	ResourceGroupName   string
	DatabaseAccountName string
}

DatabaseAccountId is a struct representing the Resource ID for a Database Account

func NewDatabaseAccountID

func NewDatabaseAccountID(subscriptionId string, resourceGroupName string, databaseAccountName string) DatabaseAccountId

NewDatabaseAccountID returns a new DatabaseAccountId struct

func ParseDatabaseAccountID

func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error)

ParseDatabaseAccountID parses 'input' into a DatabaseAccountId

func ParseDatabaseAccountIDInsensitively

func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, error)

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

func (*DatabaseAccountId) FromParseResult added in v0.20231127.1171502

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

func (DatabaseAccountId) ID

func (id DatabaseAccountId) ID() string

ID returns the formatted Database Account ID

func (DatabaseAccountId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Database Account ID

func (DatabaseAccountId) String

func (id DatabaseAccountId) String() string

String returns a human-readable description of this Database Account ID

type Permission

type Permission struct {
	DataActions    *[]string `json:"dataActions,omitempty"`
	NotDataActions *[]string `json:"notDataActions,omitempty"`
}

type RbacsClient

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

func NewRbacsClientWithBaseURI

func NewRbacsClientWithBaseURI(endpoint string) RbacsClient

func (RbacsClient) SqlResourcesCreateUpdateSqlRoleAssignment

SqlResourcesCreateUpdateSqlRoleAssignment ...

func (RbacsClient) SqlResourcesCreateUpdateSqlRoleAssignmentThenPoll

func (c RbacsClient) SqlResourcesCreateUpdateSqlRoleAssignmentThenPoll(ctx context.Context, id AccountId, input SqlRoleAssignmentCreateUpdateParameters) error

SqlResourcesCreateUpdateSqlRoleAssignmentThenPoll performs SqlResourcesCreateUpdateSqlRoleAssignment then polls until it's completed

func (RbacsClient) SqlResourcesCreateUpdateSqlRoleDefinition

SqlResourcesCreateUpdateSqlRoleDefinition ...

func (RbacsClient) SqlResourcesCreateUpdateSqlRoleDefinitionThenPoll

func (c RbacsClient) SqlResourcesCreateUpdateSqlRoleDefinitionThenPoll(ctx context.Context, id SqlRoleDefinitionId, input SqlRoleDefinitionCreateUpdateParameters) error

SqlResourcesCreateUpdateSqlRoleDefinitionThenPoll performs SqlResourcesCreateUpdateSqlRoleDefinition then polls until it's completed

func (RbacsClient) SqlResourcesDeleteSqlRoleAssignment

func (c RbacsClient) SqlResourcesDeleteSqlRoleAssignment(ctx context.Context, id AccountId) (result SqlResourcesDeleteSqlRoleAssignmentOperationResponse, err error)

SqlResourcesDeleteSqlRoleAssignment ...

func (RbacsClient) SqlResourcesDeleteSqlRoleAssignmentThenPoll

func (c RbacsClient) SqlResourcesDeleteSqlRoleAssignmentThenPoll(ctx context.Context, id AccountId) error

SqlResourcesDeleteSqlRoleAssignmentThenPoll performs SqlResourcesDeleteSqlRoleAssignment then polls until it's completed

func (RbacsClient) SqlResourcesDeleteSqlRoleDefinition

func (c RbacsClient) SqlResourcesDeleteSqlRoleDefinition(ctx context.Context, id SqlRoleDefinitionId) (result SqlResourcesDeleteSqlRoleDefinitionOperationResponse, err error)

SqlResourcesDeleteSqlRoleDefinition ...

func (RbacsClient) SqlResourcesDeleteSqlRoleDefinitionThenPoll

func (c RbacsClient) SqlResourcesDeleteSqlRoleDefinitionThenPoll(ctx context.Context, id SqlRoleDefinitionId) error

SqlResourcesDeleteSqlRoleDefinitionThenPoll performs SqlResourcesDeleteSqlRoleDefinition then polls until it's completed

func (RbacsClient) SqlResourcesGetSqlRoleAssignment

func (c RbacsClient) SqlResourcesGetSqlRoleAssignment(ctx context.Context, id AccountId) (result SqlResourcesGetSqlRoleAssignmentOperationResponse, err error)

SqlResourcesGetSqlRoleAssignment ...

func (RbacsClient) SqlResourcesGetSqlRoleDefinition

func (c RbacsClient) SqlResourcesGetSqlRoleDefinition(ctx context.Context, id SqlRoleDefinitionId) (result SqlResourcesGetSqlRoleDefinitionOperationResponse, err error)

SqlResourcesGetSqlRoleDefinition ...

func (RbacsClient) SqlResourcesListSqlRoleAssignments

func (c RbacsClient) SqlResourcesListSqlRoleAssignments(ctx context.Context, id DatabaseAccountId) (result SqlResourcesListSqlRoleAssignmentsOperationResponse, err error)

SqlResourcesListSqlRoleAssignments ...

func (RbacsClient) SqlResourcesListSqlRoleDefinitions

func (c RbacsClient) SqlResourcesListSqlRoleDefinitions(ctx context.Context, id DatabaseAccountId) (result SqlResourcesListSqlRoleDefinitionsOperationResponse, err error)

SqlResourcesListSqlRoleDefinitions ...

type RoleDefinitionType

type RoleDefinitionType string
const (
	RoleDefinitionTypeBuiltInRole RoleDefinitionType = "BuiltInRole"
	RoleDefinitionTypeCustomRole  RoleDefinitionType = "CustomRole"
)

type SqlResourcesCreateUpdateSqlRoleAssignmentOperationResponse

type SqlResourcesCreateUpdateSqlRoleAssignmentOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type SqlResourcesCreateUpdateSqlRoleDefinitionOperationResponse

type SqlResourcesCreateUpdateSqlRoleDefinitionOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type SqlResourcesDeleteSqlRoleAssignmentOperationResponse

type SqlResourcesDeleteSqlRoleAssignmentOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type SqlResourcesDeleteSqlRoleDefinitionOperationResponse

type SqlResourcesDeleteSqlRoleDefinitionOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type SqlResourcesGetSqlRoleAssignmentOperationResponse

type SqlResourcesGetSqlRoleAssignmentOperationResponse struct {
	HttpResponse *http.Response
	Model        *SqlRoleAssignmentGetResults
}

type SqlResourcesGetSqlRoleDefinitionOperationResponse

type SqlResourcesGetSqlRoleDefinitionOperationResponse struct {
	HttpResponse *http.Response
	Model        *SqlRoleDefinitionGetResults
}

type SqlResourcesListSqlRoleAssignmentsOperationResponse

type SqlResourcesListSqlRoleAssignmentsOperationResponse struct {
	HttpResponse *http.Response
	Model        *SqlRoleAssignmentListResult
}

type SqlResourcesListSqlRoleDefinitionsOperationResponse

type SqlResourcesListSqlRoleDefinitionsOperationResponse struct {
	HttpResponse *http.Response
	Model        *SqlRoleDefinitionListResult
}

type SqlRoleAssignmentCreateUpdateParameters

type SqlRoleAssignmentCreateUpdateParameters struct {
	Properties *SqlRoleAssignmentResource `json:"properties,omitempty"`
}

type SqlRoleAssignmentGetResults

type SqlRoleAssignmentGetResults struct {
	Id         *string                    `json:"id,omitempty"`
	Name       *string                    `json:"name,omitempty"`
	Properties *SqlRoleAssignmentResource `json:"properties,omitempty"`
	Type       *string                    `json:"type,omitempty"`
}

type SqlRoleAssignmentListResult

type SqlRoleAssignmentListResult struct {
	Value *[]SqlRoleAssignmentGetResults `json:"value,omitempty"`
}

type SqlRoleAssignmentResource

type SqlRoleAssignmentResource struct {
	PrincipalId      *string `json:"principalId,omitempty"`
	RoleDefinitionId *string `json:"roleDefinitionId,omitempty"`
	Scope            *string `json:"scope,omitempty"`
}

type SqlRoleDefinitionCreateUpdateParameters

type SqlRoleDefinitionCreateUpdateParameters struct {
	Properties *SqlRoleDefinitionResource `json:"properties,omitempty"`
}

type SqlRoleDefinitionGetResults

type SqlRoleDefinitionGetResults struct {
	Id         *string                    `json:"id,omitempty"`
	Name       *string                    `json:"name,omitempty"`
	Properties *SqlRoleDefinitionResource `json:"properties,omitempty"`
	Type       *string                    `json:"type,omitempty"`
}

type SqlRoleDefinitionId

type SqlRoleDefinitionId struct {
	SubscriptionId      string
	ResourceGroupName   string
	DatabaseAccountName string
	RoleDefinitionId    string
}

SqlRoleDefinitionId is a struct representing the Resource ID for a Sql Role Definition

func NewSqlRoleDefinitionID

func NewSqlRoleDefinitionID(subscriptionId string, resourceGroupName string, databaseAccountName string, roleDefinitionId string) SqlRoleDefinitionId

NewSqlRoleDefinitionID returns a new SqlRoleDefinitionId struct

func ParseSqlRoleDefinitionID

func ParseSqlRoleDefinitionID(input string) (*SqlRoleDefinitionId, error)

ParseSqlRoleDefinitionID parses 'input' into a SqlRoleDefinitionId

func ParseSqlRoleDefinitionIDInsensitively

func ParseSqlRoleDefinitionIDInsensitively(input string) (*SqlRoleDefinitionId, error)

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

func (*SqlRoleDefinitionId) FromParseResult added in v0.20231127.1171502

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

func (SqlRoleDefinitionId) ID

func (id SqlRoleDefinitionId) ID() string

ID returns the formatted Sql Role Definition ID

func (SqlRoleDefinitionId) Segments

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

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

func (SqlRoleDefinitionId) String

func (id SqlRoleDefinitionId) String() string

String returns a human-readable description of this Sql Role Definition ID

type SqlRoleDefinitionListResult

type SqlRoleDefinitionListResult struct {
	Value *[]SqlRoleDefinitionGetResults `json:"value,omitempty"`
}

type SqlRoleDefinitionResource

type SqlRoleDefinitionResource struct {
	AssignableScopes *[]string           `json:"assignableScopes,omitempty"`
	Permissions      *[]Permission       `json:"permissions,omitempty"`
	RoleName         *string             `json:"roleName,omitempty"`
	Type             *RoleDefinitionType `json:"type,omitempty"`
}

Jump to

Keyboard shortcuts

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