rbacs

package
v0.20221212.1131457 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-08-15/rbacs Documentation

The rbacs SDK allows for interaction with the Azure Resource Manager Service cosmosdb (API Version 2022-08-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/2022-08-15/rbacs"

Client Initialization

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

Example Usage: RbacsClient.SqlResourcesCreateUpdateSqlRoleAssignment

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

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", "accountValue", "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.NewSqlRoleAssignmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "roleAssignmentIdValue")

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", "accountValue", "roleDefinitionIdValue")

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

Example Usage: RbacsClient.SqlResourcesGetSqlRoleAssignment

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

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

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

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 ValidateDatabaseAccountID

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

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

func ValidateSqlRoleAssignmentID

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

ValidateSqlRoleAssignmentID checks that 'input' can be parsed as a Sql Role Assignment 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 DatabaseAccountId

type DatabaseAccountId struct {
	SubscriptionId    string
	ResourceGroupName string
	AccountName       string
}

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

func NewDatabaseAccountID

func NewDatabaseAccountID(subscriptionId string, resourceGroupName string, accountName 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) 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 SqlRoleAssignmentId, 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 SqlRoleAssignmentId) (result SqlResourcesDeleteSqlRoleAssignmentOperationResponse, err error)

SqlResourcesDeleteSqlRoleAssignment ...

func (RbacsClient) SqlResourcesDeleteSqlRoleAssignmentThenPoll

func (c RbacsClient) SqlResourcesDeleteSqlRoleAssignmentThenPoll(ctx context.Context, id SqlRoleAssignmentId) 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 SqlRoleAssignmentId) (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 SqlRoleAssignmentId

type SqlRoleAssignmentId struct {
	SubscriptionId    string
	ResourceGroupName string
	AccountName       string
	RoleAssignmentId  string
}

SqlRoleAssignmentId is a struct representing the Resource ID for a Sql Role Assignment

func NewSqlRoleAssignmentID

func NewSqlRoleAssignmentID(subscriptionId string, resourceGroupName string, accountName string, roleAssignmentId string) SqlRoleAssignmentId

NewSqlRoleAssignmentID returns a new SqlRoleAssignmentId struct

func ParseSqlRoleAssignmentID

func ParseSqlRoleAssignmentID(input string) (*SqlRoleAssignmentId, error)

ParseSqlRoleAssignmentID parses 'input' into a SqlRoleAssignmentId

func ParseSqlRoleAssignmentIDInsensitively

func ParseSqlRoleAssignmentIDInsensitively(input string) (*SqlRoleAssignmentId, error)

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

func (SqlRoleAssignmentId) ID

func (id SqlRoleAssignmentId) ID() string

ID returns the formatted Sql Role Assignment ID

func (SqlRoleAssignmentId) Segments

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

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

func (SqlRoleAssignmentId) String

func (id SqlRoleAssignmentId) String() string

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

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
	AccountName       string
	RoleDefinitionId  string
}

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

func NewSqlRoleDefinitionID

func NewSqlRoleDefinitionID(subscriptionId string, resourceGroupName string, accountName 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) 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