scripts

package
v0.20230707.1120450 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2022-02-01/scripts Documentation

The scripts SDK allows for interaction with the Azure Resource Manager Service kusto (API Version 2022-02-01).

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-02-01/scripts"

Client Initialization

client := scripts.NewScriptsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ScriptsClient.CheckNameAvailability

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

payload := scripts.ScriptCheckNameRequest{
	// ...
}


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

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

payload := scripts.Script{
	// ...
}


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

Example Usage: ScriptsClient.Delete

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

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

Example Usage: ScriptsClient.Get

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

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: ScriptsClient.ListByDatabase

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

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

Example Usage: ScriptsClient.Update

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

payload := scripts.Script{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForReason added in v0.20221024.1162143

func PossibleValuesForReason() []string

func PossibleValuesForScriptType added in v0.20221024.1162143

func PossibleValuesForScriptType() []string

func ValidateDatabaseID

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

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

func ValidateScriptID added in v0.20221024.1162143

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

ValidateScriptID checks that 'input' can be parsed as a Script ID

Types

type CheckNameAvailabilityOperationResponse added in v0.20221024.1162143

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

type CheckNameResult added in v0.20221024.1162143

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 added in v0.20221024.1162143

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

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 DeleteOperationResponse added in v0.20221024.1162143

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

type GetOperationResponse added in v0.20221024.1162143

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

type ListByDatabaseOperationResponse added in v0.20221024.1162143

type ListByDatabaseOperationResponse struct {
	HttpResponse *http.Response
	Model        *ScriptListResult
}

type ProvisioningState

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

type Reason added in v0.20221024.1162143

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

type Script

type Script struct {
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *ScriptProperties      `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type ScriptCheckNameRequest added in v0.20221024.1162143

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

type ScriptId added in v0.20221024.1162143

type ScriptId struct {
	SubscriptionId    string
	ResourceGroupName string
	ClusterName       string
	DatabaseName      string
	ScriptName        string
}

ScriptId is a struct representing the Resource ID for a Script

func NewScriptID added in v0.20221024.1162143

func NewScriptID(subscriptionId string, resourceGroupName string, clusterName string, databaseName string, scriptName string) ScriptId

NewScriptID returns a new ScriptId struct

func ParseScriptID added in v0.20221024.1162143

func ParseScriptID(input string) (*ScriptId, error)

ParseScriptID parses 'input' into a ScriptId

func ParseScriptIDInsensitively added in v0.20221024.1162143

func ParseScriptIDInsensitively(input string) (*ScriptId, error)

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

func (ScriptId) ID added in v0.20221024.1162143

func (id ScriptId) ID() string

ID returns the formatted Script ID

func (ScriptId) Segments added in v0.20221024.1162143

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

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

func (ScriptId) String added in v0.20221024.1162143

func (id ScriptId) String() string

String returns a human-readable description of this Script ID

type ScriptListResult

type ScriptListResult struct {
	Value *[]Script `json:"value,omitempty"`
}

type ScriptProperties

type ScriptProperties struct {
	ContinueOnErrors  *bool              `json:"continueOnErrors,omitempty"`
	ForceUpdateTag    *string            `json:"forceUpdateTag,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
	ScriptContent     *string            `json:"scriptContent,omitempty"`
	ScriptUrl         *string            `json:"scriptUrl,omitempty"`
	ScriptUrlSasToken *string            `json:"scriptUrlSasToken,omitempty"`
}

type ScriptType added in v0.20221024.1162143

type ScriptType string
const (
	ScriptTypeMicrosoftPointKustoClustersDatabasesScripts ScriptType = "Microsoft.Kusto/clusters/databases/scripts"
)

type ScriptsClient

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

func NewScriptsClientWithBaseURI

func NewScriptsClientWithBaseURI(endpoint string) ScriptsClient

func (ScriptsClient) CheckNameAvailability added in v0.20221024.1162143

func (c ScriptsClient) CheckNameAvailability(ctx context.Context, id DatabaseId, input ScriptCheckNameRequest) (result CheckNameAvailabilityOperationResponse, err error)

CheckNameAvailability ...

func (ScriptsClient) CreateOrUpdate added in v0.20221024.1162143

func (c ScriptsClient) CreateOrUpdate(ctx context.Context, id ScriptId, input Script) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (ScriptsClient) CreateOrUpdateThenPoll added in v0.20221024.1162143

func (c ScriptsClient) CreateOrUpdateThenPoll(ctx context.Context, id ScriptId, input Script) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (ScriptsClient) Delete added in v0.20221024.1162143

func (c ScriptsClient) Delete(ctx context.Context, id ScriptId) (result DeleteOperationResponse, err error)

Delete ...

func (ScriptsClient) DeleteThenPoll added in v0.20221024.1162143

func (c ScriptsClient) DeleteThenPoll(ctx context.Context, id ScriptId) error

DeleteThenPoll performs Delete then polls until it's completed

func (ScriptsClient) Get added in v0.20221024.1162143

func (c ScriptsClient) Get(ctx context.Context, id ScriptId) (result GetOperationResponse, err error)

Get ...

func (ScriptsClient) ListByDatabase added in v0.20221024.1162143

func (c ScriptsClient) ListByDatabase(ctx context.Context, id DatabaseId) (result ListByDatabaseOperationResponse, err error)

ListByDatabase ...

func (ScriptsClient) Update added in v0.20221024.1162143

func (c ScriptsClient) Update(ctx context.Context, id ScriptId, input Script) (result UpdateOperationResponse, err error)

Update ...

func (ScriptsClient) UpdateThenPoll added in v0.20221024.1162143

func (c ScriptsClient) UpdateThenPoll(ctx context.Context, id ScriptId, input Script) error

UpdateThenPoll performs Update then polls until it's completed

type UpdateOperationResponse added in v0.20221024.1162143

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