rbacs

package
v0.20241111.1164443 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: MPL-2.0 Imports: 12 Imported by: 1

README

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

The rbacs SDK allows for interaction with Azure Resource Manager cosmosdb (API Version 2023-04-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-04-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", "databaseAccountName", "/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", "databaseAccountName", "roleDefinitionId")

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", "databaseAccountName", "/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", "databaseAccountName", "roleDefinitionId")

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", "databaseAccountName", "/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", "databaseAccountName", "roleDefinitionId")

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", "databaseAccountName")

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", "databaseAccountName")

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

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

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

func NewRbacsClientWithBaseURI

func NewRbacsClientWithBaseURI(sdkApi sdkEnv.Api) (*RbacsClient, error)

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

func (*RoleDefinitionType) UnmarshalJSON added in v0.20240306.1111727

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

type SqlResourcesCreateUpdateSqlRoleAssignmentOperationResponse

type SqlResourcesCreateUpdateSqlRoleAssignmentOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SqlRoleAssignmentGetResults
}

type SqlResourcesCreateUpdateSqlRoleDefinitionOperationResponse

type SqlResourcesCreateUpdateSqlRoleDefinitionOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SqlRoleDefinitionGetResults
}

type SqlResourcesDeleteSqlRoleAssignmentOperationResponse

type SqlResourcesDeleteSqlRoleAssignmentOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type SqlResourcesDeleteSqlRoleDefinitionOperationResponse

type SqlResourcesDeleteSqlRoleDefinitionOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type SqlResourcesGetSqlRoleAssignmentOperationResponse

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

type SqlResourcesGetSqlRoleDefinitionOperationResponse

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

type SqlResourcesListSqlRoleAssignmentsOperationResponse

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

type SqlResourcesListSqlRoleDefinitionsOperationResponse

type SqlResourcesListSqlRoleDefinitionsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	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

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