databases

package
v0.20230711.1145438 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: MPL-2.0 Imports: 9 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2022-11-11/databases Documentation

The databases SDK allows for interaction with the Azure Resource Manager Service kusto (API Version 2022-11-11).

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/kusto/2022-11-11/databases"

Client Initialization

client := databases.NewDatabasesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DatabasesClient.AddPrincipals

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

payload := databases.DatabasePrincipalListRequest{
	// ...
}


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

Example Usage: DatabasesClient.CheckNameAvailability

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

payload := databases.CheckNameRequest{
	// ...
}


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: DatabasesClient.CreateOrUpdate

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

payload := databases.Database{
	// ...
}


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

Example Usage: DatabasesClient.Delete

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

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

Example Usage: DatabasesClient.Get

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

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: DatabasesClient.ListByCluster

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

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

Example Usage: DatabasesClient.ListPrincipals

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

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

Example Usage: DatabasesClient.RemovePrincipals

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

payload := databases.DatabasePrincipalListRequest{
	// ...
}


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

Example Usage: DatabasesClient.Update

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

payload := databases.Database{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForCallerRole

func PossibleValuesForCallerRole() []string

func PossibleValuesForDatabasePrincipalRole

func PossibleValuesForDatabasePrincipalRole() []string

func PossibleValuesForDatabasePrincipalType

func PossibleValuesForDatabasePrincipalType() []string

func PossibleValuesForDatabaseShareOrigin

func PossibleValuesForDatabaseShareOrigin() []string

func PossibleValuesForKind

func PossibleValuesForKind() []string

func PossibleValuesForPrincipalsModificationKind

func PossibleValuesForPrincipalsModificationKind() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForReason

func PossibleValuesForReason() []string

func PossibleValuesForType

func PossibleValuesForType() []string

func ValidateClusterID

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

ValidateClusterID checks that 'input' can be parsed as a Cluster ID

func ValidateDatabaseID

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

ValidateDatabaseID checks that 'input' can be parsed as a Database ID

Types

type AddPrincipalsOperationResponse

type AddPrincipalsOperationResponse struct {
	HttpResponse *http.Response
	Model        *DatabasePrincipalListResult
}

type CallerRole

type CallerRole string
const (
	CallerRoleAdmin CallerRole = "Admin"
	CallerRoleNone  CallerRole = "None"
)

type CheckNameAvailabilityOperationResponse

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

type CheckNameRequest

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

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 ClusterId

type ClusterId struct {
	SubscriptionId    string
	ResourceGroupName string
	ClusterName       string
}

ClusterId is a struct representing the Resource ID for a Cluster

func NewClusterID

func NewClusterID(subscriptionId string, resourceGroupName string, clusterName string) ClusterId

NewClusterID returns a new ClusterId struct

func ParseClusterID

func ParseClusterID(input string) (*ClusterId, error)

ParseClusterID parses 'input' into a ClusterId

func ParseClusterIDInsensitively

func ParseClusterIDInsensitively(input string) (*ClusterId, error)

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

func (ClusterId) ID

func (id ClusterId) ID() string

ID returns the formatted Cluster ID

func (ClusterId) Segments

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

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

func (ClusterId) String

func (id ClusterId) String() string

String returns a human-readable description of this Cluster ID

type CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	CallerRole *CallerRole
}

func DefaultCreateOrUpdateOperationOptions

func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions

type CreateOrUpdateOperationResponse

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

type Database

type Database interface {
}

type DatabaseId

type DatabaseId struct {
	SubscriptionId    string
	ResourceGroupName string
	ClusterName       string
	DatabaseName      string
}

DatabaseId is a struct representing the Resource ID for a Database

func NewDatabaseID

func NewDatabaseID(subscriptionId string, resourceGroupName string, clusterName string, databaseName string) DatabaseId

NewDatabaseID returns a new DatabaseId struct

func ParseDatabaseID

func ParseDatabaseID(input string) (*DatabaseId, error)

ParseDatabaseID parses 'input' into a DatabaseId

func ParseDatabaseIDInsensitively

func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error)

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

func (DatabaseId) ID

func (id DatabaseId) ID() string

ID returns the formatted Database ID

func (DatabaseId) Segments

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

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

func (DatabaseId) String

func (id DatabaseId) String() string

String returns a human-readable description of this Database ID

type DatabaseListResult

type DatabaseListResult struct {
	Value *[]Database `json:"value,omitempty"`
}

func (*DatabaseListResult) UnmarshalJSON

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

type DatabasePrincipal

type DatabasePrincipal struct {
	AppId      *string               `json:"appId,omitempty"`
	Email      *string               `json:"email,omitempty"`
	Fqn        *string               `json:"fqn,omitempty"`
	Name       string                `json:"name"`
	Role       DatabasePrincipalRole `json:"role"`
	TenantName *string               `json:"tenantName,omitempty"`
	Type       DatabasePrincipalType `json:"type"`
}

type DatabasePrincipalListRequest

type DatabasePrincipalListRequest struct {
	Value *[]DatabasePrincipal `json:"value,omitempty"`
}

type DatabasePrincipalListResult

type DatabasePrincipalListResult struct {
	Value *[]DatabasePrincipal `json:"value,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"
)

type DatabasePrincipalType

type DatabasePrincipalType string
const (
	DatabasePrincipalTypeApp   DatabasePrincipalType = "App"
	DatabasePrincipalTypeGroup DatabasePrincipalType = "Group"
	DatabasePrincipalTypeUser  DatabasePrincipalType = "User"
)

type DatabaseShareOrigin

type DatabaseShareOrigin string
const (
	DatabaseShareOriginDataShare DatabaseShareOrigin = "DataShare"
	DatabaseShareOriginDirect    DatabaseShareOrigin = "Direct"
	DatabaseShareOriginOther     DatabaseShareOrigin = "Other"
)

type DatabaseStatistics

type DatabaseStatistics struct {
	Size *float64 `json:"size,omitempty"`
}

type DatabasesClient

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

func NewDatabasesClientWithBaseURI

func NewDatabasesClientWithBaseURI(endpoint string) DatabasesClient

func (DatabasesClient) AddPrincipals

AddPrincipals ...

func (DatabasesClient) CheckNameAvailability

func (c DatabasesClient) CheckNameAvailability(ctx context.Context, id ClusterId, input CheckNameRequest) (result CheckNameAvailabilityOperationResponse, err error)

CheckNameAvailability ...

func (DatabasesClient) CreateOrUpdate

CreateOrUpdate ...

func (DatabasesClient) CreateOrUpdateThenPoll

func (c DatabasesClient) CreateOrUpdateThenPoll(ctx context.Context, id DatabaseId, input Database, options CreateOrUpdateOperationOptions) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (DatabasesClient) Delete

func (c DatabasesClient) Delete(ctx context.Context, id DatabaseId) (result DeleteOperationResponse, err error)

Delete ...

func (DatabasesClient) DeleteThenPoll

func (c DatabasesClient) DeleteThenPoll(ctx context.Context, id DatabaseId) error

DeleteThenPoll performs Delete then polls until it's completed

func (DatabasesClient) Get

func (c DatabasesClient) Get(ctx context.Context, id DatabaseId) (result GetOperationResponse, err error)

Get ...

func (DatabasesClient) ListByCluster

func (c DatabasesClient) ListByCluster(ctx context.Context, id ClusterId) (result ListByClusterOperationResponse, err error)

ListByCluster ...

func (DatabasesClient) ListPrincipals

func (c DatabasesClient) ListPrincipals(ctx context.Context, id DatabaseId) (result ListPrincipalsOperationResponse, err error)

ListPrincipals ...

func (DatabasesClient) RemovePrincipals

RemovePrincipals ...

func (DatabasesClient) Update

Update ...

func (DatabasesClient) UpdateThenPoll

func (c DatabasesClient) UpdateThenPoll(ctx context.Context, id DatabaseId, input Database, options UpdateOperationOptions) error

UpdateThenPoll performs Update then polls until it's completed

type DeleteOperationResponse

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

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *Database
}

type Kind

type Kind string
const (
	KindReadOnlyFollowing Kind = "ReadOnlyFollowing"
	KindReadWrite         Kind = "ReadWrite"
)

type ListByClusterOperationResponse

type ListByClusterOperationResponse struct {
	HttpResponse *http.Response
	Model        *DatabaseListResult
}

type ListPrincipalsOperationResponse

type ListPrincipalsOperationResponse struct {
	HttpResponse *http.Response
	Model        *DatabasePrincipalListResult
}

type PrincipalsModificationKind

type PrincipalsModificationKind string
const (
	PrincipalsModificationKindNone    PrincipalsModificationKind = "None"
	PrincipalsModificationKindReplace PrincipalsModificationKind = "Replace"
	PrincipalsModificationKindUnion   PrincipalsModificationKind = "Union"
)

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

type ReadOnlyFollowingDatabase

type ReadOnlyFollowingDatabase struct {
	Properties *ReadOnlyFollowingDatabaseProperties `json:"properties,omitempty"`

	// Fields inherited from Database
	Id       *string `json:"id,omitempty"`
	Location *string `json:"location,omitempty"`
	Name     *string `json:"name,omitempty"`
	Type     *string `json:"type,omitempty"`
}

func (ReadOnlyFollowingDatabase) MarshalJSON

func (s ReadOnlyFollowingDatabase) MarshalJSON() ([]byte, error)

type ReadOnlyFollowingDatabaseProperties

type ReadOnlyFollowingDatabaseProperties struct {
	AttachedDatabaseConfigurationName *string                      `json:"attachedDatabaseConfigurationName,omitempty"`
	DatabaseShareOrigin               *DatabaseShareOrigin         `json:"databaseShareOrigin,omitempty"`
	HotCachePeriod                    *string                      `json:"hotCachePeriod,omitempty"`
	LeaderClusterResourceId           *string                      `json:"leaderClusterResourceId,omitempty"`
	OriginalDatabaseName              *string                      `json:"originalDatabaseName,omitempty"`
	PrincipalsModificationKind        *PrincipalsModificationKind  `json:"principalsModificationKind,omitempty"`
	ProvisioningState                 *ProvisioningState           `json:"provisioningState,omitempty"`
	SoftDeletePeriod                  *string                      `json:"softDeletePeriod,omitempty"`
	Statistics                        *DatabaseStatistics          `json:"statistics,omitempty"`
	TableLevelSharingProperties       *TableLevelSharingProperties `json:"tableLevelSharingProperties,omitempty"`
}

type ReadWriteDatabase

type ReadWriteDatabase struct {
	Properties *ReadWriteDatabaseProperties `json:"properties,omitempty"`

	// Fields inherited from Database
	Id       *string `json:"id,omitempty"`
	Location *string `json:"location,omitempty"`
	Name     *string `json:"name,omitempty"`
	Type     *string `json:"type,omitempty"`
}

func (ReadWriteDatabase) MarshalJSON

func (s ReadWriteDatabase) MarshalJSON() ([]byte, error)

type ReadWriteDatabaseProperties

type ReadWriteDatabaseProperties struct {
	HotCachePeriod    *string             `json:"hotCachePeriod,omitempty"`
	IsFollowed        *bool               `json:"isFollowed,omitempty"`
	ProvisioningState *ProvisioningState  `json:"provisioningState,omitempty"`
	SoftDeletePeriod  *string             `json:"softDeletePeriod,omitempty"`
	Statistics        *DatabaseStatistics `json:"statistics,omitempty"`
}

type Reason

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

type RemovePrincipalsOperationResponse

type RemovePrincipalsOperationResponse struct {
	HttpResponse *http.Response
	Model        *DatabasePrincipalListResult
}

type TableLevelSharingProperties

type TableLevelSharingProperties struct {
	ExternalTablesToExclude    *[]string `json:"externalTablesToExclude,omitempty"`
	ExternalTablesToInclude    *[]string `json:"externalTablesToInclude,omitempty"`
	MaterializedViewsToExclude *[]string `json:"materializedViewsToExclude,omitempty"`
	MaterializedViewsToInclude *[]string `json:"materializedViewsToInclude,omitempty"`
	TablesToExclude            *[]string `json:"tablesToExclude,omitempty"`
	TablesToInclude            *[]string `json:"tablesToInclude,omitempty"`
}

type Type

type Type string
const (
	TypeMicrosoftPointKustoClustersAttachedDatabaseConfigurations Type = "Microsoft.Kusto/clusters/attachedDatabaseConfigurations"
	TypeMicrosoftPointKustoClustersDatabases                      Type = "Microsoft.Kusto/clusters/databases"
)

type UpdateOperationOptions

type UpdateOperationOptions struct {
	CallerRole *CallerRole
}

func DefaultUpdateOperationOptions

func DefaultUpdateOperationOptions() UpdateOperationOptions

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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