armkusto

package module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2022 License: MIT Imports: 15 Imported by: 5

README

Azure Kusto Module for Go

PkgGoDev

The armkusto module provides operations for working with Azure Kusto.

Source code

Getting started

Prerequisites

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Kusto module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Kusto. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Clients

Azure Kusto modules consist of one or more clients. A client groups a set of related APIs, providing access to its functionality within the specified subscription. Create one or more clients to access the APIs you require using your credential.

client, err := armkusto.NewDatabasesClient(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
client, err := armkusto.NewDatabasesClient(<subscription ID>, cred, &options)

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Kusto label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AcceptedAudiences

type AcceptedAudiences struct {
	// GUID or valid URL representing an accepted audience.
	Value *string `json:"value,omitempty"`
}

AcceptedAudiences - Represents an accepted audience trusted by the cluster.

type AttachedDatabaseConfiguration

type AttachedDatabaseConfiguration struct {
	// Resource location.
	Location *string `json:"location,omitempty"`

	// The properties of the attached database configuration.
	Properties *AttachedDatabaseConfigurationProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

AttachedDatabaseConfiguration - Class representing an attached database configuration.

type AttachedDatabaseConfigurationListResult

type AttachedDatabaseConfigurationListResult struct {
	// The list of attached database configurations.
	Value []*AttachedDatabaseConfiguration `json:"value,omitempty"`
}

AttachedDatabaseConfigurationListResult - The list attached database configurations operation response.

func (AttachedDatabaseConfigurationListResult) MarshalJSON

func (a AttachedDatabaseConfigurationListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AttachedDatabaseConfigurationListResult.

type AttachedDatabaseConfigurationProperties

type AttachedDatabaseConfigurationProperties struct {
	// REQUIRED; The resource id of the cluster where the databases you would like to attach reside.
	ClusterResourceID *string `json:"clusterResourceId,omitempty"`

	// REQUIRED; The name of the database which you would like to attach, use * if you want to follow all current and future databases.
	DatabaseName *string `json:"databaseName,omitempty"`

	// REQUIRED; The default principals modification kind
	DefaultPrincipalsModificationKind *DefaultPrincipalsModificationKind `json:"defaultPrincipalsModificationKind,omitempty"`

	// Table level sharing specifications
	TableLevelSharingProperties *TableLevelSharingProperties `json:"tableLevelSharingProperties,omitempty"`

	// READ-ONLY; The list of databases from the clusterResourceId which are currently attached to the cluster.
	AttachedDatabaseNames []*string `json:"attachedDatabaseNames,omitempty" azure:"ro"`

	// READ-ONLY; The provisioned state of the resource.
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"`
}

AttachedDatabaseConfigurationProperties - Class representing the an attached database configuration properties of kind specific.

func (AttachedDatabaseConfigurationProperties) MarshalJSON

func (a AttachedDatabaseConfigurationProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AttachedDatabaseConfigurationProperties.

type AttachedDatabaseConfigurationsCheckNameRequest

type AttachedDatabaseConfigurationsCheckNameRequest struct {
	// REQUIRED; Attached database resource name.
	Name *string `json:"name,omitempty"`

	// REQUIRED; The type of resource, for instance Microsoft.Kusto/clusters/attachedDatabaseConfigurations.
	Type *string `json:"type,omitempty"`
}

AttachedDatabaseConfigurationsCheckNameRequest - The result returned from a AttachedDatabaseConfigurations check name availability request.

type AttachedDatabaseConfigurationsClient

type AttachedDatabaseConfigurationsClient struct {
	// contains filtered or unexported fields
}

AttachedDatabaseConfigurationsClient contains the methods for the AttachedDatabaseConfigurations group. Don't use this type directly, use NewAttachedDatabaseConfigurationsClient() instead.

func NewAttachedDatabaseConfigurationsClient

func NewAttachedDatabaseConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AttachedDatabaseConfigurationsClient, error)

NewAttachedDatabaseConfigurationsClient creates a new instance of AttachedDatabaseConfigurationsClient with the specified values. subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*AttachedDatabaseConfigurationsClient) BeginCreateOrUpdate

BeginCreateOrUpdate - Creates or updates an attached database configuration. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. attachedDatabaseConfigurationName - The name of the attached database configuration. parameters - The database parameters supplied to the CreateOrUpdate operation. options - AttachedDatabaseConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the AttachedDatabaseConfigurationsClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoAttachedDatabaseConfigurationsCreateOrUpdate.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewAttachedDatabaseConfigurationsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<attached-database-configuration-name>",
		armkusto.AttachedDatabaseConfiguration{
			Location: to.Ptr("<location>"),
			Properties: &armkusto.AttachedDatabaseConfigurationProperties{
				ClusterResourceID:                 to.Ptr("<cluster-resource-id>"),
				DatabaseName:                      to.Ptr("<database-name>"),
				DefaultPrincipalsModificationKind: to.Ptr(armkusto.DefaultPrincipalsModificationKindUnion),
				TableLevelSharingProperties: &armkusto.TableLevelSharingProperties{
					ExternalTablesToExclude: []*string{
						to.Ptr("ExternalTable2")},
					ExternalTablesToInclude: []*string{
						to.Ptr("ExternalTable1")},
					MaterializedViewsToExclude: []*string{
						to.Ptr("MaterializedViewTable2")},
					MaterializedViewsToInclude: []*string{
						to.Ptr("MaterializedViewTable1")},
					TablesToExclude: []*string{
						to.Ptr("Table2")},
					TablesToInclude: []*string{
						to.Ptr("Table1")},
				},
			},
		},
		&armkusto.AttachedDatabaseConfigurationsClientBeginCreateOrUpdateOptions{ResumeToken: ""})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AttachedDatabaseConfigurationsClient) BeginDelete

BeginDelete - Deletes the attached database configuration with the given name. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. attachedDatabaseConfigurationName - The name of the attached database configuration. options - AttachedDatabaseConfigurationsClientBeginDeleteOptions contains the optional parameters for the AttachedDatabaseConfigurationsClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoAttachedDatabaseConfigurationsDelete.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewAttachedDatabaseConfigurationsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	poller, err := client.BeginDelete(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<attached-database-configuration-name>",
		&armkusto.AttachedDatabaseConfigurationsClientBeginDeleteOptions{ResumeToken: ""})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	_, err = poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
		return
	}
}
Output:

func (*AttachedDatabaseConfigurationsClient) CheckNameAvailability

CheckNameAvailability - Checks that the attached database configuration resource name is valid and is not already in use. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. resourceName - The name of the resource. options - AttachedDatabaseConfigurationsClientCheckNameAvailabilityOptions contains the optional parameters for the AttachedDatabaseConfigurationsClient.CheckNameAvailability method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoAttachedDatabaseConfigurationCheckNameAvailability.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewAttachedDatabaseConfigurationsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.CheckNameAvailability(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		armkusto.AttachedDatabaseConfigurationsCheckNameRequest{
			Name: to.Ptr("<name>"),
			Type: to.Ptr("<type>"),
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AttachedDatabaseConfigurationsClient) Get

func (client *AttachedDatabaseConfigurationsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, attachedDatabaseConfigurationName string, options *AttachedDatabaseConfigurationsClientGetOptions) (AttachedDatabaseConfigurationsClientGetResponse, error)

Get - Returns an attached database configuration. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. attachedDatabaseConfigurationName - The name of the attached database configuration. options - AttachedDatabaseConfigurationsClientGetOptions contains the optional parameters for the AttachedDatabaseConfigurationsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoAttachedDatabaseConfigurationsGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewAttachedDatabaseConfigurationsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<attached-database-configuration-name>",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AttachedDatabaseConfigurationsClient) NewListByClusterPager added in v0.4.0

NewListByClusterPager - Returns the list of attached database configurations of the given Kusto cluster. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. options - AttachedDatabaseConfigurationsClientListByClusterOptions contains the optional parameters for the AttachedDatabaseConfigurationsClient.ListByCluster method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoAttachedDatabaseConfigurationsListByCluster.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewAttachedDatabaseConfigurationsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	pager := client.NewListByClusterPager("<resource-group-name>",
		"<cluster-name>",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
			return
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type AttachedDatabaseConfigurationsClientBeginCreateOrUpdateOptions added in v0.2.0

type AttachedDatabaseConfigurationsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

AttachedDatabaseConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the AttachedDatabaseConfigurationsClient.BeginCreateOrUpdate method.

type AttachedDatabaseConfigurationsClientBeginDeleteOptions added in v0.2.0

type AttachedDatabaseConfigurationsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

AttachedDatabaseConfigurationsClientBeginDeleteOptions contains the optional parameters for the AttachedDatabaseConfigurationsClient.BeginDelete method.

type AttachedDatabaseConfigurationsClientCheckNameAvailabilityOptions added in v0.2.0

type AttachedDatabaseConfigurationsClientCheckNameAvailabilityOptions struct {
}

AttachedDatabaseConfigurationsClientCheckNameAvailabilityOptions contains the optional parameters for the AttachedDatabaseConfigurationsClient.CheckNameAvailability method.

type AttachedDatabaseConfigurationsClientCheckNameAvailabilityResponse added in v0.2.0

type AttachedDatabaseConfigurationsClientCheckNameAvailabilityResponse struct {
	CheckNameResult
}

AttachedDatabaseConfigurationsClientCheckNameAvailabilityResponse contains the response from method AttachedDatabaseConfigurationsClient.CheckNameAvailability.

type AttachedDatabaseConfigurationsClientCreateOrUpdateResponse added in v0.2.0

type AttachedDatabaseConfigurationsClientCreateOrUpdateResponse struct {
	AttachedDatabaseConfiguration
}

AttachedDatabaseConfigurationsClientCreateOrUpdateResponse contains the response from method AttachedDatabaseConfigurationsClient.CreateOrUpdate.

type AttachedDatabaseConfigurationsClientDeleteResponse added in v0.2.0

type AttachedDatabaseConfigurationsClientDeleteResponse struct {
}

AttachedDatabaseConfigurationsClientDeleteResponse contains the response from method AttachedDatabaseConfigurationsClient.Delete.

type AttachedDatabaseConfigurationsClientGetOptions added in v0.2.0

type AttachedDatabaseConfigurationsClientGetOptions struct {
}

AttachedDatabaseConfigurationsClientGetOptions contains the optional parameters for the AttachedDatabaseConfigurationsClient.Get method.

type AttachedDatabaseConfigurationsClientGetResponse added in v0.2.0

type AttachedDatabaseConfigurationsClientGetResponse struct {
	AttachedDatabaseConfiguration
}

AttachedDatabaseConfigurationsClientGetResponse contains the response from method AttachedDatabaseConfigurationsClient.Get.

type AttachedDatabaseConfigurationsClientListByClusterOptions added in v0.2.0

type AttachedDatabaseConfigurationsClientListByClusterOptions struct {
}

AttachedDatabaseConfigurationsClientListByClusterOptions contains the optional parameters for the AttachedDatabaseConfigurationsClient.ListByCluster method.

type AttachedDatabaseConfigurationsClientListByClusterResponse added in v0.2.0

type AttachedDatabaseConfigurationsClientListByClusterResponse struct {
	AttachedDatabaseConfigurationListResult
}

AttachedDatabaseConfigurationsClientListByClusterResponse contains the response from method AttachedDatabaseConfigurationsClient.ListByCluster.

type AzureCapacity

type AzureCapacity struct {
	// REQUIRED; The default capacity that would be used.
	Default *int32 `json:"default,omitempty"`

	// REQUIRED; Maximum allowed capacity.
	Maximum *int32 `json:"maximum,omitempty"`

	// REQUIRED; Minimum allowed capacity.
	Minimum *int32 `json:"minimum,omitempty"`

	// REQUIRED; Scale type.
	ScaleType *AzureScaleType `json:"scaleType,omitempty"`
}

AzureCapacity - Azure capacity definition.

type AzureResourceSKU

type AzureResourceSKU struct {
	// The number of instances of the cluster.
	Capacity *AzureCapacity `json:"capacity,omitempty"`

	// Resource Namespace and Type.
	ResourceType *string `json:"resourceType,omitempty"`

	// The SKU details.
	SKU *AzureSKU `json:"sku,omitempty"`
}

AzureResourceSKU - Azure resource SKU definition.

type AzureSKU

type AzureSKU struct {
	// REQUIRED; SKU name.
	Name *AzureSKUName `json:"name,omitempty"`

	// REQUIRED; SKU tier.
	Tier *AzureSKUTier `json:"tier,omitempty"`

	// The number of instances of the cluster.
	Capacity *int32 `json:"capacity,omitempty"`
}

AzureSKU - Azure SKU definition.

type AzureSKUName

type AzureSKUName string

AzureSKUName - SKU name.

const (
	AzureSKUNameDevNoSLAStandardD11V2 AzureSKUName = "Dev(No SLA)_Standard_D11_v2"
	AzureSKUNameDevNoSLAStandardE2AV4 AzureSKUName = "Dev(No SLA)_Standard_E2a_v4"
	AzureSKUNameStandardD11V2         AzureSKUName = "Standard_D11_v2"
	AzureSKUNameStandardD12V2         AzureSKUName = "Standard_D12_v2"
	AzureSKUNameStandardD13V2         AzureSKUName = "Standard_D13_v2"
	AzureSKUNameStandardD14V2         AzureSKUName = "Standard_D14_v2"
	AzureSKUNameStandardD16DV5        AzureSKUName = "Standard_D16d_v5"
	AzureSKUNameStandardD32DV4        AzureSKUName = "Standard_D32d_v4"
	AzureSKUNameStandardD32DV5        AzureSKUName = "Standard_D32d_v5"
	AzureSKUNameStandardDS13V21TBPS   AzureSKUName = "Standard_DS13_v2+1TB_PS"
	AzureSKUNameStandardDS13V22TBPS   AzureSKUName = "Standard_DS13_v2+2TB_PS"
	AzureSKUNameStandardDS14V23TBPS   AzureSKUName = "Standard_DS14_v2+3TB_PS"
	AzureSKUNameStandardDS14V24TBPS   AzureSKUName = "Standard_DS14_v2+4TB_PS"
	AzureSKUNameStandardE16AV4        AzureSKUName = "Standard_E16a_v4"
	AzureSKUNameStandardE16AdsV5      AzureSKUName = "Standard_E16ads_v5"
	AzureSKUNameStandardE16AsV43TBPS  AzureSKUName = "Standard_E16as_v4+3TB_PS"
	AzureSKUNameStandardE16AsV44TBPS  AzureSKUName = "Standard_E16as_v4+4TB_PS"
	AzureSKUNameStandardE16AsV53TBPS  AzureSKUName = "Standard_E16as_v5+3TB_PS"
	AzureSKUNameStandardE16AsV54TBPS  AzureSKUName = "Standard_E16as_v5+4TB_PS"
	AzureSKUNameStandardE16SV43TBPS   AzureSKUName = "Standard_E16s_v4+3TB_PS"
	AzureSKUNameStandardE16SV44TBPS   AzureSKUName = "Standard_E16s_v4+4TB_PS"
	AzureSKUNameStandardE16SV53TBPS   AzureSKUName = "Standard_E16s_v5+3TB_PS"
	AzureSKUNameStandardE16SV54TBPS   AzureSKUName = "Standard_E16s_v5+4TB_PS"
	AzureSKUNameStandardE2AV4         AzureSKUName = "Standard_E2a_v4"
	AzureSKUNameStandardE2AdsV5       AzureSKUName = "Standard_E2ads_v5"
	AzureSKUNameStandardE4AV4         AzureSKUName = "Standard_E4a_v4"
	AzureSKUNameStandardE4AdsV5       AzureSKUName = "Standard_E4ads_v5"
	AzureSKUNameStandardE64IV3        AzureSKUName = "Standard_E64i_v3"
	AzureSKUNameStandardE80IDsV4      AzureSKUName = "Standard_E80ids_v4"
	AzureSKUNameStandardE8AV4         AzureSKUName = "Standard_E8a_v4"
	AzureSKUNameStandardE8AdsV5       AzureSKUName = "Standard_E8ads_v5"
	AzureSKUNameStandardE8AsV41TBPS   AzureSKUName = "Standard_E8as_v4+1TB_PS"
	AzureSKUNameStandardE8AsV42TBPS   AzureSKUName = "Standard_E8as_v4+2TB_PS"
	AzureSKUNameStandardE8AsV51TBPS   AzureSKUName = "Standard_E8as_v5+1TB_PS"
	AzureSKUNameStandardE8AsV52TBPS   AzureSKUName = "Standard_E8as_v5+2TB_PS"
	AzureSKUNameStandardE8SV41TBPS    AzureSKUName = "Standard_E8s_v4+1TB_PS"
	AzureSKUNameStandardE8SV42TBPS    AzureSKUName = "Standard_E8s_v4+2TB_PS"
	AzureSKUNameStandardE8SV51TBPS    AzureSKUName = "Standard_E8s_v5+1TB_PS"
	AzureSKUNameStandardE8SV52TBPS    AzureSKUName = "Standard_E8s_v5+2TB_PS"
	AzureSKUNameStandardL16S          AzureSKUName = "Standard_L16s"
	AzureSKUNameStandardL16SV2        AzureSKUName = "Standard_L16s_v2"
	AzureSKUNameStandardL4S           AzureSKUName = "Standard_L4s"
	AzureSKUNameStandardL8S           AzureSKUName = "Standard_L8s"
	AzureSKUNameStandardL8SV2         AzureSKUName = "Standard_L8s_v2"
)

func PossibleAzureSKUNameValues

func PossibleAzureSKUNameValues() []AzureSKUName

PossibleAzureSKUNameValues returns the possible values for the AzureSKUName const type.

type AzureSKUTier

type AzureSKUTier string

AzureSKUTier - SKU tier.

const (
	AzureSKUTierBasic    AzureSKUTier = "Basic"
	AzureSKUTierStandard AzureSKUTier = "Standard"
)

func PossibleAzureSKUTierValues

func PossibleAzureSKUTierValues() []AzureSKUTier

PossibleAzureSKUTierValues returns the possible values for the AzureSKUTier const type.

type AzureScaleType

type AzureScaleType string

AzureScaleType - Scale type.

const (
	AzureScaleTypeAutomatic AzureScaleType = "automatic"
	AzureScaleTypeManual    AzureScaleType = "manual"
	AzureScaleTypeNone      AzureScaleType = "none"
)

func PossibleAzureScaleTypeValues

func PossibleAzureScaleTypeValues() []AzureScaleType

PossibleAzureScaleTypeValues returns the possible values for the AzureScaleType const type.

type BlobStorageEventType

type BlobStorageEventType string

BlobStorageEventType - The name of blob storage event type to process.

const (
	BlobStorageEventTypeMicrosoftStorageBlobCreated BlobStorageEventType = "Microsoft.Storage.BlobCreated"
	BlobStorageEventTypeMicrosoftStorageBlobRenamed BlobStorageEventType = "Microsoft.Storage.BlobRenamed"
)

func PossibleBlobStorageEventTypeValues

func PossibleBlobStorageEventTypeValues() []BlobStorageEventType

PossibleBlobStorageEventTypeValues returns the possible values for the BlobStorageEventType const type.

type CheckNameRequest

type CheckNameRequest struct {
	// REQUIRED; Resource name.
	Name *string `json:"name,omitempty"`

	// REQUIRED; The type of resource, for instance Microsoft.Kusto/clusters/databases.
	Type *Type `json:"type,omitempty"`
}

CheckNameRequest - The result returned from a database check name availability request.

type CheckNameResult

type CheckNameResult struct {
	// Message indicating an unavailable name due to a conflict, or a description of the naming rules that are violated.
	Message *string `json:"message,omitempty"`

	// The name that was checked.
	Name *string `json:"name,omitempty"`

	// Specifies a Boolean value that indicates if the name is available.
	NameAvailable *bool `json:"nameAvailable,omitempty"`

	// Message providing the reason why the given name is invalid.
	Reason *Reason `json:"reason,omitempty"`
}

CheckNameResult - The result returned from a check name availability request.

type CloudError

type CloudError struct {
	// An error response from Kusto.
	Error *CloudErrorBody `json:"error,omitempty"`
}

CloudError - An error response from Kusto.

type CloudErrorBody

type CloudErrorBody struct {
	// An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
	Code *string `json:"code,omitempty"`

	// A list of additional details about the error.
	Details []*CloudErrorBody `json:"details,omitempty"`

	// A message describing the error, intended to be suitable for displaying in a user interface.
	Message *string `json:"message,omitempty"`

	// The target of the particular error. For example, the name of the property in error.
	Target *string `json:"target,omitempty"`
}

CloudErrorBody - An error response from Kusto.

func (CloudErrorBody) MarshalJSON

func (c CloudErrorBody) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CloudErrorBody.

type Cluster

type Cluster struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string `json:"location,omitempty"`

	// REQUIRED; The SKU of the cluster.
	SKU *AzureSKU `json:"sku,omitempty"`

	// The identity of the cluster, if configured.
	Identity *Identity `json:"identity,omitempty"`

	// The cluster properties.
	Properties *ClusterProperties `json:"properties,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// The availability zones of the cluster.
	Zones []*string `json:"zones,omitempty"`

	// READ-ONLY; A unique read-only string that changes whenever the resource is updated.
	Etag *string `json:"etag,omitempty" azure:"ro"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

Cluster - Class representing a Kusto cluster.

func (Cluster) MarshalJSON

func (c Cluster) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Cluster.

type ClusterCheckNameRequest

type ClusterCheckNameRequest struct {
	// REQUIRED; Cluster name.
	Name *string `json:"name,omitempty"`

	// REQUIRED; The type of resource, Microsoft.Kusto/clusters.
	Type *string `json:"type,omitempty"`
}

ClusterCheckNameRequest - The result returned from a cluster check name availability request.

type ClusterListResult

type ClusterListResult struct {
	// The list of Kusto clusters.
	Value []*Cluster `json:"value,omitempty"`
}

ClusterListResult - The list Kusto clusters operation response.

func (ClusterListResult) MarshalJSON

func (c ClusterListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ClusterListResult.

type ClusterNetworkAccessFlag

type ClusterNetworkAccessFlag string

ClusterNetworkAccessFlag - Whether or not to restrict outbound network access. Value is optional but if passed in, must be 'Enabled' or 'Disabled'

const (
	ClusterNetworkAccessFlagDisabled ClusterNetworkAccessFlag = "Disabled"
	ClusterNetworkAccessFlagEnabled  ClusterNetworkAccessFlag = "Enabled"
)

func PossibleClusterNetworkAccessFlagValues

func PossibleClusterNetworkAccessFlagValues() []ClusterNetworkAccessFlag

PossibleClusterNetworkAccessFlagValues returns the possible values for the ClusterNetworkAccessFlag const type.

type ClusterPrincipalAssignment

type ClusterPrincipalAssignment struct {
	// The cluster principal.
	Properties *ClusterPrincipalProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

ClusterPrincipalAssignment - Class representing a cluster principal assignment.

type ClusterPrincipalAssignmentCheckNameRequest

type ClusterPrincipalAssignmentCheckNameRequest struct {
	// REQUIRED; Principal Assignment resource name.
	Name *string `json:"name,omitempty"`

	// REQUIRED; The type of resource, Microsoft.Kusto/clusters/principalAssignments.
	Type *string `json:"type,omitempty"`
}

ClusterPrincipalAssignmentCheckNameRequest - A principal assignment check name availability request.

type ClusterPrincipalAssignmentListResult

type ClusterPrincipalAssignmentListResult struct {
	// The list of Kusto cluster principal assignments.
	Value []*ClusterPrincipalAssignment `json:"value,omitempty"`
}

ClusterPrincipalAssignmentListResult - The list Kusto cluster principal assignments operation response.

func (ClusterPrincipalAssignmentListResult) MarshalJSON

func (c ClusterPrincipalAssignmentListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ClusterPrincipalAssignmentListResult.

type ClusterPrincipalAssignmentsClient

type ClusterPrincipalAssignmentsClient struct {
	// contains filtered or unexported fields
}

ClusterPrincipalAssignmentsClient contains the methods for the ClusterPrincipalAssignments group. Don't use this type directly, use NewClusterPrincipalAssignmentsClient() instead.

func NewClusterPrincipalAssignmentsClient

func NewClusterPrincipalAssignmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClusterPrincipalAssignmentsClient, error)

NewClusterPrincipalAssignmentsClient creates a new instance of ClusterPrincipalAssignmentsClient with the specified values. subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ClusterPrincipalAssignmentsClient) BeginCreateOrUpdate

BeginCreateOrUpdate - Create a Kusto cluster principalAssignment. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. principalAssignmentName - The name of the Kusto principalAssignment. parameters - The Kusto cluster principalAssignment's parameters supplied for the operation. options - ClusterPrincipalAssignmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the ClusterPrincipalAssignmentsClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClusterPrincipalAssignmentsCreateOrUpdate.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewClusterPrincipalAssignmentsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<principal-assignment-name>",
		armkusto.ClusterPrincipalAssignment{
			Properties: &armkusto.ClusterPrincipalProperties{
				PrincipalID:   to.Ptr("<principal-id>"),
				PrincipalType: to.Ptr(armkusto.PrincipalTypeApp),
				Role:          to.Ptr(armkusto.ClusterPrincipalRoleAllDatabasesAdmin),
				TenantID:      to.Ptr("<tenant-id>"),
			},
		},
		&armkusto.ClusterPrincipalAssignmentsClientBeginCreateOrUpdateOptions{ResumeToken: ""})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ClusterPrincipalAssignmentsClient) BeginDelete

BeginDelete - Deletes a Kusto cluster principalAssignment. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. principalAssignmentName - The name of the Kusto principalAssignment. options - ClusterPrincipalAssignmentsClientBeginDeleteOptions contains the optional parameters for the ClusterPrincipalAssignmentsClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClusterPrincipalAssignmentsDelete.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewClusterPrincipalAssignmentsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	poller, err := client.BeginDelete(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<principal-assignment-name>",
		&armkusto.ClusterPrincipalAssignmentsClientBeginDeleteOptions{ResumeToken: ""})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	_, err = poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
		return
	}
}
Output:

func (*ClusterPrincipalAssignmentsClient) CheckNameAvailability

CheckNameAvailability - Checks that the principal assignment name is valid and is not already in use. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. principalAssignmentName - The name of the principal assignment. options - ClusterPrincipalAssignmentsClientCheckNameAvailabilityOptions contains the optional parameters for the ClusterPrincipalAssignmentsClient.CheckNameAvailability method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClusterPrincipalAssignmentsCheckNameAvailability.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewClusterPrincipalAssignmentsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.CheckNameAvailability(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		armkusto.ClusterPrincipalAssignmentCheckNameRequest{
			Name: to.Ptr("<name>"),
			Type: to.Ptr("<type>"),
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ClusterPrincipalAssignmentsClient) Get

Get - Gets a Kusto cluster principalAssignment. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. principalAssignmentName - The name of the Kusto principalAssignment. options - ClusterPrincipalAssignmentsClientGetOptions contains the optional parameters for the ClusterPrincipalAssignmentsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClusterPrincipalAssignmentsGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewClusterPrincipalAssignmentsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<principal-assignment-name>",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ClusterPrincipalAssignmentsClient) NewListPager added in v0.4.0

NewListPager - Lists all Kusto cluster principalAssignments. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. options - ClusterPrincipalAssignmentsClientListOptions contains the optional parameters for the ClusterPrincipalAssignmentsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClusterPrincipalAssignmentsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewClusterPrincipalAssignmentsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	pager := client.NewListPager("<resource-group-name>",
		"<cluster-name>",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
			return
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type ClusterPrincipalAssignmentsClientBeginCreateOrUpdateOptions added in v0.2.0

type ClusterPrincipalAssignmentsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ClusterPrincipalAssignmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the ClusterPrincipalAssignmentsClient.BeginCreateOrUpdate method.

type ClusterPrincipalAssignmentsClientBeginDeleteOptions added in v0.2.0

type ClusterPrincipalAssignmentsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ClusterPrincipalAssignmentsClientBeginDeleteOptions contains the optional parameters for the ClusterPrincipalAssignmentsClient.BeginDelete method.

type ClusterPrincipalAssignmentsClientCheckNameAvailabilityOptions added in v0.2.0

type ClusterPrincipalAssignmentsClientCheckNameAvailabilityOptions struct {
}

ClusterPrincipalAssignmentsClientCheckNameAvailabilityOptions contains the optional parameters for the ClusterPrincipalAssignmentsClient.CheckNameAvailability method.

type ClusterPrincipalAssignmentsClientCheckNameAvailabilityResponse added in v0.2.0

type ClusterPrincipalAssignmentsClientCheckNameAvailabilityResponse struct {
	CheckNameResult
}

ClusterPrincipalAssignmentsClientCheckNameAvailabilityResponse contains the response from method ClusterPrincipalAssignmentsClient.CheckNameAvailability.

type ClusterPrincipalAssignmentsClientCreateOrUpdateResponse added in v0.2.0

type ClusterPrincipalAssignmentsClientCreateOrUpdateResponse struct {
	ClusterPrincipalAssignment
}

ClusterPrincipalAssignmentsClientCreateOrUpdateResponse contains the response from method ClusterPrincipalAssignmentsClient.CreateOrUpdate.

type ClusterPrincipalAssignmentsClientDeleteResponse added in v0.2.0

type ClusterPrincipalAssignmentsClientDeleteResponse struct {
}

ClusterPrincipalAssignmentsClientDeleteResponse contains the response from method ClusterPrincipalAssignmentsClient.Delete.

type ClusterPrincipalAssignmentsClientGetOptions added in v0.2.0

type ClusterPrincipalAssignmentsClientGetOptions struct {
}

ClusterPrincipalAssignmentsClientGetOptions contains the optional parameters for the ClusterPrincipalAssignmentsClient.Get method.

type ClusterPrincipalAssignmentsClientGetResponse added in v0.2.0

type ClusterPrincipalAssignmentsClientGetResponse struct {
	ClusterPrincipalAssignment
}

ClusterPrincipalAssignmentsClientGetResponse contains the response from method ClusterPrincipalAssignmentsClient.Get.

type ClusterPrincipalAssignmentsClientListOptions added in v0.2.0

type ClusterPrincipalAssignmentsClientListOptions struct {
}

ClusterPrincipalAssignmentsClientListOptions contains the optional parameters for the ClusterPrincipalAssignmentsClient.List method.

type ClusterPrincipalAssignmentsClientListResponse added in v0.2.0

type ClusterPrincipalAssignmentsClientListResponse struct {
	ClusterPrincipalAssignmentListResult
}

ClusterPrincipalAssignmentsClientListResponse contains the response from method ClusterPrincipalAssignmentsClient.List.

type ClusterPrincipalProperties

type ClusterPrincipalProperties struct {
	// REQUIRED; The principal ID assigned to the cluster principal. It can be a user email, application ID, or security group
	// name.
	PrincipalID *string `json:"principalId,omitempty"`

	// REQUIRED; Principal type.
	PrincipalType *PrincipalType `json:"principalType,omitempty"`

	// REQUIRED; Cluster principal role.
	Role *ClusterPrincipalRole `json:"role,omitempty"`

	// The tenant id of the principal
	TenantID *string `json:"tenantId,omitempty"`

	// READ-ONLY; The service principal object id in AAD (Azure active directory)
	AADObjectID *string `json:"aadObjectId,omitempty" azure:"ro"`

	// READ-ONLY; The principal name
	PrincipalName *string `json:"principalName,omitempty" azure:"ro"`

	// READ-ONLY; The provisioned state of the resource.
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; The tenant name of the principal
	TenantName *string `json:"tenantName,omitempty" azure:"ro"`
}

ClusterPrincipalProperties - A class representing cluster principal property.

type ClusterPrincipalRole

type ClusterPrincipalRole string

ClusterPrincipalRole - Cluster principal role.

const (
	ClusterPrincipalRoleAllDatabasesAdmin  ClusterPrincipalRole = "AllDatabasesAdmin"
	ClusterPrincipalRoleAllDatabasesViewer ClusterPrincipalRole = "AllDatabasesViewer"
)

func PossibleClusterPrincipalRoleValues

func PossibleClusterPrincipalRoleValues() []ClusterPrincipalRole

PossibleClusterPrincipalRoleValues returns the possible values for the ClusterPrincipalRole const type.

type ClusterProperties

type ClusterProperties struct {
	// The cluster's accepted audiences.
	AcceptedAudiences []*AcceptedAudiences `json:"acceptedAudiences,omitempty"`

	// List of allowed FQDNs(Fully Qualified Domain Name) for egress from Cluster.
	AllowedFqdnList []*string `json:"allowedFqdnList,omitempty"`

	// The list of ips in the format of CIDR allowed to connect to the cluster.
	AllowedIPRangeList []*string `json:"allowedIpRangeList,omitempty"`

	// A boolean value that indicates if the cluster could be automatically stopped (due to lack of data or no activity for many
	// days).
	EnableAutoStop *bool `json:"enableAutoStop,omitempty"`

	// A boolean value that indicates if the cluster's disks are encrypted.
	EnableDiskEncryption *bool `json:"enableDiskEncryption,omitempty"`

	// A boolean value that indicates if double encryption is enabled.
	EnableDoubleEncryption *bool `json:"enableDoubleEncryption,omitempty"`

	// A boolean value that indicates if the purge operations are enabled.
	EnablePurge *bool `json:"enablePurge,omitempty"`

	// A boolean value that indicates if the streaming ingest is enabled.
	EnableStreamingIngest *bool `json:"enableStreamingIngest,omitempty"`

	// The engine type
	EngineType *EngineType `json:"engineType,omitempty"`

	// KeyVault properties for the cluster encryption.
	KeyVaultProperties *KeyVaultProperties `json:"keyVaultProperties,omitempty"`

	// Optimized auto scale definition.
	OptimizedAutoscale *OptimizedAutoscale `json:"optimizedAutoscale,omitempty"`

	// Indicates what public IP type to create - IPv4 (default), or DualStack (both IPv4 and IPv6)
	PublicIPType *PublicIPType `json:"publicIPType,omitempty"`

	// Public network access to the cluster is enabled by default. When disabled, only private endpoint connection to the cluster
	// is allowed
	PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`

	// Whether or not to restrict outbound network access. Value is optional but if passed in, must be 'Enabled' or 'Disabled'
	RestrictOutboundNetworkAccess *ClusterNetworkAccessFlag `json:"restrictOutboundNetworkAccess,omitempty"`

	// The cluster's external tenants.
	TrustedExternalTenants []*TrustedExternalTenant `json:"trustedExternalTenants,omitempty"`

	// Virtual Cluster graduation properties
	VirtualClusterGraduationProperties *string `json:"virtualClusterGraduationProperties,omitempty"`

	// Virtual network definition.
	VirtualNetworkConfiguration *VirtualNetworkConfiguration `json:"virtualNetworkConfiguration,omitempty"`

	// READ-ONLY; The cluster data ingestion URI.
	DataIngestionURI *string `json:"dataIngestionUri,omitempty" azure:"ro"`

	// READ-ONLY; List of the cluster's language extensions.
	LanguageExtensions *LanguageExtensionsList `json:"languageExtensions,omitempty" azure:"ro"`

	// READ-ONLY; A list of private endpoint connections.
	PrivateEndpointConnections []*PrivateEndpointConnection `json:"privateEndpointConnections,omitempty" azure:"ro"`

	// READ-ONLY; The provisioned state of the resource.
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; The state of the resource.
	State *State `json:"state,omitempty" azure:"ro"`

	// READ-ONLY; The reason for the cluster's current state.
	StateReason *string `json:"stateReason,omitempty" azure:"ro"`

	// READ-ONLY; The cluster URI.
	URI *string `json:"uri,omitempty" azure:"ro"`
}

ClusterProperties - Class representing the Kusto cluster properties.

func (ClusterProperties) MarshalJSON

func (c ClusterProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ClusterProperties.

type ClusterUpdate

type ClusterUpdate struct {
	// The identity of the cluster, if configured.
	Identity *Identity `json:"identity,omitempty"`

	// Resource location.
	Location *string `json:"location,omitempty"`

	// The cluster properties.
	Properties *ClusterProperties `json:"properties,omitempty"`

	// The SKU of the cluster.
	SKU *AzureSKU `json:"sku,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

ClusterUpdate - Class representing an update to a Kusto cluster.

func (ClusterUpdate) MarshalJSON

func (c ClusterUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ClusterUpdate.

type ClustersClient

type ClustersClient struct {
	// contains filtered or unexported fields
}

ClustersClient contains the methods for the Clusters group. Don't use this type directly, use NewClustersClient() instead.

func NewClustersClient

func NewClustersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClustersClient, error)

NewClustersClient creates a new instance of ClustersClient with the specified values. subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ClustersClient) BeginAddLanguageExtensions

func (client *ClustersClient) BeginAddLanguageExtensions(ctx context.Context, resourceGroupName string, clusterName string, languageExtensionsToAdd LanguageExtensionsList, options *ClustersClientBeginAddLanguageExtensionsOptions) (*armruntime.Poller[ClustersClientAddLanguageExtensionsResponse], error)

BeginAddLanguageExtensions - Add a list of language extensions that can run within KQL queries. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. languageExtensionsToAdd - The language extensions to add. options - ClustersClientBeginAddLanguageExtensionsOptions contains the optional parameters for the ClustersClient.BeginAddLanguageExtensions method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClusterAddLanguageExtensions.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewClustersClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	poller, err := client.BeginAddLanguageExtensions(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		armkusto.LanguageExtensionsList{
			Value: []*armkusto.LanguageExtension{
				{
					LanguageExtensionName: to.Ptr(armkusto.LanguageExtensionNamePYTHON),
				},
				{
					LanguageExtensionName: to.Ptr(armkusto.LanguageExtensionNameR),
				}},
		},
		&armkusto.ClustersClientBeginAddLanguageExtensionsOptions{ResumeToken: ""})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	_, err = poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
		return
	}
}
Output:

func (*ClustersClient) BeginCreateOrUpdate

func (client *ClustersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, parameters Cluster, options *ClustersClientBeginCreateOrUpdateOptions) (*armruntime.Poller[ClustersClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create or update a Kusto cluster. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. parameters - The Kusto cluster parameters supplied to the CreateOrUpdate operation. options - ClustersClientBeginCreateOrUpdateOptions contains the optional parameters for the ClustersClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClustersCreateOrUpdate.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewClustersClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		armkusto.Cluster{
			Location: to.Ptr("<location>"),
			Identity: &armkusto.Identity{
				Type: to.Ptr(armkusto.IdentityTypeSystemAssigned),
			},
			Properties: &armkusto.ClusterProperties{
				AllowedIPRangeList: []*string{
					to.Ptr("0.0.0.0/0")},
				EnableAutoStop:         to.Ptr(true),
				EnableDoubleEncryption: to.Ptr(false),
				EnablePurge:            to.Ptr(true),
				EnableStreamingIngest:  to.Ptr(true),
				PublicIPType:           to.Ptr(armkusto.PublicIPTypeDualStack),
				PublicNetworkAccess:    to.Ptr(armkusto.PublicNetworkAccessEnabled),
			},
			SKU: &armkusto.AzureSKU{
				Name:     to.Ptr(armkusto.AzureSKUNameStandardL8S),
				Capacity: to.Ptr[int32](2),
				Tier:     to.Ptr(armkusto.AzureSKUTierStandard),
			},
		},
		&armkusto.ClustersClientBeginCreateOrUpdateOptions{IfMatch: nil,
			IfNoneMatch: nil,
			ResumeToken: "",
		})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ClustersClient) BeginDelete

func (client *ClustersClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginDeleteOptions) (*armruntime.Poller[ClustersClientDeleteResponse], error)

BeginDelete - Deletes a Kusto cluster. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. options - ClustersClientBeginDeleteOptions contains the optional parameters for the ClustersClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClustersDelete.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewClustersClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	poller, err := client.BeginDelete(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		&armkusto.ClustersClientBeginDeleteOptions{ResumeToken: ""})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	_, err = poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
		return
	}
}
Output:

func (*ClustersClient) BeginDetachFollowerDatabases

func (client *ClustersClient) BeginDetachFollowerDatabases(ctx context.Context, resourceGroupName string, clusterName string, followerDatabaseToRemove FollowerDatabaseDefinition, options *ClustersClientBeginDetachFollowerDatabasesOptions) (*armruntime.Poller[ClustersClientDetachFollowerDatabasesResponse], error)

BeginDetachFollowerDatabases - Detaches all followers of a database owned by this cluster. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. followerDatabaseToRemove - The follower databases properties to remove. options - ClustersClientBeginDetachFollowerDatabasesOptions contains the optional parameters for the ClustersClient.BeginDetachFollowerDatabases method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClusterDetachFollowerDatabases.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewClustersClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	poller, err := client.BeginDetachFollowerDatabases(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		armkusto.FollowerDatabaseDefinition{
			AttachedDatabaseConfigurationName: to.Ptr("<attached-database-configuration-name>"),
			ClusterResourceID:                 to.Ptr("<cluster-resource-id>"),
		},
		&armkusto.ClustersClientBeginDetachFollowerDatabasesOptions{ResumeToken: ""})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	_, err = poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
		return
	}
}
Output:

func (*ClustersClient) BeginDiagnoseVirtualNetwork

func (client *ClustersClient) BeginDiagnoseVirtualNetwork(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginDiagnoseVirtualNetworkOptions) (*armruntime.Poller[ClustersClientDiagnoseVirtualNetworkResponse], error)

BeginDiagnoseVirtualNetwork - Diagnoses network connectivity status for external resources on which the service is dependent on. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. options - ClustersClientBeginDiagnoseVirtualNetworkOptions contains the optional parameters for the ClustersClient.BeginDiagnoseVirtualNetwork method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClustersDiagnoseVirtualNetwork.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewClustersClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	poller, err := client.BeginDiagnoseVirtualNetwork(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		&armkusto.ClustersClientBeginDiagnoseVirtualNetworkOptions{ResumeToken: ""})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ClustersClient) BeginRemoveLanguageExtensions

func (client *ClustersClient) BeginRemoveLanguageExtensions(ctx context.Context, resourceGroupName string, clusterName string, languageExtensionsToRemove LanguageExtensionsList, options *ClustersClientBeginRemoveLanguageExtensionsOptions) (*armruntime.Poller[ClustersClientRemoveLanguageExtensionsResponse], error)

BeginRemoveLanguageExtensions - Remove a list of language extensions that can run within KQL queries. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. languageExtensionsToRemove - The language extensions to remove. options - ClustersClientBeginRemoveLanguageExtensionsOptions contains the optional parameters for the ClustersClient.BeginRemoveLanguageExtensions method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClusterRemoveLanguageExtensions.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewClustersClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	poller, err := client.BeginRemoveLanguageExtensions(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		armkusto.LanguageExtensionsList{
			Value: []*armkusto.LanguageExtension{
				{
					LanguageExtensionName: to.Ptr(armkusto.LanguageExtensionNamePYTHON),
				},
				{
					LanguageExtensionName: to.Ptr(armkusto.LanguageExtensionNameR),
				}},
		},
		&armkusto.ClustersClientBeginRemoveLanguageExtensionsOptions{ResumeToken: ""})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	_, err = poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
		return
	}
}
Output:

func (*ClustersClient) BeginStart

func (client *ClustersClient) BeginStart(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginStartOptions) (*armruntime.Poller[ClustersClientStartResponse], error)

BeginStart - Starts a Kusto cluster. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. options - ClustersClientBeginStartOptions contains the optional parameters for the ClustersClient.BeginStart method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClustersStart.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewClustersClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	poller, err := client.BeginStart(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		&armkusto.ClustersClientBeginStartOptions{ResumeToken: ""})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	_, err = poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
		return
	}
}
Output:

func (*ClustersClient) BeginStop

func (client *ClustersClient) BeginStop(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginStopOptions) (*armruntime.Poller[ClustersClientStopResponse], error)

BeginStop - Stops a Kusto cluster. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. options - ClustersClientBeginStopOptions contains the optional parameters for the ClustersClient.BeginStop method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClustersStop.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewClustersClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	poller, err := client.BeginStop(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		&armkusto.ClustersClientBeginStopOptions{ResumeToken: ""})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	_, err = poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
		return
	}
}
Output:

func (*ClustersClient) BeginUpdate

func (client *ClustersClient) BeginUpdate(ctx context.Context, resourceGroupName string, clusterName string, parameters ClusterUpdate, options *ClustersClientBeginUpdateOptions) (*armruntime.Poller[ClustersClientUpdateResponse], error)

BeginUpdate - Update a Kusto cluster. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. parameters - The Kusto cluster parameters supplied to the Update operation. options - ClustersClientBeginUpdateOptions contains the optional parameters for the ClustersClient.BeginUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClustersUpdate.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewClustersClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	poller, err := client.BeginUpdate(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		armkusto.ClusterUpdate{
			Location: to.Ptr("<location>"),
		},
		&armkusto.ClustersClientBeginUpdateOptions{IfMatch: to.Ptr("<if-match>"),
			ResumeToken: "",
		})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ClustersClient) CheckNameAvailability

CheckNameAvailability - Checks that the cluster name is valid and is not already in use. If the operation fails it returns an *azcore.ResponseError type. location - Azure location (region) name. clusterName - The name of the cluster. options - ClustersClientCheckNameAvailabilityOptions contains the optional parameters for the ClustersClient.CheckNameAvailability method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClustersCheckNameAvailability.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewClustersClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.CheckNameAvailability(ctx,
		"<location>",
		armkusto.ClusterCheckNameRequest{
			Name: to.Ptr("<name>"),
			Type: to.Ptr("<type>"),
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ClustersClient) Get

func (client *ClustersClient) Get(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientGetOptions) (ClustersClientGetResponse, error)

Get - Gets a Kusto cluster. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. options - ClustersClientGetOptions contains the optional parameters for the ClustersClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClustersGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewClustersClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ClustersClient) NewListByResourceGroupPager added in v0.4.0

func (client *ClustersClient) NewListByResourceGroupPager(resourceGroupName string, options *ClustersClientListByResourceGroupOptions) *runtime.Pager[ClustersClientListByResourceGroupResponse]

NewListByResourceGroupPager - Lists all Kusto clusters within a resource group. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. options - ClustersClientListByResourceGroupOptions contains the optional parameters for the ClustersClient.ListByResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClustersListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewClustersClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	pager := client.NewListByResourceGroupPager("<resource-group-name>",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
			return
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ClustersClient) NewListFollowerDatabasesPager added in v0.4.0

func (client *ClustersClient) NewListFollowerDatabasesPager(resourceGroupName string, clusterName string, options *ClustersClientListFollowerDatabasesOptions) *runtime.Pager[ClustersClientListFollowerDatabasesResponse]

NewListFollowerDatabasesPager - Returns a list of databases that are owned by this cluster and were followed by another cluster. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. options - ClustersClientListFollowerDatabasesOptions contains the optional parameters for the ClustersClient.ListFollowerDatabases method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClusterListFollowerDatabases.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewClustersClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	pager := client.NewListFollowerDatabasesPager("<resource-group-name>",
		"<cluster-name>",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
			return
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ClustersClient) NewListLanguageExtensionsPager added in v0.4.0

func (client *ClustersClient) NewListLanguageExtensionsPager(resourceGroupName string, clusterName string, options *ClustersClientListLanguageExtensionsOptions) *runtime.Pager[ClustersClientListLanguageExtensionsResponse]

NewListLanguageExtensionsPager - Returns a list of language extensions that can run within KQL queries. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. options - ClustersClientListLanguageExtensionsOptions contains the optional parameters for the ClustersClient.ListLanguageExtensions method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClusterListLanguageExtensions.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewClustersClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	pager := client.NewListLanguageExtensionsPager("<resource-group-name>",
		"<cluster-name>",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
			return
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ClustersClient) NewListOutboundNetworkDependenciesEndpointsPager added in v0.4.0

func (client *ClustersClient) NewListOutboundNetworkDependenciesEndpointsPager(resourceGroupName string, clusterName string, options *ClustersClientListOutboundNetworkDependenciesEndpointsOptions) *runtime.Pager[ClustersClientListOutboundNetworkDependenciesEndpointsResponse]

NewListOutboundNetworkDependenciesEndpointsPager - Gets the network endpoints of all outbound dependencies of a Kusto cluster If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. options - ClustersClientListOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the ClustersClient.ListOutboundNetworkDependenciesEndpoints method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoOutboundNetworkDependenciesList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewClustersClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	pager := client.NewListOutboundNetworkDependenciesEndpointsPager("<resource-group-name>",
		"<cluster-name>",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
			return
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ClustersClient) NewListPager added in v0.4.0

NewListPager - Lists all Kusto clusters within a subscription. If the operation fails it returns an *azcore.ResponseError type. options - ClustersClientListOptions contains the optional parameters for the ClustersClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClustersList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewClustersClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
			return
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ClustersClient) NewListSKUsByResourcePager added in v0.4.0

func (client *ClustersClient) NewListSKUsByResourcePager(resourceGroupName string, clusterName string, options *ClustersClientListSKUsByResourceOptions) *runtime.Pager[ClustersClientListSKUsByResourceResponse]

NewListSKUsByResourcePager - Returns the SKUs available for the provided resource. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. options - ClustersClientListSKUsByResourceOptions contains the optional parameters for the ClustersClient.ListSKUsByResource method.

func (*ClustersClient) NewListSKUsPager added in v0.4.0

NewListSKUsPager - Lists eligible SKUs for Kusto resource provider. If the operation fails it returns an *azcore.ResponseError type. options - ClustersClientListSKUsOptions contains the optional parameters for the ClustersClient.ListSKUs method.

type ClustersClientAddLanguageExtensionsResponse added in v0.2.0

type ClustersClientAddLanguageExtensionsResponse struct {
}

ClustersClientAddLanguageExtensionsResponse contains the response from method ClustersClient.AddLanguageExtensions.

type ClustersClientBeginAddLanguageExtensionsOptions added in v0.2.0

type ClustersClientBeginAddLanguageExtensionsOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ClustersClientBeginAddLanguageExtensionsOptions contains the optional parameters for the ClustersClient.BeginAddLanguageExtensions method.

type ClustersClientBeginCreateOrUpdateOptions added in v0.2.0

type ClustersClientBeginCreateOrUpdateOptions struct {
	// The ETag of the cluster. Omit this value to always overwrite the current cluster. Specify the last-seen ETag value to prevent
	// accidentally overwriting concurrent changes.
	IfMatch *string
	// Set to '*' to allow a new cluster to be created, but to prevent updating an existing cluster. Other values will result
	// in a 412 Pre-condition Failed response.
	IfNoneMatch *string
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ClustersClientBeginCreateOrUpdateOptions contains the optional parameters for the ClustersClient.BeginCreateOrUpdate method.

type ClustersClientBeginDeleteOptions added in v0.2.0

type ClustersClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ClustersClientBeginDeleteOptions contains the optional parameters for the ClustersClient.BeginDelete method.

type ClustersClientBeginDetachFollowerDatabasesOptions added in v0.2.0

type ClustersClientBeginDetachFollowerDatabasesOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ClustersClientBeginDetachFollowerDatabasesOptions contains the optional parameters for the ClustersClient.BeginDetachFollowerDatabases method.

type ClustersClientBeginDiagnoseVirtualNetworkOptions added in v0.2.0

type ClustersClientBeginDiagnoseVirtualNetworkOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ClustersClientBeginDiagnoseVirtualNetworkOptions contains the optional parameters for the ClustersClient.BeginDiagnoseVirtualNetwork method.

type ClustersClientBeginRemoveLanguageExtensionsOptions added in v0.2.0

type ClustersClientBeginRemoveLanguageExtensionsOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ClustersClientBeginRemoveLanguageExtensionsOptions contains the optional parameters for the ClustersClient.BeginRemoveLanguageExtensions method.

type ClustersClientBeginStartOptions added in v0.2.0

type ClustersClientBeginStartOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ClustersClientBeginStartOptions contains the optional parameters for the ClustersClient.BeginStart method.

type ClustersClientBeginStopOptions added in v0.2.0

type ClustersClientBeginStopOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ClustersClientBeginStopOptions contains the optional parameters for the ClustersClient.BeginStop method.

type ClustersClientBeginUpdateOptions added in v0.2.0

type ClustersClientBeginUpdateOptions struct {
	// The ETag of the cluster. Omit this value to always overwrite the current cluster. Specify the last-seen ETag value to prevent
	// accidentally overwriting concurrent changes.
	IfMatch *string
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ClustersClientBeginUpdateOptions contains the optional parameters for the ClustersClient.BeginUpdate method.

type ClustersClientCheckNameAvailabilityOptions added in v0.2.0

type ClustersClientCheckNameAvailabilityOptions struct {
}

ClustersClientCheckNameAvailabilityOptions contains the optional parameters for the ClustersClient.CheckNameAvailability method.

type ClustersClientCheckNameAvailabilityResponse added in v0.2.0

type ClustersClientCheckNameAvailabilityResponse struct {
	CheckNameResult
}

ClustersClientCheckNameAvailabilityResponse contains the response from method ClustersClient.CheckNameAvailability.

type ClustersClientCreateOrUpdateResponse added in v0.2.0

type ClustersClientCreateOrUpdateResponse struct {
	Cluster
}

ClustersClientCreateOrUpdateResponse contains the response from method ClustersClient.CreateOrUpdate.

type ClustersClientDeleteResponse added in v0.2.0

type ClustersClientDeleteResponse struct {
}

ClustersClientDeleteResponse contains the response from method ClustersClient.Delete.

type ClustersClientDetachFollowerDatabasesResponse added in v0.2.0

type ClustersClientDetachFollowerDatabasesResponse struct {
}

ClustersClientDetachFollowerDatabasesResponse contains the response from method ClustersClient.DetachFollowerDatabases.

type ClustersClientDiagnoseVirtualNetworkResponse added in v0.2.0

type ClustersClientDiagnoseVirtualNetworkResponse struct {
	DiagnoseVirtualNetworkResult
}

ClustersClientDiagnoseVirtualNetworkResponse contains the response from method ClustersClient.DiagnoseVirtualNetwork.

type ClustersClientGetOptions added in v0.2.0

type ClustersClientGetOptions struct {
}

ClustersClientGetOptions contains the optional parameters for the ClustersClient.Get method.

type ClustersClientGetResponse added in v0.2.0

type ClustersClientGetResponse struct {
	Cluster
}

ClustersClientGetResponse contains the response from method ClustersClient.Get.

type ClustersClientListByResourceGroupOptions added in v0.2.0

type ClustersClientListByResourceGroupOptions struct {
}

ClustersClientListByResourceGroupOptions contains the optional parameters for the ClustersClient.ListByResourceGroup method.

type ClustersClientListByResourceGroupResponse added in v0.2.0

type ClustersClientListByResourceGroupResponse struct {
	ClusterListResult
}

ClustersClientListByResourceGroupResponse contains the response from method ClustersClient.ListByResourceGroup.

type ClustersClientListFollowerDatabasesOptions added in v0.2.0

type ClustersClientListFollowerDatabasesOptions struct {
}

ClustersClientListFollowerDatabasesOptions contains the optional parameters for the ClustersClient.ListFollowerDatabases method.

type ClustersClientListFollowerDatabasesResponse added in v0.2.0

type ClustersClientListFollowerDatabasesResponse struct {
	FollowerDatabaseListResult
}

ClustersClientListFollowerDatabasesResponse contains the response from method ClustersClient.ListFollowerDatabases.

type ClustersClientListLanguageExtensionsOptions added in v0.2.0

type ClustersClientListLanguageExtensionsOptions struct {
}

ClustersClientListLanguageExtensionsOptions contains the optional parameters for the ClustersClient.ListLanguageExtensions method.

type ClustersClientListLanguageExtensionsResponse added in v0.2.0

type ClustersClientListLanguageExtensionsResponse struct {
	LanguageExtensionsList
}

ClustersClientListLanguageExtensionsResponse contains the response from method ClustersClient.ListLanguageExtensions.

type ClustersClientListOptions added in v0.2.0

type ClustersClientListOptions struct {
}

ClustersClientListOptions contains the optional parameters for the ClustersClient.List method.

type ClustersClientListOutboundNetworkDependenciesEndpointsOptions added in v0.2.0

type ClustersClientListOutboundNetworkDependenciesEndpointsOptions struct {
}

ClustersClientListOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the ClustersClient.ListOutboundNetworkDependenciesEndpoints method.

type ClustersClientListOutboundNetworkDependenciesEndpointsResponse added in v0.2.0

type ClustersClientListOutboundNetworkDependenciesEndpointsResponse struct {
	OutboundNetworkDependenciesEndpointListResult
}

ClustersClientListOutboundNetworkDependenciesEndpointsResponse contains the response from method ClustersClient.ListOutboundNetworkDependenciesEndpoints.

type ClustersClientListResponse added in v0.2.0

type ClustersClientListResponse struct {
	ClusterListResult
}

ClustersClientListResponse contains the response from method ClustersClient.List.

type ClustersClientListSKUsByResourceOptions added in v0.2.0

type ClustersClientListSKUsByResourceOptions struct {
}

ClustersClientListSKUsByResourceOptions contains the optional parameters for the ClustersClient.ListSKUsByResource method.

type ClustersClientListSKUsByResourceResponse added in v0.2.0

type ClustersClientListSKUsByResourceResponse struct {
	ListResourceSKUsResult
}

ClustersClientListSKUsByResourceResponse contains the response from method ClustersClient.ListSKUsByResource.

type ClustersClientListSKUsOptions added in v0.2.0

type ClustersClientListSKUsOptions struct {
}

ClustersClientListSKUsOptions contains the optional parameters for the ClustersClient.ListSKUs method.

type ClustersClientListSKUsResponse added in v0.2.0

type ClustersClientListSKUsResponse struct {
	SKUDescriptionList
}

ClustersClientListSKUsResponse contains the response from method ClustersClient.ListSKUs.

type ClustersClientRemoveLanguageExtensionsResponse added in v0.2.0

type ClustersClientRemoveLanguageExtensionsResponse struct {
}

ClustersClientRemoveLanguageExtensionsResponse contains the response from method ClustersClient.RemoveLanguageExtensions.

type ClustersClientStartResponse added in v0.2.0

type ClustersClientStartResponse struct {
}

ClustersClientStartResponse contains the response from method ClustersClient.Start.

type ClustersClientStopResponse added in v0.2.0

type ClustersClientStopResponse struct {
}

ClustersClientStopResponse contains the response from method ClustersClient.Stop.

type ClustersClientUpdateResponse added in v0.2.0

type ClustersClientUpdateResponse struct {
	Cluster
}

ClustersClientUpdateResponse contains the response from method ClustersClient.Update.

type ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties

type ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties struct {
	// READ-ONLY; The client id of user assigned identity.
	ClientID *string `json:"clientId,omitempty" azure:"ro"`

	// READ-ONLY; The principal id of user assigned identity.
	PrincipalID *string `json:"principalId,omitempty" azure:"ro"`
}

type Compression

type Compression string

Compression - The compression type

const (
	CompressionGZip Compression = "GZip"
	CompressionNone Compression = "None"
)

func PossibleCompressionValues

func PossibleCompressionValues() []Compression

PossibleCompressionValues returns the possible values for the Compression const type.

type CreatedByType

type CreatedByType string

CreatedByType - The type of identity that created the resource.

const (
	CreatedByTypeApplication     CreatedByType = "Application"
	CreatedByTypeKey             CreatedByType = "Key"
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	CreatedByTypeUser            CreatedByType = "User"
)

func PossibleCreatedByTypeValues

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type DataConnection

type DataConnection struct {
	// REQUIRED; Kind of the endpoint for the data connection
	Kind *DataConnectionKind `json:"kind,omitempty"`

	// Resource location.
	Location *string `json:"location,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

DataConnection - Class representing an data connection.

func (*DataConnection) GetDataConnection

func (d *DataConnection) GetDataConnection() *DataConnection

GetDataConnection implements the DataConnectionClassification interface for type DataConnection.

func (DataConnection) MarshalJSON added in v0.2.0

func (d DataConnection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DataConnection.

type DataConnectionCheckNameRequest

type DataConnectionCheckNameRequest struct {
	// REQUIRED; Data Connection name.
	Name *string `json:"name,omitempty"`

	// REQUIRED; The type of resource, Microsoft.Kusto/clusters/databases/dataConnections.
	Type *string `json:"type,omitempty"`
}

DataConnectionCheckNameRequest - A data connection check name availability request.

type DataConnectionClassification

type DataConnectionClassification interface {
	// GetDataConnection returns the DataConnection content of the underlying type.
	GetDataConnection() *DataConnection
}

DataConnectionClassification provides polymorphic access to related types. Call the interface's GetDataConnection() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *DataConnection, *EventGridDataConnection, *EventHubDataConnection, *IotHubDataConnection

type DataConnectionKind

type DataConnectionKind string

DataConnectionKind - Kind of the endpoint for the data connection

const (
	DataConnectionKindEventGrid DataConnectionKind = "EventGrid"
	DataConnectionKindEventHub  DataConnectionKind = "EventHub"
	DataConnectionKindIotHub    DataConnectionKind = "IotHub"
)

func PossibleDataConnectionKindValues

func PossibleDataConnectionKindValues() []DataConnectionKind

PossibleDataConnectionKindValues returns the possible values for the DataConnectionKind const type.

type DataConnectionListResult

type DataConnectionListResult struct {
	// The list of Kusto data connections.
	Value []DataConnectionClassification `json:"value,omitempty"`
}

DataConnectionListResult - The list Kusto data connections operation response.

func (DataConnectionListResult) MarshalJSON

func (d DataConnectionListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DataConnectionListResult.

func (*DataConnectionListResult) UnmarshalJSON

func (d *DataConnectionListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DataConnectionListResult.

type DataConnectionValidation

type DataConnectionValidation struct {
	// The name of the data connection.
	DataConnectionName *string `json:"dataConnectionName,omitempty"`

	// The data connection properties to validate.
	Properties DataConnectionClassification `json:"properties,omitempty"`
}

DataConnectionValidation - Class representing an data connection validation.

func (DataConnectionValidation) MarshalJSON

func (d DataConnectionValidation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DataConnectionValidation.

func (*DataConnectionValidation) UnmarshalJSON

func (d *DataConnectionValidation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DataConnectionValidation.

type DataConnectionValidationListResult

type DataConnectionValidationListResult struct {
	// The list of Kusto data connection validation errors.
	Value []*DataConnectionValidationResult `json:"value,omitempty"`
}

DataConnectionValidationListResult - The list Kusto data connection validation result.

func (DataConnectionValidationListResult) MarshalJSON

func (d DataConnectionValidationListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DataConnectionValidationListResult.

type DataConnectionValidationResult

type DataConnectionValidationResult struct {
	// A message which indicates a problem in data connection validation.
	ErrorMessage *string `json:"errorMessage,omitempty"`
}

DataConnectionValidationResult - The result returned from a data connection validation request.

type DataConnectionsClient

type DataConnectionsClient struct {
	// contains filtered or unexported fields
}

DataConnectionsClient contains the methods for the DataConnections group. Don't use this type directly, use NewDataConnectionsClient() instead.

func NewDataConnectionsClient

func NewDataConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DataConnectionsClient, error)

NewDataConnectionsClient creates a new instance of DataConnectionsClient with the specified values. subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*DataConnectionsClient) BeginCreateOrUpdate

func (client *DataConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, dataConnectionName string, parameters DataConnectionClassification, options *DataConnectionsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[DataConnectionsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates a data connection. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. databaseName - The name of the database in the Kusto cluster. dataConnectionName - The name of the data connection. parameters - The data connection parameters supplied to the CreateOrUpdate operation. options - DataConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the DataConnectionsClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDataConnectionsCreateOrUpdate.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewDataConnectionsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<database-name>",
		"<data-connection-name>",
		&armkusto.EventHubDataConnection{
			Kind:     to.Ptr(armkusto.DataConnectionKindEventHub),
			Location: to.Ptr("<location>"),
			Properties: &armkusto.EventHubConnectionProperties{
				ConsumerGroup:             to.Ptr("<consumer-group>"),
				EventHubResourceID:        to.Ptr("<event-hub-resource-id>"),
				ManagedIdentityResourceID: to.Ptr("<managed-identity-resource-id>"),
			},
		},
		&armkusto.DataConnectionsClientBeginCreateOrUpdateOptions{ResumeToken: ""})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DataConnectionsClient) BeginDataConnectionValidation

BeginDataConnectionValidation - Checks that the data connection parameters are valid. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. databaseName - The name of the database in the Kusto cluster. parameters - The data connection parameters supplied to the CreateOrUpdate operation. options - DataConnectionsClientBeginDataConnectionValidationOptions contains the optional parameters for the DataConnectionsClient.BeginDataConnectionValidation method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDataConnectionEventGridValidationAsync.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewDataConnectionsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	poller, err := client.BeginDataConnectionValidation(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<database-name>",
		armkusto.DataConnectionValidation{
			DataConnectionName: to.Ptr("<data-connection-name>"),
			Properties: &armkusto.EventGridDataConnection{
				Kind: to.Ptr(armkusto.DataConnectionKindEventGrid),
				Properties: &armkusto.EventGridConnectionProperties{
					BlobStorageEventType:      to.Ptr(armkusto.BlobStorageEventTypeMicrosoftStorageBlobCreated),
					ConsumerGroup:             to.Ptr("<consumer-group>"),
					DataFormat:                to.Ptr(armkusto.EventGridDataFormatJSON),
					DatabaseRouting:           to.Ptr(armkusto.DatabaseRoutingSingle),
					EventGridResourceID:       to.Ptr("<event-grid-resource-id>"),
					EventHubResourceID:        to.Ptr("<event-hub-resource-id>"),
					IgnoreFirstRecord:         to.Ptr(false),
					ManagedIdentityResourceID: to.Ptr("<managed-identity-resource-id>"),
					MappingRuleName:           to.Ptr("<mapping-rule-name>"),
					StorageAccountResourceID:  to.Ptr("<storage-account-resource-id>"),
					TableName:                 to.Ptr("<table-name>"),
				},
			},
		},
		&armkusto.DataConnectionsClientBeginDataConnectionValidationOptions{ResumeToken: ""})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DataConnectionsClient) BeginDelete

func (client *DataConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, dataConnectionName string, options *DataConnectionsClientBeginDeleteOptions) (*armruntime.Poller[DataConnectionsClientDeleteResponse], error)

BeginDelete - Deletes the data connection with the given name. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. databaseName - The name of the database in the Kusto cluster. dataConnectionName - The name of the data connection. options - DataConnectionsClientBeginDeleteOptions contains the optional parameters for the DataConnectionsClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDataConnectionsDelete.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewDataConnectionsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	poller, err := client.BeginDelete(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<database-name>",
		"<data-connection-name>",
		&armkusto.DataConnectionsClientBeginDeleteOptions{ResumeToken: ""})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	_, err = poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
		return
	}
}
Output:

func (*DataConnectionsClient) BeginUpdate

func (client *DataConnectionsClient) BeginUpdate(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, dataConnectionName string, parameters DataConnectionClassification, options *DataConnectionsClientBeginUpdateOptions) (*armruntime.Poller[DataConnectionsClientUpdateResponse], error)

BeginUpdate - Updates a data connection. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. databaseName - The name of the database in the Kusto cluster. dataConnectionName - The name of the data connection. parameters - The data connection parameters supplied to the Update operation. options - DataConnectionsClientBeginUpdateOptions contains the optional parameters for the DataConnectionsClient.BeginUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDataConnectionsEventGridUpdate.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewDataConnectionsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	poller, err := client.BeginUpdate(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<database-name>",
		"<data-connection-name>",
		&armkusto.EventGridDataConnection{
			Kind:     to.Ptr(armkusto.DataConnectionKindEventGrid),
			Location: to.Ptr("<location>"),
			Properties: &armkusto.EventGridConnectionProperties{
				BlobStorageEventType:      to.Ptr(armkusto.BlobStorageEventTypeMicrosoftStorageBlobCreated),
				ConsumerGroup:             to.Ptr("<consumer-group>"),
				DataFormat:                to.Ptr(armkusto.EventGridDataFormatJSON),
				DatabaseRouting:           to.Ptr(armkusto.DatabaseRoutingSingle),
				EventGridResourceID:       to.Ptr("<event-grid-resource-id>"),
				EventHubResourceID:        to.Ptr("<event-hub-resource-id>"),
				IgnoreFirstRecord:         to.Ptr(false),
				ManagedIdentityResourceID: to.Ptr("<managed-identity-resource-id>"),
				MappingRuleName:           to.Ptr("<mapping-rule-name>"),
				StorageAccountResourceID:  to.Ptr("<storage-account-resource-id>"),
				TableName:                 to.Ptr("<table-name>"),
			},
		},
		&armkusto.DataConnectionsClientBeginUpdateOptions{ResumeToken: ""})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DataConnectionsClient) CheckNameAvailability

func (client *DataConnectionsClient) CheckNameAvailability(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, dataConnectionName DataConnectionCheckNameRequest, options *DataConnectionsClientCheckNameAvailabilityOptions) (DataConnectionsClientCheckNameAvailabilityResponse, error)

CheckNameAvailability - Checks that the data connection name is valid and is not already in use. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. databaseName - The name of the database in the Kusto cluster. dataConnectionName - The name of the data connection. options - DataConnectionsClientCheckNameAvailabilityOptions contains the optional parameters for the DataConnectionsClient.CheckNameAvailability method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDataConnectionsCheckNameAvailability.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewDataConnectionsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.CheckNameAvailability(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<database-name>",
		armkusto.DataConnectionCheckNameRequest{
			Name: to.Ptr("<name>"),
			Type: to.Ptr("<type>"),
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DataConnectionsClient) Get

func (client *DataConnectionsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, dataConnectionName string, options *DataConnectionsClientGetOptions) (DataConnectionsClientGetResponse, error)

Get - Returns a data connection. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. databaseName - The name of the database in the Kusto cluster. dataConnectionName - The name of the data connection. options - DataConnectionsClientGetOptions contains the optional parameters for the DataConnectionsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDataConnectionsEventGridGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewDataConnectionsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<database-name>",
		"<data-connection-name>",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DataConnectionsClient) NewListByDatabasePager added in v0.4.0

func (client *DataConnectionsClient) NewListByDatabasePager(resourceGroupName string, clusterName string, databaseName string, options *DataConnectionsClientListByDatabaseOptions) *runtime.Pager[DataConnectionsClientListByDatabaseResponse]

NewListByDatabasePager - Returns the list of data connections of the given Kusto database. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. databaseName - The name of the database in the Kusto cluster. options - DataConnectionsClientListByDatabaseOptions contains the optional parameters for the DataConnectionsClient.ListByDatabase method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDataConnectionsListByDatabase.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewDataConnectionsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	pager := client.NewListByDatabasePager("<resource-group-name>",
		"<cluster-name>",
		"<database-name>",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
			return
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type DataConnectionsClientBeginCreateOrUpdateOptions added in v0.2.0

type DataConnectionsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DataConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the DataConnectionsClient.BeginCreateOrUpdate method.

type DataConnectionsClientBeginDataConnectionValidationOptions added in v0.2.0

type DataConnectionsClientBeginDataConnectionValidationOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DataConnectionsClientBeginDataConnectionValidationOptions contains the optional parameters for the DataConnectionsClient.BeginDataConnectionValidation method.

type DataConnectionsClientBeginDeleteOptions added in v0.2.0

type DataConnectionsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DataConnectionsClientBeginDeleteOptions contains the optional parameters for the DataConnectionsClient.BeginDelete method.

type DataConnectionsClientBeginUpdateOptions added in v0.2.0

type DataConnectionsClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DataConnectionsClientBeginUpdateOptions contains the optional parameters for the DataConnectionsClient.BeginUpdate method.

type DataConnectionsClientCheckNameAvailabilityOptions added in v0.2.0

type DataConnectionsClientCheckNameAvailabilityOptions struct {
}

DataConnectionsClientCheckNameAvailabilityOptions contains the optional parameters for the DataConnectionsClient.CheckNameAvailability method.

type DataConnectionsClientCheckNameAvailabilityResponse added in v0.2.0

type DataConnectionsClientCheckNameAvailabilityResponse struct {
	CheckNameResult
}

DataConnectionsClientCheckNameAvailabilityResponse contains the response from method DataConnectionsClient.CheckNameAvailability.

type DataConnectionsClientCreateOrUpdateResponse added in v0.2.0

type DataConnectionsClientCreateOrUpdateResponse struct {
	DataConnectionClassification
}

DataConnectionsClientCreateOrUpdateResponse contains the response from method DataConnectionsClient.CreateOrUpdate.

func (*DataConnectionsClientCreateOrUpdateResponse) UnmarshalJSON added in v0.3.0

func (d *DataConnectionsClientCreateOrUpdateResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DataConnectionsClientCreateOrUpdateResponse.

type DataConnectionsClientDataConnectionValidationResponse added in v0.2.0

type DataConnectionsClientDataConnectionValidationResponse struct {
	DataConnectionValidationListResult
}

DataConnectionsClientDataConnectionValidationResponse contains the response from method DataConnectionsClient.DataConnectionValidation.

type DataConnectionsClientDeleteResponse added in v0.2.0

type DataConnectionsClientDeleteResponse struct {
}

DataConnectionsClientDeleteResponse contains the response from method DataConnectionsClient.Delete.

type DataConnectionsClientGetOptions added in v0.2.0

type DataConnectionsClientGetOptions struct {
}

DataConnectionsClientGetOptions contains the optional parameters for the DataConnectionsClient.Get method.

type DataConnectionsClientGetResponse added in v0.2.0

type DataConnectionsClientGetResponse struct {
	DataConnectionClassification
}

DataConnectionsClientGetResponse contains the response from method DataConnectionsClient.Get.

func (*DataConnectionsClientGetResponse) UnmarshalJSON added in v0.3.0

func (d *DataConnectionsClientGetResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DataConnectionsClientGetResponse.

type DataConnectionsClientListByDatabaseOptions added in v0.2.0

type DataConnectionsClientListByDatabaseOptions struct {
}

DataConnectionsClientListByDatabaseOptions contains the optional parameters for the DataConnectionsClient.ListByDatabase method.

type DataConnectionsClientListByDatabaseResponse added in v0.2.0

type DataConnectionsClientListByDatabaseResponse struct {
	DataConnectionListResult
}

DataConnectionsClientListByDatabaseResponse contains the response from method DataConnectionsClient.ListByDatabase.

type DataConnectionsClientUpdateResponse added in v0.2.0

type DataConnectionsClientUpdateResponse struct {
	DataConnectionClassification
}

DataConnectionsClientUpdateResponse contains the response from method DataConnectionsClient.Update.

func (*DataConnectionsClientUpdateResponse) UnmarshalJSON added in v0.3.0

func (d *DataConnectionsClientUpdateResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DataConnectionsClientUpdateResponse.

type Database

type Database struct {
	// REQUIRED; Kind of the database
	Kind *Kind `json:"kind,omitempty"`

	// Resource location.
	Location *string `json:"location,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

Database - Class representing a Kusto database.

func (*Database) GetDatabase

func (d *Database) GetDatabase() *Database

GetDatabase implements the DatabaseClassification interface for type Database.

func (Database) MarshalJSON added in v0.2.0

func (d Database) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Database.

type DatabaseClassification

type DatabaseClassification interface {
	// GetDatabase returns the Database content of the underlying type.
	GetDatabase() *Database
}

DatabaseClassification provides polymorphic access to related types. Call the interface's GetDatabase() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *Database, *ReadOnlyFollowingDatabase, *ReadWriteDatabase

type DatabaseListResult

type DatabaseListResult struct {
	// The list of Kusto databases.
	Value []DatabaseClassification `json:"value,omitempty"`
}

DatabaseListResult - The list Kusto databases operation response.

func (DatabaseListResult) MarshalJSON

func (d DatabaseListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DatabaseListResult.

func (*DatabaseListResult) UnmarshalJSON

func (d *DatabaseListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseListResult.

type DatabasePrincipal

type DatabasePrincipal struct {
	// REQUIRED; Database principal name.
	Name *string `json:"name,omitempty"`

	// REQUIRED; Database principal role.
	Role *DatabasePrincipalRole `json:"role,omitempty"`

	// REQUIRED; Database principal type.
	Type *DatabasePrincipalType `json:"type,omitempty"`

	// Application id - relevant only for application principal type.
	AppID *string `json:"appId,omitempty"`

	// Database principal email if exists.
	Email *string `json:"email,omitempty"`

	// Database principal fully qualified name.
	Fqn *string `json:"fqn,omitempty"`

	// READ-ONLY; The tenant name of the principal
	TenantName *string `json:"tenantName,omitempty" azure:"ro"`
}

DatabasePrincipal - A class representing database principal entity.

type DatabasePrincipalAssignment

type DatabasePrincipalAssignment struct {
	// The database principal.
	Properties *DatabasePrincipalProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

DatabasePrincipalAssignment - Class representing a database principal assignment.

type DatabasePrincipalAssignmentCheckNameRequest

type DatabasePrincipalAssignmentCheckNameRequest struct {
	// REQUIRED; Principal Assignment resource name.
	Name *string `json:"name,omitempty"`

	// REQUIRED; The type of resource, Microsoft.Kusto/clusters/databases/principalAssignments.
	Type *string `json:"type,omitempty"`
}

DatabasePrincipalAssignmentCheckNameRequest - A principal assignment check name availability request.

type DatabasePrincipalAssignmentListResult

type DatabasePrincipalAssignmentListResult struct {
	// The list of Kusto database principal assignments.
	Value []*DatabasePrincipalAssignment `json:"value,omitempty"`
}

DatabasePrincipalAssignmentListResult - The list Kusto database principal assignments operation response.

func (DatabasePrincipalAssignmentListResult) MarshalJSON

func (d DatabasePrincipalAssignmentListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DatabasePrincipalAssignmentListResult.

type DatabasePrincipalAssignmentsClient

type DatabasePrincipalAssignmentsClient struct {
	// contains filtered or unexported fields
}

DatabasePrincipalAssignmentsClient contains the methods for the DatabasePrincipalAssignments group. Don't use this type directly, use NewDatabasePrincipalAssignmentsClient() instead.

func NewDatabasePrincipalAssignmentsClient

func NewDatabasePrincipalAssignmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabasePrincipalAssignmentsClient, error)

NewDatabasePrincipalAssignmentsClient creates a new instance of DatabasePrincipalAssignmentsClient with the specified values. subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*DatabasePrincipalAssignmentsClient) BeginCreateOrUpdate

BeginCreateOrUpdate - Creates a Kusto cluster database principalAssignment. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. databaseName - The name of the database in the Kusto cluster. principalAssignmentName - The name of the Kusto principalAssignment. parameters - The Kusto principalAssignments parameters supplied for the operation. options - DatabasePrincipalAssignmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the DatabasePrincipalAssignmentsClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDatabasePrincipalAssignmentsCreateOrUpdate.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewDatabasePrincipalAssignmentsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<database-name>",
		"<principal-assignment-name>",
		armkusto.DatabasePrincipalAssignment{
			Properties: &armkusto.DatabasePrincipalProperties{
				PrincipalID:   to.Ptr("<principal-id>"),
				PrincipalType: to.Ptr(armkusto.PrincipalTypeApp),
				Role:          to.Ptr(armkusto.DatabasePrincipalRoleAdmin),
				TenantID:      to.Ptr("<tenant-id>"),
			},
		},
		&armkusto.DatabasePrincipalAssignmentsClientBeginCreateOrUpdateOptions{ResumeToken: ""})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DatabasePrincipalAssignmentsClient) BeginDelete

func (client *DatabasePrincipalAssignmentsClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, principalAssignmentName string, options *DatabasePrincipalAssignmentsClientBeginDeleteOptions) (*armruntime.Poller[DatabasePrincipalAssignmentsClientDeleteResponse], error)

BeginDelete - Deletes a Kusto principalAssignment. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. databaseName - The name of the database in the Kusto cluster. principalAssignmentName - The name of the Kusto principalAssignment. options - DatabasePrincipalAssignmentsClientBeginDeleteOptions contains the optional parameters for the DatabasePrincipalAssignmentsClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDatabasePrincipalAssignmentsDelete.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewDatabasePrincipalAssignmentsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	poller, err := client.BeginDelete(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<database-name>",
		"<principal-assignment-name>",
		&armkusto.DatabasePrincipalAssignmentsClientBeginDeleteOptions{ResumeToken: ""})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	_, err = poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
		return
	}
}
Output:

func (*DatabasePrincipalAssignmentsClient) CheckNameAvailability

CheckNameAvailability - Checks that the database principal assignment is valid and is not already in use. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. databaseName - The name of the database in the Kusto cluster. principalAssignmentName - The name of the resource. options - DatabasePrincipalAssignmentsClientCheckNameAvailabilityOptions contains the optional parameters for the DatabasePrincipalAssignmentsClient.CheckNameAvailability method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDatabasePrincipalAssignmentsCheckNameAvailability.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewDatabasePrincipalAssignmentsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.CheckNameAvailability(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<database-name>",
		armkusto.DatabasePrincipalAssignmentCheckNameRequest{
			Name: to.Ptr("<name>"),
			Type: to.Ptr("<type>"),
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DatabasePrincipalAssignmentsClient) Get

func (client *DatabasePrincipalAssignmentsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, principalAssignmentName string, options *DatabasePrincipalAssignmentsClientGetOptions) (DatabasePrincipalAssignmentsClientGetResponse, error)

Get - Gets a Kusto cluster database principalAssignment. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. databaseName - The name of the database in the Kusto cluster. principalAssignmentName - The name of the Kusto principalAssignment. options - DatabasePrincipalAssignmentsClientGetOptions contains the optional parameters for the DatabasePrincipalAssignmentsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDatabasePrincipalAssignmentsGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewDatabasePrincipalAssignmentsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<database-name>",
		"<principal-assignment-name>",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DatabasePrincipalAssignmentsClient) NewListPager added in v0.4.0

NewListPager - Lists all Kusto cluster database principalAssignments. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. databaseName - The name of the database in the Kusto cluster. options - DatabasePrincipalAssignmentsClientListOptions contains the optional parameters for the DatabasePrincipalAssignmentsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDatabasePrincipalAssignmentsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewDatabasePrincipalAssignmentsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	pager := client.NewListPager("<resource-group-name>",
		"<cluster-name>",
		"<database-name>",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
			return
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type DatabasePrincipalAssignmentsClientBeginCreateOrUpdateOptions added in v0.2.0

type DatabasePrincipalAssignmentsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DatabasePrincipalAssignmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the DatabasePrincipalAssignmentsClient.BeginCreateOrUpdate method.

type DatabasePrincipalAssignmentsClientBeginDeleteOptions added in v0.2.0

type DatabasePrincipalAssignmentsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DatabasePrincipalAssignmentsClientBeginDeleteOptions contains the optional parameters for the DatabasePrincipalAssignmentsClient.BeginDelete method.

type DatabasePrincipalAssignmentsClientCheckNameAvailabilityOptions added in v0.2.0

type DatabasePrincipalAssignmentsClientCheckNameAvailabilityOptions struct {
}

DatabasePrincipalAssignmentsClientCheckNameAvailabilityOptions contains the optional parameters for the DatabasePrincipalAssignmentsClient.CheckNameAvailability method.

type DatabasePrincipalAssignmentsClientCheckNameAvailabilityResponse added in v0.2.0

type DatabasePrincipalAssignmentsClientCheckNameAvailabilityResponse struct {
	CheckNameResult
}

DatabasePrincipalAssignmentsClientCheckNameAvailabilityResponse contains the response from method DatabasePrincipalAssignmentsClient.CheckNameAvailability.

type DatabasePrincipalAssignmentsClientCreateOrUpdateResponse added in v0.2.0

type DatabasePrincipalAssignmentsClientCreateOrUpdateResponse struct {
	DatabasePrincipalAssignment
}

DatabasePrincipalAssignmentsClientCreateOrUpdateResponse contains the response from method DatabasePrincipalAssignmentsClient.CreateOrUpdate.

type DatabasePrincipalAssignmentsClientDeleteResponse added in v0.2.0

type DatabasePrincipalAssignmentsClientDeleteResponse struct {
}

DatabasePrincipalAssignmentsClientDeleteResponse contains the response from method DatabasePrincipalAssignmentsClient.Delete.

type DatabasePrincipalAssignmentsClientGetOptions added in v0.2.0

type DatabasePrincipalAssignmentsClientGetOptions struct {
}

DatabasePrincipalAssignmentsClientGetOptions contains the optional parameters for the DatabasePrincipalAssignmentsClient.Get method.

type DatabasePrincipalAssignmentsClientGetResponse added in v0.2.0

type DatabasePrincipalAssignmentsClientGetResponse struct {
	DatabasePrincipalAssignment
}

DatabasePrincipalAssignmentsClientGetResponse contains the response from method DatabasePrincipalAssignmentsClient.Get.

type DatabasePrincipalAssignmentsClientListOptions added in v0.2.0

type DatabasePrincipalAssignmentsClientListOptions struct {
}

DatabasePrincipalAssignmentsClientListOptions contains the optional parameters for the DatabasePrincipalAssignmentsClient.List method.

type DatabasePrincipalAssignmentsClientListResponse added in v0.2.0

type DatabasePrincipalAssignmentsClientListResponse struct {
	DatabasePrincipalAssignmentListResult
}

DatabasePrincipalAssignmentsClientListResponse contains the response from method DatabasePrincipalAssignmentsClient.List.

type DatabasePrincipalListRequest

type DatabasePrincipalListRequest struct {
	// The list of Kusto database principals.
	Value []*DatabasePrincipal `json:"value,omitempty"`
}

DatabasePrincipalListRequest - The list Kusto database principals operation request.

func (DatabasePrincipalListRequest) MarshalJSON

func (d DatabasePrincipalListRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DatabasePrincipalListRequest.

type DatabasePrincipalListResult

type DatabasePrincipalListResult struct {
	// The list of Kusto database principals.
	Value []*DatabasePrincipal `json:"value,omitempty"`
}

DatabasePrincipalListResult - The list Kusto database principals operation response.

func (DatabasePrincipalListResult) MarshalJSON

func (d DatabasePrincipalListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DatabasePrincipalListResult.

type DatabasePrincipalProperties

type DatabasePrincipalProperties struct {
	// REQUIRED; The principal ID assigned to the database principal. It can be a user email, application ID, or security group
	// name.
	PrincipalID *string `json:"principalId,omitempty"`

	// REQUIRED; Principal type.
	PrincipalType *PrincipalType `json:"principalType,omitempty"`

	// REQUIRED; Database principal role.
	Role *DatabasePrincipalRole `json:"role,omitempty"`

	// The tenant id of the principal
	TenantID *string `json:"tenantId,omitempty"`

	// READ-ONLY; The service principal object id in AAD (Azure active directory)
	AADObjectID *string `json:"aadObjectId,omitempty" azure:"ro"`

	// READ-ONLY; The principal name
	PrincipalName *string `json:"principalName,omitempty" azure:"ro"`

	// READ-ONLY; The provisioned state of the resource.
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; The tenant name of the principal
	TenantName *string `json:"tenantName,omitempty" azure:"ro"`
}

DatabasePrincipalProperties - A class representing database principal property.

type DatabasePrincipalRole

type DatabasePrincipalRole string

DatabasePrincipalRole - Database principal role.

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

func PossibleDatabasePrincipalRoleValues

func PossibleDatabasePrincipalRoleValues() []DatabasePrincipalRole

PossibleDatabasePrincipalRoleValues returns the possible values for the DatabasePrincipalRole const type.

type DatabasePrincipalType

type DatabasePrincipalType string

DatabasePrincipalType - Database principal type.

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

func PossibleDatabasePrincipalTypeValues

func PossibleDatabasePrincipalTypeValues() []DatabasePrincipalType

PossibleDatabasePrincipalTypeValues returns the possible values for the DatabasePrincipalType const type.

type DatabaseRouting added in v0.3.0

type DatabaseRouting string

DatabaseRouting - Indication for database routing information from the data connection, by default only database routing information is allowed

const (
	DatabaseRoutingMulti  DatabaseRouting = "Multi"
	DatabaseRoutingSingle DatabaseRouting = "Single"
)

func PossibleDatabaseRoutingValues added in v0.3.0

func PossibleDatabaseRoutingValues() []DatabaseRouting

PossibleDatabaseRoutingValues returns the possible values for the DatabaseRouting const type.

type DatabaseStatistics

type DatabaseStatistics struct {
	// The database size - the total size of compressed data and index in bytes.
	Size *float32 `json:"size,omitempty"`
}

DatabaseStatistics - A class that contains database statistics information.

type DatabasesClient

type DatabasesClient struct {
	// contains filtered or unexported fields
}

DatabasesClient contains the methods for the Databases group. Don't use this type directly, use NewDatabasesClient() instead.

func NewDatabasesClient

func NewDatabasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabasesClient, error)

NewDatabasesClient creates a new instance of DatabasesClient with the specified values. subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*DatabasesClient) AddPrincipals

func (client *DatabasesClient) AddPrincipals(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, databasePrincipalsToAdd DatabasePrincipalListRequest, options *DatabasesClientAddPrincipalsOptions) (DatabasesClientAddPrincipalsResponse, error)

AddPrincipals - Add Database principals permissions. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. databaseName - The name of the database in the Kusto cluster. databasePrincipalsToAdd - List of database principals to add. options - DatabasesClientAddPrincipalsOptions contains the optional parameters for the DatabasesClient.AddPrincipals method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDatabaseAddPrincipals.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewDatabasesClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.AddPrincipals(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<database-name>",
		armkusto.DatabasePrincipalListRequest{
			Value: []*armkusto.DatabasePrincipal{
				{
					Name:  to.Ptr("<name>"),
					Type:  to.Ptr(armkusto.DatabasePrincipalTypeUser),
					AppID: to.Ptr("<app-id>"),
					Email: to.Ptr("<email>"),
					Fqn:   to.Ptr("<fqn>"),
					Role:  to.Ptr(armkusto.DatabasePrincipalRoleAdmin),
				},
				{
					Name:  to.Ptr("<name>"),
					Type:  to.Ptr(armkusto.DatabasePrincipalTypeGroup),
					AppID: to.Ptr("<app-id>"),
					Email: to.Ptr("<email>"),
					Fqn:   to.Ptr("<fqn>"),
					Role:  to.Ptr(armkusto.DatabasePrincipalRoleViewer),
				},
				{
					Name:  to.Ptr("<name>"),
					Type:  to.Ptr(armkusto.DatabasePrincipalTypeApp),
					AppID: to.Ptr("<app-id>"),
					Email: to.Ptr("<email>"),
					Fqn:   to.Ptr("<fqn>"),
					Role:  to.Ptr(armkusto.DatabasePrincipalRoleAdmin),
				}},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DatabasesClient) BeginCreateOrUpdate

func (client *DatabasesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, parameters DatabaseClassification, options *DatabasesClientBeginCreateOrUpdateOptions) (*armruntime.Poller[DatabasesClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates a database. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. databaseName - The name of the database in the Kusto cluster. parameters - The database parameters supplied to the CreateOrUpdate operation. options - DatabasesClientBeginCreateOrUpdateOptions contains the optional parameters for the DatabasesClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDatabaseReadonlyUpdate.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewDatabasesClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<database-name>",
		&armkusto.ReadOnlyFollowingDatabase{
			Kind:     to.Ptr(armkusto.KindReadOnlyFollowing),
			Location: to.Ptr("<location>"),
			Properties: &armkusto.ReadOnlyFollowingDatabaseProperties{
				HotCachePeriod: to.Ptr("<hot-cache-period>"),
			},
		},
		&armkusto.DatabasesClientBeginCreateOrUpdateOptions{ResumeToken: ""})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DatabasesClient) BeginDelete

func (client *DatabasesClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, options *DatabasesClientBeginDeleteOptions) (*armruntime.Poller[DatabasesClientDeleteResponse], error)

BeginDelete - Deletes the database with the given name. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. databaseName - The name of the database in the Kusto cluster. options - DatabasesClientBeginDeleteOptions contains the optional parameters for the DatabasesClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDatabasesDelete.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewDatabasesClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	poller, err := client.BeginDelete(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<database-name>",
		&armkusto.DatabasesClientBeginDeleteOptions{ResumeToken: ""})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	_, err = poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
		return
	}
}
Output:

func (*DatabasesClient) BeginUpdate

func (client *DatabasesClient) BeginUpdate(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, parameters DatabaseClassification, options *DatabasesClientBeginUpdateOptions) (*armruntime.Poller[DatabasesClientUpdateResponse], error)

BeginUpdate - Updates a database. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. databaseName - The name of the database in the Kusto cluster. parameters - The database parameters supplied to the Update operation. options - DatabasesClientBeginUpdateOptions contains the optional parameters for the DatabasesClient.BeginUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDatabasesUpdate.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewDatabasesClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	poller, err := client.BeginUpdate(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<database-name>",
		&armkusto.ReadWriteDatabase{
			Kind: to.Ptr(armkusto.KindReadWrite),
			Properties: &armkusto.ReadWriteDatabaseProperties{
				HotCachePeriod: to.Ptr("<hot-cache-period>"),
			},
		},
		&armkusto.DatabasesClientBeginUpdateOptions{ResumeToken: ""})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DatabasesClient) CheckNameAvailability

func (client *DatabasesClient) CheckNameAvailability(ctx context.Context, resourceGroupName string, clusterName string, resourceName CheckNameRequest, options *DatabasesClientCheckNameAvailabilityOptions) (DatabasesClientCheckNameAvailabilityResponse, error)

CheckNameAvailability - Checks that the databases resource name is valid and is not already in use. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. resourceName - The name of the resource. options - DatabasesClientCheckNameAvailabilityOptions contains the optional parameters for the DatabasesClient.CheckNameAvailability method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDatabasesCheckNameAvailability.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewDatabasesClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.CheckNameAvailability(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		armkusto.CheckNameRequest{
			Name: to.Ptr("<name>"),
			Type: to.Ptr(armkusto.TypeMicrosoftKustoClustersDatabases),
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DatabasesClient) Get

func (client *DatabasesClient) Get(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, options *DatabasesClientGetOptions) (DatabasesClientGetResponse, error)

Get - Returns a database. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. databaseName - The name of the database in the Kusto cluster. options - DatabasesClientGetOptions contains the optional parameters for the DatabasesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDatabasesGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewDatabasesClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<database-name>",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DatabasesClient) NewListByClusterPager added in v0.4.0

func (client *DatabasesClient) NewListByClusterPager(resourceGroupName string, clusterName string, options *DatabasesClientListByClusterOptions) *runtime.Pager[DatabasesClientListByClusterResponse]

NewListByClusterPager - Returns the list of databases of the given Kusto cluster. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. options - DatabasesClientListByClusterOptions contains the optional parameters for the DatabasesClient.ListByCluster method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDatabasesListByCluster.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewDatabasesClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	pager := client.NewListByClusterPager("<resource-group-name>",
		"<cluster-name>",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
			return
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*DatabasesClient) NewListPrincipalsPager added in v0.4.0

func (client *DatabasesClient) NewListPrincipalsPager(resourceGroupName string, clusterName string, databaseName string, options *DatabasesClientListPrincipalsOptions) *runtime.Pager[DatabasesClientListPrincipalsResponse]

NewListPrincipalsPager - Returns a list of database principals of the given Kusto cluster and database. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. databaseName - The name of the database in the Kusto cluster. options - DatabasesClientListPrincipalsOptions contains the optional parameters for the DatabasesClient.ListPrincipals method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDatabaseListPrincipals.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewDatabasesClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	pager := client.NewListPrincipalsPager("<resource-group-name>",
		"<cluster-name>",
		"<database-name>",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
			return
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*DatabasesClient) RemovePrincipals

func (client *DatabasesClient) RemovePrincipals(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, databasePrincipalsToRemove DatabasePrincipalListRequest, options *DatabasesClientRemovePrincipalsOptions) (DatabasesClientRemovePrincipalsResponse, error)

RemovePrincipals - Remove Database principals permissions. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. databaseName - The name of the database in the Kusto cluster. databasePrincipalsToRemove - List of database principals to remove. options - DatabasesClientRemovePrincipalsOptions contains the optional parameters for the DatabasesClient.RemovePrincipals method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDatabaseRemovePrincipals.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewDatabasesClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.RemovePrincipals(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<database-name>",
		armkusto.DatabasePrincipalListRequest{
			Value: []*armkusto.DatabasePrincipal{
				{
					Name:  to.Ptr("<name>"),
					Type:  to.Ptr(armkusto.DatabasePrincipalTypeUser),
					AppID: to.Ptr("<app-id>"),
					Email: to.Ptr("<email>"),
					Fqn:   to.Ptr("<fqn>"),
					Role:  to.Ptr(armkusto.DatabasePrincipalRoleAdmin),
				},
				{
					Name:  to.Ptr("<name>"),
					Type:  to.Ptr(armkusto.DatabasePrincipalTypeGroup),
					AppID: to.Ptr("<app-id>"),
					Email: to.Ptr("<email>"),
					Fqn:   to.Ptr("<fqn>"),
					Role:  to.Ptr(armkusto.DatabasePrincipalRoleViewer),
				},
				{
					Name:  to.Ptr("<name>"),
					Type:  to.Ptr(armkusto.DatabasePrincipalTypeApp),
					AppID: to.Ptr("<app-id>"),
					Email: to.Ptr("<email>"),
					Fqn:   to.Ptr("<fqn>"),
					Role:  to.Ptr(armkusto.DatabasePrincipalRoleAdmin),
				}},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

type DatabasesClientAddPrincipalsOptions added in v0.2.0

type DatabasesClientAddPrincipalsOptions struct {
}

DatabasesClientAddPrincipalsOptions contains the optional parameters for the DatabasesClient.AddPrincipals method.

type DatabasesClientAddPrincipalsResponse added in v0.2.0

type DatabasesClientAddPrincipalsResponse struct {
	DatabasePrincipalListResult
}

DatabasesClientAddPrincipalsResponse contains the response from method DatabasesClient.AddPrincipals.

type DatabasesClientBeginCreateOrUpdateOptions added in v0.2.0

type DatabasesClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DatabasesClientBeginCreateOrUpdateOptions contains the optional parameters for the DatabasesClient.BeginCreateOrUpdate method.

type DatabasesClientBeginDeleteOptions added in v0.2.0

type DatabasesClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DatabasesClientBeginDeleteOptions contains the optional parameters for the DatabasesClient.BeginDelete method.

type DatabasesClientBeginUpdateOptions added in v0.2.0

type DatabasesClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DatabasesClientBeginUpdateOptions contains the optional parameters for the DatabasesClient.BeginUpdate method.

type DatabasesClientCheckNameAvailabilityOptions added in v0.2.0

type DatabasesClientCheckNameAvailabilityOptions struct {
}

DatabasesClientCheckNameAvailabilityOptions contains the optional parameters for the DatabasesClient.CheckNameAvailability method.

type DatabasesClientCheckNameAvailabilityResponse added in v0.2.0

type DatabasesClientCheckNameAvailabilityResponse struct {
	CheckNameResult
}

DatabasesClientCheckNameAvailabilityResponse contains the response from method DatabasesClient.CheckNameAvailability.

type DatabasesClientCreateOrUpdateResponse added in v0.2.0

type DatabasesClientCreateOrUpdateResponse struct {
	DatabaseClassification
}

DatabasesClientCreateOrUpdateResponse contains the response from method DatabasesClient.CreateOrUpdate.

func (*DatabasesClientCreateOrUpdateResponse) UnmarshalJSON added in v0.3.0

func (d *DatabasesClientCreateOrUpdateResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DatabasesClientCreateOrUpdateResponse.

type DatabasesClientDeleteResponse added in v0.2.0

type DatabasesClientDeleteResponse struct {
}

DatabasesClientDeleteResponse contains the response from method DatabasesClient.Delete.

type DatabasesClientGetOptions added in v0.2.0

type DatabasesClientGetOptions struct {
}

DatabasesClientGetOptions contains the optional parameters for the DatabasesClient.Get method.

type DatabasesClientGetResponse added in v0.2.0

type DatabasesClientGetResponse struct {
	DatabaseClassification
}

DatabasesClientGetResponse contains the response from method DatabasesClient.Get.

func (*DatabasesClientGetResponse) UnmarshalJSON added in v0.3.0

func (d *DatabasesClientGetResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DatabasesClientGetResponse.

type DatabasesClientListByClusterOptions added in v0.2.0

type DatabasesClientListByClusterOptions struct {
}

DatabasesClientListByClusterOptions contains the optional parameters for the DatabasesClient.ListByCluster method.

type DatabasesClientListByClusterResponse added in v0.2.0

type DatabasesClientListByClusterResponse struct {
	DatabaseListResult
}

DatabasesClientListByClusterResponse contains the response from method DatabasesClient.ListByCluster.

type DatabasesClientListPrincipalsOptions added in v0.2.0

type DatabasesClientListPrincipalsOptions struct {
}

DatabasesClientListPrincipalsOptions contains the optional parameters for the DatabasesClient.ListPrincipals method.

type DatabasesClientListPrincipalsResponse added in v0.2.0

type DatabasesClientListPrincipalsResponse struct {
	DatabasePrincipalListResult
}

DatabasesClientListPrincipalsResponse contains the response from method DatabasesClient.ListPrincipals.

type DatabasesClientRemovePrincipalsOptions added in v0.2.0

type DatabasesClientRemovePrincipalsOptions struct {
}

DatabasesClientRemovePrincipalsOptions contains the optional parameters for the DatabasesClient.RemovePrincipals method.

type DatabasesClientRemovePrincipalsResponse added in v0.2.0

type DatabasesClientRemovePrincipalsResponse struct {
	DatabasePrincipalListResult
}

DatabasesClientRemovePrincipalsResponse contains the response from method DatabasesClient.RemovePrincipals.

type DatabasesClientUpdateResponse added in v0.2.0

type DatabasesClientUpdateResponse struct {
	DatabaseClassification
}

DatabasesClientUpdateResponse contains the response from method DatabasesClient.Update.

func (*DatabasesClientUpdateResponse) UnmarshalJSON added in v0.3.0

func (d *DatabasesClientUpdateResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DatabasesClientUpdateResponse.

type DefaultPrincipalsModificationKind

type DefaultPrincipalsModificationKind string

DefaultPrincipalsModificationKind - The default principals modification kind

const (
	DefaultPrincipalsModificationKindNone    DefaultPrincipalsModificationKind = "None"
	DefaultPrincipalsModificationKindReplace DefaultPrincipalsModificationKind = "Replace"
	DefaultPrincipalsModificationKindUnion   DefaultPrincipalsModificationKind = "Union"
)

func PossibleDefaultPrincipalsModificationKindValues

func PossibleDefaultPrincipalsModificationKindValues() []DefaultPrincipalsModificationKind

PossibleDefaultPrincipalsModificationKindValues returns the possible values for the DefaultPrincipalsModificationKind const type.

type DiagnoseVirtualNetworkResult

type DiagnoseVirtualNetworkResult struct {
	// The list of network connectivity diagnostic finding
	Findings []*string `json:"findings,omitempty"`
}

func (DiagnoseVirtualNetworkResult) MarshalJSON

func (d DiagnoseVirtualNetworkResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DiagnoseVirtualNetworkResult.

type EndpointDependency

type EndpointDependency struct {
	// The domain name of the dependency.
	DomainName *string `json:"domainName,omitempty"`

	// The ports used when connecting to DomainName.
	EndpointDetails []*EndpointDetail `json:"endpointDetails,omitempty"`
}

EndpointDependency - A domain name that a service is reached at, including details of the current connection status.

func (EndpointDependency) MarshalJSON

func (e EndpointDependency) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EndpointDependency.

type EndpointDetail

type EndpointDetail struct {
	// The port an endpoint is connected to.
	Port *int32 `json:"port,omitempty"`
}

EndpointDetail - Current TCP connectivity information from the Kusto cluster to a single endpoint.

type EngineType

type EngineType string

EngineType - The engine type

const (
	EngineTypeV2 EngineType = "V2"
	EngineTypeV3 EngineType = "V3"
)

func PossibleEngineTypeValues

func PossibleEngineTypeValues() []EngineType

PossibleEngineTypeValues returns the possible values for the EngineType const type.

type EventGridConnectionProperties

type EventGridConnectionProperties struct {
	// REQUIRED; The event hub consumer group.
	ConsumerGroup *string `json:"consumerGroup,omitempty"`

	// REQUIRED; The resource ID where the event grid is configured to send events.
	EventHubResourceID *string `json:"eventHubResourceId,omitempty"`

	// REQUIRED; The resource ID of the storage account where the data resides.
	StorageAccountResourceID *string `json:"storageAccountResourceId,omitempty"`

	// The name of blob storage event type to process.
	BlobStorageEventType *BlobStorageEventType `json:"blobStorageEventType,omitempty"`

	// The data format of the message. Optionally the data format can be added to each message.
	DataFormat *EventGridDataFormat `json:"dataFormat,omitempty"`

	// Indication for database routing information from the data connection, by default only database routing information is allowed
	DatabaseRouting *DatabaseRouting `json:"databaseRouting,omitempty"`

	// The resource ID of the event grid that is subscribed to the storage account events.
	EventGridResourceID *string `json:"eventGridResourceId,omitempty"`

	// A Boolean value that, if set to true, indicates that ingestion should ignore the first record of every file
	IgnoreFirstRecord *bool `json:"ignoreFirstRecord,omitempty"`

	// Empty for non-managed identity based data connection. For system assigned identity, provide cluster resource Id. For user
	// assigned identity (UAI) provide the UAI resource Id.
	ManagedIdentityResourceID *string `json:"managedIdentityResourceId,omitempty"`

	// The mapping rule to be used to ingest the data. Optionally the mapping information can be added to each message.
	MappingRuleName *string `json:"mappingRuleName,omitempty"`

	// The table where the data should be ingested. Optionally the table information can be added to each message.
	TableName *string `json:"tableName,omitempty"`

	// READ-ONLY; The object ID of managedIdentityResourceId
	ManagedIdentityObjectID *string `json:"managedIdentityObjectId,omitempty" azure:"ro"`

	// READ-ONLY; The provisioned state of the resource.
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"`
}

EventGridConnectionProperties - Class representing the Kusto event grid connection properties.

type EventGridDataConnection

type EventGridDataConnection struct {
	// REQUIRED; Kind of the endpoint for the data connection
	Kind *DataConnectionKind `json:"kind,omitempty"`

	// Resource location.
	Location *string `json:"location,omitempty"`

	// The properties of the Event Grid data connection.
	Properties *EventGridConnectionProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

EventGridDataConnection - Class representing an Event Grid data connection.

func (*EventGridDataConnection) GetDataConnection added in v0.2.0

func (e *EventGridDataConnection) GetDataConnection() *DataConnection

GetDataConnection implements the DataConnectionClassification interface for type EventGridDataConnection.

func (EventGridDataConnection) MarshalJSON

func (e EventGridDataConnection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EventGridDataConnection.

func (*EventGridDataConnection) UnmarshalJSON

func (e *EventGridDataConnection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EventGridDataConnection.

type EventGridDataFormat

type EventGridDataFormat string

EventGridDataFormat - The data format of the message. Optionally the data format can be added to each message.

const (
	EventGridDataFormatAPACHEAVRO EventGridDataFormat = "APACHEAVRO"
	EventGridDataFormatAVRO       EventGridDataFormat = "AVRO"
	EventGridDataFormatCSV        EventGridDataFormat = "CSV"
	EventGridDataFormatJSON       EventGridDataFormat = "JSON"
	EventGridDataFormatMULTIJSON  EventGridDataFormat = "MULTIJSON"
	EventGridDataFormatORC        EventGridDataFormat = "ORC"
	EventGridDataFormatPARQUET    EventGridDataFormat = "PARQUET"
	EventGridDataFormatPSV        EventGridDataFormat = "PSV"
	EventGridDataFormatRAW        EventGridDataFormat = "RAW"
	EventGridDataFormatSCSV       EventGridDataFormat = "SCSV"
	EventGridDataFormatSINGLEJSON EventGridDataFormat = "SINGLEJSON"
	EventGridDataFormatSOHSV      EventGridDataFormat = "SOHSV"
	EventGridDataFormatTSV        EventGridDataFormat = "TSV"
	EventGridDataFormatTSVE       EventGridDataFormat = "TSVE"
	EventGridDataFormatTXT        EventGridDataFormat = "TXT"
	EventGridDataFormatW3CLOGFILE EventGridDataFormat = "W3CLOGFILE"
)

func PossibleEventGridDataFormatValues

func PossibleEventGridDataFormatValues() []EventGridDataFormat

PossibleEventGridDataFormatValues returns the possible values for the EventGridDataFormat const type.

type EventHubConnectionProperties

type EventHubConnectionProperties struct {
	// REQUIRED; The event hub consumer group.
	ConsumerGroup *string `json:"consumerGroup,omitempty"`

	// REQUIRED; The resource ID of the event hub to be used to create a data connection.
	EventHubResourceID *string `json:"eventHubResourceId,omitempty"`

	// The event hub messages compression type
	Compression *Compression `json:"compression,omitempty"`

	// The data format of the message. Optionally the data format can be added to each message.
	DataFormat *EventHubDataFormat `json:"dataFormat,omitempty"`

	// Indication for database routing information from the data connection, by default only database routing information is allowed
	DatabaseRouting *DatabaseRouting `json:"databaseRouting,omitempty"`

	// System properties of the event hub
	EventSystemProperties []*string `json:"eventSystemProperties,omitempty"`

	// Empty for non-managed identity based data connection. For system assigned identity, provide cluster resource Id. For user
	// assigned identity (UAI) provide the UAI resource Id.
	ManagedIdentityResourceID *string `json:"managedIdentityResourceId,omitempty"`

	// The mapping rule to be used to ingest the data. Optionally the mapping information can be added to each message.
	MappingRuleName *string `json:"mappingRuleName,omitempty"`

	// The table where the data should be ingested. Optionally the table information can be added to each message.
	TableName *string `json:"tableName,omitempty"`

	// READ-ONLY; The object ID of the managedIdentityResourceId
	ManagedIdentityObjectID *string `json:"managedIdentityObjectId,omitempty" azure:"ro"`

	// READ-ONLY; The provisioned state of the resource.
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"`
}

EventHubConnectionProperties - Class representing the Kusto event hub connection properties.

func (EventHubConnectionProperties) MarshalJSON

func (e EventHubConnectionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EventHubConnectionProperties.

type EventHubDataConnection

type EventHubDataConnection struct {
	// REQUIRED; Kind of the endpoint for the data connection
	Kind *DataConnectionKind `json:"kind,omitempty"`

	// Resource location.
	Location *string `json:"location,omitempty"`

	// The Event Hub data connection properties to validate.
	Properties *EventHubConnectionProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

EventHubDataConnection - Class representing an event hub data connection.

func (*EventHubDataConnection) GetDataConnection added in v0.2.0

func (e *EventHubDataConnection) GetDataConnection() *DataConnection

GetDataConnection implements the DataConnectionClassification interface for type EventHubDataConnection.

func (EventHubDataConnection) MarshalJSON

func (e EventHubDataConnection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EventHubDataConnection.

func (*EventHubDataConnection) UnmarshalJSON

func (e *EventHubDataConnection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EventHubDataConnection.

type EventHubDataFormat

type EventHubDataFormat string

EventHubDataFormat - The data format of the message. Optionally the data format can be added to each message.

const (
	EventHubDataFormatAPACHEAVRO EventHubDataFormat = "APACHEAVRO"
	EventHubDataFormatAVRO       EventHubDataFormat = "AVRO"
	EventHubDataFormatCSV        EventHubDataFormat = "CSV"
	EventHubDataFormatJSON       EventHubDataFormat = "JSON"
	EventHubDataFormatMULTIJSON  EventHubDataFormat = "MULTIJSON"
	EventHubDataFormatORC        EventHubDataFormat = "ORC"
	EventHubDataFormatPARQUET    EventHubDataFormat = "PARQUET"
	EventHubDataFormatPSV        EventHubDataFormat = "PSV"
	EventHubDataFormatRAW        EventHubDataFormat = "RAW"
	EventHubDataFormatSCSV       EventHubDataFormat = "SCSV"
	EventHubDataFormatSINGLEJSON EventHubDataFormat = "SINGLEJSON"
	EventHubDataFormatSOHSV      EventHubDataFormat = "SOHSV"
	EventHubDataFormatTSV        EventHubDataFormat = "TSV"
	EventHubDataFormatTSVE       EventHubDataFormat = "TSVE"
	EventHubDataFormatTXT        EventHubDataFormat = "TXT"
	EventHubDataFormatW3CLOGFILE EventHubDataFormat = "W3CLOGFILE"
)

func PossibleEventHubDataFormatValues

func PossibleEventHubDataFormatValues() []EventHubDataFormat

PossibleEventHubDataFormatValues returns the possible values for the EventHubDataFormat const type.

type FollowerDatabaseDefinition

type FollowerDatabaseDefinition struct {
	// REQUIRED; Resource name of the attached database configuration in the follower cluster.
	AttachedDatabaseConfigurationName *string `json:"attachedDatabaseConfigurationName,omitempty"`

	// REQUIRED; Resource id of the cluster that follows a database owned by this cluster.
	ClusterResourceID *string `json:"clusterResourceId,omitempty"`

	// READ-ONLY; The database name owned by this cluster that was followed. * in case following all databases.
	DatabaseName *string `json:"databaseName,omitempty" azure:"ro"`
}

FollowerDatabaseDefinition - A class representing follower database request.

type FollowerDatabaseListResult

type FollowerDatabaseListResult struct {
	// The list of follower database result.
	Value []*FollowerDatabaseDefinition `json:"value,omitempty"`
}

FollowerDatabaseListResult - The list Kusto database principals operation response.

func (FollowerDatabaseListResult) MarshalJSON

func (f FollowerDatabaseListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FollowerDatabaseListResult.

type Identity

type Identity struct {
	// REQUIRED; The type of managed identity used. The type 'SystemAssigned, UserAssigned' includes both an implicitly created
	// identity and a set of user-assigned identities. The type 'None' will remove all
	// identities.
	Type *IdentityType `json:"type,omitempty"`

	// The list of user identities associated with the Kusto cluster. The user identity dictionary key references will be ARM
	// resource ids in the form:
	// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
	UserAssignedIdentities map[string]*ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties `json:"userAssignedIdentities,omitempty"`

	// READ-ONLY; The principal ID of resource identity.
	PrincipalID *string `json:"principalId,omitempty" azure:"ro"`

	// READ-ONLY; The tenant ID of resource.
	TenantID *string `json:"tenantId,omitempty" azure:"ro"`
}

Identity for the resource.

func (Identity) MarshalJSON

func (i Identity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Identity.

type IdentityType

type IdentityType string

IdentityType - The type of managed identity used. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user-assigned identities. The type 'None' will remove all identities.

const (
	IdentityTypeNone                       IdentityType = "None"
	IdentityTypeSystemAssigned             IdentityType = "SystemAssigned"
	IdentityTypeSystemAssignedUserAssigned IdentityType = "SystemAssigned, UserAssigned"
	IdentityTypeUserAssigned               IdentityType = "UserAssigned"
)

func PossibleIdentityTypeValues

func PossibleIdentityTypeValues() []IdentityType

PossibleIdentityTypeValues returns the possible values for the IdentityType const type.

type IotHubConnectionProperties

type IotHubConnectionProperties struct {
	// REQUIRED; The iot hub consumer group.
	ConsumerGroup *string `json:"consumerGroup,omitempty"`

	// REQUIRED; The resource ID of the Iot hub to be used to create a data connection.
	IotHubResourceID *string `json:"iotHubResourceId,omitempty"`

	// REQUIRED; The name of the share access policy
	SharedAccessPolicyName *string `json:"sharedAccessPolicyName,omitempty"`

	// The data format of the message. Optionally the data format can be added to each message.
	DataFormat *IotHubDataFormat `json:"dataFormat,omitempty"`

	// Indication for database routing information from the data connection, by default only database routing information is allowed
	DatabaseRouting *DatabaseRouting `json:"databaseRouting,omitempty"`

	// System properties of the iot hub
	EventSystemProperties []*string `json:"eventSystemProperties,omitempty"`

	// The mapping rule to be used to ingest the data. Optionally the mapping information can be added to each message.
	MappingRuleName *string `json:"mappingRuleName,omitempty"`

	// The table where the data should be ingested. Optionally the table information can be added to each message.
	TableName *string `json:"tableName,omitempty"`

	// READ-ONLY; The provisioned state of the resource.
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"`
}

IotHubConnectionProperties - Class representing the Kusto Iot hub connection properties.

func (IotHubConnectionProperties) MarshalJSON

func (i IotHubConnectionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type IotHubConnectionProperties.

type IotHubDataConnection

type IotHubDataConnection struct {
	// REQUIRED; Kind of the endpoint for the data connection
	Kind *DataConnectionKind `json:"kind,omitempty"`

	// Resource location.
	Location *string `json:"location,omitempty"`

	// The Iot Hub data connection properties.
	Properties *IotHubConnectionProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

IotHubDataConnection - Class representing an iot hub data connection.

func (*IotHubDataConnection) GetDataConnection added in v0.2.0

func (i *IotHubDataConnection) GetDataConnection() *DataConnection

GetDataConnection implements the DataConnectionClassification interface for type IotHubDataConnection.

func (IotHubDataConnection) MarshalJSON

func (i IotHubDataConnection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type IotHubDataConnection.

func (*IotHubDataConnection) UnmarshalJSON

func (i *IotHubDataConnection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type IotHubDataConnection.

type IotHubDataFormat

type IotHubDataFormat string

IotHubDataFormat - The data format of the message. Optionally the data format can be added to each message.

const (
	IotHubDataFormatAPACHEAVRO IotHubDataFormat = "APACHEAVRO"
	IotHubDataFormatAVRO       IotHubDataFormat = "AVRO"
	IotHubDataFormatCSV        IotHubDataFormat = "CSV"
	IotHubDataFormatJSON       IotHubDataFormat = "JSON"
	IotHubDataFormatMULTIJSON  IotHubDataFormat = "MULTIJSON"
	IotHubDataFormatORC        IotHubDataFormat = "ORC"
	IotHubDataFormatPARQUET    IotHubDataFormat = "PARQUET"
	IotHubDataFormatPSV        IotHubDataFormat = "PSV"
	IotHubDataFormatRAW        IotHubDataFormat = "RAW"
	IotHubDataFormatSCSV       IotHubDataFormat = "SCSV"
	IotHubDataFormatSINGLEJSON IotHubDataFormat = "SINGLEJSON"
	IotHubDataFormatSOHSV      IotHubDataFormat = "SOHSV"
	IotHubDataFormatTSV        IotHubDataFormat = "TSV"
	IotHubDataFormatTSVE       IotHubDataFormat = "TSVE"
	IotHubDataFormatTXT        IotHubDataFormat = "TXT"
	IotHubDataFormatW3CLOGFILE IotHubDataFormat = "W3CLOGFILE"
)

func PossibleIotHubDataFormatValues

func PossibleIotHubDataFormatValues() []IotHubDataFormat

PossibleIotHubDataFormatValues returns the possible values for the IotHubDataFormat const type.

type KeyVaultProperties

type KeyVaultProperties struct {
	// The name of the key vault key.
	KeyName *string `json:"keyName,omitempty"`

	// The Uri of the key vault.
	KeyVaultURI *string `json:"keyVaultUri,omitempty"`

	// The version of the key vault key.
	KeyVersion *string `json:"keyVersion,omitempty"`

	// The user assigned identity (ARM resource id) that has access to the key.
	UserIdentity *string `json:"userIdentity,omitempty"`
}

KeyVaultProperties - Properties of the key vault.

type Kind

type Kind string

Kind - Kind of the database

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

func PossibleKindValues

func PossibleKindValues() []Kind

PossibleKindValues returns the possible values for the Kind const type.

type LanguageExtension

type LanguageExtension struct {
	// The language extension name.
	LanguageExtensionName *LanguageExtensionName `json:"languageExtensionName,omitempty"`
}

LanguageExtension - The language extension object.

type LanguageExtensionName

type LanguageExtensionName string

LanguageExtensionName - Language extension that can run within KQL query.

const (
	LanguageExtensionNamePYTHON LanguageExtensionName = "PYTHON"
	LanguageExtensionNameR      LanguageExtensionName = "R"
)

func PossibleLanguageExtensionNameValues

func PossibleLanguageExtensionNameValues() []LanguageExtensionName

PossibleLanguageExtensionNameValues returns the possible values for the LanguageExtensionName const type.

type LanguageExtensionsList

type LanguageExtensionsList struct {
	// The list of language extensions.
	Value []*LanguageExtension `json:"value,omitempty"`
}

LanguageExtensionsList - The list of language extension objects.

func (LanguageExtensionsList) MarshalJSON

func (l LanguageExtensionsList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LanguageExtensionsList.

type ListResourceSKUsResult

type ListResourceSKUsResult struct {
	// The collection of available SKUs for an existing resource.
	Value []*AzureResourceSKU `json:"value,omitempty"`
}

ListResourceSKUsResult - List of available SKUs for a Kusto Cluster.

func (ListResourceSKUsResult) MarshalJSON

func (l ListResourceSKUsResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ListResourceSKUsResult.

type ManagedPrivateEndpoint

type ManagedPrivateEndpoint struct {
	// A managed private endpoint.
	Properties *ManagedPrivateEndpointProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

ManagedPrivateEndpoint - Class representing a managed private endpoint.

func (ManagedPrivateEndpoint) MarshalJSON

func (m ManagedPrivateEndpoint) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ManagedPrivateEndpoint.

type ManagedPrivateEndpointListResult

type ManagedPrivateEndpointListResult struct {
	// The list of managed private endpoints.
	Value []*ManagedPrivateEndpoint `json:"value,omitempty"`
}

ManagedPrivateEndpointListResult - The list managed private endpoints operation response.

func (ManagedPrivateEndpointListResult) MarshalJSON

func (m ManagedPrivateEndpointListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ManagedPrivateEndpointListResult.

type ManagedPrivateEndpointProperties

type ManagedPrivateEndpointProperties struct {
	// REQUIRED; The groupId in which the managed private endpoint is created.
	GroupID *string `json:"groupId,omitempty"`

	// REQUIRED; The ARM resource ID of the resource for which the managed private endpoint is created.
	PrivateLinkResourceID *string `json:"privateLinkResourceId,omitempty"`

	// The region of the resource to which the managed private endpoint is created.
	PrivateLinkResourceRegion *string `json:"privateLinkResourceRegion,omitempty"`

	// The user request message.
	RequestMessage *string `json:"requestMessage,omitempty"`

	// READ-ONLY; The provisioned state of the resource.
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"`
}

ManagedPrivateEndpointProperties - A class representing the properties of a managed private endpoint object.

type ManagedPrivateEndpointsCheckNameRequest

type ManagedPrivateEndpointsCheckNameRequest struct {
	// REQUIRED; Managed private endpoint resource name.
	Name *string `json:"name,omitempty"`

	// REQUIRED; The type of resource, for instance Microsoft.Kusto/clusters/managedPrivateEndpoints.
	Type *string `json:"type,omitempty"`
}

ManagedPrivateEndpointsCheckNameRequest - The result returned from a managedPrivateEndpoints check name availability request.

type ManagedPrivateEndpointsClient

type ManagedPrivateEndpointsClient struct {
	// contains filtered or unexported fields
}

ManagedPrivateEndpointsClient contains the methods for the ManagedPrivateEndpoints group. Don't use this type directly, use NewManagedPrivateEndpointsClient() instead.

func NewManagedPrivateEndpointsClient

func NewManagedPrivateEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedPrivateEndpointsClient, error)

NewManagedPrivateEndpointsClient creates a new instance of ManagedPrivateEndpointsClient with the specified values. subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ManagedPrivateEndpointsClient) BeginCreateOrUpdate

func (client *ManagedPrivateEndpointsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, managedPrivateEndpointName string, parameters ManagedPrivateEndpoint, options *ManagedPrivateEndpointsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[ManagedPrivateEndpointsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates a managed private endpoint. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. managedPrivateEndpointName - The name of the managed private endpoint. parameters - The managed private endpoint parameters. options - ManagedPrivateEndpointsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedPrivateEndpointsClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoManagedPrivateEndpointsCreateOrUpdate.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewManagedPrivateEndpointsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<managed-private-endpoint-name>",
		armkusto.ManagedPrivateEndpoint{
			Properties: &armkusto.ManagedPrivateEndpointProperties{
				GroupID:               to.Ptr("<group-id>"),
				PrivateLinkResourceID: to.Ptr("<private-link-resource-id>"),
				RequestMessage:        to.Ptr("<request-message>"),
			},
		},
		&armkusto.ManagedPrivateEndpointsClientBeginCreateOrUpdateOptions{ResumeToken: ""})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ManagedPrivateEndpointsClient) BeginDelete

func (client *ManagedPrivateEndpointsClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, managedPrivateEndpointName string, options *ManagedPrivateEndpointsClientBeginDeleteOptions) (*armruntime.Poller[ManagedPrivateEndpointsClientDeleteResponse], error)

BeginDelete - Deletes a managed private endpoint. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. managedPrivateEndpointName - The name of the managed private endpoint. options - ManagedPrivateEndpointsClientBeginDeleteOptions contains the optional parameters for the ManagedPrivateEndpointsClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoManagedPrivateEndpointsDelete.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewManagedPrivateEndpointsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	poller, err := client.BeginDelete(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<managed-private-endpoint-name>",
		&armkusto.ManagedPrivateEndpointsClientBeginDeleteOptions{ResumeToken: ""})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	_, err = poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
		return
	}
}
Output:

func (*ManagedPrivateEndpointsClient) BeginUpdate

func (client *ManagedPrivateEndpointsClient) BeginUpdate(ctx context.Context, resourceGroupName string, clusterName string, managedPrivateEndpointName string, parameters ManagedPrivateEndpoint, options *ManagedPrivateEndpointsClientBeginUpdateOptions) (*armruntime.Poller[ManagedPrivateEndpointsClientUpdateResponse], error)

BeginUpdate - Updates a managed private endpoint. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. managedPrivateEndpointName - The name of the managed private endpoint. parameters - The managed private endpoint parameters. options - ManagedPrivateEndpointsClientBeginUpdateOptions contains the optional parameters for the ManagedPrivateEndpointsClient.BeginUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoManagedPrivateEndpointsUpdate.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewManagedPrivateEndpointsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	poller, err := client.BeginUpdate(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<managed-private-endpoint-name>",
		armkusto.ManagedPrivateEndpoint{
			Properties: &armkusto.ManagedPrivateEndpointProperties{
				GroupID:               to.Ptr("<group-id>"),
				PrivateLinkResourceID: to.Ptr("<private-link-resource-id>"),
				RequestMessage:        to.Ptr("<request-message>"),
			},
		},
		&armkusto.ManagedPrivateEndpointsClientBeginUpdateOptions{ResumeToken: ""})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ManagedPrivateEndpointsClient) CheckNameAvailability

CheckNameAvailability - Checks that the managed private endpoints resource name is valid and is not already in use. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. resourceName - The name of the resource. options - ManagedPrivateEndpointsClientCheckNameAvailabilityOptions contains the optional parameters for the ManagedPrivateEndpointsClient.CheckNameAvailability method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoManagedPrivateEndpointsCheckNameAvailability.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewManagedPrivateEndpointsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.CheckNameAvailability(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		armkusto.ManagedPrivateEndpointsCheckNameRequest{
			Name: to.Ptr("<name>"),
			Type: to.Ptr("<type>"),
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ManagedPrivateEndpointsClient) Get

func (client *ManagedPrivateEndpointsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, managedPrivateEndpointName string, options *ManagedPrivateEndpointsClientGetOptions) (ManagedPrivateEndpointsClientGetResponse, error)

Get - Gets a managed private endpoint. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. managedPrivateEndpointName - The name of the managed private endpoint. options - ManagedPrivateEndpointsClientGetOptions contains the optional parameters for the ManagedPrivateEndpointsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoManagedPrivateEndpointsGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewManagedPrivateEndpointsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<managed-private-endpoint-name>",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ManagedPrivateEndpointsClient) NewListPager added in v0.4.0

NewListPager - Returns the list of managed private endpoints. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. options - ManagedPrivateEndpointsClientListOptions contains the optional parameters for the ManagedPrivateEndpointsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoManagedPrivateEndpointsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewManagedPrivateEndpointsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	pager := client.NewListPager("<resource-group-name>",
		"<cluster-name>",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
			return
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type ManagedPrivateEndpointsClientBeginCreateOrUpdateOptions added in v0.2.0

type ManagedPrivateEndpointsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ManagedPrivateEndpointsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedPrivateEndpointsClient.BeginCreateOrUpdate method.

type ManagedPrivateEndpointsClientBeginDeleteOptions added in v0.2.0

type ManagedPrivateEndpointsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ManagedPrivateEndpointsClientBeginDeleteOptions contains the optional parameters for the ManagedPrivateEndpointsClient.BeginDelete method.

type ManagedPrivateEndpointsClientBeginUpdateOptions added in v0.2.0

type ManagedPrivateEndpointsClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ManagedPrivateEndpointsClientBeginUpdateOptions contains the optional parameters for the ManagedPrivateEndpointsClient.BeginUpdate method.

type ManagedPrivateEndpointsClientCheckNameAvailabilityOptions added in v0.2.0

type ManagedPrivateEndpointsClientCheckNameAvailabilityOptions struct {
}

ManagedPrivateEndpointsClientCheckNameAvailabilityOptions contains the optional parameters for the ManagedPrivateEndpointsClient.CheckNameAvailability method.

type ManagedPrivateEndpointsClientCheckNameAvailabilityResponse added in v0.2.0

type ManagedPrivateEndpointsClientCheckNameAvailabilityResponse struct {
	CheckNameResult
}

ManagedPrivateEndpointsClientCheckNameAvailabilityResponse contains the response from method ManagedPrivateEndpointsClient.CheckNameAvailability.

type ManagedPrivateEndpointsClientCreateOrUpdateResponse added in v0.2.0

type ManagedPrivateEndpointsClientCreateOrUpdateResponse struct {
	ManagedPrivateEndpoint
}

ManagedPrivateEndpointsClientCreateOrUpdateResponse contains the response from method ManagedPrivateEndpointsClient.CreateOrUpdate.

type ManagedPrivateEndpointsClientDeleteResponse added in v0.2.0

type ManagedPrivateEndpointsClientDeleteResponse struct {
}

ManagedPrivateEndpointsClientDeleteResponse contains the response from method ManagedPrivateEndpointsClient.Delete.

type ManagedPrivateEndpointsClientGetOptions added in v0.2.0

type ManagedPrivateEndpointsClientGetOptions struct {
}

ManagedPrivateEndpointsClientGetOptions contains the optional parameters for the ManagedPrivateEndpointsClient.Get method.

type ManagedPrivateEndpointsClientGetResponse added in v0.2.0

type ManagedPrivateEndpointsClientGetResponse struct {
	ManagedPrivateEndpoint
}

ManagedPrivateEndpointsClientGetResponse contains the response from method ManagedPrivateEndpointsClient.Get.

type ManagedPrivateEndpointsClientListOptions added in v0.2.0

type ManagedPrivateEndpointsClientListOptions struct {
}

ManagedPrivateEndpointsClientListOptions contains the optional parameters for the ManagedPrivateEndpointsClient.List method.

type ManagedPrivateEndpointsClientListResponse added in v0.2.0

type ManagedPrivateEndpointsClientListResponse struct {
	ManagedPrivateEndpointListResult
}

ManagedPrivateEndpointsClientListResponse contains the response from method ManagedPrivateEndpointsClient.List.

type ManagedPrivateEndpointsClientUpdateResponse added in v0.2.0

type ManagedPrivateEndpointsClientUpdateResponse struct {
	ManagedPrivateEndpoint
}

ManagedPrivateEndpointsClientUpdateResponse contains the response from method ManagedPrivateEndpointsClient.Update.

type Operation

type Operation struct {
	// The object that describes the operation.
	Display *OperationDisplay `json:"display,omitempty"`

	// This is of the format {provider}/{resource}/{operation}.
	Name *string `json:"name,omitempty"`

	// The intended executor of the operation.
	Origin *string `json:"origin,omitempty"`

	// Properties of the operation.
	Properties interface{} `json:"properties,omitempty"`
}

Operation - A REST API operation

type OperationDisplay

type OperationDisplay struct {
	// The friendly name of the operation.
	Description *string `json:"description,omitempty"`

	// For example: read, write, delete.
	Operation *string `json:"operation,omitempty"`

	// Friendly name of the resource provider.
	Provider *string `json:"provider,omitempty"`

	// The resource type on which the operation is performed.
	Resource *string `json:"resource,omitempty"`
}

OperationDisplay - The object that describes the operation.

type OperationListResult

type OperationListResult struct {
	// The URL to get the next set of operation list results if there are any.
	NextLink *string `json:"nextLink,omitempty"`

	// The list of operations supported by the resource provider.
	Value []*Operation `json:"value,omitempty"`
}

OperationListResult - Result of the request to list REST API operations. It contains a list of operations and a URL nextLink to get the next set of results.

func (OperationListResult) MarshalJSON

func (o OperationListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationListResult.

type OperationResult

type OperationResult struct {
	// The operation end time
	EndTime *time.Time `json:"endTime,omitempty"`

	// Object that contains the error code and message if the operation failed.
	Error *OperationResultErrorProperties `json:"error,omitempty"`

	// Percentage completed.
	PercentComplete *float64 `json:"percentComplete,omitempty"`

	// Properties of the operation results
	Properties *OperationResultProperties `json:"properties,omitempty"`

	// The operation start time
	StartTime *time.Time `json:"startTime,omitempty"`

	// READ-ONLY; ID of the resource.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Name of the resource.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; status of the Operation result.
	Status *Status `json:"status,omitempty" azure:"ro"`
}

OperationResult - Operation Result Entity.

func (OperationResult) MarshalJSON

func (o OperationResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationResult.

func (*OperationResult) UnmarshalJSON

func (o *OperationResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationResult.

type OperationResultErrorProperties

type OperationResultErrorProperties struct {
	// The code of the error.
	Code *string `json:"code,omitempty"`

	// The error message.
	Message *string `json:"message,omitempty"`
}

OperationResultErrorProperties - Operation result error properties

type OperationResultProperties

type OperationResultProperties struct {
	// The kind of the operation.
	OperationKind *string `json:"operationKind,omitempty"`

	// The state of the operation.
	OperationState *string `json:"operationState,omitempty"`

	// READ-ONLY; The provisioned state of the resource.
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"`
}

OperationResultProperties - Operation result properties

type OperationsClient

type OperationsClient struct {
	// contains filtered or unexported fields
}

OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.

func NewOperationsClient

func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)

NewOperationsClient creates a new instance of OperationsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*OperationsClient) NewListPager added in v0.4.0

NewListPager - Lists available operations for the Microsoft.Kusto provider. If the operation fails it returns an *azcore.ResponseError type. options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoOperationsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewOperationsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
			return
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type OperationsClientListOptions added in v0.2.0

type OperationsClientListOptions struct {
}

OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.

type OperationsClientListResponse added in v0.2.0

type OperationsClientListResponse struct {
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.List.

type OperationsResultsClient

type OperationsResultsClient struct {
	// contains filtered or unexported fields
}

OperationsResultsClient contains the methods for the OperationsResults group. Don't use this type directly, use NewOperationsResultsClient() instead.

func NewOperationsResultsClient

func NewOperationsResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsResultsClient, error)

NewOperationsResultsClient creates a new instance of OperationsResultsClient with the specified values. subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*OperationsResultsClient) Get

Get - Returns operation results. If the operation fails it returns an *azcore.ResponseError type. location - Azure location (region) name. operationID - The Guid of the operation ID options - OperationsResultsClientGetOptions contains the optional parameters for the OperationsResultsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoOperationResultsGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewOperationsResultsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.Get(ctx,
		"<location>",
		"<operation-id>",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

type OperationsResultsClientGetOptions added in v0.2.0

type OperationsResultsClientGetOptions struct {
}

OperationsResultsClientGetOptions contains the optional parameters for the OperationsResultsClient.Get method.

type OperationsResultsClientGetResponse added in v0.2.0

type OperationsResultsClientGetResponse struct {
	OperationResult
}

OperationsResultsClientGetResponse contains the response from method OperationsResultsClient.Get.

type OperationsResultsLocationClient added in v0.3.0

type OperationsResultsLocationClient struct {
	// contains filtered or unexported fields
}

OperationsResultsLocationClient contains the methods for the OperationsResultsLocation group. Don't use this type directly, use NewOperationsResultsLocationClient() instead.

func NewOperationsResultsLocationClient added in v0.3.0

func NewOperationsResultsLocationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsResultsLocationClient, error)

NewOperationsResultsLocationClient creates a new instance of OperationsResultsLocationClient with the specified values. subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*OperationsResultsLocationClient) Get added in v0.3.0

Get - Returns operation results. If the operation fails it returns an *azcore.ResponseError type. location - Azure location (region) name. operationID - The Guid of the operation ID options - OperationsResultsLocationClientGetOptions contains the optional parameters for the OperationsResultsLocationClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoOperationResultsOperationResultResponseTypeGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewOperationsResultsLocationClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	_, err = client.Get(ctx,
		"<location>",
		"<operation-id>",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
}
Output:

type OperationsResultsLocationClientGetOptions added in v0.3.0

type OperationsResultsLocationClientGetOptions struct {
}

OperationsResultsLocationClientGetOptions contains the optional parameters for the OperationsResultsLocationClient.Get method.

type OperationsResultsLocationClientGetResponse added in v0.3.0

type OperationsResultsLocationClientGetResponse struct {
}

OperationsResultsLocationClientGetResponse contains the response from method OperationsResultsLocationClient.Get.

type OptimizedAutoscale

type OptimizedAutoscale struct {
	// REQUIRED; A boolean value that indicate if the optimized autoscale feature is enabled or not.
	IsEnabled *bool `json:"isEnabled,omitempty"`

	// REQUIRED; Maximum allowed instances count.
	Maximum *int32 `json:"maximum,omitempty"`

	// REQUIRED; Minimum allowed instances count.
	Minimum *int32 `json:"minimum,omitempty"`

	// REQUIRED; The version of the template defined, for instance 1.
	Version *int32 `json:"version,omitempty"`
}

OptimizedAutoscale - A class that contains the optimized auto scale definition.

type OutboundNetworkDependenciesEndpoint

type OutboundNetworkDependenciesEndpoint struct {
	// The outbound environment endpoint properties.
	Properties *OutboundNetworkDependenciesEndpointProperties `json:"properties,omitempty"`

	// READ-ONLY; A unique read-only string that changes whenever the resource is updated.
	Etag *string `json:"etag,omitempty" azure:"ro"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

OutboundNetworkDependenciesEndpoint - Endpoints accessed for a common purpose that the Kusto Service Environment requires outbound network access to.

type OutboundNetworkDependenciesEndpointListResult

type OutboundNetworkDependenciesEndpointListResult struct {
	// REQUIRED; Collection of resources.
	Value []*OutboundNetworkDependenciesEndpoint `json:"value,omitempty"`

	// READ-ONLY; Link to next page of resources.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

OutboundNetworkDependenciesEndpointListResult - Collection of Outbound Environment Endpoints

func (OutboundNetworkDependenciesEndpointListResult) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type OutboundNetworkDependenciesEndpointListResult.

type OutboundNetworkDependenciesEndpointProperties

type OutboundNetworkDependenciesEndpointProperties struct {
	// The type of service accessed by the Kusto Service Environment, e.g., Azure Storage, Azure SQL Database, and Azure Active
	// Directory.
	Category *string `json:"category,omitempty"`

	// The endpoints that the Kusto Service Environment reaches the service at.
	Endpoints []*EndpointDependency `json:"endpoints,omitempty"`

	// READ-ONLY; The provisioned state of the resource.
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"`
}

OutboundNetworkDependenciesEndpointProperties - Endpoints accessed for a common purpose that the Kusto Service Environment requires outbound network access to.

func (OutboundNetworkDependenciesEndpointProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type OutboundNetworkDependenciesEndpointProperties.

type PrincipalType

type PrincipalType string

PrincipalType - Principal type.

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

func PossiblePrincipalTypeValues

func PossiblePrincipalTypeValues() []PrincipalType

PossiblePrincipalTypeValues returns the possible values for the PrincipalType const type.

type PrincipalsModificationKind

type PrincipalsModificationKind string

PrincipalsModificationKind - The principals modification kind of the database

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

func PossiblePrincipalsModificationKindValues

func PossiblePrincipalsModificationKindValues() []PrincipalsModificationKind

PossiblePrincipalsModificationKindValues returns the possible values for the PrincipalsModificationKind const type.

type PrivateEndpointConnection

type PrivateEndpointConnection struct {
	// Resource properties.
	Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

PrivateEndpointConnection - A private endpoint connection

type PrivateEndpointConnectionListResult

type PrivateEndpointConnectionListResult struct {
	// Array of private endpoint connections
	Value []*PrivateEndpointConnection `json:"value,omitempty"`
}

PrivateEndpointConnectionListResult - A list of private endpoint connections

func (PrivateEndpointConnectionListResult) MarshalJSON

func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult.

type PrivateEndpointConnectionProperties

type PrivateEndpointConnectionProperties struct {
	// REQUIRED; Connection State of the Private Endpoint Connection.
	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionStateProperty `json:"privateLinkServiceConnectionState,omitempty"`

	// READ-ONLY; Group id of the private endpoint.
	GroupID *string `json:"groupId,omitempty" azure:"ro"`

	// READ-ONLY; Private endpoint which the connection belongs to.
	PrivateEndpoint *PrivateEndpointProperty `json:"privateEndpoint,omitempty" azure:"ro"`

	// READ-ONLY; Provisioning state of the private endpoint.
	ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"`
}

PrivateEndpointConnectionProperties - Properties of a private endpoint connection.

type PrivateEndpointConnectionsClient

type PrivateEndpointConnectionsClient struct {
	// contains filtered or unexported fields
}

PrivateEndpointConnectionsClient contains the methods for the PrivateEndpointConnections group. Don't use this type directly, use NewPrivateEndpointConnectionsClient() instead.

func NewPrivateEndpointConnectionsClient

func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error)

NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient with the specified values. subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*PrivateEndpointConnectionsClient) BeginCreateOrUpdate

BeginCreateOrUpdate - Approve or reject a private endpoint connection with a given name. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. privateEndpointConnectionName - The name of the private endpoint connection. options - PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoPrivateEndpointConnectionsCreateOrUpdate.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewPrivateEndpointConnectionsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<private-endpoint-connection-name>",
		armkusto.PrivateEndpointConnection{
			Properties: &armkusto.PrivateEndpointConnectionProperties{
				PrivateLinkServiceConnectionState: &armkusto.PrivateLinkServiceConnectionStateProperty{
					Description: to.Ptr("<description>"),
					Status:      to.Ptr("<status>"),
				},
			},
		},
		&armkusto.PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions{ResumeToken: ""})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*PrivateEndpointConnectionsClient) BeginDelete

func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*armruntime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)

BeginDelete - Deletes a private endpoint connection with a given name. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. privateEndpointConnectionName - The name of the private endpoint connection. options - PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoPrivateEndpointConnectionsDelete.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewPrivateEndpointConnectionsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	poller, err := client.BeginDelete(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<private-endpoint-connection-name>",
		&armkusto.PrivateEndpointConnectionsClientBeginDeleteOptions{ResumeToken: ""})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	_, err = poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
		return
	}
}
Output:

func (*PrivateEndpointConnectionsClient) Get

func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (PrivateEndpointConnectionsClientGetResponse, error)

Get - Gets a private endpoint connection. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. privateEndpointConnectionName - The name of the private endpoint connection. options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoPrivateEndpointConnectionsGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewPrivateEndpointConnectionsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<private-endpoint-connection-name>",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*PrivateEndpointConnectionsClient) NewListPager added in v0.4.0

NewListPager - Returns the list of private endpoint connections. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. options - PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoPrivateEndpointConnectionsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewPrivateEndpointConnectionsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	pager := client.NewListPager("<resource-group-name>",
		"<cluster-name>",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
			return
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions added in v0.2.0

type PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate method.

type PrivateEndpointConnectionsClientBeginDeleteOptions added in v0.2.0

type PrivateEndpointConnectionsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.

type PrivateEndpointConnectionsClientCreateOrUpdateResponse added in v0.2.0

type PrivateEndpointConnectionsClientCreateOrUpdateResponse struct {
	PrivateEndpointConnection
}

PrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionsClient.CreateOrUpdate.

type PrivateEndpointConnectionsClientDeleteResponse added in v0.2.0

type PrivateEndpointConnectionsClientDeleteResponse struct {
}

PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.Delete.

type PrivateEndpointConnectionsClientGetOptions added in v0.2.0

type PrivateEndpointConnectionsClientGetOptions struct {
}

PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.

type PrivateEndpointConnectionsClientGetResponse added in v0.2.0

type PrivateEndpointConnectionsClientGetResponse struct {
	PrivateEndpointConnection
}

PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get.

type PrivateEndpointConnectionsClientListOptions added in v0.2.0

type PrivateEndpointConnectionsClientListOptions struct {
}

PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.List method.

type PrivateEndpointConnectionsClientListResponse added in v0.2.0

type PrivateEndpointConnectionsClientListResponse struct {
	PrivateEndpointConnectionListResult
}

PrivateEndpointConnectionsClientListResponse contains the response from method PrivateEndpointConnectionsClient.List.

type PrivateEndpointProperty

type PrivateEndpointProperty struct {
	// READ-ONLY; Resource id of the private endpoint.
	ID *string `json:"id,omitempty" azure:"ro"`
}

PrivateEndpointProperty - Private endpoint which the connection belongs to.

type PrivateLinkResource

type PrivateLinkResource struct {
	// Resource properties.
	Properties *PrivateLinkResourceProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

PrivateLinkResource - A private link resource

type PrivateLinkResourceListResult

type PrivateLinkResourceListResult struct {
	// Array of private link resources
	Value []*PrivateLinkResource `json:"value,omitempty"`
}

PrivateLinkResourceListResult - A list of private link resources

func (PrivateLinkResourceListResult) MarshalJSON

func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult.

type PrivateLinkResourceProperties

type PrivateLinkResourceProperties struct {
	// READ-ONLY; The private link resource group id.
	GroupID *string `json:"groupId,omitempty" azure:"ro"`

	// READ-ONLY; The private link resource required member names.
	RequiredMembers []*string `json:"requiredMembers,omitempty" azure:"ro"`

	// READ-ONLY; The private link resource required zone names.
	RequiredZoneNames []*string `json:"requiredZoneNames,omitempty" azure:"ro"`
}

PrivateLinkResourceProperties - Properties of a private link resource.

func (PrivateLinkResourceProperties) MarshalJSON

func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties.

type PrivateLinkResourcesClient

type PrivateLinkResourcesClient struct {
	// contains filtered or unexported fields
}

PrivateLinkResourcesClient contains the methods for the PrivateLinkResources group. Don't use this type directly, use NewPrivateLinkResourcesClient() instead.

func NewPrivateLinkResourcesClient

func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkResourcesClient, error)

NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient with the specified values. subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*PrivateLinkResourcesClient) Get

func (client *PrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, clusterName string, privateLinkResourceName string, options *PrivateLinkResourcesClientGetOptions) (PrivateLinkResourcesClientGetResponse, error)

Get - Gets a private link resource. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. privateLinkResourceName - The name of the private link resource. options - PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoPrivateLinkResourcesGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewPrivateLinkResourcesClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<private-link-resource-name>",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*PrivateLinkResourcesClient) NewListPager added in v0.4.0

NewListPager - Returns the list of private link resources. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. options - PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoPrivateLinkResourcesList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewPrivateLinkResourcesClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	pager := client.NewListPager("<resource-group-name>",
		"<cluster-name>",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
			return
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type PrivateLinkResourcesClientGetOptions added in v0.2.0

type PrivateLinkResourcesClientGetOptions struct {
}

PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.

type PrivateLinkResourcesClientGetResponse added in v0.2.0

type PrivateLinkResourcesClientGetResponse struct {
	PrivateLinkResource
}

PrivateLinkResourcesClientGetResponse contains the response from method PrivateLinkResourcesClient.Get.

type PrivateLinkResourcesClientListOptions added in v0.2.0

type PrivateLinkResourcesClientListOptions struct {
}

PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List method.

type PrivateLinkResourcesClientListResponse added in v0.2.0

type PrivateLinkResourcesClientListResponse struct {
	PrivateLinkResourceListResult
}

PrivateLinkResourcesClientListResponse contains the response from method PrivateLinkResourcesClient.List.

type PrivateLinkServiceConnectionStateProperty

type PrivateLinkServiceConnectionStateProperty struct {
	// The private link service connection description.
	Description *string `json:"description,omitempty"`

	// The private link service connection status.
	Status *string `json:"status,omitempty"`

	// READ-ONLY; Any action that is required beyond basic workflow (approve/ reject/ disconnect)
	ActionsRequired *string `json:"actionsRequired,omitempty" azure:"ro"`
}

PrivateLinkServiceConnectionStateProperty - Connection State of the Private Endpoint Connection.

type ProvisioningState

type ProvisioningState string

ProvisioningState - The provisioned state of the resource.

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

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type ProxyResource

type ProxyResource struct {
	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location

type PublicIPType added in v0.3.0

type PublicIPType string

PublicIPType - Indicates what public IP type to create - IPv4 (default), or DualStack (both IPv4 and IPv6)

const (
	PublicIPTypeDualStack PublicIPType = "DualStack"
	PublicIPTypeIPv4      PublicIPType = "IPv4"
)

func PossiblePublicIPTypeValues added in v0.3.0

func PossiblePublicIPTypeValues() []PublicIPType

PossiblePublicIPTypeValues returns the possible values for the PublicIPType const type.

type PublicNetworkAccess

type PublicNetworkAccess string

PublicNetworkAccess - Public network access to the cluster is enabled by default. When disabled, only private endpoint connection to the cluster is allowed

const (
	PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled"
	PublicNetworkAccessEnabled  PublicNetworkAccess = "Enabled"
)

func PossiblePublicNetworkAccessValues

func PossiblePublicNetworkAccessValues() []PublicNetworkAccess

PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type.

type ReadOnlyFollowingDatabase

type ReadOnlyFollowingDatabase struct {
	// REQUIRED; Kind of the database
	Kind *Kind `json:"kind,omitempty"`

	// Resource location.
	Location *string `json:"location,omitempty"`

	// The database properties.
	Properties *ReadOnlyFollowingDatabaseProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

ReadOnlyFollowingDatabase - Class representing a read only following database.

func (*ReadOnlyFollowingDatabase) GetDatabase added in v0.2.0

func (r *ReadOnlyFollowingDatabase) GetDatabase() *Database

GetDatabase implements the DatabaseClassification interface for type ReadOnlyFollowingDatabase.

func (ReadOnlyFollowingDatabase) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ReadOnlyFollowingDatabase.

func (*ReadOnlyFollowingDatabase) UnmarshalJSON

func (r *ReadOnlyFollowingDatabase) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ReadOnlyFollowingDatabase.

type ReadOnlyFollowingDatabaseProperties

type ReadOnlyFollowingDatabaseProperties struct {
	// The time the data should be kept in cache for fast queries in TimeSpan.
	HotCachePeriod *string `json:"hotCachePeriod,omitempty"`

	// READ-ONLY; The name of the attached database configuration cluster
	AttachedDatabaseConfigurationName *string `json:"attachedDatabaseConfigurationName,omitempty" azure:"ro"`

	// READ-ONLY; The name of the leader cluster
	LeaderClusterResourceID *string `json:"leaderClusterResourceId,omitempty" azure:"ro"`

	// READ-ONLY; The principals modification kind of the database
	PrincipalsModificationKind *PrincipalsModificationKind `json:"principalsModificationKind,omitempty" azure:"ro"`

	// READ-ONLY; The provisioned state of the resource.
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; The time the data should be kept before it stops being accessible to queries in TimeSpan.
	SoftDeletePeriod *string `json:"softDeletePeriod,omitempty" azure:"ro"`

	// READ-ONLY; The statistics of the database.
	Statistics *DatabaseStatistics `json:"statistics,omitempty" azure:"ro"`
}

ReadOnlyFollowingDatabaseProperties - Class representing the Kusto database properties.

type ReadWriteDatabase

type ReadWriteDatabase struct {
	// REQUIRED; Kind of the database
	Kind *Kind `json:"kind,omitempty"`

	// Resource location.
	Location *string `json:"location,omitempty"`

	// The database properties.
	Properties *ReadWriteDatabaseProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

ReadWriteDatabase - Class representing a read write database.

func (*ReadWriteDatabase) GetDatabase added in v0.2.0

func (r *ReadWriteDatabase) GetDatabase() *Database

GetDatabase implements the DatabaseClassification interface for type ReadWriteDatabase.

func (ReadWriteDatabase) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ReadWriteDatabase.

func (*ReadWriteDatabase) UnmarshalJSON

func (r *ReadWriteDatabase) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ReadWriteDatabase.

type ReadWriteDatabaseProperties

type ReadWriteDatabaseProperties struct {
	// The time the data should be kept in cache for fast queries in TimeSpan.
	HotCachePeriod *string `json:"hotCachePeriod,omitempty"`

	// The time the data should be kept before it stops being accessible to queries in TimeSpan.
	SoftDeletePeriod *string `json:"softDeletePeriod,omitempty"`

	// READ-ONLY; Indicates whether the database is followed.
	IsFollowed *bool `json:"isFollowed,omitempty" azure:"ro"`

	// READ-ONLY; The provisioned state of the resource.
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; The statistics of the database.
	Statistics *DatabaseStatistics `json:"statistics,omitempty" azure:"ro"`
}

ReadWriteDatabaseProperties - Class representing the Kusto database properties.

type Reason

type Reason string

Reason - Message providing the reason why the given name is invalid.

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

func PossibleReasonValues

func PossibleReasonValues() []Reason

PossibleReasonValues returns the possible values for the Reason const type.

type Resource

type Resource struct {
	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

Resource - Common fields that are returned in the response for all Azure Resource Manager resources

type SKUDescription

type SKUDescription struct {
	// READ-ONLY; Locations and zones
	LocationInfo []*SKULocationInfoItem `json:"locationInfo,omitempty" azure:"ro"`

	// READ-ONLY; The set of locations that the SKU is available
	Locations []*string `json:"locations,omitempty" azure:"ro"`

	// READ-ONLY; The name of the SKU
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The resource type
	ResourceType *string `json:"resourceType,omitempty" azure:"ro"`

	// READ-ONLY; The restrictions because of which SKU cannot be used
	Restrictions []interface{} `json:"restrictions,omitempty" azure:"ro"`

	// READ-ONLY; The tier of the SKU
	Tier *string `json:"tier,omitempty" azure:"ro"`
}

SKUDescription - The Kusto SKU description of given resource type

func (SKUDescription) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SKUDescription.

type SKUDescriptionList

type SKUDescriptionList struct {
	// READ-ONLY; SKU descriptions
	Value []*SKUDescription `json:"value,omitempty" azure:"ro"`
}

SKUDescriptionList - The list of the EngagementFabric SKU descriptions

func (SKUDescriptionList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SKUDescriptionList.

type SKULocationInfoItem

type SKULocationInfoItem struct {
	// REQUIRED; The available location of the SKU.
	Location *string `json:"location,omitempty"`

	// The available zone of the SKU.
	Zones []*string `json:"zones,omitempty"`
}

SKULocationInfoItem - The locations and zones info for SKU.

func (SKULocationInfoItem) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SKULocationInfoItem.

type Script

type Script struct {
	// The database script.
	Properties *ScriptProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

Script - Class representing a database script.

func (Script) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Script.

type ScriptCheckNameRequest

type ScriptCheckNameRequest struct {
	// REQUIRED; Script name.
	Name *string `json:"name,omitempty"`

	// REQUIRED; The type of resource, Microsoft.Kusto/clusters/databases/scripts.
	Type *string `json:"type,omitempty"`
}

ScriptCheckNameRequest - A script name availability request.

type ScriptListResult

type ScriptListResult struct {
	// The list of Kusto scripts.
	Value []*Script `json:"value,omitempty"`
}

ScriptListResult - The list Kusto database script operation response.

func (ScriptListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ScriptListResult.

type ScriptProperties

type ScriptProperties struct {
	// Flag that indicates whether to continue if one of the command fails.
	ContinueOnErrors *bool `json:"continueOnErrors,omitempty"`

	// A unique string. If changed the script will be applied again.
	ForceUpdateTag *string `json:"forceUpdateTag,omitempty"`

	// The script content. This property should be used when the script is provide inline and not through file in a SA. Must not
	// be used together with scriptUrl and scriptUrlSasToken properties.
	ScriptContent *string `json:"scriptContent,omitempty"`

	// The url to the KQL script blob file. Must not be used together with scriptContent property
	ScriptURL *string `json:"scriptUrl,omitempty"`

	// The SaS token that provide read access to the file which contain the script. Must be provided when using scriptUrl property.
	ScriptURLSasToken *string `json:"scriptUrlSasToken,omitempty"`

	// READ-ONLY; The provisioned state of the resource.
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"`
}

ScriptProperties - A class representing database script property.

type ScriptsClient

type ScriptsClient struct {
	// contains filtered or unexported fields
}

ScriptsClient contains the methods for the Scripts group. Don't use this type directly, use NewScriptsClient() instead.

func NewScriptsClient

func NewScriptsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ScriptsClient, error)

NewScriptsClient creates a new instance of ScriptsClient with the specified values. subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ScriptsClient) BeginCreateOrUpdate

func (client *ScriptsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, scriptName string, parameters Script, options *ScriptsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[ScriptsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates a Kusto database script. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. databaseName - The name of the database in the Kusto cluster. scriptName - The name of the Kusto database script. parameters - The Kusto Script parameters contains the KQL to run. options - ScriptsClientBeginCreateOrUpdateOptions contains the optional parameters for the ScriptsClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoScriptsCreateOrUpdate.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewScriptsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<database-name>",
		"<script-name>",
		armkusto.Script{
			Properties: &armkusto.ScriptProperties{
				ContinueOnErrors:  to.Ptr(true),
				ForceUpdateTag:    to.Ptr("<force-update-tag>"),
				ScriptURL:         to.Ptr("<script-url>"),
				ScriptURLSasToken: to.Ptr("<script-urlsas-token>"),
			},
		},
		&armkusto.ScriptsClientBeginCreateOrUpdateOptions{ResumeToken: ""})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ScriptsClient) BeginDelete

func (client *ScriptsClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, scriptName string, options *ScriptsClientBeginDeleteOptions) (*armruntime.Poller[ScriptsClientDeleteResponse], error)

BeginDelete - Deletes a Kusto principalAssignment. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. databaseName - The name of the database in the Kusto cluster. scriptName - The name of the Kusto database script. options - ScriptsClientBeginDeleteOptions contains the optional parameters for the ScriptsClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoScriptsDelete.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewScriptsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	poller, err := client.BeginDelete(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<database-name>",
		"<script-name>",
		&armkusto.ScriptsClientBeginDeleteOptions{ResumeToken: ""})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	_, err = poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
		return
	}
}
Output:

func (*ScriptsClient) BeginUpdate

func (client *ScriptsClient) BeginUpdate(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, scriptName string, parameters Script, options *ScriptsClientBeginUpdateOptions) (*armruntime.Poller[ScriptsClientUpdateResponse], error)

BeginUpdate - Updates a database script. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. databaseName - The name of the database in the Kusto cluster. scriptName - The name of the Kusto database script. parameters - The Kusto Script parameters contains to the KQL to run. options - ScriptsClientBeginUpdateOptions contains the optional parameters for the ScriptsClient.BeginUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoScriptsUpdate.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewScriptsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	poller, err := client.BeginUpdate(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<database-name>",
		"<script-name>",
		armkusto.Script{
			Properties: &armkusto.ScriptProperties{
				ContinueOnErrors:  to.Ptr(true),
				ForceUpdateTag:    to.Ptr("<force-update-tag>"),
				ScriptURL:         to.Ptr("<script-url>"),
				ScriptURLSasToken: to.Ptr("<script-urlsas-token>"),
			},
		},
		&armkusto.ScriptsClientBeginUpdateOptions{ResumeToken: ""})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ScriptsClient) CheckNameAvailability

func (client *ScriptsClient) CheckNameAvailability(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, scriptName ScriptCheckNameRequest, options *ScriptsClientCheckNameAvailabilityOptions) (ScriptsClientCheckNameAvailabilityResponse, error)

CheckNameAvailability - Checks that the script name is valid and is not already in use. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. databaseName - The name of the database in the Kusto cluster. scriptName - The name of the script. options - ScriptsClientCheckNameAvailabilityOptions contains the optional parameters for the ScriptsClient.CheckNameAvailability method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoScriptsCheckNameAvailability.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewScriptsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.CheckNameAvailability(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<database-name>",
		armkusto.ScriptCheckNameRequest{
			Name: to.Ptr("<name>"),
			Type: to.Ptr("<type>"),
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ScriptsClient) Get

func (client *ScriptsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, scriptName string, options *ScriptsClientGetOptions) (ScriptsClientGetResponse, error)

Get - Gets a Kusto cluster database script. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. databaseName - The name of the database in the Kusto cluster. scriptName - The name of the Kusto database script. options - ScriptsClientGetOptions contains the optional parameters for the ScriptsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoScriptsGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewScriptsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<cluster-name>",
		"<database-name>",
		"<script-name>",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ScriptsClient) NewListByDatabasePager added in v0.4.0

func (client *ScriptsClient) NewListByDatabasePager(resourceGroupName string, clusterName string, databaseName string, options *ScriptsClientListByDatabaseOptions) *runtime.Pager[ScriptsClientListByDatabaseResponse]

NewListByDatabasePager - Returns the list of database scripts for given database. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group containing the Kusto cluster. clusterName - The name of the Kusto cluster. databaseName - The name of the database in the Kusto cluster. options - ScriptsClientListByDatabaseOptions contains the optional parameters for the ScriptsClient.ListByDatabase method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoScriptsListByDatabase.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armkusto.NewScriptsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	pager := client.NewListByDatabasePager("<resource-group-name>",
		"<cluster-name>",
		"<database-name>",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
			return
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type ScriptsClientBeginCreateOrUpdateOptions added in v0.2.0

type ScriptsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ScriptsClientBeginCreateOrUpdateOptions contains the optional parameters for the ScriptsClient.BeginCreateOrUpdate method.

type ScriptsClientBeginDeleteOptions added in v0.2.0

type ScriptsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ScriptsClientBeginDeleteOptions contains the optional parameters for the ScriptsClient.BeginDelete method.

type ScriptsClientBeginUpdateOptions added in v0.2.0

type ScriptsClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ScriptsClientBeginUpdateOptions contains the optional parameters for the ScriptsClient.BeginUpdate method.

type ScriptsClientCheckNameAvailabilityOptions added in v0.2.0

type ScriptsClientCheckNameAvailabilityOptions struct {
}

ScriptsClientCheckNameAvailabilityOptions contains the optional parameters for the ScriptsClient.CheckNameAvailability method.

type ScriptsClientCheckNameAvailabilityResponse added in v0.2.0

type ScriptsClientCheckNameAvailabilityResponse struct {
	CheckNameResult
}

ScriptsClientCheckNameAvailabilityResponse contains the response from method ScriptsClient.CheckNameAvailability.

type ScriptsClientCreateOrUpdateResponse added in v0.2.0

type ScriptsClientCreateOrUpdateResponse struct {
	Script
}

ScriptsClientCreateOrUpdateResponse contains the response from method ScriptsClient.CreateOrUpdate.

type ScriptsClientDeleteResponse added in v0.2.0

type ScriptsClientDeleteResponse struct {
}

ScriptsClientDeleteResponse contains the response from method ScriptsClient.Delete.

type ScriptsClientGetOptions added in v0.2.0

type ScriptsClientGetOptions struct {
}

ScriptsClientGetOptions contains the optional parameters for the ScriptsClient.Get method.

type ScriptsClientGetResponse added in v0.2.0

type ScriptsClientGetResponse struct {
	Script
}

ScriptsClientGetResponse contains the response from method ScriptsClient.Get.

type ScriptsClientListByDatabaseOptions added in v0.2.0

type ScriptsClientListByDatabaseOptions struct {
}

ScriptsClientListByDatabaseOptions contains the optional parameters for the ScriptsClient.ListByDatabase method.

type ScriptsClientListByDatabaseResponse added in v0.2.0

type ScriptsClientListByDatabaseResponse struct {
	ScriptListResult
}

ScriptsClientListByDatabaseResponse contains the response from method ScriptsClient.ListByDatabase.

type ScriptsClientUpdateResponse added in v0.2.0

type ScriptsClientUpdateResponse struct {
	Script
}

ScriptsClientUpdateResponse contains the response from method ScriptsClient.Update.

type State

type State string

State - The state of the resource.

const (
	StateCreating    State = "Creating"
	StateDeleted     State = "Deleted"
	StateDeleting    State = "Deleting"
	StateRunning     State = "Running"
	StateStarting    State = "Starting"
	StateStopped     State = "Stopped"
	StateStopping    State = "Stopping"
	StateUnavailable State = "Unavailable"
	StateUpdating    State = "Updating"
)

func PossibleStateValues

func PossibleStateValues() []State

PossibleStateValues returns the possible values for the State const type.

type Status

type Status string

Status - The status of operation.

const (
	StatusCanceled  Status = "Canceled"
	StatusFailed    Status = "Failed"
	StatusRunning   Status = "Running"
	StatusSucceeded Status = "Succeeded"
)

func PossibleStatusValues

func PossibleStatusValues() []Status

PossibleStatusValues returns the possible values for the Status const type.

type SystemData

type SystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time `json:"createdAt,omitempty"`

	// The identity that created the resource.
	CreatedBy *string `json:"createdBy,omitempty"`

	// The type of identity that created the resource.
	CreatedByType *CreatedByType `json:"createdByType,omitempty"`

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"`

	// The identity that last modified the resource.
	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"`
}

SystemData - Metadata pertaining to creation and last modification of the resource.

func (SystemData) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

func (s *SystemData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type TableLevelSharingProperties

type TableLevelSharingProperties struct {
	// List of external tables exclude from the follower database
	ExternalTablesToExclude []*string `json:"externalTablesToExclude,omitempty"`

	// List of external tables to include in the follower database
	ExternalTablesToInclude []*string `json:"externalTablesToInclude,omitempty"`

	// List of materialized views exclude from the follower database
	MaterializedViewsToExclude []*string `json:"materializedViewsToExclude,omitempty"`

	// List of materialized views to include in the follower database
	MaterializedViewsToInclude []*string `json:"materializedViewsToInclude,omitempty"`

	// List of tables to exclude from the follower database
	TablesToExclude []*string `json:"tablesToExclude,omitempty"`

	// List of tables to include in the follower database
	TablesToInclude []*string `json:"tablesToInclude,omitempty"`
}

TableLevelSharingProperties - Tables that will be included and excluded in the follower database

func (TableLevelSharingProperties) MarshalJSON

func (t TableLevelSharingProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TableLevelSharingProperties.

type TrackedResource

type TrackedResource struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string `json:"location,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'

func (TrackedResource) MarshalJSON

func (t TrackedResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TrackedResource.

type TrustedExternalTenant

type TrustedExternalTenant struct {
	// GUID representing an external tenant.
	Value *string `json:"value,omitempty"`
}

TrustedExternalTenant - Represents a tenant ID that is trusted by the cluster.

type Type

type Type string

Type - The type of resource, for instance Microsoft.Kusto/clusters/databases.

const (
	TypeMicrosoftKustoClustersDatabases                      Type = "Microsoft.Kusto/clusters/databases"
	TypeMicrosoftKustoClustersAttachedDatabaseConfigurations Type = "Microsoft.Kusto/clusters/attachedDatabaseConfigurations"
)

func PossibleTypeValues

func PossibleTypeValues() []Type

PossibleTypeValues returns the possible values for the Type const type.

type VirtualNetworkConfiguration

type VirtualNetworkConfiguration struct {
	// REQUIRED; Data management's service public IP address resource id.
	DataManagementPublicIPID *string `json:"dataManagementPublicIpId,omitempty"`

	// REQUIRED; Engine service's public IP address resource id.
	EnginePublicIPID *string `json:"enginePublicIpId,omitempty"`

	// REQUIRED; The subnet resource id.
	SubnetID *string `json:"subnetId,omitempty"`
}

VirtualNetworkConfiguration - A class that contains virtual network definition.

Jump to

Keyboard shortcuts

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