kqldatabase

package
v0.1.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientFactory

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

func NewClientFactory(credential azcore.TokenCredential, endpoint *string, options *azcore.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.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • endpoint - pass nil to accept the default values.
  • options - pass nil to accept the default values.

func NewClientFactoryWithClient

func NewClientFactoryWithClient(client fabric.Client) *ClientFactory

NewClientFactoryWithClient creates a new instance of ClientFactory with sharable Client. The Client will be propagated to any client created from this factory.

  • client - Client created in the containing module: github.com/microsoft/fabric-sdk-go/fabric

func (*ClientFactory) NewItemsClient

func (c *ClientFactory) NewItemsClient() *ItemsClient

NewItemsClient creates a new instance of ItemsClient.

type CreateKQLDatabaseRequest

type CreateKQLDatabaseRequest struct {
	// REQUIRED; The KQL database creation payload.
	CreationPayload CreationPayloadClassification

	// REQUIRED; The KQL database display name. The database name can contain alphanumeric characters, underscores, periods, and
	// hyphens. Special characters aren't supported.
	DisplayName *string

	// The KQL database description. Maximum length is 256 characters.
	Description *string
}

CreateKQLDatabaseRequest - Create KQL database request payload.

func (CreateKQLDatabaseRequest) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CreateKQLDatabaseRequest.

func (*CreateKQLDatabaseRequest) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CreateKQLDatabaseRequest.

type CreationPayload

type CreationPayload struct {
	// REQUIRED; The type of the KQL database
	DatabaseType *Type

	// REQUIRED; Parent eventhouse item ID.
	ParentEventhouseItemID *string
}

CreationPayload - KQL database item payload

func (*CreationPayload) GetCreationPayload

func (c *CreationPayload) GetCreationPayload() *CreationPayload

GetCreationPayload implements the CreationPayloadClassification interface for type CreationPayload.

func (CreationPayload) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CreationPayload.

func (*CreationPayload) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CreationPayload.

type CreationPayloadClassification

type CreationPayloadClassification interface {
	// GetCreationPayload returns the CreationPayload content of the underlying type.
	GetCreationPayload() *CreationPayload
}

CreationPayloadClassification provides polymorphic access to related types. Call the interface's GetCreationPayload() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *CreationPayload, *ReadWriteDatabaseCreationPayload, *ShortcutDatabaseCreationPayload

type ItemType

type ItemType string

ItemType - The type of the item. Additional item types may be added over time.

const (
	// ItemTypeDashboard - PowerBI dashboard.
	ItemTypeDashboard ItemType = "Dashboard"
	// ItemTypeDataPipeline - A data pipeline.
	ItemTypeDataPipeline ItemType = "DataPipeline"
	// ItemTypeDatamart - PowerBI datamart.
	ItemTypeDatamart ItemType = "Datamart"
	// ItemTypeEnvironment - An environment.
	ItemTypeEnvironment ItemType = "Environment"
	// ItemTypeEventhouse - An eventhouse.
	ItemTypeEventhouse ItemType = "Eventhouse"
	// ItemTypeEventstream - An eventstream.
	ItemTypeEventstream ItemType = "Eventstream"
	// ItemTypeKQLDatabase - A KQL database.
	ItemTypeKQLDatabase ItemType = "KQLDatabase"
	// ItemTypeKQLQueryset - A KQL queryset.
	ItemTypeKQLQueryset ItemType = "KQLQueryset"
	// ItemTypeLakehouse - A lakehouse.
	ItemTypeLakehouse ItemType = "Lakehouse"
	// ItemTypeMLExperiment - A machine learning experiment.
	ItemTypeMLExperiment ItemType = "MLExperiment"
	// ItemTypeMLModel - A machine learning model.
	ItemTypeMLModel ItemType = "MLModel"
	// ItemTypeMirroredWarehouse - A mirrored warehouse.
	ItemTypeMirroredWarehouse ItemType = "MirroredWarehouse"
	// ItemTypeNotebook - A notebook.
	ItemTypeNotebook ItemType = "Notebook"
	// ItemTypePaginatedReport - PowerBI paginated report.
	ItemTypePaginatedReport ItemType = "PaginatedReport"
	// ItemTypeReport - PowerBI report.
	ItemTypeReport ItemType = "Report"
	// ItemTypeSQLEndpoint - An SQL endpoint.
	ItemTypeSQLEndpoint ItemType = "SQLEndpoint"
	// ItemTypeSemanticModel - PowerBI semantic model.
	ItemTypeSemanticModel ItemType = "SemanticModel"
	// ItemTypeSparkJobDefinition - A spark job definition.
	ItemTypeSparkJobDefinition ItemType = "SparkJobDefinition"
	// ItemTypeWarehouse - A warehouse.
	ItemTypeWarehouse ItemType = "Warehouse"
)

func PossibleItemTypeValues

func PossibleItemTypeValues() []ItemType

PossibleItemTypeValues returns the possible values for the ItemType const type.

type ItemsClient

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

ItemsClient contains the methods for the Items group. Don't use this type directly, use a constructor function instead.

func (*ItemsClient) BeginCreateKQLDatabase

func (client *ItemsClient) BeginCreateKQLDatabase(ctx context.Context, workspaceID string, createKQLDatabaseRequest CreateKQLDatabaseRequest, options *ItemsClientBeginCreateKQLDatabaseOptions) (*runtime.Poller[ItemsClientCreateKQLDatabaseResponse], error)

BeginCreateKQLDatabase - This API supports long running operations (LRO) [/rest/api/fabric/articles/long-running-operation]. PERMISSIONS THE CALLER MUST HAVE CONTRIBUTOR OR HIGHER WORKSPACE ROLE. REQUIRED DELEGATED SCOPES KQLDatabase.ReadWrite.All or Item.ReadWrite.All LIMITATIONS * To create a KQL database the workspace must be on a supported Fabric capacity. For more information see: Microsoft Fabric license types [/fabric/enterprise/licenses#microsoft-fabric-license-types]. MICROSOFT ENTRA SUPPORTED IDENTITIES This API supports the Microsoft identities [/rest/api/fabric/articles/identity-support] listed in this section. | Identity | Support | |-|-| | User | Yes | | Service principal [/entra/identity-platform/app-objects-and-service-principals#service-principal-object] | Yes | | Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes | INTERFACE If the operation fails it returns an *core.ResponseError type.

Generated from API version v1

  • workspaceID - The workspace ID.
  • createKQLDatabaseRequest - Create item request payload.
  • options - ItemsClientBeginCreateKQLDatabaseOptions contains the optional parameters for the ItemsClient.BeginCreateKQLDatabase method.
Example (CreateAReadWriteKqlDatabaseExample)

Generated from example definition

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/microsoft/fabric-sdk-go/fabric/kqldatabase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := kqldatabase.NewClientFactory(cred, nil, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewItemsClient().BeginCreateKQLDatabase(ctx, "cfafbeb1-8037-4d0c-896e-a46fb27ff229", kqldatabase.CreateKQLDatabaseRequest{
		Description: to.Ptr("A KQL database description."),
		CreationPayload: &kqldatabase.ReadWriteDatabaseCreationPayload{
			DatabaseType:           to.Ptr(kqldatabase.TypeReadWrite),
			ParentEventhouseItemID: to.Ptr("5b218778-e7a5-4d73-8187-f10824047836"),
		},
		DisplayName: to.Ptr("KQLDatabase_1"),
	}, 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:

Example (CreateAShortcutKqlDatabaseToSourceAzureDataExplorerClusterExample)

Generated from example definition

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/microsoft/fabric-sdk-go/fabric/kqldatabase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := kqldatabase.NewClientFactory(cred, nil, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewItemsClient().BeginCreateKQLDatabase(ctx, "cfafbeb1-8037-4d0c-896e-a46fb27ff229", kqldatabase.CreateKQLDatabaseRequest{
		Description: to.Ptr("A KQL database description."),
		CreationPayload: &kqldatabase.ShortcutDatabaseCreationPayload{
			DatabaseType:           to.Ptr(kqldatabase.TypeShortcut),
			ParentEventhouseItemID: to.Ptr("5b218778-e7a5-4d73-8187-f10824047836"),
			SourceClusterURI:       to.Ptr("https://adxcluster.westus.kusto.windows.net"),
			SourceDatabaseName:     to.Ptr("MyDatabase"),
		},
		DisplayName: to.Ptr("KQLDatabase_1"),
	}, 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:

Example (CreateAShortcutKqlDatabaseToSourceAzureDataExplorerClusterWithInvitationTokenExample)

Generated from example definition

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/microsoft/fabric-sdk-go/fabric/kqldatabase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := kqldatabase.NewClientFactory(cred, nil, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewItemsClient().BeginCreateKQLDatabase(ctx, "cfafbeb1-8037-4d0c-896e-a46fb27ff229", kqldatabase.CreateKQLDatabaseRequest{
		Description: to.Ptr("A KQL database description."),
		CreationPayload: &kqldatabase.ShortcutDatabaseCreationPayload{
			DatabaseType:           to.Ptr(kqldatabase.TypeShortcut),
			ParentEventhouseItemID: to.Ptr("5b218778-e7a5-4d73-8187-f10824047836"),
			InvitationToken:        to.Ptr("eyJ0eXAiOiJKVInvitationToken"),
		},
		DisplayName: to.Ptr("KQLDatabase_1"),
	}, 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:

Example (CreateAShortcutKqlDatabaseToSourceKqlDatabaseExample)

Generated from example definition

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/microsoft/fabric-sdk-go/fabric/kqldatabase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := kqldatabase.NewClientFactory(cred, nil, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewItemsClient().BeginCreateKQLDatabase(ctx, "cfafbeb1-8037-4d0c-896e-a46fb27ff229", kqldatabase.CreateKQLDatabaseRequest{
		Description: to.Ptr("A KQL database description."),
		CreationPayload: &kqldatabase.ShortcutDatabaseCreationPayload{
			DatabaseType:           to.Ptr(kqldatabase.TypeShortcut),
			ParentEventhouseItemID: to.Ptr("5b218778-e7a5-4d73-8187-f10824047836"),
			SourceDatabaseName:     to.Ptr("ac542109-abd1-4ee3-aec5-86282c01ee24"),
		},
		DisplayName: to.Ptr("KQLDatabase_1"),
	}, 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 (*ItemsClient) CreateKQLDatabase

func (client *ItemsClient) CreateKQLDatabase(ctx context.Context, workspaceID string, createKQLDatabaseRequest CreateKQLDatabaseRequest, options *ItemsClientBeginCreateKQLDatabaseOptions) (ItemsClientCreateKQLDatabaseResponse, error)

CreateKQLDatabase - returns ItemsClientCreateKQLDatabaseResponse in sync mode. This API supports long running operations (LRO) [/rest/api/fabric/articles/long-running-operation].

PERMISSIONS THE CALLER MUST HAVE CONTRIBUTOR OR HIGHER WORKSPACE ROLE. REQUIRED DELEGATED SCOPES KQLDatabase.ReadWrite.All or Item.ReadWrite.All

LIMITATIONS

  • To create a KQL database the workspace must be on a supported Fabric capacity. For more information see: Microsoft Fabric license types [/fabric/enterprise/licenses#microsoft-fabric-license-types].

MICROSOFT ENTRA SUPPORTED IDENTITIES This API supports the Microsoft identities [/rest/api/fabric/articles/identity-support] listed in this section.

| Identity | Support | |-|-| | User | Yes | | Service principal [/entra/identity-platform/app-objects-and-service-principals#service-principal-object] | Yes | | Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes |

INTERFACE If the operation fails it returns an *core.ResponseError type. Generated from API version v1

  • workspaceID - The workspace ID.
  • createKQLDatabaseRequest - Create item request payload.
  • options - ItemsClientBeginCreateKQLDatabaseOptions contains the optional parameters for the ItemsClient.BeginCreateKQLDatabase method.

func (*ItemsClient) DeleteKQLDatabase

func (client *ItemsClient) DeleteKQLDatabase(ctx context.Context, workspaceID string, kqlDatabaseID string, options *ItemsClientDeleteKQLDatabaseOptions) (ItemsClientDeleteKQLDatabaseResponse, error)

DeleteKQLDatabase - PERMISSIONS The caller must have contributor or higher workspace role. REQUIRED DELEGATED SCOPES KQLDatabase.ReadWrite.All or Item.ReadWrite.All MICROSOFT ENTRA SUPPORTED IDENTITIES This API supports the Microsoft identities [/rest/api/fabric/articles/identity-support] listed in this section. | Identity | Support | |-|-| | User | Yes | | Service principal [/entra/identity-platform/app-objects-and-service-principals#service-principal-object] | Yes | | Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes | INTERFACE If the operation fails it returns an *core.ResponseError type.

Generated from API version v1

  • workspaceID - The workspace ID.
  • kqlDatabaseID - The KQL database ID.
  • options - ItemsClientDeleteKQLDatabaseOptions contains the optional parameters for the ItemsClient.DeleteKQLDatabase method.
Example

Generated from example definition

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"

	"github.com/microsoft/fabric-sdk-go/fabric/kqldatabase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := kqldatabase.NewClientFactory(cred, nil, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewItemsClient().DeleteKQLDatabase(ctx, "cfafbeb1-8037-4d0c-896e-a46fb27ff229", "5b218778-e7a5-4d73-8187-f10824047715", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*ItemsClient) GetKQLDatabase

func (client *ItemsClient) GetKQLDatabase(ctx context.Context, workspaceID string, kqlDatabaseID string, options *ItemsClientGetKQLDatabaseOptions) (ItemsClientGetKQLDatabaseResponse, error)

GetKQLDatabase - PERMISSIONS The caller must have viewer or higher workspace role. REQUIRED DELEGATED SCOPES KQLDatabase.Read.All or KQLDatabase.ReadWrite.All or Item.Read.All or Item.ReadWrite.All MICROSOFT ENTRA SUPPORTED IDENTITIES This API supports the Microsoft identities [/rest/api/fabric/articles/identity-support] listed in this section. | Identity | Support | |-|-| | User | Yes | | Service principal [/entra/identity-platform/app-objects-and-service-principals#service-principal-object] | Yes | | Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes | INTERFACE If the operation fails it returns an *core.ResponseError type.

Generated from API version v1

  • workspaceID - The workspace ID.
  • kqlDatabaseID - The KQL database ID.
  • options - ItemsClientGetKQLDatabaseOptions contains the optional parameters for the ItemsClient.GetKQLDatabase method.
Example

Generated from example definition

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"

	"github.com/microsoft/fabric-sdk-go/fabric/kqldatabase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := kqldatabase.NewClientFactory(cred, nil, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewItemsClient().GetKQLDatabase(ctx, "cfafbeb1-8037-4d0c-896e-a46fb27ff229", "5b218778-e7a5-4d73-8187-f10824047715", 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.KQLDatabase = kqldatabase.KQLDatabase{
	// 	Type: to.Ptr(kqldatabase.ItemTypeKQLDatabase),
	// 	Description: to.Ptr("A KQL database description."),
	// 	DisplayName: to.Ptr("KQLDatabase_1"),
	// 	ID: to.Ptr("5b218778-e7a5-4d73-8187-f10824047715"),
	// 	WorkspaceID: to.Ptr("cfafbeb1-8037-4d0c-896e-a46fb27ff229"),
	// 	Properties: &kqldatabase.Properties{
	// 		DatabaseType: to.Ptr(kqldatabase.TypeReadWrite),
	// 		IngestionServiceURI: to.Ptr("https://ingest-trd-f7k1b2rzuqrjmb3wpd.z5.kusto.fabric.microsoft.com"),
	// 		ParentEventhouseItemID: to.Ptr("6a437a7c-1a28-4fd0-a362-11308b94c79b"),
	// 		QueryServiceURI: to.Ptr("https://trd-f7k1b2rzuqrjmb3wpd.z5.kusto.fabric.microsoft.com"),
	// 	},
	// }
}
Output:

func (*ItemsClient) ListKQLDatabases

func (client *ItemsClient) ListKQLDatabases(ctx context.Context, workspaceID string, options *ItemsClientListKQLDatabasesOptions) ([]KQLDatabase, error)

ListKQLDatabases - returns array of KQLDatabase from all pages. This API supports pagination [/rest/api/fabric/articles/pagination].

PERMISSIONS The caller must have viewer or higher workspace role.

REQUIRED DELEGATED SCOPES Workspace.Read.All or Workspace.ReadWrite.All

MICROSOFT ENTRA SUPPORTED IDENTITIES This API supports the Microsoft identities [/rest/api/fabric/articles/identity-support] listed in this section.

| Identity | Support | |-|-| | User | Yes | | Service principal [/entra/identity-platform/app-objects-and-service-principals#service-principal-object] | Yes | | Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes |

INTERFACE Generated from API version v1

  • workspaceID - The workspace ID.
  • options - ItemsClientListKQLDatabasesOptions contains the optional parameters for the ItemsClient.NewListKQLDatabasesPager method.

func (*ItemsClient) NewListKQLDatabasesPager

func (client *ItemsClient) NewListKQLDatabasesPager(workspaceID string, options *ItemsClientListKQLDatabasesOptions) *runtime.Pager[ItemsClientListKQLDatabasesResponse]

NewListKQLDatabasesPager - This API supports pagination [/rest/api/fabric/articles/pagination]. PERMISSIONS The caller must have viewer or higher workspace role. REQUIRED DELEGATED SCOPES Workspace.Read.All or Workspace.ReadWrite.All MICROSOFT ENTRA SUPPORTED IDENTITIES This API supports the Microsoft identities [/rest/api/fabric/articles/identity-support] listed in this section. | Identity | Support | |-|-| | User | Yes | | Service principal [/entra/identity-platform/app-objects-and-service-principals#service-principal-object] | Yes | | Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes | INTERFACE

Generated from API version v1

  • workspaceID - The workspace ID.
  • options - ItemsClientListKQLDatabasesOptions contains the optional parameters for the ItemsClient.NewListKQLDatabasesPager method.
Example

Generated from example definition

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"

	"github.com/microsoft/fabric-sdk-go/fabric/kqldatabase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := kqldatabase.NewClientFactory(cred, nil, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewItemsClient().NewListKQLDatabasesPager("cfafbeb1-8037-4d0c-896e-a46fb27ff229", &kqldatabase.ItemsClientListKQLDatabasesOptions{ContinuationToken: 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.KQLDatabases = kqldatabase.KQLDatabases{
		// 	Value: []kqldatabase.KQLDatabase{
		// 		{
		// 			Type: to.Ptr(kqldatabase.ItemTypeKQLDatabase),
		// 			Description: to.Ptr("A KQL database description."),
		// 			DisplayName: to.Ptr("KQLDatabase_1"),
		// 			ID: to.Ptr("3546052c-ae64-4526-b1a8-52af7761426f"),
		// 			WorkspaceID: to.Ptr("cfafbeb1-8037-4d0c-896e-a46fb27ff229"),
		// 			Properties: &kqldatabase.Properties{
		// 				DatabaseType: to.Ptr(kqldatabase.TypeReadWrite),
		// 				IngestionServiceURI: to.Ptr("https://ingest-trd-f7k1b2rzuqrjmb3wpd.z5.kusto.fabric.microsoft.com"),
		// 				ParentEventhouseItemID: to.Ptr("6a437a7c-1a28-4fd0-a362-11308b94c79b"),
		// 				QueryServiceURI: to.Ptr("https://trd-f7k1b2rzuqrjmb3wpd.z5.kusto.fabric.microsoft.com"),
		// 			},
		// 		},
		// 		{
		// 			Type: to.Ptr(kqldatabase.ItemTypeKQLDatabase),
		// 			Description: to.Ptr("A KQL database description."),
		// 			DisplayName: to.Ptr("KQLDatabase_2"),
		// 			ID: to.Ptr("340d91b9-5a39-409c-b9c0-05ba832c476e"),
		// 			WorkspaceID: to.Ptr("cfafbeb1-8037-4d0c-896e-a46fb27ff229"),
		// 			Properties: &kqldatabase.Properties{
		// 				DatabaseType: to.Ptr(kqldatabase.TypeReadWrite),
		// 				IngestionServiceURI: to.Ptr("https://ingest-trd-f7k1b2rzuqrjmb3wpd.z5.kusto.fabric.microsoft.com"),
		// 				ParentEventhouseItemID: to.Ptr("9add9a4d-079a-432a-b43a-70c899f2087b"),
		// 				QueryServiceURI: to.Ptr("https://trd-f7k1b2rzuqrjmb3wpd.z5.kusto.fabric.microsoft.com"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*ItemsClient) UpdateKQLDatabase

func (client *ItemsClient) UpdateKQLDatabase(ctx context.Context, workspaceID string, kqlDatabaseID string, updateKQLDatabaseRequest UpdateKQLDatabaseRequest, options *ItemsClientUpdateKQLDatabaseOptions) (ItemsClientUpdateKQLDatabaseResponse, error)

UpdateKQLDatabase - PERMISSIONS The caller must have contributor or higher workspace role. REQUIRED DELEGATED SCOPES KQLDatabase.ReadWrite.All or Item.ReadWrite.All MICROSOFT ENTRA SUPPORTED IDENTITIES This API supports the Microsoft identities [/rest/api/fabric/articles/identity-support] listed in this section. | Identity | Support | |-|-| | User | Yes | | Service principal [/entra/identity-platform/app-objects-and-service-principals#service-principal-object] | Yes | | Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes | INTERFACE If the operation fails it returns an *core.ResponseError type.

Generated from API version v1

  • workspaceID - The workspace ID.
  • kqlDatabaseID - The KQL database ID.
  • updateKQLDatabaseRequest - Update KQL database request payload.
  • options - ItemsClientUpdateKQLDatabaseOptions contains the optional parameters for the ItemsClient.UpdateKQLDatabase method.
Example

Generated from example definition

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/microsoft/fabric-sdk-go/fabric/kqldatabase"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := kqldatabase.NewClientFactory(cred, nil, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewItemsClient().UpdateKQLDatabase(ctx, "cfafbeb1-8037-4d0c-896e-a46fb27ff229", "5b218778-e7a5-4d73-8187-f10824047715", kqldatabase.UpdateKQLDatabaseRequest{
		Description: to.Ptr("A new description for KQL database."),
		DisplayName: to.Ptr("KQLDatabase_New_Name"),
	}, 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.KQLDatabase = kqldatabase.KQLDatabase{
	// 	Type: to.Ptr(kqldatabase.ItemTypeKQLDatabase),
	// 	Description: to.Ptr("A new description for KQL database."),
	// 	DisplayName: to.Ptr("KQLDatabase_New_Name"),
	// 	ID: to.Ptr("5b218778-e7a5-4d73-8187-f10824047715"),
	// 	WorkspaceID: to.Ptr("cfafbeb1-8037-4d0c-896e-a46fb27ff229"),
	// }
}
Output:

type ItemsClientBeginCreateKQLDatabaseOptions

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

ItemsClientBeginCreateKQLDatabaseOptions contains the optional parameters for the ItemsClient.BeginCreateKQLDatabase method.

type ItemsClientCreateKQLDatabaseResponse

type ItemsClientCreateKQLDatabaseResponse struct {
	// A KQL database object.
	KQLDatabase
}

ItemsClientCreateKQLDatabaseResponse contains the response from method ItemsClient.BeginCreateKQLDatabase.

type ItemsClientDeleteKQLDatabaseOptions

type ItemsClientDeleteKQLDatabaseOptions struct {
}

ItemsClientDeleteKQLDatabaseOptions contains the optional parameters for the ItemsClient.DeleteKQLDatabase method.

type ItemsClientDeleteKQLDatabaseResponse

type ItemsClientDeleteKQLDatabaseResponse struct {
}

ItemsClientDeleteKQLDatabaseResponse contains the response from method ItemsClient.DeleteKQLDatabase.

type ItemsClientGetKQLDatabaseOptions

type ItemsClientGetKQLDatabaseOptions struct {
}

ItemsClientGetKQLDatabaseOptions contains the optional parameters for the ItemsClient.GetKQLDatabase method.

type ItemsClientGetKQLDatabaseResponse

type ItemsClientGetKQLDatabaseResponse struct {
	// A KQL database object.
	KQLDatabase
}

ItemsClientGetKQLDatabaseResponse contains the response from method ItemsClient.GetKQLDatabase.

type ItemsClientListKQLDatabasesOptions

type ItemsClientListKQLDatabasesOptions struct {
	// A token for retrieving the next page of results.
	ContinuationToken *string
}

ItemsClientListKQLDatabasesOptions contains the optional parameters for the ItemsClient.NewListKQLDatabasesPager method.

type ItemsClientListKQLDatabasesResponse

type ItemsClientListKQLDatabasesResponse struct {
	// A list of KQL databases.
	KQLDatabases
}

ItemsClientListKQLDatabasesResponse contains the response from method ItemsClient.NewListKQLDatabasesPager.

type ItemsClientUpdateKQLDatabaseOptions

type ItemsClientUpdateKQLDatabaseOptions struct {
}

ItemsClientUpdateKQLDatabaseOptions contains the optional parameters for the ItemsClient.UpdateKQLDatabase method.

type ItemsClientUpdateKQLDatabaseResponse

type ItemsClientUpdateKQLDatabaseResponse struct {
	// A KQL database object.
	KQLDatabase
}

ItemsClientUpdateKQLDatabaseResponse contains the response from method ItemsClient.UpdateKQLDatabase.

type KQLDatabase

type KQLDatabase struct {
	// REQUIRED; The item type.
	Type *ItemType

	// The item description.
	Description *string

	// The item display name.
	DisplayName *string

	// The KQL database properties.
	Properties *Properties

	// READ-ONLY; The item ID.
	ID *string

	// READ-ONLY; The workspace ID.
	WorkspaceID *string
}

KQLDatabase - A KQL database object.

func (KQLDatabase) MarshalJSON

func (k KQLDatabase) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type KQLDatabase.

func (*KQLDatabase) UnmarshalJSON

func (k *KQLDatabase) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type KQLDatabase.

type KQLDatabases

type KQLDatabases struct {
	// REQUIRED; A list of KQL databases.
	Value []KQLDatabase

	// The token for the next result set batch. If there are no more records, it's removed from the response.
	ContinuationToken *string

	// The URI of the next result set batch. If there are no more records, it's removed from the response.
	ContinuationURI *string
}

KQLDatabases - A list of KQL databases.

func (KQLDatabases) MarshalJSON

func (k KQLDatabases) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type KQLDatabases.

func (*KQLDatabases) UnmarshalJSON

func (k *KQLDatabases) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type KQLDatabases.

type Properties

type Properties struct {
	// REQUIRED; Ingestion service URI.
	IngestionServiceURI *string

	// REQUIRED; Query service URI.
	QueryServiceURI *string

	// The type of the database.
	DatabaseType *Type

	// Parent eventhouse ID.
	ParentEventhouseItemID *string
}

Properties - The KQL database properties.

func (Properties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Properties.

func (*Properties) UnmarshalJSON

func (p *Properties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Properties.

type ReadWriteDatabaseCreationPayload

type ReadWriteDatabaseCreationPayload struct {
	// REQUIRED; The type of the KQL database
	DatabaseType *Type

	// REQUIRED; Parent eventhouse item ID.
	ParentEventhouseItemID *string
}

ReadWriteDatabaseCreationPayload - ReadWrite KQL database item creation payload

func (*ReadWriteDatabaseCreationPayload) GetCreationPayload

func (r *ReadWriteDatabaseCreationPayload) GetCreationPayload() *CreationPayload

GetCreationPayload implements the CreationPayloadClassification interface for type ReadWriteDatabaseCreationPayload.

func (ReadWriteDatabaseCreationPayload) MarshalJSON

func (r ReadWriteDatabaseCreationPayload) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ReadWriteDatabaseCreationPayload.

func (*ReadWriteDatabaseCreationPayload) UnmarshalJSON

func (r *ReadWriteDatabaseCreationPayload) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ReadWriteDatabaseCreationPayload.

type ShortcutDatabaseCreationPayload

type ShortcutDatabaseCreationPayload struct {
	// REQUIRED; The type of the KQL database
	DatabaseType *Type

	// REQUIRED; Parent eventhouse item ID.
	ParentEventhouseItemID *string

	// Invitation token to follow the source database
	InvitationToken *string

	// The URI of the source Eventhouse or Azure Data Explorer cluster
	SourceClusterURI *string

	// The name of the database to follow in the source Eventhouse or Azure Data Explorer cluster.
	SourceDatabaseName *string
}

ShortcutDatabaseCreationPayload - Shortcut KQL database item creation payload

func (*ShortcutDatabaseCreationPayload) GetCreationPayload

func (s *ShortcutDatabaseCreationPayload) GetCreationPayload() *CreationPayload

GetCreationPayload implements the CreationPayloadClassification interface for type ShortcutDatabaseCreationPayload.

func (ShortcutDatabaseCreationPayload) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ShortcutDatabaseCreationPayload.

func (*ShortcutDatabaseCreationPayload) UnmarshalJSON

func (s *ShortcutDatabaseCreationPayload) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ShortcutDatabaseCreationPayload.

type Type

type Type string

Type - The KQL database type. Additional KQLDatabaseType types may be added over time.

const (
	// TypeReadWrite - Allows read and write operations on the database.
	TypeReadWrite Type = "ReadWrite"
	// TypeShortcut - A shortcut is an embedded reference allowing read only operations on a source database. The source can be
	// in the same or different tenants, either in an Azure Data Explorer cluster or a Fabric Eventhouse.
	TypeShortcut Type = "Shortcut"
)

func PossibleKqlDatabaseTypeValues

func PossibleKqlDatabaseTypeValues() []Type

PossibleKqlDatabaseTypeValues returns the possible values for the Type const type.

type UpdateKQLDatabaseRequest

type UpdateKQLDatabaseRequest struct {
	// The KQL database description. Maximum length is 256 characters.
	Description *string

	// The KQL database display name. The database name can contain alphanumeric characters, underscores, periods, and hyphens.
	// Special characters aren't supported.
	DisplayName *string
}

UpdateKQLDatabaseRequest - Update KQL database request.

func (UpdateKQLDatabaseRequest) MarshalJSON

func (u UpdateKQLDatabaseRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UpdateKQLDatabaseRequest.

func (*UpdateKQLDatabaseRequest) UnmarshalJSON

func (u *UpdateKQLDatabaseRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UpdateKQLDatabaseRequest.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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