databaseprincipalassignments

package
v0.20240209.1123314 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databaseprincipalassignments Documentation

The databaseprincipalassignments SDK allows for interaction with the Azure Resource Manager Service kusto (API Version 2023-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databaseprincipalassignments"

Client Initialization

client := databaseprincipalassignments.NewDatabasePrincipalAssignmentsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DatabasePrincipalAssignmentsClient.CheckNameAvailability

ctx := context.TODO()
id := commonids.NewKustoDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue")

payload := databaseprincipalassignments.DatabasePrincipalAssignmentCheckNameRequest{
	// ...
}


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

Example Usage: DatabasePrincipalAssignmentsClient.CreateOrUpdate

ctx := context.TODO()
id := databaseprincipalassignments.NewDatabasePrincipalAssignmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue", "principalAssignmentValue")

payload := databaseprincipalassignments.DatabasePrincipalAssignment{
	// ...
}


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

Example Usage: DatabasePrincipalAssignmentsClient.Delete

ctx := context.TODO()
id := databaseprincipalassignments.NewDatabasePrincipalAssignmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue", "principalAssignmentValue")

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

Example Usage: DatabasePrincipalAssignmentsClient.Get

ctx := context.TODO()
id := databaseprincipalassignments.NewDatabasePrincipalAssignmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue", "principalAssignmentValue")

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: DatabasePrincipalAssignmentsClient.List

ctx := context.TODO()
id := commonids.NewKustoDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue", "databaseValue")

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

func PossibleValuesForDatabasePrincipalAssignmentType() []string

func PossibleValuesForDatabasePrincipalRole

func PossibleValuesForDatabasePrincipalRole() []string

func PossibleValuesForPrincipalType

func PossibleValuesForPrincipalType() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForReason

func PossibleValuesForReason() []string

func ValidateDatabasePrincipalAssignmentID

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

ValidateDatabasePrincipalAssignmentID checks that 'input' can be parsed as a Database Principal Assignment ID

Types

type CheckNameAvailabilityOperationResponse

type CheckNameAvailabilityOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *CheckNameResult
}

type CheckNameResult

type CheckNameResult struct {
	Message       *string `json:"message,omitempty"`
	Name          *string `json:"name,omitempty"`
	NameAvailable *bool   `json:"nameAvailable,omitempty"`
	Reason        *Reason `json:"reason,omitempty"`
}

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *DatabasePrincipalAssignment
}

type DatabasePrincipalAssignment

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

type DatabasePrincipalAssignmentCheckNameRequest

type DatabasePrincipalAssignmentCheckNameRequest struct {
	Name string                          `json:"name"`
	Type DatabasePrincipalAssignmentType `json:"type"`
}

type DatabasePrincipalAssignmentId

type DatabasePrincipalAssignmentId struct {
	SubscriptionId          string
	ResourceGroupName       string
	ClusterName             string
	DatabaseName            string
	PrincipalAssignmentName string
}

DatabasePrincipalAssignmentId is a struct representing the Resource ID for a Database Principal Assignment

func NewDatabasePrincipalAssignmentID

func NewDatabasePrincipalAssignmentID(subscriptionId string, resourceGroupName string, clusterName string, databaseName string, principalAssignmentName string) DatabasePrincipalAssignmentId

NewDatabasePrincipalAssignmentID returns a new DatabasePrincipalAssignmentId struct

func ParseDatabasePrincipalAssignmentID

func ParseDatabasePrincipalAssignmentID(input string) (*DatabasePrincipalAssignmentId, error)

ParseDatabasePrincipalAssignmentID parses 'input' into a DatabasePrincipalAssignmentId

func ParseDatabasePrincipalAssignmentIDInsensitively

func ParseDatabasePrincipalAssignmentIDInsensitively(input string) (*DatabasePrincipalAssignmentId, error)

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

func (*DatabasePrincipalAssignmentId) FromParseResult

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

func (DatabasePrincipalAssignmentId) ID

ID returns the formatted Database Principal Assignment ID

func (DatabasePrincipalAssignmentId) Segments

Segments returns a slice of Resource ID Segments which comprise this Database Principal Assignment ID

func (DatabasePrincipalAssignmentId) String

String returns a human-readable description of this Database Principal Assignment ID

type DatabasePrincipalAssignmentListResult

type DatabasePrincipalAssignmentListResult struct {
	Value *[]DatabasePrincipalAssignment `json:"value,omitempty"`
}

type DatabasePrincipalAssignmentType

type DatabasePrincipalAssignmentType string
const (
	DatabasePrincipalAssignmentTypeMicrosoftPointKustoClustersDatabasesPrincipalAssignments DatabasePrincipalAssignmentType = "Microsoft.Kusto/clusters/databases/principalAssignments"
)

func (*DatabasePrincipalAssignmentType) UnmarshalJSON

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

type DatabasePrincipalAssignmentsClient

type DatabasePrincipalAssignmentsClient struct {
	Client *resourcemanager.Client
}

func NewDatabasePrincipalAssignmentsClientWithBaseURI

func NewDatabasePrincipalAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabasePrincipalAssignmentsClient, error)

func (DatabasePrincipalAssignmentsClient) CheckNameAvailability

CheckNameAvailability ...

func (DatabasePrincipalAssignmentsClient) CreateOrUpdate

CreateOrUpdate ...

func (DatabasePrincipalAssignmentsClient) CreateOrUpdateThenPoll

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (DatabasePrincipalAssignmentsClient) Delete

Delete ...

func (DatabasePrincipalAssignmentsClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (DatabasePrincipalAssignmentsClient) Get

Get ...

func (DatabasePrincipalAssignmentsClient) List

List ...

type DatabasePrincipalProperties

type DatabasePrincipalProperties struct {
	AadObjectId       *string               `json:"aadObjectId,omitempty"`
	PrincipalId       string                `json:"principalId"`
	PrincipalName     *string               `json:"principalName,omitempty"`
	PrincipalType     PrincipalType         `json:"principalType"`
	ProvisioningState *ProvisioningState    `json:"provisioningState,omitempty"`
	Role              DatabasePrincipalRole `json:"role"`
	TenantId          *string               `json:"tenantId,omitempty"`
	TenantName        *string               `json:"tenantName,omitempty"`
}

type DatabasePrincipalRole

type DatabasePrincipalRole string
const (
	DatabasePrincipalRoleAdmin              DatabasePrincipalRole = "Admin"
	DatabasePrincipalRoleIngestor           DatabasePrincipalRole = "Ingestor"
	DatabasePrincipalRoleMonitor            DatabasePrincipalRole = "Monitor"
	DatabasePrincipalRoleUnrestrictedViewer DatabasePrincipalRole = "UnrestrictedViewer"
	DatabasePrincipalRoleUser               DatabasePrincipalRole = "User"
	DatabasePrincipalRoleViewer             DatabasePrincipalRole = "Viewer"
)

func (*DatabasePrincipalRole) UnmarshalJSON

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

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

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *DatabasePrincipalAssignmentListResult
}

type PrincipalType

type PrincipalType string
const (
	PrincipalTypeApp   PrincipalType = "App"
	PrincipalTypeGroup PrincipalType = "Group"
	PrincipalTypeUser  PrincipalType = "User"
)

func (*PrincipalType) UnmarshalJSON

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

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateCanceled  ProvisioningState = "Canceled"
	ProvisioningStateCreating  ProvisioningState = "Creating"
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateMoving    ProvisioningState = "Moving"
	ProvisioningStateRunning   ProvisioningState = "Running"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
)

func (*ProvisioningState) UnmarshalJSON

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

type Reason

type Reason string
const (
	ReasonAlreadyExists Reason = "AlreadyExists"
	ReasonInvalid       Reason = "Invalid"
)

func (*Reason) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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