scripts

package
v0.20241126.2320 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MPL-2.0 Imports: 14 Imported by: 0

README

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

The scripts SDK allows for interaction with Azure Resource Manager 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/scripts"

Client Initialization

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

Example Usage: ScriptsClient.CheckNameAvailability

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

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", "clusterName", "databaseName", "scriptName")

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", "clusterName", "databaseName", "scriptName")

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", "clusterName", "databaseName", "scriptName")

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 := commonids.NewKustoDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterName", "databaseName")

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", "clusterName", "databaseName", "scriptName")

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

func PossibleValuesForReason() []string

func PossibleValuesForScriptType

func PossibleValuesForScriptType() []string

func ValidateScriptID

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

ValidateScriptID checks that 'input' can be parsed as a Script 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        *Script
}

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

type ListByDatabaseOperationResponse

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

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

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

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

type ScriptId

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

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

NewScriptID returns a new ScriptId struct

func ParseScriptID

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

ParseScriptID parses 'input' into a ScriptId

func ParseScriptIDInsensitively

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

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

func (ScriptId) ID

func (id ScriptId) ID() string

ID returns the formatted Script ID

func (ScriptId) Segments

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

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

func (ScriptId) String

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

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

func (*ScriptType) UnmarshalJSON

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

type ScriptsClient

type ScriptsClient struct {
	Client *resourcemanager.Client
}

func NewScriptsClientWithBaseURI

func NewScriptsClientWithBaseURI(sdkApi sdkEnv.Api) (*ScriptsClient, error)

func (ScriptsClient) CheckNameAvailability

CheckNameAvailability ...

func (ScriptsClient) CreateOrUpdate

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

CreateOrUpdate ...

func (ScriptsClient) CreateOrUpdateThenPoll

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

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (ScriptsClient) Delete

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

Delete ...

func (ScriptsClient) DeleteThenPoll

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

DeleteThenPoll performs Delete then polls until it's completed

func (ScriptsClient) Get

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

Get ...

func (ScriptsClient) ListByDatabase

ListByDatabase ...

func (ScriptsClient) Update

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

Update ...

func (ScriptsClient) UpdateThenPoll

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

UpdateThenPoll performs Update then polls until it's completed

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Script
}

Jump to

Keyboard shortcuts

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