armkusto

package module
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: MIT Imports: 14 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

  • an Azure subscription
  • Go 1.18 or above (You could download and install the latest version of Go from here. It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this doc.)

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.

Client Factory

Azure Kusto module consists of one or more clients. We provide a client factory which could be used to create any client in this module.

clientFactory, err := armkusto.NewClientFactory(<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,
    },
}
clientFactory, err := armkusto.NewClientFactory(<subscription ID>, cred, &options)

Clients

A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory.

client := clientFactory.NewDatabasesClient()

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
}

AcceptedAudiences - Represents an accepted audience trusted by the cluster.

func (AcceptedAudiences) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type AcceptedAudiences.

func (*AcceptedAudiences) UnmarshalJSON added in v1.1.0

func (a *AcceptedAudiences) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AcceptedAudiences.

type AttachedDatabaseConfiguration

type AttachedDatabaseConfiguration struct {
	// Resource location.
	Location *string

	// The properties of the attached database configuration.
	Properties *AttachedDatabaseConfigurationProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

AttachedDatabaseConfiguration - Class representing an attached database configuration.

func (AttachedDatabaseConfiguration) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AttachedDatabaseConfiguration.

func (*AttachedDatabaseConfiguration) UnmarshalJSON

func (a *AttachedDatabaseConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AttachedDatabaseConfiguration.

type AttachedDatabaseConfigurationListResult

type AttachedDatabaseConfigurationListResult struct {
	// The list of attached database configurations.
	Value []*AttachedDatabaseConfiguration
}

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.

func (*AttachedDatabaseConfigurationListResult) UnmarshalJSON added in v1.1.0

func (a *AttachedDatabaseConfigurationListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller 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

	// 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

	// REQUIRED; The default principals modification kind
	DefaultPrincipalsModificationKind *DefaultPrincipalsModificationKind

	// Overrides the original database name. Relevant only when attaching to a specific database.
	DatabaseNameOverride *string

	// Adds a prefix to the attached databases name. When following an entire cluster, that prefix would be added to all of the
	// databases original names from leader cluster.
	DatabaseNamePrefix *string

	// Table level sharing specifications
	TableLevelSharingProperties *TableLevelSharingProperties

	// READ-ONLY; The list of databases from the clusterResourceId which are currently attached to the cluster.
	AttachedDatabaseNames []*string

	// READ-ONLY; The provisioned state of the resource.
	ProvisioningState *ProvisioningState
}

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.

func (*AttachedDatabaseConfigurationProperties) UnmarshalJSON added in v1.1.0

func (a *AttachedDatabaseConfigurationProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AttachedDatabaseConfigurationProperties.

type AttachedDatabaseConfigurationsCheckNameRequest

type AttachedDatabaseConfigurationsCheckNameRequest struct {
	// REQUIRED; Attached database resource name.
	Name *string

	// CONSTANT; The type of resource, for instance Microsoft.Kusto/clusters/attachedDatabaseConfigurations.
	// Field has constant value "Microsoft.Kusto/clusters/attachedDatabaseConfigurations", any specified value is ignored.
	Type *string
}

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

func (AttachedDatabaseConfigurationsCheckNameRequest) MarshalJSON added in v1.1.0

MarshalJSON implements the json.Marshaller interface for type AttachedDatabaseConfigurationsCheckNameRequest.

func (*AttachedDatabaseConfigurationsCheckNameRequest) UnmarshalJSON added in v1.1.0

UnmarshalJSON implements the json.Unmarshaller interface for type AttachedDatabaseConfigurationsCheckNameRequest.

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.

Generated from API version 2022-12-29

  • 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/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoAttachedDatabaseConfigurationsCreateOrUpdate.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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAttachedDatabaseConfigurationsClient().BeginCreateOrUpdate(ctx, "kustorptest", "kustoCluster2", "attachedDatabaseConfigurationsTest", armkusto.AttachedDatabaseConfiguration{
		Location: to.Ptr("westus"),
		Properties: &armkusto.AttachedDatabaseConfigurationProperties{
			ClusterResourceID:                 to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster2"),
			DatabaseName:                      to.Ptr("kustodatabase"),
			DatabaseNameOverride:              to.Ptr("overridekustodatabase"),
			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")},
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AttachedDatabaseConfiguration = armkusto.AttachedDatabaseConfiguration{
	// 	Name: to.Ptr("kustoCluster2/attachedDatabaseConfigurationsTest"),
	// 	Type: to.Ptr("Microsoft.Kusto/Clusters/AttachedDatabaseConfigurations"),
	// 	ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster2/attachedDatabaseConfigurations/attachedDatabaseConfigurationsTest"),
	// 	Location: to.Ptr("westus"),
	// 	Properties: &armkusto.AttachedDatabaseConfigurationProperties{
	// 		ClusterResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster2"),
	// 		DatabaseName: to.Ptr("db1"),
	// 		DatabaseNameOverride: to.Ptr("overridekustodatabase"),
	// 		DefaultPrincipalsModificationKind: to.Ptr(armkusto.DefaultPrincipalsModificationKindUnion),
	// 		ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded),
	// 		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")},
	// 								},
	// 							},
	// 						}
}
Output:

func (*AttachedDatabaseConfigurationsClient) BeginDelete

BeginDelete - Deletes the attached database configuration with the given name. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-12-29

  • 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/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoAttachedDatabaseConfigurationsDelete.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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAttachedDatabaseConfigurationsClient().BeginDelete(ctx, "kustorptest", "kustoCluster", "attachedDatabaseConfigurationsTest", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
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.

Generated from API version 2022-12-29

  • 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/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAttachedDatabaseConfigurationsClient().CheckNameAvailability(ctx, "kustorptest", "kustoCluster", armkusto.AttachedDatabaseConfigurationsCheckNameRequest{
		Name: to.Ptr("adc1"),
		Type: to.Ptr("Microsoft.Kusto/clusters/attachedDatabaseConfigurations"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CheckNameResult = armkusto.CheckNameResult{
	// 	Name: to.Ptr("adc1"),
	// 	Message: to.Ptr("Name 'adc1' is already taken. Please specify a different name"),
	// 	NameAvailable: to.Ptr(false),
	// }
}
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.

Generated from API version 2022-12-29

  • 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/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAttachedDatabaseConfigurationsClient().Get(ctx, "kustorptest", "kustoCluster2", "attachedDatabaseConfigurationsTest", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AttachedDatabaseConfiguration = armkusto.AttachedDatabaseConfiguration{
	// 	Name: to.Ptr("kustoCluster2/attachedDatabaseConfigurationsTest"),
	// 	Type: to.Ptr("Microsoft.Kusto/Clusters/AttachedDatabaseConfigurations"),
	// 	ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster2/AttachedDatabaseConfigurations/attachedDatabaseConfigurationsTest"),
	// 	Location: to.Ptr("westus"),
	// 	Properties: &armkusto.AttachedDatabaseConfigurationProperties{
	// 		ClusterResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster2"),
	// 		DatabaseName: to.Ptr("*"),
	// 		DatabaseNamePrefix: to.Ptr("prefix"),
	// 		DefaultPrincipalsModificationKind: to.Ptr(armkusto.DefaultPrincipalsModificationKindUnion),
	// 		ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*AttachedDatabaseConfigurationsClient) NewListByClusterPager added in v0.4.0

NewListByClusterPager - Returns the list of attached database configurations of the given Kusto cluster.

Generated from API version 2022-12-29

  • 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.NewListByClusterPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAttachedDatabaseConfigurationsClient().NewListByClusterPager("kustorptest", "kustoCluster2", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AttachedDatabaseConfigurationListResult = armkusto.AttachedDatabaseConfigurationListResult{
		// 	Value: []*armkusto.AttachedDatabaseConfiguration{
		// 		{
		// 			Name: to.Ptr("kustoCluster2/KustoDatabase8"),
		// 			Type: to.Ptr("Microsoft.Kusto/Clusters/AttachedDatabaseConfigurations"),
		// 			ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster2/AttachedDatabaseConfigurations/KustoDatabase8"),
		// 			Location: to.Ptr("westus"),
		// 			Properties: &armkusto.AttachedDatabaseConfigurationProperties{
		// 				ClusterResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/KustoClusterLeader"),
		// 				DatabaseName: to.Ptr("db1"),
		// 				DefaultPrincipalsModificationKind: to.Ptr(armkusto.DefaultPrincipalsModificationKindUnion),
		// 				ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("kustoCluster2/KustoDatabase9"),
		// 			Type: to.Ptr("Microsoft.Kusto/Clusters/AttachedDatabaseConfigurations"),
		// 			ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster2/AttachedDatabaseConfigurations/KustoDatabase9"),
		// 			Location: to.Ptr("westus"),
		// 			Properties: &armkusto.AttachedDatabaseConfigurationProperties{
		// 				ClusterResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/KustoClusterLeader"),
		// 				DatabaseName: to.Ptr("db1"),
		// 				DefaultPrincipalsModificationKind: to.Ptr(armkusto.DefaultPrincipalsModificationKindUnion),
		// 				ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded),
		// 				TableLevelSharingProperties: &armkusto.TableLevelSharingProperties{
		// 					ExternalTablesToExclude: []*string{
		// 						to.Ptr("ExternalTable2")},
		// 						ExternalTablesToInclude: []*string{
		// 							to.Ptr("ExternalTable1")},
		// 							FunctionsToExclude: []*string{
		// 								to.Ptr("functionsToExclude2")},
		// 								FunctionsToInclude: []*string{
		// 									to.Ptr("functionsToInclude1")},
		// 									MaterializedViewsToExclude: []*string{
		// 										to.Ptr("MaterializedViewTable2")},
		// 										MaterializedViewsToInclude: []*string{
		// 											to.Ptr("MaterializedViewTable1")},
		// 											TablesToExclude: []*string{
		// 												to.Ptr("Table2")},
		// 												TablesToInclude: []*string{
		// 													to.Ptr("Table1")},
		// 												},
		// 											},
		// 									}},
		// 								}
	}
}
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.BeginCreateOrUpdate.

type AttachedDatabaseConfigurationsClientDeleteResponse added in v0.2.0

type AttachedDatabaseConfigurationsClientDeleteResponse struct {
}

AttachedDatabaseConfigurationsClientDeleteResponse contains the response from method AttachedDatabaseConfigurationsClient.BeginDelete.

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.NewListByClusterPager method.

type AttachedDatabaseConfigurationsClientListByClusterResponse added in v0.2.0

type AttachedDatabaseConfigurationsClientListByClusterResponse struct {
	AttachedDatabaseConfigurationListResult
}

AttachedDatabaseConfigurationsClientListByClusterResponse contains the response from method AttachedDatabaseConfigurationsClient.NewListByClusterPager.

type AzureCapacity

type AzureCapacity struct {
	// REQUIRED; The default capacity that would be used.
	Default *int32

	// REQUIRED; Maximum allowed capacity.
	Maximum *int32

	// REQUIRED; Minimum allowed capacity.
	Minimum *int32

	// REQUIRED; Scale type.
	ScaleType *AzureScaleType
}

AzureCapacity - Azure capacity definition.

func (AzureCapacity) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type AzureCapacity.

func (*AzureCapacity) UnmarshalJSON added in v1.1.0

func (a *AzureCapacity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AzureCapacity.

type AzureResourceSKU

type AzureResourceSKU struct {
	// The number of instances of the cluster.
	Capacity *AzureCapacity

	// Resource Namespace and Type.
	ResourceType *string

	// The SKU details.
	SKU *AzureSKU
}

AzureResourceSKU - Azure resource SKU definition.

func (AzureResourceSKU) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type AzureResourceSKU.

func (*AzureResourceSKU) UnmarshalJSON added in v1.1.0

func (a *AzureResourceSKU) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AzureResourceSKU.

type AzureSKU

type AzureSKU struct {
	// REQUIRED; SKU name.
	Name *AzureSKUName

	// REQUIRED; SKU tier.
	Tier *AzureSKUTier

	// The number of instances of the cluster.
	Capacity *int32
}

AzureSKU - Azure SKU definition.

func (AzureSKU) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type AzureSKU.

func (*AzureSKU) UnmarshalJSON added in v1.1.0

func (a *AzureSKU) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AzureSKU.

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"
	AzureSKUNameStandardE16DV4        AzureSKUName = "Standard_E16d_v4"
	AzureSKUNameStandardE16DV5        AzureSKUName = "Standard_E16d_v5"
	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"
	AzureSKUNameStandardE2DV4         AzureSKUName = "Standard_E2d_v4"
	AzureSKUNameStandardE2DV5         AzureSKUName = "Standard_E2d_v5"
	AzureSKUNameStandardE4AV4         AzureSKUName = "Standard_E4a_v4"
	AzureSKUNameStandardE4AdsV5       AzureSKUName = "Standard_E4ads_v5"
	AzureSKUNameStandardE4DV4         AzureSKUName = "Standard_E4d_v4"
	AzureSKUNameStandardE4DV5         AzureSKUName = "Standard_E4d_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"
	AzureSKUNameStandardE8DV4         AzureSKUName = "Standard_E8d_v4"
	AzureSKUNameStandardE8DV5         AzureSKUName = "Standard_E8d_v5"
	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"
	AzureSKUNameStandardEC16AdsV5     AzureSKUName = "Standard_EC16ads_v5"
	AzureSKUNameStandardEC16AsV53TBPS AzureSKUName = "Standard_EC16as_v5+3TB_PS"
	AzureSKUNameStandardEC16AsV54TBPS AzureSKUName = "Standard_EC16as_v5+4TB_PS"
	AzureSKUNameStandardEC8AdsV5      AzureSKUName = "Standard_EC8ads_v5"
	AzureSKUNameStandardEC8AsV51TBPS  AzureSKUName = "Standard_EC8as_v5+1TB_PS"
	AzureSKUNameStandardEC8AsV52TBPS  AzureSKUName = "Standard_EC8as_v5+2TB_PS"
	AzureSKUNameStandardL16AsV3       AzureSKUName = "Standard_L16as_v3"
	AzureSKUNameStandardL16S          AzureSKUName = "Standard_L16s"
	AzureSKUNameStandardL16SV2        AzureSKUName = "Standard_L16s_v2"
	AzureSKUNameStandardL16SV3        AzureSKUName = "Standard_L16s_v3"
	AzureSKUNameStandardL32AsV3       AzureSKUName = "Standard_L32as_v3"
	AzureSKUNameStandardL32SV3        AzureSKUName = "Standard_L32s_v3"
	AzureSKUNameStandardL4S           AzureSKUName = "Standard_L4s"
	AzureSKUNameStandardL8AsV3        AzureSKUName = "Standard_L8as_v3"
	AzureSKUNameStandardL8S           AzureSKUName = "Standard_L8s"
	AzureSKUNameStandardL8SV2         AzureSKUName = "Standard_L8s_v2"
	AzureSKUNameStandardL8SV3         AzureSKUName = "Standard_L8s_v3"
)

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 CallerRole added in v1.1.0

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

func PossibleCallerRoleValues added in v1.1.0

func PossibleCallerRoleValues() []CallerRole

PossibleCallerRoleValues returns the possible values for the CallerRole const type.

type CheckNameRequest

type CheckNameRequest struct {
	// REQUIRED; Resource name.
	Name *string

	// REQUIRED; The type of resource, for instance Microsoft.Kusto/clusters/databases.
	Type *Type
}

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

func (CheckNameRequest) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type CheckNameRequest.

func (*CheckNameRequest) UnmarshalJSON added in v1.1.0

func (c *CheckNameRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameRequest.

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

	// The name that was checked.
	Name *string

	// Specifies a Boolean value that indicates if the name is available.
	NameAvailable *bool

	// Message providing the reason why the given name is invalid.
	Reason *Reason
}

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

func (CheckNameResult) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type CheckNameResult.

func (*CheckNameResult) UnmarshalJSON added in v1.1.0

func (c *CheckNameResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameResult.

type ClientFactory added in v1.3.0

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

ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.

func NewClientFactory added in v1.3.0

func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)

NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.

  • 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 (*ClientFactory) NewAttachedDatabaseConfigurationsClient added in v1.3.0

func (c *ClientFactory) NewAttachedDatabaseConfigurationsClient() *AttachedDatabaseConfigurationsClient

func (*ClientFactory) NewClusterPrincipalAssignmentsClient added in v1.3.0

func (c *ClientFactory) NewClusterPrincipalAssignmentsClient() *ClusterPrincipalAssignmentsClient

func (*ClientFactory) NewClustersClient added in v1.3.0

func (c *ClientFactory) NewClustersClient() *ClustersClient

func (*ClientFactory) NewDataConnectionsClient added in v1.3.0

func (c *ClientFactory) NewDataConnectionsClient() *DataConnectionsClient

func (*ClientFactory) NewDatabasePrincipalAssignmentsClient added in v1.3.0

func (c *ClientFactory) NewDatabasePrincipalAssignmentsClient() *DatabasePrincipalAssignmentsClient

func (*ClientFactory) NewDatabasesClient added in v1.3.0

func (c *ClientFactory) NewDatabasesClient() *DatabasesClient

func (*ClientFactory) NewManagedPrivateEndpointsClient added in v1.3.0

func (c *ClientFactory) NewManagedPrivateEndpointsClient() *ManagedPrivateEndpointsClient

func (*ClientFactory) NewOperationsClient added in v1.3.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

func (*ClientFactory) NewOperationsResultsClient added in v1.3.0

func (c *ClientFactory) NewOperationsResultsClient() *OperationsResultsClient

func (*ClientFactory) NewOperationsResultsLocationClient added in v1.3.0

func (c *ClientFactory) NewOperationsResultsLocationClient() *OperationsResultsLocationClient

func (*ClientFactory) NewPrivateEndpointConnectionsClient added in v1.3.0

func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient

func (*ClientFactory) NewPrivateLinkResourcesClient added in v1.3.0

func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient

func (*ClientFactory) NewSKUsClient added in v1.3.0

func (c *ClientFactory) NewSKUsClient() *SKUsClient

func (*ClientFactory) NewScriptsClient added in v1.3.0

func (c *ClientFactory) NewScriptsClient() *ScriptsClient

type Cluster

type Cluster struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// REQUIRED; The SKU of the cluster.
	SKU *AzureSKU

	// The identity of the cluster, if configured.
	Identity *Identity

	// The cluster properties.
	Properties *ClusterProperties

	// Resource tags.
	Tags map[string]*string

	// The availability zones of the cluster.
	Zones []*string

	// READ-ONLY; A unique read-only string that changes whenever the resource is updated.
	Etag *string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Cluster - Class representing a Kusto cluster.

func (Cluster) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Cluster.

func (*Cluster) UnmarshalJSON

func (c *Cluster) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Cluster.

type ClusterCheckNameRequest

type ClusterCheckNameRequest struct {
	// REQUIRED; Cluster name.
	Name *string

	// CONSTANT; The type of resource, Microsoft.Kusto/clusters.
	// Field has constant value "Microsoft.Kusto/clusters", any specified value is ignored.
	Type *string
}

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

func (ClusterCheckNameRequest) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ClusterCheckNameRequest.

func (*ClusterCheckNameRequest) UnmarshalJSON added in v1.1.0

func (c *ClusterCheckNameRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ClusterCheckNameRequest.

type ClusterListResult

type ClusterListResult struct {
	// The list of Kusto clusters.
	Value []*Cluster
}

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.

func (*ClusterListResult) UnmarshalJSON added in v1.1.0

func (c *ClusterListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller 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

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

ClusterPrincipalAssignment - Class representing a cluster principal assignment.

func (ClusterPrincipalAssignment) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ClusterPrincipalAssignment.

func (*ClusterPrincipalAssignment) UnmarshalJSON

func (c *ClusterPrincipalAssignment) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ClusterPrincipalAssignment.

type ClusterPrincipalAssignmentCheckNameRequest

type ClusterPrincipalAssignmentCheckNameRequest struct {
	// REQUIRED; Principal Assignment resource name.
	Name *string

	// CONSTANT; The type of resource, Microsoft.Kusto/clusters/principalAssignments.
	// Field has constant value "Microsoft.Kusto/clusters/principalAssignments", any specified value is ignored.
	Type *string
}

ClusterPrincipalAssignmentCheckNameRequest - A principal assignment check name availability request.

func (ClusterPrincipalAssignmentCheckNameRequest) MarshalJSON added in v1.1.0

MarshalJSON implements the json.Marshaller interface for type ClusterPrincipalAssignmentCheckNameRequest.

func (*ClusterPrincipalAssignmentCheckNameRequest) UnmarshalJSON added in v1.1.0

func (c *ClusterPrincipalAssignmentCheckNameRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ClusterPrincipalAssignmentCheckNameRequest.

type ClusterPrincipalAssignmentListResult

type ClusterPrincipalAssignmentListResult struct {
	// The list of Kusto cluster principal assignments.
	Value []*ClusterPrincipalAssignment
}

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.

func (*ClusterPrincipalAssignmentListResult) UnmarshalJSON added in v1.1.0

func (c *ClusterPrincipalAssignmentListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller 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.

Generated from API version 2022-12-29

  • 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/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClusterPrincipalAssignmentsCreateOrUpdate.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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClusterPrincipalAssignmentsClient().BeginCreateOrUpdate(ctx, "kustorptest", "kustoCluster", "kustoprincipal1", armkusto.ClusterPrincipalAssignment{
		Properties: &armkusto.ClusterPrincipalProperties{
			PrincipalID:   to.Ptr("87654321-1234-1234-1234-123456789123"),
			PrincipalType: to.Ptr(armkusto.PrincipalTypeApp),
			Role:          to.Ptr(armkusto.ClusterPrincipalRoleAllDatabasesAdmin),
			TenantID:      to.Ptr("12345678-1234-1234-1234-123456789123"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ClusterPrincipalAssignment = armkusto.ClusterPrincipalAssignment{
	// 	Name: to.Ptr("kustoCluster/kustoprincipal1"),
	// 	Type: to.Ptr("Microsoft.Kusto/Clusters/PrincipalAssignments"),
	// 	ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/PrincipalAssignments/kustoprincipal1"),
	// 	Properties: &armkusto.ClusterPrincipalProperties{
	// 		AADObjectID: to.Ptr("98765432-1234-1234-1234-123456789123"),
	// 		PrincipalID: to.Ptr("87654321-1234-1234-1234-123456789123"),
	// 		PrincipalName: to.Ptr("TestApp"),
	// 		PrincipalType: to.Ptr(armkusto.PrincipalTypeApp),
	// 		ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded),
	// 		Role: to.Ptr(armkusto.ClusterPrincipalRoleAllDatabasesAdmin),
	// 		TenantID: to.Ptr("12345678-1234-1234-1234-123456789123"),
	// 		TenantName: to.Ptr("tenantName"),
	// 	},
	// }
}
Output:

func (*ClusterPrincipalAssignmentsClient) BeginDelete

BeginDelete - Deletes a Kusto cluster principalAssignment. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-12-29

  • 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/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClusterPrincipalAssignmentsDelete.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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClusterPrincipalAssignmentsClient().BeginDelete(ctx, "kustorptest", "kustoCluster", "kustoprincipal1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
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.

Generated from API version 2022-12-29

  • 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/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClusterPrincipalAssignmentsClient().CheckNameAvailability(ctx, "kustorptest", "kustoCluster", armkusto.ClusterPrincipalAssignmentCheckNameRequest{
		Name: to.Ptr("kustoprincipal1"),
		Type: to.Ptr("Microsoft.Kusto/clusters/principalAssignments"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CheckNameResult = armkusto.CheckNameResult{
	// 	Name: to.Ptr("kustoprincipal1"),
	// 	Message: to.Ptr("Name 'kustoprincipal1' is already taken. Please specify a different name"),
	// 	NameAvailable: to.Ptr(false),
	// }
}
Output:

func (*ClusterPrincipalAssignmentsClient) Get

Get - Gets a Kusto cluster principalAssignment. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-12-29

  • 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/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClusterPrincipalAssignmentsClient().Get(ctx, "kustorptest", "kustoCluster", "kustoprincipal1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ClusterPrincipalAssignment = armkusto.ClusterPrincipalAssignment{
	// 	Name: to.Ptr("kustoCluster/kustoprincipal1"),
	// 	Type: to.Ptr("Microsoft.Kusto/Clusters/PrincipalAssignments"),
	// 	ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/PrincipalAssignments/kustoprincipal1"),
	// 	Properties: &armkusto.ClusterPrincipalProperties{
	// 		AADObjectID: to.Ptr("98765432-1234-1234-1234-123456789123"),
	// 		PrincipalID: to.Ptr("87654321-1234-1234-1234-123456789123"),
	// 		PrincipalName: to.Ptr("TestApp"),
	// 		PrincipalType: to.Ptr(armkusto.PrincipalTypeApp),
	// 		ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded),
	// 		Role: to.Ptr(armkusto.ClusterPrincipalRoleAllDatabasesAdmin),
	// 		TenantID: to.Ptr("12345678-1234-1234-1234-123456789123"),
	// 		TenantName: to.Ptr("tenantName"),
	// 	},
	// }
}
Output:

func (*ClusterPrincipalAssignmentsClient) NewListPager added in v0.4.0

NewListPager - Lists all Kusto cluster principalAssignments.

Generated from API version 2022-12-29

  • 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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewClusterPrincipalAssignmentsClient().NewListPager("kustorptest", "kustoCluster", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ClusterPrincipalAssignmentListResult = armkusto.ClusterPrincipalAssignmentListResult{
		// 	Value: []*armkusto.ClusterPrincipalAssignment{
		// 		{
		// 			Name: to.Ptr("kustoCluster/Kustodatabase8/kustoprincipal1"),
		// 			Type: to.Ptr("Microsoft.Kusto/Clusters/Databases/PrincipalAssignments"),
		// 			ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/Databases/Kustodatabase8/PrincipalAssignments/kustoprincipal1"),
		// 			Properties: &armkusto.ClusterPrincipalProperties{
		// 				AADObjectID: to.Ptr("98765432-1234-1234-1234-123456789123"),
		// 				PrincipalID: to.Ptr("87654321-1234-1234-1234-123456789123"),
		// 				PrincipalName: to.Ptr("TestApp"),
		// 				PrincipalType: to.Ptr(armkusto.PrincipalTypeApp),
		// 				ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded),
		// 				Role: to.Ptr(armkusto.ClusterPrincipalRoleAllDatabasesAdmin),
		// 				TenantID: to.Ptr("12345678-1234-1234-1234-123456789123"),
		// 				TenantName: to.Ptr("tenantName"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("kustoCluster/Kustodatabase8/kustoprincipal2"),
		// 			Type: to.Ptr("Microsoft.Kusto/Clusters/Databases/PrincipalAssignments"),
		// 			ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/Databases/Kustodatabase8/PrincipalAssignments/kustoprincipal1"),
		// 			Properties: &armkusto.ClusterPrincipalProperties{
		// 				AADObjectID: to.Ptr("98765432-1234-1234-1234-123456789123"),
		// 				PrincipalID: to.Ptr("11112222-1234-1234-1234-123456789123"),
		// 				PrincipalName: to.Ptr("TestApp"),
		// 				PrincipalType: to.Ptr(armkusto.PrincipalTypeApp),
		// 				ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded),
		// 				Role: to.Ptr(armkusto.ClusterPrincipalRoleAllDatabasesViewer),
		// 				TenantID: to.Ptr("12345678-1234-1234-1234-123456789123"),
		// 				TenantName: to.Ptr("tenantName"),
		// 			},
		// 	}},
		// }
	}
}
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.BeginCreateOrUpdate.

type ClusterPrincipalAssignmentsClientDeleteResponse added in v0.2.0

type ClusterPrincipalAssignmentsClientDeleteResponse struct {
}

ClusterPrincipalAssignmentsClientDeleteResponse contains the response from method ClusterPrincipalAssignmentsClient.BeginDelete.

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.NewListPager method.

type ClusterPrincipalAssignmentsClientListResponse added in v0.2.0

type ClusterPrincipalAssignmentsClientListResponse struct {
	ClusterPrincipalAssignmentListResult
}

ClusterPrincipalAssignmentsClientListResponse contains the response from method ClusterPrincipalAssignmentsClient.NewListPager.

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

	// REQUIRED; Principal type.
	PrincipalType *PrincipalType

	// REQUIRED; Cluster principal role.
	Role *ClusterPrincipalRole

	// The tenant id of the principal
	TenantID *string

	// READ-ONLY; The service principal object id in AAD (Azure active directory)
	AADObjectID *string

	// READ-ONLY; The principal name
	PrincipalName *string

	// READ-ONLY; The provisioned state of the resource.
	ProvisioningState *ProvisioningState

	// READ-ONLY; The tenant name of the principal
	TenantName *string
}

ClusterPrincipalProperties - A class representing cluster principal property.

func (ClusterPrincipalProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ClusterPrincipalProperties.

func (*ClusterPrincipalProperties) UnmarshalJSON added in v1.1.0

func (c *ClusterPrincipalProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ClusterPrincipalProperties.

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

	// List of allowed FQDNs(Fully Qualified Domain Name) for egress from Cluster.
	AllowedFqdnList []*string

	// The list of ips in the format of CIDR allowed to connect to the cluster.
	AllowedIPRangeList []*string

	// 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

	// A boolean value that indicates if the cluster's disks are encrypted.
	EnableDiskEncryption *bool

	// A boolean value that indicates if double encryption is enabled.
	EnableDoubleEncryption *bool

	// A boolean value that indicates if the purge operations are enabled.
	EnablePurge *bool

	// A boolean value that indicates if the streaming ingest is enabled.
	EnableStreamingIngest *bool

	// The engine type
	EngineType *EngineType

	// KeyVault properties for the cluster encryption.
	KeyVaultProperties *KeyVaultProperties

	// List of the cluster's language extensions.
	LanguageExtensions *LanguageExtensionsList

	// Optimized auto scale definition.
	OptimizedAutoscale *OptimizedAutoscale

	// Indicates what public IP type to create - IPv4 (default), or DualStack (both IPv4 and IPv6)
	PublicIPType *PublicIPType

	// Public network access to the cluster is enabled by default. When disabled, only private endpoint connection to the cluster
	// is allowed
	PublicNetworkAccess *PublicNetworkAccess

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

	// The cluster's external tenants.
	TrustedExternalTenants []*TrustedExternalTenant

	// Virtual Cluster graduation properties
	VirtualClusterGraduationProperties *string

	// Virtual network definition.
	VirtualNetworkConfiguration *VirtualNetworkConfiguration

	// READ-ONLY; The cluster data ingestion URI.
	DataIngestionURI *string

	// READ-ONLY; A list of private endpoint connections.
	PrivateEndpointConnections []*PrivateEndpointConnection

	// READ-ONLY; The provisioned state of the resource.
	ProvisioningState *ProvisioningState

	// READ-ONLY; The state of the resource.
	State *State

	// READ-ONLY; The reason for the cluster's current state.
	StateReason *string

	// READ-ONLY; The cluster URI.
	URI *string
}

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.

func (*ClusterProperties) UnmarshalJSON added in v1.1.0

func (c *ClusterProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ClusterProperties.

type ClusterUpdate

type ClusterUpdate struct {
	// The identity of the cluster, if configured.
	Identity *Identity

	// Resource location.
	Location *string

	// The cluster properties.
	Properties *ClusterProperties

	// The SKU of the cluster.
	SKU *AzureSKU

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

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.

func (*ClusterUpdate) UnmarshalJSON

func (c *ClusterUpdate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller 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) (*runtime.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.

Generated from API version 2022-12-29

  • 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/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClusterAddLanguageExtensions.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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginAddLanguageExtensions(ctx, "kustorptest", "kustoCluster", armkusto.LanguageExtensionsList{
		Value: []*armkusto.LanguageExtension{
			{
				LanguageExtensionName: to.Ptr(armkusto.LanguageExtensionNamePYTHON),
			},
			{
				LanguageExtensionName: to.Ptr(armkusto.LanguageExtensionNameR),
			}},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*ClustersClient) BeginCreateOrUpdate

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

BeginCreateOrUpdate - Create or update a Kusto cluster. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-12-29

  • 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/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClustersCreateOrUpdate.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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginCreateOrUpdate(ctx, "kustorptest", "kustoCluster", armkusto.Cluster{
		Location: to.Ptr("westus"),
		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.AzureSKUNameStandardL16AsV3),
			Capacity: to.Ptr[int32](2),
			Tier:     to.Ptr(armkusto.AzureSKUTierStandard),
		},
	}, &armkusto.ClustersClientBeginCreateOrUpdateOptions{IfMatch: nil,
		IfNoneMatch: nil,
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Cluster = armkusto.Cluster{
	// 	Name: to.Ptr("kustoCluster"),
	// 	Type: to.Ptr("Microsoft.Kusto/Clusters"),
	// 	ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster"),
	// 	Location: to.Ptr("westus"),
	// 	Etag: to.Ptr("abcd"),
	// 	Identity: &armkusto.Identity{
	// 		Type: to.Ptr(armkusto.IdentityTypeSystemAssigned),
	// 		PrincipalID: to.Ptr("faabad1f-4876-463c-af9d-6ba2d2d2394c"),
	// 		TenantID: to.Ptr("b932977f-6277-4ab7-a2cd-5bd21f07aaf4"),
	// 		UserAssignedIdentities: map[string]*armkusto.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties{
	// 		},
	// 	},
	// 	Properties: &armkusto.ClusterProperties{
	// 		AllowedIPRangeList: []*string{
	// 			to.Ptr("0.0.0.0/0")},
	// 			EnableAutoStop: to.Ptr(true),
	// 			EnableDiskEncryption: to.Ptr(false),
	// 			EnableDoubleEncryption: to.Ptr(false),
	// 			EnablePurge: to.Ptr(true),
	// 			EnableStreamingIngest: to.Ptr(true),
	// 			EngineType: to.Ptr(armkusto.EngineTypeV3),
	// 			KeyVaultProperties: &armkusto.KeyVaultProperties{
	// 				KeyName: to.Ptr("keyName"),
	// 				KeyVaultURI: to.Ptr("https://dummy.keyvault.com"),
	// 				KeyVersion: to.Ptr("keyVersion"),
	// 			},
	// 			ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded),
	// 			PublicIPType: to.Ptr(armkusto.PublicIPTypeDualStack),
	// 			PublicNetworkAccess: to.Ptr(armkusto.PublicNetworkAccessEnabled),
	// 			RestrictOutboundNetworkAccess: to.Ptr(armkusto.ClusterNetworkAccessFlagDisabled),
	// 		},
	// 		SKU: &armkusto.AzureSKU{
	// 			Name: to.Ptr(armkusto.AzureSKUNameStandardL16AsV3),
	// 			Capacity: to.Ptr[int32](2),
	// 			Tier: to.Ptr(armkusto.AzureSKUTierStandard),
	// 		},
	// 	}
}
Output:

func (*ClustersClient) BeginDelete

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

BeginDelete - Deletes a Kusto cluster. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-12-29

  • 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/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClustersDelete.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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginDelete(ctx, "kustorptest", "kustoCluster2", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*ClustersClient) BeginDetachFollowerDatabases

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

BeginDetachFollowerDatabases - Detaches all followers of a database owned by this cluster. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-12-29

  • 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/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClusterDetachFollowerDatabases.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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginDetachFollowerDatabases(ctx, "kustorptest", "kustoCluster", armkusto.FollowerDatabaseDefinition{
		AttachedDatabaseConfigurationName: to.Ptr("attachedDatabaseConfigurationsTest"),
		ClusterResourceID:                 to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/clusters/kustoCluster2"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*ClustersClient) BeginDiagnoseVirtualNetwork

func (client *ClustersClient) BeginDiagnoseVirtualNetwork(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginDiagnoseVirtualNetworkOptions) (*runtime.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.

Generated from API version 2022-12-29

  • 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/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClustersDiagnoseVirtualNetwork.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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginDiagnoseVirtualNetwork(ctx, "kustorptest", "kustoCluster", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DiagnoseVirtualNetworkResult = armkusto.DiagnoseVirtualNetworkResult{
	// 	Findings: []*string{
	// 		to.Ptr("Outbound dependency 'Storage:443' might not be satisfied (Outbound)")},
	// 	}
}
Output:

func (*ClustersClient) BeginRemoveLanguageExtensions

func (client *ClustersClient) BeginRemoveLanguageExtensions(ctx context.Context, resourceGroupName string, clusterName string, languageExtensionsToRemove LanguageExtensionsList, options *ClustersClientBeginRemoveLanguageExtensionsOptions) (*runtime.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.

Generated from API version 2022-12-29

  • 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/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClusterRemoveLanguageExtensions.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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginRemoveLanguageExtensions(ctx, "kustorptest", "kustoCluster", armkusto.LanguageExtensionsList{
		Value: []*armkusto.LanguageExtension{
			{
				LanguageExtensionName: to.Ptr(armkusto.LanguageExtensionNamePYTHON),
			},
			{
				LanguageExtensionName: to.Ptr(armkusto.LanguageExtensionNameR),
			}},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*ClustersClient) BeginStart

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

BeginStart - Starts a Kusto cluster. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-12-29

  • 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/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClustersStart.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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginStart(ctx, "kustorptest", "kustoCluster2", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*ClustersClient) BeginStop

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

BeginStop - Stops a Kusto cluster. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-12-29

  • 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/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClustersStop.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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginStop(ctx, "kustorptest", "kustoCluster2", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*ClustersClient) BeginUpdate

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

BeginUpdate - Update a Kusto cluster. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-12-29

  • 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/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClustersUpdate.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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginUpdate(ctx, "kustorptest", "kustoCluster2", armkusto.ClusterUpdate{
		Location: to.Ptr("westus"),
	}, &armkusto.ClustersClientBeginUpdateOptions{IfMatch: to.Ptr("*")})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Cluster = armkusto.Cluster{
	// 	Name: to.Ptr("kustoCluster2"),
	// 	Type: to.Ptr("Microsoft.Kusto/Clusters"),
	// 	ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster2"),
	// 	Location: to.Ptr("westus"),
	// 	Etag: to.Ptr("abcd123"),
	// 	Identity: &armkusto.Identity{
	// 		Type: to.Ptr(armkusto.IdentityTypeSystemAssigned),
	// 		PrincipalID: to.Ptr("faabad1f-4876-463c-af9d-6ba2d2d2394c"),
	// 		TenantID: to.Ptr("b932977f-6277-4ab7-a2cd-5bd21f07aaf4"),
	// 		UserAssignedIdentities: map[string]*armkusto.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties{
	// 		},
	// 	},
	// 	Properties: &armkusto.ClusterProperties{
	// 		EnableAutoStop: to.Ptr(true),
	// 		EnableDiskEncryption: to.Ptr(false),
	// 		EnablePurge: to.Ptr(true),
	// 		EnableStreamingIngest: to.Ptr(true),
	// 		EngineType: to.Ptr(armkusto.EngineTypeV3),
	// 		KeyVaultProperties: &armkusto.KeyVaultProperties{
	// 			KeyName: to.Ptr("keyName"),
	// 			KeyVaultURI: to.Ptr("https://dummy.keyvault.com"),
	// 			KeyVersion: to.Ptr("keyVersion"),
	// 		},
	// 		ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded),
	// 		PublicIPType: to.Ptr(armkusto.PublicIPTypeIPv4),
	// 		RestrictOutboundNetworkAccess: to.Ptr(armkusto.ClusterNetworkAccessFlagDisabled),
	// 	},
	// 	SKU: &armkusto.AzureSKU{
	// 		Name: to.Ptr(armkusto.AzureSKUNameStandardL16AsV3),
	// 		Capacity: to.Ptr[int32](2),
	// 		Tier: to.Ptr(armkusto.AzureSKUTierStandard),
	// 	},
	// }
}
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.

Generated from API version 2022-12-29

  • 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/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClustersClient().CheckNameAvailability(ctx, "westus", armkusto.ClusterCheckNameRequest{
		Name: to.Ptr("kustoCluster"),
		Type: to.Ptr("Microsoft.Kusto/clusters"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CheckNameResult = armkusto.CheckNameResult{
	// 	Name: to.Ptr("kuskusprod"),
	// 	Message: to.Ptr("Name 'kuskusprod' is already taken. Please specify a different name"),
	// 	NameAvailable: to.Ptr(false),
	// }
}
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.

Generated from API version 2022-12-29

  • 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/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClustersClient().Get(ctx, "kustorptest", "kustoCluster", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Cluster = armkusto.Cluster{
	// 	Name: to.Ptr("kustoCluster"),
	// 	Type: to.Ptr("Microsoft.Kusto/Clusters"),
	// 	ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster"),
	// 	Location: to.Ptr("westus"),
	// 	Etag: to.Ptr("abcd123"),
	// 	Identity: &armkusto.Identity{
	// 		Type: to.Ptr(armkusto.IdentityTypeSystemAssigned),
	// 		PrincipalID: to.Ptr("faabad1f-4876-463c-af9d-6ba2d2d2394c"),
	// 		TenantID: to.Ptr("b932977f-6277-4ab7-a2cd-5bd21f07aaf4"),
	// 		UserAssignedIdentities: map[string]*armkusto.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties{
	// 		},
	// 	},
	// 	Properties: &armkusto.ClusterProperties{
	// 		AllowedFqdnList: []*string{
	// 			to.Ptr("my-stroage.blob.core.windows.net")},
	// 			AllowedIPRangeList: []*string{
	// 			},
	// 			EnableAutoStop: to.Ptr(true),
	// 			EnableDiskEncryption: to.Ptr(false),
	// 			EnablePurge: to.Ptr(false),
	// 			EnableStreamingIngest: to.Ptr(true),
	// 			EngineType: to.Ptr(armkusto.EngineTypeV3),
	// 			KeyVaultProperties: &armkusto.KeyVaultProperties{
	// 				KeyName: to.Ptr("keyName"),
	// 				KeyVaultURI: to.Ptr("https://dummy.keyvault.com"),
	// 				KeyVersion: to.Ptr("keyVersion"),
	// 			},
	// 			PrivateEndpointConnections: []*armkusto.PrivateEndpointConnection{
	// 				{
	// 					Name: to.Ptr("privateEndpointTest"),
	// 					Type: to.Ptr("Microsoft.Kusto/Clusters/PrivateEndpointConnections"),
	// 					ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/privateEndpointConnections/privateEndpointTest"),
	// 					Properties: &armkusto.PrivateEndpointConnectionProperties{
	// 						GroupID: to.Ptr("cluster"),
	// 						PrivateEndpoint: &armkusto.PrivateEndpointProperty{
	// 							ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/rg1Network/providers/Microsoft.Network/privateEndpoints/privateEndpointName"),
	// 						},
	// 						PrivateLinkServiceConnectionState: &armkusto.PrivateLinkServiceConnectionStateProperty{
	// 							Description: to.Ptr("Auto-approved"),
	// 							ActionsRequired: to.Ptr("None"),
	// 							Status: to.Ptr("Approved"),
	// 						},
	// 						ProvisioningState: to.Ptr("Succeeded"),
	// 					},
	// 			}},
	// 			ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded),
	// 			PublicIPType: to.Ptr(armkusto.PublicIPTypeIPv4),
	// 			PublicNetworkAccess: to.Ptr(armkusto.PublicNetworkAccessEnabled),
	// 			RestrictOutboundNetworkAccess: to.Ptr(armkusto.ClusterNetworkAccessFlagEnabled),
	// 		},
	// 		SKU: &armkusto.AzureSKU{
	// 			Name: to.Ptr(armkusto.AzureSKUNameStandardL16AsV3),
	// 			Capacity: to.Ptr[int32](2),
	// 			Tier: to.Ptr(armkusto.AzureSKUTierStandard),
	// 		},
	// 		SystemData: &armkusto.SystemData{
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-29T15:06:54.2757906Z"); return t}()),
	// 			CreatedBy: to.Ptr("user@microsoft.com"),
	// 			CreatedByType: to.Ptr(armkusto.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-29T15:06:54.2757906Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("user@microsoft.com"),
	// 			LastModifiedByType: to.Ptr(armkusto.CreatedByTypeUser),
	// 		},
	// 	}
}
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.

Generated from API version 2022-12-29

  • resourceGroupName - The name of the resource group containing the Kusto cluster.
  • options - ClustersClientListByResourceGroupOptions contains the optional parameters for the ClustersClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewClustersClient().NewListByResourceGroupPager("kustorptest", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ClusterListResult = armkusto.ClusterListResult{
		// 	Value: []*armkusto.Cluster{
		// 		{
		// 			Name: to.Ptr("KustoClusterRPTest4"),
		// 			Type: to.Ptr("Microsoft.Kusto/Clusters"),
		// 			ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/KustoClusterRPTest4"),
		// 			Location: to.Ptr("westus"),
		// 			Etag: to.Ptr("abcd123"),
		// 			Properties: &armkusto.ClusterProperties{
		// 				AllowedFqdnList: []*string{
		// 					to.Ptr("my-stroage.blob.core.windows.net")},
		// 					AllowedIPRangeList: []*string{
		// 					},
		// 					EnableDiskEncryption: to.Ptr(false),
		// 					EnableStreamingIngest: to.Ptr(true),
		// 					EngineType: to.Ptr(armkusto.EngineTypeV2),
		// 					KeyVaultProperties: &armkusto.KeyVaultProperties{
		// 						KeyName: to.Ptr("keyName"),
		// 						KeyVaultURI: to.Ptr("https://dummy.keyvault.com"),
		// 						KeyVersion: to.Ptr("keyVersion"),
		// 					},
		// 					ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded),
		// 					PublicNetworkAccess: to.Ptr(armkusto.PublicNetworkAccessEnabled),
		// 					RestrictOutboundNetworkAccess: to.Ptr(armkusto.ClusterNetworkAccessFlagDisabled),
		// 				},
		// 				SKU: &armkusto.AzureSKU{
		// 					Name: to.Ptr(armkusto.AzureSKUNameStandardL16AsV3),
		// 					Capacity: to.Ptr[int32](2),
		// 					Tier: to.Ptr(armkusto.AzureSKUTierStandard),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("KustoClusterRPTest3"),
		// 				Type: to.Ptr("Microsoft.Kusto/Clusters"),
		// 				ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/KustoClusterRPTest3"),
		// 				Location: to.Ptr("westus"),
		// 				Etag: to.Ptr("abcd123"),
		// 				Properties: &armkusto.ClusterProperties{
		// 					AllowedIPRangeList: []*string{
		// 						to.Ptr("0.0.0.0/0")},
		// 						EnableDiskEncryption: to.Ptr(true),
		// 						EnableStreamingIngest: to.Ptr(true),
		// 						EngineType: to.Ptr(armkusto.EngineTypeV3),
		// 						ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded),
		// 						PublicNetworkAccess: to.Ptr(armkusto.PublicNetworkAccessEnabled),
		// 						RestrictOutboundNetworkAccess: to.Ptr(armkusto.ClusterNetworkAccessFlagDisabled),
		// 					},
		// 					SKU: &armkusto.AzureSKU{
		// 						Name: to.Ptr(armkusto.AzureSKUNameStandardL16AsV3),
		// 						Capacity: to.Ptr[int32](2),
		// 						Tier: to.Ptr(armkusto.AzureSKUTierStandard),
		// 					},
		// 			}},
		// 		}
	}
}
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.

Generated from API version 2022-12-29

  • 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.NewListFollowerDatabasesPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewClustersClient().NewListFollowerDatabasesPager("kustorptest", "kustoCluster", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.FollowerDatabaseListResult = armkusto.FollowerDatabaseListResult{
		// 	Value: []*armkusto.FollowerDatabaseDefinition{
		// 		{
		// 			AttachedDatabaseConfigurationName: to.Ptr("attachedDbConfiguration"),
		// 			ClusterResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/clusters/follower1"),
		// 			DatabaseName: to.Ptr("*"),
		// 			DatabaseShareOrigin: to.Ptr(armkusto.DatabaseShareOriginDataShare),
		// 		},
		// 		{
		// 			AttachedDatabaseConfigurationName: to.Ptr("attachedDbConfiguration2"),
		// 			ClusterResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/clusters/follower4"),
		// 			DatabaseName: to.Ptr("db1"),
		// 			DatabaseShareOrigin: to.Ptr(armkusto.DatabaseShareOriginDirect),
		// 			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")},
		// 									},
		// 							}},
		// 						}
	}
}
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.

Generated from API version 2022-12-29

  • 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.NewListLanguageExtensionsPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewClustersClient().NewListLanguageExtensionsPager("kustorptest", "kustoCluster", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.LanguageExtensionsList = armkusto.LanguageExtensionsList{
		// 	Value: []*armkusto.LanguageExtension{
		// 		{
		// 			LanguageExtensionName: to.Ptr(armkusto.LanguageExtensionNamePYTHON),
		// 		},
		// 		{
		// 			LanguageExtensionName: to.Ptr(armkusto.LanguageExtensionNameR),
		// 	}},
		// }
	}
}
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

Generated from API version 2022-12-29

  • 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.NewListOutboundNetworkDependenciesEndpointsPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewClustersClient().NewListOutboundNetworkDependenciesEndpointsPager("kustorptest", "kustoCluster", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.OutboundNetworkDependenciesEndpointListResult = armkusto.OutboundNetworkDependenciesEndpointListResult{
		// 	Value: []*armkusto.OutboundNetworkDependenciesEndpoint{
		// 		{
		// 			Name: to.Ptr("kustoCluster/AzureActiveDirectory"),
		// 			Type: to.Ptr("Microsoft.Kusto/Clusters/OutboundNetworkDependenciesEndpoints"),
		// 			ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/OutboundNetworkDependenciesEndpoints/AzureActiveDirectory"),
		// 			Properties: &armkusto.OutboundNetworkDependenciesEndpointProperties{
		// 				Category: to.Ptr("Azure Active Directory"),
		// 				Endpoints: []*armkusto.EndpointDependency{
		// 					{
		// 						DomainName: to.Ptr("login.microsoftonline.com"),
		// 						EndpointDetails: []*armkusto.EndpointDetail{
		// 							{
		// 								Port: to.Ptr[int32](443),
		// 						}},
		// 					},
		// 					{
		// 						DomainName: to.Ptr("graph.windows.net"),
		// 						EndpointDetails: []*armkusto.EndpointDetail{
		// 							{
		// 								Port: to.Ptr[int32](443),
		// 						}},
		// 					},
		// 					{
		// 						DomainName: to.Ptr("graph.microsoft.com"),
		// 						EndpointDetails: []*armkusto.EndpointDetail{
		// 							{
		// 								Port: to.Ptr[int32](443),
		// 						}},
		// 					},
		// 					{
		// 						DomainName: to.Ptr("graph.microsoft-ppe.com"),
		// 						EndpointDetails: []*armkusto.EndpointDetail{
		// 							{
		// 								Port: to.Ptr[int32](443),
		// 						}},
		// 				}},
		// 				ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("kustoCluster/AzureMonitor"),
		// 			Type: to.Ptr("Microsoft.Kusto/Clusters/OutboundNetworkDependenciesEndpoints"),
		// 			ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/OutboundNetworkDependenciesEndpoints/AzureMonitor"),
		// 			Properties: &armkusto.OutboundNetworkDependenciesEndpointProperties{
		// 				Category: to.Ptr("Azure Monitor"),
		// 				Endpoints: []*armkusto.EndpointDependency{
		// 					{
		// 						DomainName: to.Ptr("prod.warmpath.msftcloudes.com"),
		// 						EndpointDetails: []*armkusto.EndpointDetail{
		// 							{
		// 								Port: to.Ptr[int32](443),
		// 						}},
		// 					},
		// 					{
		// 						DomainName: to.Ptr("gcs.prod.monitoring.core.windows.net"),
		// 						EndpointDetails: []*armkusto.EndpointDetail{
		// 							{
		// 								Port: to.Ptr[int32](443),
		// 						}},
		// 					},
		// 					{
		// 						DomainName: to.Ptr("production.diagnostics.monitoring.core.windows.net"),
		// 						EndpointDetails: []*armkusto.EndpointDetail{
		// 							{
		// 								Port: to.Ptr[int32](443),
		// 						}},
		// 					},
		// 					{
		// 						DomainName: to.Ptr("shoebox2.metrics.nsatc.net:443"),
		// 						EndpointDetails: []*armkusto.EndpointDetail{
		// 							{
		// 								Port: to.Ptr[int32](443),
		// 						}},
		// 				}},
		// 				ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("kustoCluster/CertificateAuthority"),
		// 			Type: to.Ptr("Microsoft.Kusto/Clusters/OutboundNetworkDependenciesEndpoints"),
		// 			ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/OutboundNetworkDependenciesEndpoints/CertificateAuthority"),
		// 			Properties: &armkusto.OutboundNetworkDependenciesEndpointProperties{
		// 				Category: to.Ptr("Certificate Authority"),
		// 				Endpoints: []*armkusto.EndpointDependency{
		// 					{
		// 						DomainName: to.Ptr("ocsp.msocsp.com"),
		// 						EndpointDetails: []*armkusto.EndpointDetail{
		// 							{
		// 								Port: to.Ptr[int32](80),
		// 						}},
		// 					},
		// 					{
		// 						DomainName: to.Ptr("ocsp.digicert.com"),
		// 						EndpointDetails: []*armkusto.EndpointDetail{
		// 							{
		// 								Port: to.Ptr[int32](80),
		// 						}},
		// 					},
		// 					{
		// 						DomainName: to.Ptr("crl3.digicert.com"),
		// 						EndpointDetails: []*armkusto.EndpointDetail{
		// 							{
		// 								Port: to.Ptr[int32](80),
		// 						}},
		// 					},
		// 					{
		// 						DomainName: to.Ptr("crl.microsoft.com"),
		// 						EndpointDetails: []*armkusto.EndpointDetail{
		// 							{
		// 								Port: to.Ptr[int32](80),
		// 						}},
		// 					},
		// 					{
		// 						DomainName: to.Ptr("www.microsoft.com"),
		// 						EndpointDetails: []*armkusto.EndpointDetail{
		// 							{
		// 								Port: to.Ptr[int32](80),
		// 						}},
		// 				}},
		// 				ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("kustoCluster/AzureStorage"),
		// 			Type: to.Ptr("Microsoft.Kusto/Clusters/OutboundNetworkDependenciesEndpoints"),
		// 			ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/OutboundNetworkDependenciesEndpoints/AzureStorage"),
		// 			Properties: &armkusto.OutboundNetworkDependenciesEndpointProperties{
		// 				Category: to.Ptr("Azure Storage"),
		// 				Endpoints: []*armkusto.EndpointDependency{
		// 					{
		// 						DomainName: to.Ptr("clusterinternalsa.blob.core.windows.net"),
		// 						EndpointDetails: []*armkusto.EndpointDetail{
		// 							{
		// 								Port: to.Ptr[int32](443),
		// 						}},
		// 					},
		// 					{
		// 						DomainName: to.Ptr("clusterinternalsa.queue.core.windows.net"),
		// 						EndpointDetails: []*armkusto.EndpointDetail{
		// 							{
		// 								Port: to.Ptr[int32](443),
		// 						}},
		// 					},
		// 					{
		// 						DomainName: to.Ptr("clusterinternalsa.table.core.windows.net"),
		// 						EndpointDetails: []*armkusto.EndpointDetail{
		// 							{
		// 								Port: to.Ptr[int32](443),
		// 						}},
		// 				}},
		// 				ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*ClustersClient) NewListPager added in v0.4.0

NewListPager - Lists all Kusto clusters within a subscription.

Generated from API version 2022-12-29

  • options - ClustersClientListOptions contains the optional parameters for the ClustersClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewClustersClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ClusterListResult = armkusto.ClusterListResult{
		// 	Value: []*armkusto.Cluster{
		// 		{
		// 			Name: to.Ptr("kustoCluster"),
		// 			Type: to.Ptr("Microsoft.Kusto/Clusters"),
		// 			ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster"),
		// 			Location: to.Ptr("westus"),
		// 			Etag: to.Ptr("abcd123"),
		// 			Properties: &armkusto.ClusterProperties{
		// 				AllowedFqdnList: []*string{
		// 					to.Ptr("my-stroage.blob.core.windows.net")},
		// 					AllowedIPRangeList: []*string{
		// 					},
		// 					EnableAutoStop: to.Ptr(true),
		// 					EnableDiskEncryption: to.Ptr(false),
		// 					EnableStreamingIngest: to.Ptr(true),
		// 					EngineType: to.Ptr(armkusto.EngineTypeV3),
		// 					KeyVaultProperties: &armkusto.KeyVaultProperties{
		// 						KeyName: to.Ptr("keyName"),
		// 						KeyVaultURI: to.Ptr("https://dummy.keyvault.com"),
		// 						KeyVersion: to.Ptr("keyVersion"),
		// 					},
		// 					PrivateEndpointConnections: []*armkusto.PrivateEndpointConnection{
		// 						{
		// 							Name: to.Ptr("privateEndpointTest"),
		// 							Type: to.Ptr("Microsoft.Kusto/Clusters/PrivateEndpointConnections"),
		// 							ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/privateEndpointConnections/privateEndpointTest"),
		// 							Properties: &armkusto.PrivateEndpointConnectionProperties{
		// 								GroupID: to.Ptr("cluster"),
		// 								PrivateEndpoint: &armkusto.PrivateEndpointProperty{
		// 									ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/rg1Network/providers/Microsoft.Network/privateEndpoints/privateEndpointName"),
		// 								},
		// 								PrivateLinkServiceConnectionState: &armkusto.PrivateLinkServiceConnectionStateProperty{
		// 									Description: to.Ptr("Auto-approved"),
		// 									ActionsRequired: to.Ptr("None"),
		// 									Status: to.Ptr("Approved"),
		// 								},
		// 								ProvisioningState: to.Ptr("Succeeded"),
		// 							},
		// 					}},
		// 					ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded),
		// 					PublicIPType: to.Ptr(armkusto.PublicIPTypeDualStack),
		// 					PublicNetworkAccess: to.Ptr(armkusto.PublicNetworkAccessEnabled),
		// 					RestrictOutboundNetworkAccess: to.Ptr(armkusto.ClusterNetworkAccessFlagEnabled),
		// 				},
		// 				SKU: &armkusto.AzureSKU{
		// 					Name: to.Ptr(armkusto.AzureSKUNameStandardL16AsV3),
		// 					Capacity: to.Ptr[int32](2),
		// 					Tier: to.Ptr(armkusto.AzureSKUTierStandard),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("KustoClusterRPTest3"),
		// 				Type: to.Ptr("Microsoft.Kusto/Clusters"),
		// 				ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/KustoClusterRPTest3"),
		// 				Location: to.Ptr("westus"),
		// 				Etag: to.Ptr("abcd123"),
		// 				Properties: &armkusto.ClusterProperties{
		// 					AllowedIPRangeList: []*string{
		// 						to.Ptr("0.0.0.0/0")},
		// 						EnableDiskEncryption: to.Ptr(true),
		// 						EnableStreamingIngest: to.Ptr(true),
		// 						EngineType: to.Ptr(armkusto.EngineTypeV2),
		// 						PrivateEndpointConnections: []*armkusto.PrivateEndpointConnection{
		// 						},
		// 						ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded),
		// 						PublicIPType: to.Ptr(armkusto.PublicIPTypeIPv4),
		// 						PublicNetworkAccess: to.Ptr(armkusto.PublicNetworkAccessEnabled),
		// 						RestrictOutboundNetworkAccess: to.Ptr(armkusto.ClusterNetworkAccessFlagDisabled),
		// 					},
		// 					SKU: &armkusto.AzureSKU{
		// 						Name: to.Ptr(armkusto.AzureSKUNameStandardL16AsV3),
		// 						Capacity: to.Ptr[int32](2),
		// 						Tier: to.Ptr(armkusto.AzureSKUTierStandard),
		// 					},
		// 			}},
		// 		}
	}
}
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.

Generated from API version 2022-12-29

  • 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.NewListSKUsByResourcePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClustersListResourceSkus.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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewClustersClient().NewListSKUsByResourcePager("kustorptest", "kustoCluster", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ListResourceSKUsResult = armkusto.ListResourceSKUsResult{
		// 	Value: []*armkusto.AzureResourceSKU{
		// 		{
		// 			Capacity: &armkusto.AzureCapacity{
		// 				Default: to.Ptr[int32](2),
		// 				Maximum: to.Ptr[int32](100),
		// 				Minimum: to.Ptr[int32](2),
		// 				ScaleType: to.Ptr(armkusto.AzureScaleTypeAutomatic),
		// 			},
		// 			ResourceType: to.Ptr("clusters"),
		// 			SKU: &armkusto.AzureSKU{
		// 				Name: to.Ptr(armkusto.AzureSKUNameStandardL8SV3),
		// 				Tier: to.Ptr(armkusto.AzureSKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Capacity: &armkusto.AzureCapacity{
		// 				Default: to.Ptr[int32](2),
		// 				Maximum: to.Ptr[int32](100),
		// 				Minimum: to.Ptr[int32](2),
		// 				ScaleType: to.Ptr(armkusto.AzureScaleTypeAutomatic),
		// 			},
		// 			ResourceType: to.Ptr("clusters"),
		// 			SKU: &armkusto.AzureSKU{
		// 				Name: to.Ptr(armkusto.AzureSKUNameStandardL8AsV3),
		// 				Tier: to.Ptr(armkusto.AzureSKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Capacity: &armkusto.AzureCapacity{
		// 				Default: to.Ptr[int32](2),
		// 				Maximum: to.Ptr[int32](100),
		// 				Minimum: to.Ptr[int32](2),
		// 				ScaleType: to.Ptr(armkusto.AzureScaleTypeAutomatic),
		// 			},
		// 			ResourceType: to.Ptr("clusters"),
		// 			SKU: &armkusto.AzureSKU{
		// 				Name: to.Ptr(armkusto.AzureSKUNameStandardL16AsV3),
		// 				Tier: to.Ptr(armkusto.AzureSKUTierStandard),
		// 			},
		// 		},
		// 		{
		// 			Capacity: &armkusto.AzureCapacity{
		// 				Default: to.Ptr[int32](2),
		// 				Maximum: to.Ptr[int32](100),
		// 				Minimum: to.Ptr[int32](2),
		// 				ScaleType: to.Ptr(armkusto.AzureScaleTypeAutomatic),
		// 			},
		// 			ResourceType: to.Ptr("clusters"),
		// 			SKU: &armkusto.AzureSKU{
		// 				Name: to.Ptr(armkusto.AzureSKUNameStandardL16SV3),
		// 				Tier: to.Ptr(armkusto.AzureSKUTierStandard),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*ClustersClient) NewListSKUsPager added in v0.4.0

NewListSKUsPager - Lists eligible SKUs for Kusto resource provider.

Generated from API version 2022-12-29

  • options - ClustersClientListSKUsOptions contains the optional parameters for the ClustersClient.NewListSKUsPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoClustersListSkus.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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewClustersClient().NewListSKUsPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SKUDescriptionList = armkusto.SKUDescriptionList{
		// 	Value: []*armkusto.SKUDescription{
		// 		{
		// 			Name: to.Ptr("Standard_L8s_v3"),
		// 			LocationInfo: []*armkusto.SKULocationInfoItem{
		// 				{
		// 					Location: to.Ptr("West US"),
		// 					Zones: []*string{
		// 						to.Ptr("1"),
		// 						to.Ptr("2"),
		// 						to.Ptr("3")},
		// 					},
		// 					{
		// 						Location: to.Ptr("West Europe"),
		// 						Zones: []*string{
		// 						},
		// 				}},
		// 				Locations: []*string{
		// 					to.Ptr("West US"),
		// 					to.Ptr("West Europe")},
		// 					Tier: to.Ptr("Standard"),
		// 				},
		// 				{
		// 					Name: to.Ptr("Standard_L16s_v3"),
		// 					LocationInfo: []*armkusto.SKULocationInfoItem{
		// 						{
		// 							Location: to.Ptr("West US"),
		// 							Zones: []*string{
		// 								to.Ptr("1"),
		// 								to.Ptr("2"),
		// 								to.Ptr("3")},
		// 							},
		// 							{
		// 								Location: to.Ptr("West Europe"),
		// 								Zones: []*string{
		// 								},
		// 						}},
		// 						Locations: []*string{
		// 							to.Ptr("West US"),
		// 							to.Ptr("West Europe")},
		// 							Tier: to.Ptr("Standard"),
		// 						},
		// 						{
		// 							Name: to.Ptr("Standard_L8as_v3"),
		// 							LocationInfo: []*armkusto.SKULocationInfoItem{
		// 								{
		// 									Location: to.Ptr("West US"),
		// 									Zones: []*string{
		// 										to.Ptr("1"),
		// 										to.Ptr("2"),
		// 										to.Ptr("3")},
		// 									},
		// 									{
		// 										Location: to.Ptr("West Europe"),
		// 										Zones: []*string{
		// 										},
		// 								}},
		// 								Locations: []*string{
		// 									to.Ptr("West US"),
		// 									to.Ptr("West Europe")},
		// 									Tier: to.Ptr("Standard"),
		// 								},
		// 								{
		// 									Name: to.Ptr("Standard_L16as_v3"),
		// 									LocationInfo: []*armkusto.SKULocationInfoItem{
		// 										{
		// 											Location: to.Ptr("West US"),
		// 											Zones: []*string{
		// 												to.Ptr("1"),
		// 												to.Ptr("2"),
		// 												to.Ptr("3")},
		// 											},
		// 											{
		// 												Location: to.Ptr("West Europe"),
		// 												Zones: []*string{
		// 												},
		// 										}},
		// 										Locations: []*string{
		// 											to.Ptr("West US"),
		// 											to.Ptr("West Europe")},
		// 											Tier: to.Ptr("Standard"),
		// 									}},
		// 								}
	}
}
Output:

type ClustersClientAddLanguageExtensionsResponse added in v0.2.0

type ClustersClientAddLanguageExtensionsResponse struct {
}

ClustersClientAddLanguageExtensionsResponse contains the response from method ClustersClient.BeginAddLanguageExtensions.

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.BeginCreateOrUpdate.

type ClustersClientDeleteResponse added in v0.2.0

type ClustersClientDeleteResponse struct {
}

ClustersClientDeleteResponse contains the response from method ClustersClient.BeginDelete.

type ClustersClientDetachFollowerDatabasesResponse added in v0.2.0

type ClustersClientDetachFollowerDatabasesResponse struct {
}

ClustersClientDetachFollowerDatabasesResponse contains the response from method ClustersClient.BeginDetachFollowerDatabases.

type ClustersClientDiagnoseVirtualNetworkResponse added in v0.2.0

type ClustersClientDiagnoseVirtualNetworkResponse struct {
	DiagnoseVirtualNetworkResult
}

ClustersClientDiagnoseVirtualNetworkResponse contains the response from method ClustersClient.BeginDiagnoseVirtualNetwork.

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.NewListByResourceGroupPager method.

type ClustersClientListByResourceGroupResponse added in v0.2.0

type ClustersClientListByResourceGroupResponse struct {
	ClusterListResult
}

ClustersClientListByResourceGroupResponse contains the response from method ClustersClient.NewListByResourceGroupPager.

type ClustersClientListFollowerDatabasesOptions added in v0.2.0

type ClustersClientListFollowerDatabasesOptions struct {
}

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

type ClustersClientListFollowerDatabasesResponse added in v0.2.0

type ClustersClientListFollowerDatabasesResponse struct {
	FollowerDatabaseListResult
}

ClustersClientListFollowerDatabasesResponse contains the response from method ClustersClient.NewListFollowerDatabasesPager.

type ClustersClientListLanguageExtensionsOptions added in v0.2.0

type ClustersClientListLanguageExtensionsOptions struct {
}

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

type ClustersClientListLanguageExtensionsResponse added in v0.2.0

type ClustersClientListLanguageExtensionsResponse struct {
	LanguageExtensionsList
}

ClustersClientListLanguageExtensionsResponse contains the response from method ClustersClient.NewListLanguageExtensionsPager.

type ClustersClientListOptions added in v0.2.0

type ClustersClientListOptions struct {
}

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

type ClustersClientListOutboundNetworkDependenciesEndpointsOptions added in v0.2.0

type ClustersClientListOutboundNetworkDependenciesEndpointsOptions struct {
}

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

type ClustersClientListOutboundNetworkDependenciesEndpointsResponse added in v0.2.0

type ClustersClientListOutboundNetworkDependenciesEndpointsResponse struct {
	OutboundNetworkDependenciesEndpointListResult
}

ClustersClientListOutboundNetworkDependenciesEndpointsResponse contains the response from method ClustersClient.NewListOutboundNetworkDependenciesEndpointsPager.

type ClustersClientListResponse added in v0.2.0

type ClustersClientListResponse struct {
	ClusterListResult
}

ClustersClientListResponse contains the response from method ClustersClient.NewListPager.

type ClustersClientListSKUsByResourceOptions added in v0.2.0

type ClustersClientListSKUsByResourceOptions struct {
}

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

type ClustersClientListSKUsByResourceResponse added in v0.2.0

type ClustersClientListSKUsByResourceResponse struct {
	ListResourceSKUsResult
}

ClustersClientListSKUsByResourceResponse contains the response from method ClustersClient.NewListSKUsByResourcePager.

type ClustersClientListSKUsOptions added in v0.2.0

type ClustersClientListSKUsOptions struct {
}

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

type ClustersClientListSKUsResponse added in v0.2.0

type ClustersClientListSKUsResponse struct {
	SKUDescriptionList
}

ClustersClientListSKUsResponse contains the response from method ClustersClient.NewListSKUsPager.

type ClustersClientRemoveLanguageExtensionsResponse added in v0.2.0

type ClustersClientRemoveLanguageExtensionsResponse struct {
}

ClustersClientRemoveLanguageExtensionsResponse contains the response from method ClustersClient.BeginRemoveLanguageExtensions.

type ClustersClientStartResponse added in v0.2.0

type ClustersClientStartResponse struct {
}

ClustersClientStartResponse contains the response from method ClustersClient.BeginStart.

type ClustersClientStopResponse added in v0.2.0

type ClustersClientStopResponse struct {
}

ClustersClientStopResponse contains the response from method ClustersClient.BeginStop.

type ClustersClientUpdateResponse added in v0.2.0

type ClustersClientUpdateResponse struct {
	Cluster
}

ClustersClientUpdateResponse contains the response from method ClustersClient.BeginUpdate.

type ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties

type ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties struct {
	// READ-ONLY; The client id of user assigned identity.
	ClientID *string

	// READ-ONLY; The principal id of user assigned identity.
	PrincipalID *string
}

func (ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties) MarshalJSON added in v1.1.0

MarshalJSON implements the json.Marshaller interface for type ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties.

func (*ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties) UnmarshalJSON added in v1.1.0

UnmarshalJSON implements the json.Unmarshaller interface for type ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties.

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 CosmosDbDataConnection added in v1.2.0

type CosmosDbDataConnection struct {
	// REQUIRED; Kind of the endpoint for the data connection
	Kind *DataConnectionKind

	// Resource location.
	Location *string

	// The properties of the CosmosDb data connection.
	Properties *CosmosDbDataConnectionProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

CosmosDbDataConnection - Class representing a CosmosDb data connection.

func (*CosmosDbDataConnection) GetDataConnection added in v1.2.0

func (c *CosmosDbDataConnection) GetDataConnection() *DataConnection

GetDataConnection implements the DataConnectionClassification interface for type CosmosDbDataConnection.

func (CosmosDbDataConnection) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type CosmosDbDataConnection.

func (*CosmosDbDataConnection) UnmarshalJSON added in v1.2.0

func (c *CosmosDbDataConnection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CosmosDbDataConnection.

type CosmosDbDataConnectionProperties added in v1.2.0

type CosmosDbDataConnectionProperties struct {
	// REQUIRED; The resource ID of the Cosmos DB account used to create the data connection.
	CosmosDbAccountResourceID *string

	// REQUIRED; The name of an existing container in the Cosmos DB database.
	CosmosDbContainer *string

	// REQUIRED; The name of an existing database in the Cosmos DB account.
	CosmosDbDatabase *string

	// REQUIRED; The resource ID of a managed system or user-assigned identity. The identity is used to authenticate with Cosmos
	// DB.
	ManagedIdentityResourceID *string

	// REQUIRED; The case-sensitive name of the existing target table in your cluster. Retrieved data is ingested into this table.
	TableName *string

	// The name of an existing mapping rule to use when ingesting the retrieved data.
	MappingRuleName *string

	// Optional. If defined, the data connection retrieves Cosmos DB documents created or updated after the specified retrieval
	// start date.
	RetrievalStartDate *time.Time

	// READ-ONLY; The object ID of the managed identity resource.
	ManagedIdentityObjectID *string

	// READ-ONLY; The provisioned state of the resource.
	ProvisioningState *ProvisioningState
}

CosmosDbDataConnectionProperties - Class representing the Kusto CosmosDb data connection properties.

func (CosmosDbDataConnectionProperties) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type CosmosDbDataConnectionProperties.

func (*CosmosDbDataConnectionProperties) UnmarshalJSON added in v1.2.0

func (c *CosmosDbDataConnectionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CosmosDbDataConnectionProperties.

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

	// Resource location.
	Location *string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

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.

func (*DataConnection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DataConnection.

type DataConnectionCheckNameRequest

type DataConnectionCheckNameRequest struct {
	// REQUIRED; Data Connection name.
	Name *string

	// CONSTANT; The type of resource, Microsoft.Kusto/clusters/databases/dataConnections.
	// Field has constant value "Microsoft.Kusto/clusters/databases/dataConnections", any specified value is ignored.
	Type *string
}

DataConnectionCheckNameRequest - A data connection check name availability request.

func (DataConnectionCheckNameRequest) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type DataConnectionCheckNameRequest.

func (*DataConnectionCheckNameRequest) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type DataConnectionCheckNameRequest.

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: - *CosmosDbDataConnection, *DataConnection, *EventGridDataConnection, *EventHubDataConnection, *IotHubDataConnection

type DataConnectionKind

type DataConnectionKind string

DataConnectionKind - Kind of the endpoint for the data connection

const (
	DataConnectionKindCosmosDb  DataConnectionKind = "CosmosDb"
	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
}

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

	// The data connection properties to validate.
	Properties DataConnectionClassification
}

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
}

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.

func (*DataConnectionValidationListResult) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type DataConnectionValidationListResult.

type DataConnectionValidationResult

type DataConnectionValidationResult struct {
	// A message which indicates a problem in data connection validation.
	ErrorMessage *string
}

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

func (DataConnectionValidationResult) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type DataConnectionValidationResult.

func (*DataConnectionValidationResult) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type DataConnectionValidationResult.

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) (*runtime.Poller[DataConnectionsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates a data connection. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-12-29

  • 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 (KustoDataConnectionsCosmosDbCreateOrUpdate)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDataConnectionsCosmosDbCreateOrUpdate.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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDataConnectionsClient().BeginCreateOrUpdate(ctx, "kustorptest", "kustoCluster", "KustoDatabase1", "dataConnectionTest", &armkusto.CosmosDbDataConnection{
		Kind:     to.Ptr(armkusto.DataConnectionKindCosmosDb),
		Location: to.Ptr("westus"),
		Properties: &armkusto.CosmosDbDataConnectionProperties{
			CosmosDbAccountResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.DocumentDb/databaseAccounts/cosmosDbAccountTest1"),
			CosmosDbContainer:         to.Ptr("cosmosDbContainerTest"),
			CosmosDbDatabase:          to.Ptr("cosmosDbDatabaseTest"),
			ManagedIdentityResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/managedidentityTest1"),
			MappingRuleName:           to.Ptr("TestMapping"),
			RetrievalStartDate:        to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-07-29T12:00:00.6554616Z"); return t }()),
			TableName:                 to.Ptr("TestTable"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armkusto.DataConnectionsClientCreateOrUpdateResponse{
	// 	                            DataConnectionClassification: &armkusto.CosmosDbDataConnection{
	// 		Name: to.Ptr("kustoCluster/KustoDatabase1/dataConnectionTest"),
	// 		Type: to.Ptr("Microsoft.Kusto/Clusters/Databases/DataConnections"),
	// 		ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/Databases/KustoDatabase1/DataConnections/dataConnectionTest"),
	// 		Kind: to.Ptr(armkusto.DataConnectionKindCosmosDb),
	// 		Location: to.Ptr("westus"),
	// 		Properties: &armkusto.CosmosDbDataConnectionProperties{
	// 			CosmosDbAccountResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.DocumentDb/databaseAccounts/cosmosDbAccountTest1"),
	// 			CosmosDbContainer: to.Ptr("cosmosDbContainerTest"),
	// 			CosmosDbDatabase: to.Ptr("cosmosDbDatabaseTest"),
	// 			ManagedIdentityObjectID: to.Ptr("87654321-1234-1234-1234-123456789123"),
	// 			ManagedIdentityResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/managedidentityTest1"),
	// 			MappingRuleName: to.Ptr("TestMapping"),
	// 			RetrievalStartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-07-29T12:00:00.6554616Z"); return t}()),
	// 			TableName: to.Ptr("TestTable"),
	// 		},
	// 	},
	// 	                        }
}
Output:

Example (KustoDataConnectionsCreateOrUpdate)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDataConnectionsCreateOrUpdate.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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDataConnectionsClient().BeginCreateOrUpdate(ctx, "kustorptest", "kustoCluster", "KustoDatabase8", "dataConnectionTest", &armkusto.EventHubDataConnection{
		Kind:     to.Ptr(armkusto.DataConnectionKindEventHub),
		Location: to.Ptr("westus"),
		Properties: &armkusto.EventHubConnectionProperties{
			ConsumerGroup:             to.Ptr("testConsumerGroup1"),
			EventHubResourceID:        to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1"),
			ManagedIdentityResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/managedidentityTest1"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armkusto.DataConnectionsClientCreateOrUpdateResponse{
	// 	                            DataConnectionClassification: &armkusto.EventHubDataConnection{
	// 		Name: to.Ptr("kustoCluster/KustoDatabase8/dataConnectionTest"),
	// 		Type: to.Ptr("Microsoft.Kusto/Clusters/Databases/DataConnections"),
	// 		ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/Databases/KustoDatabase8/DataConnections/dataConnectionTest"),
	// 		Kind: to.Ptr(armkusto.DataConnectionKindEventHub),
	// 		Location: to.Ptr("westus"),
	// 		Properties: &armkusto.EventHubConnectionProperties{
	// 			Compression: to.Ptr(armkusto.CompressionNone),
	// 			ConsumerGroup: to.Ptr("testConsumerGroup1"),
	// 			EventHubResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1"),
	// 			ManagedIdentityResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/managedidentityTest1"),
	// 		},
	// 	},
	// 	                        }
}
Output:

Example (KustoDataConnectionsEventGridCreateOrUpdate)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDataConnectionsEventGridCreateOrUpdate.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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDataConnectionsClient().BeginCreateOrUpdate(ctx, "kustorptest", "kustoCluster", "KustoDatabase8", "dataConnectionTest", &armkusto.EventGridDataConnection{
		Kind:     to.Ptr(armkusto.DataConnectionKindEventGrid),
		Location: to.Ptr("westus"),
		Properties: &armkusto.EventGridConnectionProperties{
			BlobStorageEventType:      to.Ptr(armkusto.BlobStorageEventTypeMicrosoftStorageBlobCreated),
			ConsumerGroup:             to.Ptr("$Default"),
			DataFormat:                to.Ptr(armkusto.EventGridDataFormatJSON),
			DatabaseRouting:           to.Ptr(armkusto.DatabaseRoutingSingle),
			EventGridResourceID:       to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Storage/storageAccounts/teststorageaccount/providers/Microsoft.EventGrid/eventSubscriptions/eventSubscriptionTest"),
			EventHubResourceID:        to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest2"),
			IgnoreFirstRecord:         to.Ptr(false),
			ManagedIdentityResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/managedidentityTest1"),
			MappingRuleName:           to.Ptr("TestMapping"),
			StorageAccountResourceID:  to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Storage/storageAccounts/teststorageaccount"),
			TableName:                 to.Ptr("TestTable"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armkusto.DataConnectionsClientCreateOrUpdateResponse{
	// 	                            DataConnectionClassification: &armkusto.EventGridDataConnection{
	// 		Name: to.Ptr("kustoCluster/KustoDatabase8/dataConnectionTest"),
	// 		Type: to.Ptr("Microsoft.Kusto/Clusters/Databases/DataConnections"),
	// 		ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/Databases/KustoDatabase8/DataConnections/KustoDataConnection9"),
	// 		Kind: to.Ptr(armkusto.DataConnectionKindEventGrid),
	// 		Location: to.Ptr("westus"),
	// 		Properties: &armkusto.EventGridConnectionProperties{
	// 			BlobStorageEventType: to.Ptr(armkusto.BlobStorageEventTypeMicrosoftStorageBlobCreated),
	// 			ConsumerGroup: to.Ptr("$Default"),
	// 			DataFormat: to.Ptr(armkusto.EventGridDataFormatJSON),
	// 			DatabaseRouting: to.Ptr(armkusto.DatabaseRoutingSingle),
	// 			EventGridResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Storage/storageAccounts/teststorageaccount/providers/Microsoft.EventGrid/eventSubscriptions/eventSubscriptionTest"),
	// 			EventHubResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest2"),
	// 			IgnoreFirstRecord: to.Ptr(false),
	// 			ManagedIdentityObjectID: to.Ptr("87654321-1234-1234-1234-123456789123"),
	// 			ManagedIdentityResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/managedidentityTest1"),
	// 			MappingRuleName: to.Ptr("TestMapping"),
	// 			StorageAccountResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Storage/storageAccounts/teststorageaccount"),
	// 			TableName: to.Ptr("TestTable"),
	// 		},
	// 	},
	// 	                        }
}
Output:

func (*DataConnectionsClient) BeginDataConnectionValidation

BeginDataConnectionValidation - Checks that the data connection parameters are valid. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-12-29

  • 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 (KustoDataConnectionEventGridValidation)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDataConnectionEventGridValidationAsync.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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDataConnectionsClient().BeginDataConnectionValidation(ctx, "kustorptest", "kustoCluster", "KustoDatabase8", armkusto.DataConnectionValidation{
		DataConnectionName: to.Ptr("dataConnectionTest"),
		Properties: &armkusto.EventGridDataConnection{
			Kind: to.Ptr(armkusto.DataConnectionKindEventGrid),
			Properties: &armkusto.EventGridConnectionProperties{
				BlobStorageEventType:      to.Ptr(armkusto.BlobStorageEventTypeMicrosoftStorageBlobCreated),
				ConsumerGroup:             to.Ptr("$Default"),
				DataFormat:                to.Ptr(armkusto.EventGridDataFormatJSON),
				DatabaseRouting:           to.Ptr(armkusto.DatabaseRoutingSingle),
				EventGridResourceID:       to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Storage/storageAccounts/teststorageaccount/providers/Microsoft.EventGrid/eventSubscriptions/eventSubscriptionTest"),
				EventHubResourceID:        to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1"),
				IgnoreFirstRecord:         to.Ptr(false),
				ManagedIdentityResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/managedidentityTest1"),
				MappingRuleName:           to.Ptr("TestMapping"),
				StorageAccountResourceID:  to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Storage/storageAccounts/teststorageaccount"),
				TableName:                 to.Ptr("TestTable"),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DataConnectionValidationListResult = armkusto.DataConnectionValidationListResult{
	// }
}
Output:

Example (KustoDataConnectionValidation)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDataConnectionValidationAsync.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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDataConnectionsClient().BeginDataConnectionValidation(ctx, "kustorptest", "kustoCluster", "KustoDatabase8", armkusto.DataConnectionValidation{
		DataConnectionName: to.Ptr("dataConnectionTest"),
		Properties: &armkusto.EventHubDataConnection{
			Kind: to.Ptr(armkusto.DataConnectionKindEventHub),
			Properties: &armkusto.EventHubConnectionProperties{
				Compression:               to.Ptr(armkusto.CompressionNone),
				ConsumerGroup:             to.Ptr("testConsumerGroup1"),
				DataFormat:                to.Ptr(armkusto.EventHubDataFormatJSON),
				EventHubResourceID:        to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1"),
				ManagedIdentityResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/managedidentityTest1"),
				MappingRuleName:           to.Ptr("TestMapping"),
				TableName:                 to.Ptr("TestTable"),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DataConnectionValidationListResult = armkusto.DataConnectionValidationListResult{
	// }
}
Output:

func (*DataConnectionsClient) BeginDelete

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

BeginDelete - Deletes the data connection with the given name. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-12-29

  • 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/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDataConnectionsDelete.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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDataConnectionsClient().BeginDelete(ctx, "kustorptest", "kustoCluster", "KustoDatabase8", "dataConnectionTest", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*DataConnectionsClient) BeginUpdate

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

BeginUpdate - Updates a data connection. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-12-29

  • 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 (KustoDataConnectionsCosmosDbUpdate)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDataConnectionsCosmosDbUpdate.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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDataConnectionsClient().BeginUpdate(ctx, "kustorptest", "kustoCluster", "KustoDatabase1", "dataConnectionTest", &armkusto.CosmosDbDataConnection{
		Kind:     to.Ptr(armkusto.DataConnectionKindCosmosDb),
		Location: to.Ptr("westus"),
		Properties: &armkusto.CosmosDbDataConnectionProperties{
			CosmosDbAccountResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.DocumentDb/databaseAccounts/cosmosDbAccountTest1"),
			CosmosDbContainer:         to.Ptr("cosmosDbContainerTest"),
			CosmosDbDatabase:          to.Ptr("cosmosDbDatabaseTest"),
			ManagedIdentityResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/managedidentityTest1"),
			MappingRuleName:           to.Ptr("TestMapping"),
			RetrievalStartDate:        to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-07-29T12:00:00.6554616Z"); return t }()),
			TableName:                 to.Ptr("TestTable"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armkusto.DataConnectionsClientUpdateResponse{
	// 	                            DataConnectionClassification: &armkusto.CosmosDbDataConnection{
	// 		Name: to.Ptr("kustoCluster/KustoDatabase1/dataConnectionTest"),
	// 		Type: to.Ptr("Microsoft.Kusto/Clusters/Databases/DataConnections"),
	// 		ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/Databases/KustoDatabase1/DataConnections/dataConnectionTest"),
	// 		Kind: to.Ptr(armkusto.DataConnectionKindCosmosDb),
	// 		Location: to.Ptr("westus"),
	// 		Properties: &armkusto.CosmosDbDataConnectionProperties{
	// 			CosmosDbAccountResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.DocumentDb/databaseAccounts/cosmosDbAccountTest1"),
	// 			CosmosDbContainer: to.Ptr("cosmosDbContainerTest"),
	// 			CosmosDbDatabase: to.Ptr("cosmosDbDatabaseTest"),
	// 			ManagedIdentityObjectID: to.Ptr("87654321-1234-1234-1234-123456789123"),
	// 			ManagedIdentityResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/managedidentityTest1"),
	// 			MappingRuleName: to.Ptr("TestMapping"),
	// 			RetrievalStartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-07-29T12:00:00.6554616Z"); return t}()),
	// 			TableName: to.Ptr("TestTable"),
	// 		},
	// 	},
	// 	                        }
}
Output:

Example (KustoDataConnectionsEventGridUpdate)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDataConnectionsEventGridUpdate.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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDataConnectionsClient().BeginUpdate(ctx, "kustorptest", "kustoCluster", "KustoDatabase8", "dataConnectionTest", &armkusto.EventGridDataConnection{
		Kind:     to.Ptr(armkusto.DataConnectionKindEventGrid),
		Location: to.Ptr("westus"),
		Properties: &armkusto.EventGridConnectionProperties{
			BlobStorageEventType:      to.Ptr(armkusto.BlobStorageEventTypeMicrosoftStorageBlobCreated),
			ConsumerGroup:             to.Ptr("$Default"),
			DataFormat:                to.Ptr(armkusto.EventGridDataFormatJSON),
			DatabaseRouting:           to.Ptr(armkusto.DatabaseRoutingSingle),
			EventGridResourceID:       to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Storage/storageAccounts/teststorageaccount/providers/Microsoft.EventGrid/eventSubscriptions/eventSubscriptionTest"),
			EventHubResourceID:        to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest2"),
			IgnoreFirstRecord:         to.Ptr(false),
			ManagedIdentityResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/managedidentityTest1"),
			MappingRuleName:           to.Ptr("TestMapping"),
			StorageAccountResourceID:  to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Storage/storageAccounts/teststorageaccount"),
			TableName:                 to.Ptr("TestTable"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armkusto.DataConnectionsClientUpdateResponse{
	// 	                            DataConnectionClassification: &armkusto.EventGridDataConnection{
	// 		Name: to.Ptr("kustoCluster/KustoDatabase8/dataConnectionTest"),
	// 		Type: to.Ptr("Microsoft.Kusto/Clusters/Databases/DataConnections"),
	// 		ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/Databases/KustoDatabase8/DataConnections/KustoDataConnection9"),
	// 		Kind: to.Ptr(armkusto.DataConnectionKindEventGrid),
	// 		Location: to.Ptr("westus"),
	// 		Properties: &armkusto.EventGridConnectionProperties{
	// 			BlobStorageEventType: to.Ptr(armkusto.BlobStorageEventTypeMicrosoftStorageBlobCreated),
	// 			ConsumerGroup: to.Ptr("$Default"),
	// 			DataFormat: to.Ptr(armkusto.EventGridDataFormatJSON),
	// 			DatabaseRouting: to.Ptr(armkusto.DatabaseRoutingSingle),
	// 			EventGridResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Storage/storageAccounts/teststorageaccount/providers/Microsoft.EventGrid/eventSubscriptions/eventSubscriptionTest"),
	// 			EventHubResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest2"),
	// 			IgnoreFirstRecord: to.Ptr(false),
	// 			ManagedIdentityObjectID: to.Ptr("87654321-1234-1234-1234-123456789123"),
	// 			ManagedIdentityResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/managedidentityTest1"),
	// 			MappingRuleName: to.Ptr("TestMapping"),
	// 			StorageAccountResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Storage/storageAccounts/teststorageaccount"),
	// 			TableName: to.Ptr("TestTable"),
	// 		},
	// 	},
	// 	                        }
}
Output:

Example (KustoDataConnectionsUpdate)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDataConnectionsUpdate.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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDataConnectionsClient().BeginUpdate(ctx, "kustorptest", "kustoCluster", "KustoDatabase8", "dataConnectionTest", &armkusto.EventHubDataConnection{
		Kind:     to.Ptr(armkusto.DataConnectionKindEventHub),
		Location: to.Ptr("westus"),
		Properties: &armkusto.EventHubConnectionProperties{
			ConsumerGroup:             to.Ptr("testConsumerGroup1"),
			EventHubResourceID:        to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1"),
			ManagedIdentityResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/managedidentityTest1"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armkusto.DataConnectionsClientUpdateResponse{
	// 	                            DataConnectionClassification: &armkusto.EventHubDataConnection{
	// 		Name: to.Ptr("kustoCluster/KustoDatabase8/dataConnectionTest"),
	// 		Type: to.Ptr("Microsoft.Kusto/Clusters/Databases/DataConnections"),
	// 		ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/Databases/KustoDatabase8/DataConnections/dataConnectionTest"),
	// 		Kind: to.Ptr(armkusto.DataConnectionKindEventHub),
	// 		Location: to.Ptr("westus"),
	// 		Properties: &armkusto.EventHubConnectionProperties{
	// 			Compression: to.Ptr(armkusto.CompressionNone),
	// 			ConsumerGroup: to.Ptr("testConsumerGroup1"),
	// 			EventHubResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1"),
	// 			ManagedIdentityResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/managedidentityTest1"),
	// 		},
	// 	},
	// 	                        }
}
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.

Generated from API version 2022-12-29

  • 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/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDataConnectionsClient().CheckNameAvailability(ctx, "kustorptest", "kustoCluster", "KustoDatabase8", armkusto.DataConnectionCheckNameRequest{
		Name: to.Ptr("DataConnections8"),
		Type: to.Ptr("Microsoft.Kusto/clusters/databases/dataConnections"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CheckNameResult = armkusto.CheckNameResult{
	// 	Name: to.Ptr("DataConnections8"),
	// 	Message: to.Ptr("Name 'DataConnections8' is already taken. Please specify a different name."),
	// 	NameAvailable: to.Ptr(false),
	// 	Reason: to.Ptr(armkusto.ReasonAlreadyExists),
	// }
}
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.

Generated from API version 2022-12-29

  • 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 (KustoDataConnectionsCosmosDbGet)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDataConnectionsCosmosDbGet.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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDataConnectionsClient().Get(ctx, "kustorptest", "kustoCluster", "KustoDatabase1", "dataConnectionTest", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armkusto.DataConnectionsClientGetResponse{
	// 	                            DataConnectionClassification: &armkusto.CosmosDbDataConnection{
	// 		Name: to.Ptr("kustoCluster/KustoDatabase1/KustoDataConnection1"),
	// 		Type: to.Ptr("Microsoft.Kusto/Clusters/Databases/DataConnections"),
	// 		ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/Databases/KustoDatabase1/DataConnections/KustoDataConnection1"),
	// 		Kind: to.Ptr(armkusto.DataConnectionKindCosmosDb),
	// 		Location: to.Ptr("westus"),
	// 		Properties: &armkusto.CosmosDbDataConnectionProperties{
	// 			CosmosDbAccountResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.DocumentDb/databaseAccounts/cosmosDbAccountTest1"),
	// 			CosmosDbContainer: to.Ptr("cosmosDbContainerTest"),
	// 			CosmosDbDatabase: to.Ptr("cosmosDbDatabaseTest"),
	// 			ManagedIdentityObjectID: to.Ptr("87654321-1234-1234-1234-123456789123"),
	// 			ManagedIdentityResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/managedidentityTest1"),
	// 			MappingRuleName: to.Ptr("TestMapping"),
	// 			ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded),
	// 			RetrievalStartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-07-29T12:00:00.6554616Z"); return t}()),
	// 			TableName: to.Ptr("TestTable"),
	// 		},
	// 	},
	// 	                        }
}
Output:

Example (KustoDataConnectionsEventGridGet)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDataConnectionsClient().Get(ctx, "kustorptest", "kustoCluster", "KustoDatabase8", "dataConnectionTest", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armkusto.DataConnectionsClientGetResponse{
	// 	                            DataConnectionClassification: &armkusto.EventGridDataConnection{
	// 		Name: to.Ptr("kustoCluster/KustoDatabase8/dataConnectionTest"),
	// 		Type: to.Ptr("Microsoft.Kusto/Clusters/Databases/DataConnections"),
	// 		ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/Databases/KustoDatabase8/DataConnections/KustoDataConnection9"),
	// 		Kind: to.Ptr(armkusto.DataConnectionKindEventGrid),
	// 		Location: to.Ptr("westus"),
	// 		Properties: &armkusto.EventGridConnectionProperties{
	// 			BlobStorageEventType: to.Ptr(armkusto.BlobStorageEventTypeMicrosoftStorageBlobCreated),
	// 			ConsumerGroup: to.Ptr("$Default"),
	// 			DataFormat: to.Ptr(armkusto.EventGridDataFormatJSON),
	// 			DatabaseRouting: to.Ptr(armkusto.DatabaseRoutingSingle),
	// 			EventGridResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Storage/storageAccounts/teststorageaccount/providers/Microsoft.EventGrid/eventSubscriptions/eventSubscriptionTest"),
	// 			EventHubResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest2"),
	// 			IgnoreFirstRecord: to.Ptr(false),
	// 			ManagedIdentityObjectID: to.Ptr("87654321-1234-1234-1234-123456789123"),
	// 			ManagedIdentityResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/managedidentityTest1"),
	// 			MappingRuleName: to.Ptr("TestMapping"),
	// 			ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded),
	// 			StorageAccountResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Storage/storageAccounts/teststorageaccount"),
	// 			TableName: to.Ptr("TestTable"),
	// 		},
	// 	},
	// 	                        }
}
Output:

Example (KustoDataConnectionsGet)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDataConnectionsGet.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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDataConnectionsClient().Get(ctx, "kustorptest", "kustoCluster", "KustoDatabase8", "dataConnectionTest", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armkusto.DataConnectionsClientGetResponse{
	// 	                            DataConnectionClassification: &armkusto.EventHubDataConnection{
	// 		Name: to.Ptr("kustoCluster/KustoDatabase8/dataConnectionTest"),
	// 		Type: to.Ptr("Microsoft.Kusto/Clusters/Databases/DataConnections"),
	// 		ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/Databases/KustoDatabase8/DataConnections/dataConnectionTest"),
	// 		Kind: to.Ptr(armkusto.DataConnectionKindEventHub),
	// 		Location: to.Ptr("westus"),
	// 		Properties: &armkusto.EventHubConnectionProperties{
	// 			Compression: to.Ptr(armkusto.CompressionNone),
	// 			ConsumerGroup: to.Ptr("$Default"),
	// 			DataFormat: to.Ptr(armkusto.EventHubDataFormatJSON),
	// 			DatabaseRouting: to.Ptr(armkusto.DatabaseRoutingSingle),
	// 			EventHubResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1"),
	// 			EventSystemProperties: []*string{
	// 			},
	// 			ManagedIdentityObjectID: to.Ptr("87654321-1234-1234-1234-123456789123"),
	// 			ManagedIdentityResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/managedidentityTest1"),
	// 			MappingRuleName: to.Ptr("TestMapping"),
	// 			ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded),
	// 			RetrievalStartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-07-29T12:00:00.6554616Z"); return t}()),
	// 			TableName: to.Ptr("TestTable"),
	// 		},
	// 	},
	// 	                        }
}
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.

Generated from API version 2022-12-29

  • 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.NewListByDatabasePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDataConnectionsClient().NewListByDatabasePager("kustorptest", "kustoCluster", "KustoDatabase8", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.DataConnectionListResult = armkusto.DataConnectionListResult{
		// 	Value: []armkusto.DataConnectionClassification{
		// 		&armkusto.EventHubDataConnection{
		// 			Name: to.Ptr("kustoCluster/KustoDatabase8/KustoDataConnection1"),
		// 			Type: to.Ptr("Microsoft.Kusto/Clusters/Databases/DataConnections"),
		// 			ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/Databases/KustoDatabase8/DataConnections/KustoDataConnection1"),
		// 			Kind: to.Ptr(armkusto.DataConnectionKindEventHub),
		// 			Location: to.Ptr("westus"),
		// 			Properties: &armkusto.EventHubConnectionProperties{
		// 				Compression: to.Ptr(armkusto.CompressionNone),
		// 				ConsumerGroup: to.Ptr("$Default"),
		// 				DataFormat: to.Ptr(armkusto.EventHubDataFormatJSON),
		// 				DatabaseRouting: to.Ptr(armkusto.DatabaseRoutingSingle),
		// 				EventHubResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1"),
		// 				EventSystemProperties: []*string{
		// 				},
		// 				ManagedIdentityObjectID: to.Ptr("87654321-1234-1234-1234-123456789123"),
		// 				ManagedIdentityResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/managedidentityTest1"),
		// 				MappingRuleName: to.Ptr("TestMapping"),
		// 				ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded),
		// 				RetrievalStartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-07-29T12:00:00.6554616Z"); return t}()),
		// 				TableName: to.Ptr("TestTable"),
		// 			},
		// 		},
		// 		&armkusto.EventGridDataConnection{
		// 			Name: to.Ptr("kustoCluster/KustoDatabase8/KustoDataConnection2"),
		// 			Type: to.Ptr("Microsoft.Kusto/Clusters/Databases/DataConnections"),
		// 			ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/Databases/KustoDatabase8/DataConnections/KustoDataConnection2"),
		// 			Kind: to.Ptr(armkusto.DataConnectionKindEventGrid),
		// 			Location: to.Ptr("westus"),
		// 			Properties: &armkusto.EventGridConnectionProperties{
		// 				BlobStorageEventType: to.Ptr(armkusto.BlobStorageEventTypeMicrosoftStorageBlobCreated),
		// 				ConsumerGroup: to.Ptr("$Default"),
		// 				DataFormat: to.Ptr(armkusto.EventGridDataFormatJSON),
		// 				DatabaseRouting: to.Ptr(armkusto.DatabaseRoutingSingle),
		// 				EventGridResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Storage/storageAccounts/teststorageaccount/providers/Microsoft.EventGrid/eventSubscriptions/eventSubscriptionTest"),
		// 				EventHubResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest2"),
		// 				IgnoreFirstRecord: to.Ptr(false),
		// 				ManagedIdentityObjectID: to.Ptr("87654321-1234-1234-1234-123456789123"),
		// 				ManagedIdentityResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/managedidentityTest1"),
		// 				MappingRuleName: to.Ptr("TestMapping"),
		// 				ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded),
		// 				StorageAccountResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Storage/storageAccounts/teststorageaccount"),
		// 				TableName: to.Ptr("TestTable"),
		// 			},
		// 		},
		// 		&armkusto.CosmosDbDataConnection{
		// 			Name: to.Ptr("kustoCluster/KustoDatabase8/KustoDataConnection3"),
		// 			Type: to.Ptr("Microsoft.Kusto/Clusters/Databases/DataConnections"),
		// 			ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/Databases/KustoDatabase8/DataConnections/KustoDataConnection3"),
		// 			Kind: to.Ptr(armkusto.DataConnectionKindCosmosDb),
		// 			Location: to.Ptr("westus"),
		// 			Properties: &armkusto.CosmosDbDataConnectionProperties{
		// 				CosmosDbAccountResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.DocumentDb/databaseAccounts/cosmosDbAccountTest1"),
		// 				CosmosDbContainer: to.Ptr("cosmosDbContainerTest"),
		// 				CosmosDbDatabase: to.Ptr("cosmosDbDatabaseTest"),
		// 				ManagedIdentityObjectID: to.Ptr("87654321-1234-1234-1234-123456789123"),
		// 				ManagedIdentityResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/managedidentityTest1"),
		// 				MappingRuleName: to.Ptr("TestMapping"),
		// 				ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded),
		// 				RetrievalStartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-07-29T12:00:00.6554616Z"); return t}()),
		// 				TableName: to.Ptr("TestTable"),
		// 			},
		// 	}},
		// }
	}
}
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.BeginCreateOrUpdate.

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.BeginDataConnectionValidation.

type DataConnectionsClientDeleteResponse added in v0.2.0

type DataConnectionsClientDeleteResponse struct {
}

DataConnectionsClientDeleteResponse contains the response from method DataConnectionsClient.BeginDelete.

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.NewListByDatabasePager method.

type DataConnectionsClientListByDatabaseResponse added in v0.2.0

type DataConnectionsClientListByDatabaseResponse struct {
	DataConnectionListResult
}

DataConnectionsClientListByDatabaseResponse contains the response from method DataConnectionsClient.NewListByDatabasePager.

type DataConnectionsClientUpdateResponse added in v0.2.0

type DataConnectionsClientUpdateResponse struct {
	DataConnectionClassification
}

DataConnectionsClientUpdateResponse contains the response from method DataConnectionsClient.BeginUpdate.

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

	// Resource location.
	Location *string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

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.

func (*Database) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller 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
}

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

	// REQUIRED; Database principal role.
	Role *DatabasePrincipalRole

	// REQUIRED; Database principal type.
	Type *DatabasePrincipalType

	// Application id - relevant only for application principal type.
	AppID *string

	// Database principal email if exists.
	Email *string

	// Database principal fully qualified name.
	Fqn *string

	// READ-ONLY; The tenant name of the principal
	TenantName *string
}

DatabasePrincipal - A class representing database principal entity.

func (DatabasePrincipal) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type DatabasePrincipal.

func (*DatabasePrincipal) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type DatabasePrincipal.

type DatabasePrincipalAssignment

type DatabasePrincipalAssignment struct {
	// The database principal.
	Properties *DatabasePrincipalProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

DatabasePrincipalAssignment - Class representing a database principal assignment.

func (DatabasePrincipalAssignment) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DatabasePrincipalAssignment.

func (*DatabasePrincipalAssignment) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DatabasePrincipalAssignment.

type DatabasePrincipalAssignmentCheckNameRequest

type DatabasePrincipalAssignmentCheckNameRequest struct {
	// REQUIRED; Principal Assignment resource name.
	Name *string

	// CONSTANT; The type of resource, Microsoft.Kusto/clusters/databases/principalAssignments.
	// Field has constant value "Microsoft.Kusto/clusters/databases/principalAssignments", any specified value is ignored.
	Type *string
}

DatabasePrincipalAssignmentCheckNameRequest - A principal assignment check name availability request.

func (DatabasePrincipalAssignmentCheckNameRequest) MarshalJSON added in v1.1.0

MarshalJSON implements the json.Marshaller interface for type DatabasePrincipalAssignmentCheckNameRequest.

func (*DatabasePrincipalAssignmentCheckNameRequest) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type DatabasePrincipalAssignmentCheckNameRequest.

type DatabasePrincipalAssignmentListResult

type DatabasePrincipalAssignmentListResult struct {
	// The list of Kusto database principal assignments.
	Value []*DatabasePrincipalAssignment
}

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.

func (*DatabasePrincipalAssignmentListResult) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller 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.

Generated from API version 2022-12-29

  • 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/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDatabasePrincipalAssignmentsCreateOrUpdate.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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDatabasePrincipalAssignmentsClient().BeginCreateOrUpdate(ctx, "kustorptest", "kustoCluster", "Kustodatabase8", "kustoprincipal1", armkusto.DatabasePrincipalAssignment{
		Properties: &armkusto.DatabasePrincipalProperties{
			PrincipalID:   to.Ptr("87654321-1234-1234-1234-123456789123"),
			PrincipalType: to.Ptr(armkusto.PrincipalTypeApp),
			Role:          to.Ptr(armkusto.DatabasePrincipalRoleAdmin),
			TenantID:      to.Ptr("12345678-1234-1234-1234-123456789123"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DatabasePrincipalAssignment = armkusto.DatabasePrincipalAssignment{
	// 	Name: to.Ptr("kustoCluster/Kustodatabase8/kustoprincipal1"),
	// 	Type: to.Ptr("Microsoft.Kusto/Clusters/Databases/PrincipalAssignments"),
	// 	ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/Databases/Kustodatabase8/PrincipalAssignments/kustoprincipal1"),
	// 	Properties: &armkusto.DatabasePrincipalProperties{
	// 		AADObjectID: to.Ptr("98765432-1234-1234-1234-123456789123"),
	// 		PrincipalID: to.Ptr("87654321-1234-1234-1234-123456789123"),
	// 		PrincipalName: to.Ptr("TestApp"),
	// 		PrincipalType: to.Ptr(armkusto.PrincipalTypeApp),
	// 		ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded),
	// 		Role: to.Ptr(armkusto.DatabasePrincipalRoleAdmin),
	// 		TenantID: to.Ptr("12345678-1234-1234-1234-123456789123"),
	// 		TenantName: to.Ptr("tenantName"),
	// 	},
	// }
}
Output:

func (*DatabasePrincipalAssignmentsClient) BeginDelete

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

BeginDelete - Deletes a Kusto principalAssignment. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-12-29

  • 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/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDatabasePrincipalAssignmentsDelete.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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDatabasePrincipalAssignmentsClient().BeginDelete(ctx, "kustorptest", "kustoCluster", "Kustodatabase8", "kustoprincipal1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
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.

Generated from API version 2022-12-29

  • 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/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDatabasePrincipalAssignmentsClient().CheckNameAvailability(ctx, "kustorptest", "kustoCluster", "Kustodatabase8", armkusto.DatabasePrincipalAssignmentCheckNameRequest{
		Name: to.Ptr("kustoprincipal1"),
		Type: to.Ptr("Microsoft.Kusto/clusters/databases/principalAssignments"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CheckNameResult = armkusto.CheckNameResult{
	// 	Name: to.Ptr("kustoprincipal1"),
	// 	Message: to.Ptr("Name 'kustoprincipal1' is already taken. Please specify a different name"),
	// 	NameAvailable: to.Ptr(false),
	// }
}
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.

Generated from API version 2022-12-29

  • 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/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDatabasePrincipalAssignmentsClient().Get(ctx, "kustorptest", "kustoCluster", "Kustodatabase8", "kustoprincipal1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DatabasePrincipalAssignment = armkusto.DatabasePrincipalAssignment{
	// 	Name: to.Ptr("kustoCluster/Kustodatabase8/kustoprincipal1"),
	// 	Type: to.Ptr("Microsoft.Kusto/Clusters/Databases/PrincipalAssignments"),
	// 	ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/Databases/Kustodatabase8/PrincipalAssignments/kustoprincipal1"),
	// 	Properties: &armkusto.DatabasePrincipalProperties{
	// 		AADObjectID: to.Ptr("98765432-1234-1234-1234-123456789123"),
	// 		PrincipalID: to.Ptr("87654321-1234-1234-1234-123456789123"),
	// 		PrincipalName: to.Ptr("TestApp"),
	// 		PrincipalType: to.Ptr(armkusto.PrincipalTypeApp),
	// 		ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded),
	// 		Role: to.Ptr(armkusto.DatabasePrincipalRoleAdmin),
	// 		TenantID: to.Ptr("12345678-1234-1234-1234-123456789123"),
	// 		TenantName: to.Ptr("tenantName"),
	// 	},
	// }
}
Output:

func (*DatabasePrincipalAssignmentsClient) NewListPager added in v0.4.0

NewListPager - Lists all Kusto cluster database principalAssignments.

Generated from API version 2022-12-29

  • 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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDatabasePrincipalAssignmentsClient().NewListPager("kustorptest", "kustoCluster", "Kustodatabase8", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.DatabasePrincipalAssignmentListResult = armkusto.DatabasePrincipalAssignmentListResult{
		// 	Value: []*armkusto.DatabasePrincipalAssignment{
		// 		{
		// 			Name: to.Ptr("kustoCluster/Kustodatabase8/kustoprincipal1"),
		// 			Type: to.Ptr("Microsoft.Kusto/Clusters/Databases/PrincipalAssignments"),
		// 			ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/Databases/Kustodatabase8/PrincipalAssignments/kustoprincipal1"),
		// 			Properties: &armkusto.DatabasePrincipalProperties{
		// 				AADObjectID: to.Ptr("98765432-1234-1234-1234-123456789123"),
		// 				PrincipalID: to.Ptr("11223344-1234-1234-1234-123456789999"),
		// 				PrincipalName: to.Ptr("TestApp"),
		// 				PrincipalType: to.Ptr(armkusto.PrincipalTypeApp),
		// 				ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded),
		// 				Role: to.Ptr(armkusto.DatabasePrincipalRoleViewer),
		// 				TenantID: to.Ptr("12345678-1234-1234-1234-123456789123"),
		// 				TenantName: to.Ptr("tenantName"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("kustoCluster/Kustodatabase8/kustoprincipal2"),
		// 			Type: to.Ptr("Microsoft.Kusto/Clusters/Databases/PrincipalAssignments"),
		// 			ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/Databases/Kustodatabase8/PrincipalAssignments/kustoprincipal1"),
		// 			Properties: &armkusto.DatabasePrincipalProperties{
		// 				AADObjectID: to.Ptr("98765432-1234-1234-1234-123456789123"),
		// 				PrincipalID: to.Ptr("87654321-1234-1234-1234-123456789123"),
		// 				PrincipalName: to.Ptr("TestApp"),
		// 				PrincipalType: to.Ptr(armkusto.PrincipalTypeApp),
		// 				ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded),
		// 				Role: to.Ptr(armkusto.DatabasePrincipalRoleAdmin),
		// 				TenantID: to.Ptr("12345678-1234-1234-1234-123456789123"),
		// 				TenantName: to.Ptr("tenantName"),
		// 			},
		// 	}},
		// }
	}
}
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.BeginCreateOrUpdate.

type DatabasePrincipalAssignmentsClientDeleteResponse added in v0.2.0

type DatabasePrincipalAssignmentsClientDeleteResponse struct {
}

DatabasePrincipalAssignmentsClientDeleteResponse contains the response from method DatabasePrincipalAssignmentsClient.BeginDelete.

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.NewListPager method.

type DatabasePrincipalAssignmentsClientListResponse added in v0.2.0

type DatabasePrincipalAssignmentsClientListResponse struct {
	DatabasePrincipalAssignmentListResult
}

DatabasePrincipalAssignmentsClientListResponse contains the response from method DatabasePrincipalAssignmentsClient.NewListPager.

type DatabasePrincipalListRequest

type DatabasePrincipalListRequest struct {
	// The list of Kusto database principals.
	Value []*DatabasePrincipal
}

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.

func (*DatabasePrincipalListRequest) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type DatabasePrincipalListRequest.

type DatabasePrincipalListResult

type DatabasePrincipalListResult struct {
	// The list of Kusto database principals.
	Value []*DatabasePrincipal
}

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.

func (*DatabasePrincipalListResult) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller 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

	// REQUIRED; Principal type.
	PrincipalType *PrincipalType

	// REQUIRED; Database principal role.
	Role *DatabasePrincipalRole

	// The tenant id of the principal
	TenantID *string

	// READ-ONLY; The service principal object id in AAD (Azure active directory)
	AADObjectID *string

	// READ-ONLY; The principal name
	PrincipalName *string

	// READ-ONLY; The provisioned state of the resource.
	ProvisioningState *ProvisioningState

	// READ-ONLY; The tenant name of the principal
	TenantName *string
}

DatabasePrincipalProperties - A class representing database principal property.

func (DatabasePrincipalProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type DatabasePrincipalProperties.

func (*DatabasePrincipalProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type DatabasePrincipalProperties.

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 DatabaseShareOrigin added in v1.1.0

type DatabaseShareOrigin string

DatabaseShareOrigin - The origin of the following setup.

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

func PossibleDatabaseShareOriginValues added in v1.1.0

func PossibleDatabaseShareOriginValues() []DatabaseShareOrigin

PossibleDatabaseShareOriginValues returns the possible values for the DatabaseShareOrigin const type.

type DatabaseStatistics

type DatabaseStatistics struct {
	// The database size - the total size of compressed data and index in bytes.
	Size *float32
}

DatabaseStatistics - A class that contains database statistics information.

func (DatabaseStatistics) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type DatabaseStatistics.

func (*DatabaseStatistics) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseStatistics.

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.

Generated from API version 2022-12-29

  • 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/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDatabasesClient().AddPrincipals(ctx, "kustorptest", "kustoCluster", "KustoDatabase8", armkusto.DatabasePrincipalListRequest{
		Value: []*armkusto.DatabasePrincipal{
			{
				Name:  to.Ptr("Some User"),
				Type:  to.Ptr(armkusto.DatabasePrincipalTypeUser),
				AppID: to.Ptr(""),
				Email: to.Ptr("user@microsoft.com"),
				Fqn:   to.Ptr("aaduser=some_guid"),
				Role:  to.Ptr(armkusto.DatabasePrincipalRoleAdmin),
			},
			{
				Name:  to.Ptr("Kusto"),
				Type:  to.Ptr(armkusto.DatabasePrincipalTypeGroup),
				AppID: to.Ptr(""),
				Email: to.Ptr("kusto@microsoft.com"),
				Fqn:   to.Ptr("aadgroup=some_guid"),
				Role:  to.Ptr(armkusto.DatabasePrincipalRoleViewer),
			},
			{
				Name:  to.Ptr("SomeApp"),
				Type:  to.Ptr(armkusto.DatabasePrincipalTypeApp),
				AppID: to.Ptr("some_guid_app_id"),
				Email: to.Ptr(""),
				Fqn:   to.Ptr("aadapp=some_guid_app_id"),
				Role:  to.Ptr(armkusto.DatabasePrincipalRoleAdmin),
			}},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DatabasePrincipalListResult = armkusto.DatabasePrincipalListResult{
	// 	Value: []*armkusto.DatabasePrincipal{
	// 		{
	// 			Name: to.Ptr("Some User"),
	// 			Type: to.Ptr(armkusto.DatabasePrincipalTypeUser),
	// 			AppID: to.Ptr(""),
	// 			Email: to.Ptr("user@microsoft.com"),
	// 			Fqn: to.Ptr("aaduser=some_guid"),
	// 			Role: to.Ptr(armkusto.DatabasePrincipalRoleAdmin),
	// 		},
	// 		{
	// 			Name: to.Ptr("Kusto"),
	// 			Type: to.Ptr(armkusto.DatabasePrincipalTypeGroup),
	// 			AppID: to.Ptr(""),
	// 			Email: to.Ptr("kusto@microsoft.com"),
	// 			Fqn: to.Ptr("aadgroup=some_guid"),
	// 			Role: to.Ptr(armkusto.DatabasePrincipalRoleViewer),
	// 		},
	// 		{
	// 			Name: to.Ptr("SomeApp"),
	// 			Type: to.Ptr(armkusto.DatabasePrincipalTypeApp),
	// 			AppID: to.Ptr("some_guid_app_id"),
	// 			Email: to.Ptr(""),
	// 			Fqn: to.Ptr("aadapp=some_guid_app_id"),
	// 			Role: to.Ptr(armkusto.DatabasePrincipalRoleAdmin),
	// 	}},
	// }
}
Output:

func (*DatabasesClient) BeginCreateOrUpdate

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

BeginCreateOrUpdate - Creates or updates a database. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-12-29

  • 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 (KustoReadOnlyDatabaseUpdate)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDatabaseReadonlyUpdate.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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDatabasesClient().BeginCreateOrUpdate(ctx, "kustorptest", "kustoCluster", "kustoReadOnlyDatabase", &armkusto.ReadOnlyFollowingDatabase{
		Kind:     to.Ptr(armkusto.KindReadOnlyFollowing),
		Location: to.Ptr("westus"),
		Properties: &armkusto.ReadOnlyFollowingDatabaseProperties{
			HotCachePeriod: to.Ptr("P1D"),
		},
	}, &armkusto.DatabasesClientBeginCreateOrUpdateOptions{CallerRole: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armkusto.DatabasesClientCreateOrUpdateResponse{
	// 	                            DatabaseClassification: &armkusto.ReadOnlyFollowingDatabase{
	// 		Name: to.Ptr("kustoCluster/kustoReadOnlyDatabase"),
	// 		Type: to.Ptr("Microsoft.Kusto/Clusters/Databases"),
	// 		ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/Databases/kustoReadOnlyDatabase"),
	// 		Kind: to.Ptr(armkusto.KindReadOnlyFollowing),
	// 		Location: to.Ptr("westus"),
	// 	},
	// 	                        }
}
Output:

Example (KustoReadWriteDatabaseCreateOrUpdate)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDatabasesCreateOrUpdate.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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDatabasesClient().BeginCreateOrUpdate(ctx, "kustorptest", "kustoCluster", "KustoDatabase8", &armkusto.ReadWriteDatabase{
		Kind:     to.Ptr(armkusto.KindReadWrite),
		Location: to.Ptr("westus"),
		Properties: &armkusto.ReadWriteDatabaseProperties{
			SoftDeletePeriod: to.Ptr("P1D"),
		},
	}, &armkusto.DatabasesClientBeginCreateOrUpdateOptions{CallerRole: to.Ptr(armkusto.CallerRoleAdmin)})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armkusto.DatabasesClientCreateOrUpdateResponse{
	// 	                            DatabaseClassification: &armkusto.ReadWriteDatabase{
	// 		Name: to.Ptr("kustoCluster/KustoDatabase8"),
	// 		Type: to.Ptr("Microsoft.Kusto/Clusters/Databases"),
	// 		ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/Databases/KustoDatabase8"),
	// 		Kind: to.Ptr(armkusto.KindReadWrite),
	// 		Location: to.Ptr("westus"),
	// 	},
	// 	                        }
}
Output:

func (*DatabasesClient) BeginDelete

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

BeginDelete - Deletes the database with the given name. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-12-29

  • 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/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDatabasesDelete.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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDatabasesClient().BeginDelete(ctx, "kustorptest", "kustoCluster", "KustoDatabase8", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*DatabasesClient) BeginUpdate

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

BeginUpdate - Updates a database. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-12-29

  • 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/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/examples/KustoDatabasesUpdate.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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDatabasesClient().BeginUpdate(ctx, "kustorptest", "kustoCluster", "KustoDatabase8", &armkusto.ReadWriteDatabase{
		Kind: to.Ptr(armkusto.KindReadWrite),
		Properties: &armkusto.ReadWriteDatabaseProperties{
			HotCachePeriod: to.Ptr("P1D"),
		},
	}, &armkusto.DatabasesClientBeginUpdateOptions{CallerRole: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armkusto.DatabasesClientUpdateResponse{
	// 	                            DatabaseClassification: &armkusto.ReadWriteDatabase{
	// 		Name: to.Ptr("kustoCluster/KustoDatabase8"),
	// 		Type: to.Ptr("Microsoft.Kusto/Clusters/Databases"),
	// 		ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/Databases/KustoDatabase8"),
	// 		Kind: to.Ptr(armkusto.KindReadWrite),
	// 		Location: to.Ptr("westus"),
	// 		Properties: &armkusto.ReadWriteDatabaseProperties{
	// 			HotCachePeriod: to.Ptr("P1D"),
	// 			ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded),
	// 		},
	// 	},
	// 	                        }
}
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.

Generated from API version 2022-12-29

  • 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/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDatabasesClient().CheckNameAvailability(ctx, "kustorptest", "kustoCluster", armkusto.CheckNameRequest{
		Name: to.Ptr("database1"),
		Type: to.Ptr(armkusto.TypeMicrosoftKustoClustersDatabases),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CheckNameResult = armkusto.CheckNameResult{
	// 	Name: to.Ptr("database1"),
	// 	Message: to.Ptr("Name 'database1' is already taken. Please specify a different name"),
	// 	NameAvailable: to.Ptr(false),
	// }
}
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.

Generated from API version 2022-12-29

  • 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/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDatabasesClient().Get(ctx, "kustorptest", "kustoCluster", "KustoDatabase8", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armkusto.DatabasesClientGetResponse{
	// 	                            DatabaseClassification: &armkusto.ReadWriteDatabase{
	// 		Name: to.Ptr("kustoCluster/KustoDatabase8"),
	// 		Type: to.Ptr("Microsoft.Kusto/Clusters/Databases"),
	// 		ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/Databases/KustoDatabase8"),
	// 		Kind: to.Ptr(armkusto.KindReadWrite),
	// 		Location: to.Ptr("westus"),
	// 		Properties: &armkusto.ReadWriteDatabaseProperties{
	// 			ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded),
	// 			SoftDeletePeriod: to.Ptr("P1D"),
	// 		},
	// 	},
	// 	                        }
}
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.

Generated from API version 2022-12-29

  • 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.NewListByClusterPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDatabasesClient().NewListByClusterPager("kustorptest", "kustoCluster", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.DatabaseListResult = armkusto.DatabaseListResult{
		// 	Value: []armkusto.DatabaseClassification{
		// 		&armkusto.ReadWriteDatabase{
		// 			Name: to.Ptr("kustoCluster/KustoDatabase8"),
		// 			Type: to.Ptr("Microsoft.Kusto/Clusters/Databases"),
		// 			ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/Databases/KustoDatabase8"),
		// 			Kind: to.Ptr(armkusto.KindReadWrite),
		// 			Location: to.Ptr("westus"),
		// 			Properties: &armkusto.ReadWriteDatabaseProperties{
		// 				HotCachePeriod: to.Ptr("P1D"),
		// 				ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded),
		// 				SoftDeletePeriod: to.Ptr("P1D"),
		// 			},
		// 		},
		// 		&armkusto.ReadOnlyFollowingDatabase{
		// 			Name: to.Ptr("kustoCluster/KustoDatabase9"),
		// 			Type: to.Ptr("Microsoft.Kusto/Clusters/Databases"),
		// 			ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/Databases/KustoDatabase9"),
		// 			Kind: to.Ptr(armkusto.KindReadOnlyFollowing),
		// 			Location: to.Ptr("westus"),
		// 			Properties: &armkusto.ReadOnlyFollowingDatabaseProperties{
		// 				AttachedDatabaseConfigurationName: to.Ptr("attachedDatabaseConfigurationsTest"),
		// 				DatabaseShareOrigin: to.Ptr(armkusto.DatabaseShareOriginDirect),
		// 				HotCachePeriod: to.Ptr("P1D"),
		// 				LeaderClusterResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster2"),
		// 				OriginalDatabaseName: to.Ptr("KustoDatabase9"),
		// 				PrincipalsModificationKind: to.Ptr(armkusto.PrincipalsModificationKindUnion),
		// 				ProvisioningState: to.Ptr(armkusto.ProvisioningStateSucceeded),
		// 				SoftDeletePeriod: to.Ptr("P1D"),
		// 				Statistics: &armkusto.DatabaseStatistics{
		// 					Size: to.Ptr[float32](1024),
		// 				},
		// 				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")},
		// 										},
		// 									},
		// 							}},
		// 						}
	}
}
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.

Generated from API version 2022-12-29

  • 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.NewListPrincipalsPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDatabasesClient().NewListPrincipalsPager("kustorptest", "kustoCluster", "KustoDatabase8", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.DatabasePrincipalListResult = armkusto.DatabasePrincipalListResult{
		// 	Value: []*armkusto.DatabasePrincipal{
		// 		{
		// 			Name: to.Ptr("Some User"),
		// 			Type: to.Ptr(armkusto.DatabasePrincipalTypeUser),
		// 			AppID: to.Ptr(""),
		// 			Email: to.Ptr("user@microsoft.com"),
		// 			Fqn: to.Ptr("aaduser=some_guid"),
		// 			Role: to.Ptr(armkusto.DatabasePrincipalRoleAdmin),
		// 		},
		// 		{
		// 			Name: to.Ptr("Kusto"),
		// 			Type: to.Ptr(armkusto.DatabasePrincipalTypeGroup),
		// 			AppID: to.Ptr(""),
		// 			Email: to.Ptr("kusto@microsoft.com"),
		// 			Fqn: to.Ptr("aadgroup=some_guid"),
		// 			Role: to.Ptr(armkusto.DatabasePrincipalRoleViewer),
		// 		},
		// 		{
		// 			Name: to.Ptr("SomeApp"),
		// 			Type: to.Ptr(armkusto.DatabasePrincipalTypeApp),
		// 			AppID: to.Ptr("some_guid_app_id"),
		// 			Email: to.Ptr(""),
		// 			Fqn: to.Ptr("aadapp=some_guid_app_id"),
		// 			Role: to.Ptr(armkusto.DatabasePrincipalRoleAdmin),
		// 	}},
		// }
	}
}
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.

Generated from API version 2022-12-29

  • 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/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-12-29/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)
	}
	ctx := context.Background()
	clientFactory, err := armkusto.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDatabasesClient().RemovePrincipals(ctx, "kustorptest", "kustoCluster", "KustoDatabase8", armkusto.DatabasePrincipalListRequest{
		Value: []*armkusto.DatabasePrincipal{
			{
				Name:  to.Ptr("Some User"),
				Type:  to.Ptr(armkusto.DatabasePrincipalTypeUser),
				AppID: to.Ptr(""),
				Email: to.Ptr("user@microsoft.com"),
				Fqn:   to.Ptr("aaduser=some_guid"),
				Role:  to.Ptr(armkusto.DatabasePrincipalRoleAdmin),
			},
			{
				Name:  to.Ptr("Kusto"),
				Type:  to.Ptr(armkusto.DatabasePrincipalTypeGroup),
				AppID: to.Ptr(""),
				Email: to.Ptr("kusto@microsoft.com"),
				Fqn:   to.Ptr("aadgroup=some_guid"),
				Role:  to.Ptr(armkusto.DatabasePrincipalRoleViewer),
			},
			{
				Name:  to.Ptr("SomeApp"),
				Type:  to.Ptr(armkusto.DatabasePrincipalTypeApp),
				AppID: to.Ptr("some_guid_app_id"),
				Email: to.Ptr(""),
				Fqn:   to.Ptr("aadapp=some_guid_app_id"),
				Role:  to.Ptr(armkusto.DatabasePrincipalRoleAdmin),
			}},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DatabasePrincipalListResult = armkusto.DatabasePrincipalListResult{
	// 	Value: []*armkusto.DatabasePrincipal{
	// 		{
	// 			Name: to.Ptr("Some User"),
	// 			Type: to.Ptr(armkusto.DatabasePrincipalTypeUser),
	// 			AppID: to.Ptr(""),
	// 			Email: to.Ptr("user@microsoft.com"),
	// 			Fqn: to.Ptr("aaduser=some_guid"),
	// 			Role: to.Ptr(armkusto.DatabasePrincipalRoleAdmin),
	// 		},
	// 		{
	// 			Name: to.Ptr("Kusto"),
	// 			Type: to.Ptr(armkusto.DatabasePrincipalTypeGroup),
	// 			AppID: to.Ptr(""),
	// 			Email: to.Ptr("kusto@microsoft.com"),
	// 			Fqn: to.Ptr("aadgroup=some_guid"),
	// 			Role: to.Ptr(armkusto.DatabasePrincipalRoleViewer),
	// 		},
	// 		{
	// 			Name: to.Ptr("SomeApp"),
	// 			Type: to.Ptr(armkusto.DatabasePrincipalTypeApp),
	// 			AppID: to.Ptr("some_guid_app_id"),
	// 			Email: to.Ptr(""),
	// 			Fqn: to.Ptr("aadapp=some_guid_app_id"),
	// 			Role: to.Ptr(armkusto.DatabasePrincipalRoleAdmin),
	// 	}},
	// }
}
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 {
	// By default, any user who run operation on a database become an Admin on it. This property allows the caller to exclude
	// the caller from Admins list.
	CallerRole *CallerRole
	// 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 {
	// By default, any user who run operation on a database become an Admin on it. This property allows the caller to exclude
	// the caller from Admins list.
	CallerRole *CallerRole
	// 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.BeginCreateOrUpdate.

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.BeginDelete.

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.NewListByClusterPager method.

type DatabasesClientListByClusterResponse added in v0.2.0

type DatabasesClientListByClusterResponse struct {
	DatabaseListResult
}

DatabasesClientListByClusterResponse contains the response from method DatabasesClient.NewListByClusterPager.

type DatabasesClientListPrincipalsOptions added in v0.2.0

type DatabasesClientListPrincipalsOptions struct {
}

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

type DatabasesClientListPrincipalsResponse added in v0.2.0

type DatabasesClientListPrincipalsResponse struct {
	DatabasePrincipalListResult
}

DatabasesClientListPrincipalsResponse contains the response from method DatabasesClient.NewListPrincipalsPager.

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.BeginUpdate.

func (*DatabasesClientUpdateResponse) UnmarshalJSON added in v0.3.0