Documentation ¶
Index ¶
- type ClientFactory
- type CreateSemanticModelRequest
- type Definition
- type DefinitionPart
- type DefinitionResponse
- type ItemType
- type ItemsClient
- func (client *ItemsClient) BeginCreateSemanticModel(ctx context.Context, workspaceID string, ...) (*runtime.Poller[ItemsClientCreateSemanticModelResponse], error)
- func (client *ItemsClient) BeginGetSemanticModelDefinition(ctx context.Context, workspaceID string, semanticModelID string, ...) (*runtime.Poller[ItemsClientGetSemanticModelDefinitionResponse], error)
- func (client *ItemsClient) BeginUpdateSemanticModelDefinition(ctx context.Context, workspaceID string, semanticModelID string, ...) (*runtime.Poller[ItemsClientUpdateSemanticModelDefinitionResponse], error)
- func (client *ItemsClient) CreateSemanticModel(ctx context.Context, workspaceID string, ...) (ItemsClientCreateSemanticModelResponse, error)
- func (client *ItemsClient) DeleteSemanticModel(ctx context.Context, workspaceID string, semanticModelID string, ...) (ItemsClientDeleteSemanticModelResponse, error)
- func (client *ItemsClient) GetSemanticModel(ctx context.Context, workspaceID string, semanticModelID string, ...) (ItemsClientGetSemanticModelResponse, error)
- func (client *ItemsClient) GetSemanticModelDefinition(ctx context.Context, workspaceID string, semanticModelID string, ...) (ItemsClientGetSemanticModelDefinitionResponse, error)
- func (client *ItemsClient) ListSemanticModels(ctx context.Context, workspaceID string, ...) ([]SemanticModel, error)
- func (client *ItemsClient) NewListSemanticModelsPager(workspaceID string, options *ItemsClientListSemanticModelsOptions) *runtime.Pager[ItemsClientListSemanticModelsResponse]
- func (client *ItemsClient) UpdateSemanticModel(ctx context.Context, workspaceID string, semanticModelID string, ...) (ItemsClientUpdateSemanticModelResponse, error)
- func (client *ItemsClient) UpdateSemanticModelDefinition(ctx context.Context, workspaceID string, semanticModelID string, ...) (ItemsClientUpdateSemanticModelDefinitionResponse, error)
- type ItemsClientBeginCreateSemanticModelOptions
- type ItemsClientBeginGetSemanticModelDefinitionOptions
- type ItemsClientBeginUpdateSemanticModelDefinitionOptions
- type ItemsClientCreateSemanticModelResponse
- type ItemsClientDeleteSemanticModelOptions
- type ItemsClientDeleteSemanticModelResponse
- type ItemsClientGetSemanticModelDefinitionResponse
- type ItemsClientGetSemanticModelOptions
- type ItemsClientGetSemanticModelResponse
- type ItemsClientListSemanticModelsOptions
- type ItemsClientListSemanticModelsResponse
- type ItemsClientUpdateSemanticModelDefinitionResponse
- type ItemsClientUpdateSemanticModelOptions
- type ItemsClientUpdateSemanticModelResponse
- type PayloadType
- type SemanticModel
- type SemanticModels
- type UpdateSemanticModelDefinitionRequest
- type UpdateSemanticModelRequest
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 CreateSemanticModelRequest ¶
type CreateSemanticModelRequest struct { // REQUIRED; The semantic model public definition. Definition *Definition // REQUIRED; The semantic model display name. The display name must follow naming rules according to item type. DisplayName *string // The semantic model description. Maximum length is 256 characters. Description *string }
CreateSemanticModelRequest - Create semantic model request payload.
func (CreateSemanticModelRequest) MarshalJSON ¶
func (c CreateSemanticModelRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CreateSemanticModelRequest.
func (*CreateSemanticModelRequest) UnmarshalJSON ¶
func (c *CreateSemanticModelRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CreateSemanticModelRequest.
type Definition ¶
type Definition struct { // REQUIRED; A list of definition parts. Parts []DefinitionPart // The format of the item definition. Format *string }
Definition - Semantic model public definition [/rest/api/fabric/articles/item-management/definitions/semantic-model-definition] object.
func (Definition) MarshalJSON ¶
func (d Definition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Definition.
func (*Definition) UnmarshalJSON ¶
func (d *Definition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type Definition.
type DefinitionPart ¶
type DefinitionPart struct { // The semantic model part path. Path *string // The semantic model part payload. Payload *string // The payload type. PayloadType *PayloadType }
DefinitionPart - Semantic model definition part object.
func (DefinitionPart) MarshalJSON ¶
func (d DefinitionPart) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DefinitionPart.
func (*DefinitionPart) UnmarshalJSON ¶
func (d *DefinitionPart) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DefinitionPart.
type DefinitionResponse ¶
type DefinitionResponse struct { // READ-ONLY; Semantic model public definition [/rest/api/fabric/articles/item-management/definitions/semantic-model-definition] // object. Definition *Definition }
DefinitionResponse - Semantic model public definition response.
func (DefinitionResponse) MarshalJSON ¶
func (d DefinitionResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DefinitionResponse.
func (*DefinitionResponse) UnmarshalJSON ¶
func (d *DefinitionResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DefinitionResponse.
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" // ItemTypeGraphQLAPI - An API for GraphQL item. ItemTypeGraphQLAPI ItemType = "GraphQLApi" // ItemTypeKQLDashboard - A KQL dashboard. ItemTypeKQLDashboard ItemType = "KQLDashboard" // 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" // ItemTypeMirroredDatabase - A mirrored database. ItemTypeMirroredDatabase ItemType = "MirroredDatabase" // ItemTypeMirroredWarehouse - A mirrored warehouse. ItemTypeMirroredWarehouse ItemType = "MirroredWarehouse" // ItemTypeNotebook - A notebook. ItemTypeNotebook ItemType = "Notebook" // ItemTypePaginatedReport - PowerBI paginated report. ItemTypePaginatedReport ItemType = "PaginatedReport" // ItemTypeReflex - A Reflex. ItemTypeReflex ItemType = "Reflex" // 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) BeginCreateSemanticModel ¶
func (client *ItemsClient) BeginCreateSemanticModel(ctx context.Context, workspaceID string, createSemanticModelRequest CreateSemanticModelRequest, options *ItemsClientBeginCreateSemanticModelOptions) (*runtime.Poller[ItemsClientCreateSemanticModelResponse], error)
BeginCreateSemanticModel - This API supports long running operations (LRO) [/rest/api/fabric/articles/long-running-operation]. This API requires a definition [/rest/api/fabric/articles/item-management/definitions/semantic-model-definition]. PERMISSIONS The caller must have contributor or higher workspace role. REQUIRED DELEGATED SCOPES SemanticModel.ReadWrite.All or Item.ReadWrite.All LIMITATIONS * To create a semantic model, the user must have the appropriate license. 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] and 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.
- createSemanticModelRequest - Create item request payload.
- options - ItemsClientBeginCreateSemanticModelOptions contains the optional parameters for the ItemsClient.BeginCreateSemanticModel 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/semanticmodel" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := semanticmodel.NewClientFactory(cred, nil, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewItemsClient().BeginCreateSemanticModel(ctx, "cfafbeb1-8037-4d0c-896e-a46fb27ff229", semanticmodel.CreateSemanticModelRequest{ Description: to.Ptr("A semantic model description."), Definition: &semanticmodel.Definition{ Parts: []semanticmodel.DefinitionPart{ { Path: to.Ptr("model.bim"), Payload: to.Ptr("ew0KICAiY29tcGF0a..GVzIjogWyBdDQogIH0NCn0="), PayloadType: to.Ptr(semanticmodel.PayloadTypeInlineBase64), }, { Path: to.Ptr("definition.pbism"), Payload: to.Ptr("ewogICJ2ZXJzaW9uI..NldHRpbmdzIjoge30KfQ=="), PayloadType: to.Ptr(semanticmodel.PayloadTypeInlineBase64), }, { Path: to.Ptr(".platform"), Payload: to.Ptr("ZG90UGxhdGZvcm1CYXNlNjRTdHJpbmc="), PayloadType: to.Ptr(semanticmodel.PayloadTypeInlineBase64), }}, }, DisplayName: to.Ptr("SemanticModel 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) BeginGetSemanticModelDefinition ¶
func (client *ItemsClient) BeginGetSemanticModelDefinition(ctx context.Context, workspaceID string, semanticModelID string, options *ItemsClientBeginGetSemanticModelDefinitionOptions) (*runtime.Poller[ItemsClientGetSemanticModelDefinitionResponse], error)
BeginGetSemanticModelDefinition - This API supports long running operations (LRO) [/rest/api/fabric/articles/long-running-operation]. When you get a semantic model's public definition, the sensitivity label is not a part of the definition. PERMISSIONS The caller must have contributor or higher workspace role. REQUIRED DELEGATED SCOPES SemanticModel.ReadWrite.All or Item.ReadWrite.All LIMITATIONS This API is blocked for a semantic model with an encrypted sensitivity label. 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] and 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.
- semanticModelID - The semantic model ID.
- options - ItemsClientBeginGetSemanticModelDefinitionOptions contains the optional parameters for the ItemsClient.BeginGetSemanticModelDefinition 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/semanticmodel" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := semanticmodel.NewClientFactory(cred, nil, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewItemsClient().BeginGetSemanticModelDefinition(ctx, "6e335e92-a2a2-4b5a-970a-bd6a89fbb765", "cfafbeb1-8037-4d0c-896e-a46fb27ff229", &semanticmodel.ItemsClientBeginGetSemanticModelDefinitionOptions{Format: 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.DefinitionResponse = semanticmodel.DefinitionResponse{ // Definition: &semanticmodel.Definition{ // Parts: []semanticmodel.DefinitionPart{ // { // Path: to.Ptr("definition/database.tmdl"), // Payload: to.Ptr("<base64 encoded string>"), // PayloadType: to.Ptr(semanticmodel.PayloadTypeInlineBase64), // }, // { // Path: to.Ptr("definition/model.tmdl"), // Payload: to.Ptr("<base64 encoded string>"), // PayloadType: to.Ptr(semanticmodel.PayloadTypeInlineBase64), // }, // { // Path: to.Ptr("definition/tables/Table1.tmdl"), // Payload: to.Ptr("<base64 encoded string>"), // PayloadType: to.Ptr(semanticmodel.PayloadTypeInlineBase64), // }, // { // Path: to.Ptr("definition.pbism"), // Payload: to.Ptr("<base64 encoded string>"), // PayloadType: to.Ptr(semanticmodel.PayloadTypeInlineBase64), // }, // { // Path: to.Ptr(".platform"), // Payload: to.Ptr("ZG90UGxhdGZvcm1CYXNlNjRTdHJpbmc="), // PayloadType: to.Ptr(semanticmodel.PayloadTypeInlineBase64), // }}, // }, // } }
Output:
func (*ItemsClient) BeginUpdateSemanticModelDefinition ¶
func (client *ItemsClient) BeginUpdateSemanticModelDefinition(ctx context.Context, workspaceID string, semanticModelID string, updateSemanticModelDefinitionRequest UpdateSemanticModelDefinitionRequest, options *ItemsClientBeginUpdateSemanticModelDefinitionOptions) (*runtime.Poller[ItemsClientUpdateSemanticModelDefinitionResponse], error)
BeginUpdateSemanticModelDefinition - This API supports long running operations (LRO) [/rest/api/fabric/articles/long-running-operation]. Updating the semantic model's definition, does not affect its sensitivity label. PERMISSIONS The API caller must have contributor or higher workspace role. REQUIRED DELEGATED SCOPES SemanticModel.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] and 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.
- semanticModelID - The semantic model ID.
- updateSemanticModelDefinitionRequest - Update semantic model definition request payload.
- options - ItemsClientBeginUpdateSemanticModelDefinitionOptions contains the optional parameters for the ItemsClient.BeginUpdateSemanticModelDefinition 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/semanticmodel" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := semanticmodel.NewClientFactory(cred, nil, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewItemsClient().BeginUpdateSemanticModelDefinition(ctx, "cfafbeb1-8037-4d0c-896e-a46fb27ff229", "5b218778-e7a5-4d73-8187-f10824047715", semanticmodel.UpdateSemanticModelDefinitionRequest{ Definition: &semanticmodel.Definition{ Parts: []semanticmodel.DefinitionPart{ { Path: to.Ptr("model.bim"), Payload: to.Ptr("ewogICJjb21wYXRpYmlsaXR5TGV2ZW..GVzIjogWyBdDQogIH0NCn0"), PayloadType: to.Ptr(semanticmodel.PayloadTypeInlineBase64), }, { Path: to.Ptr("definition.pbism"), Payload: to.Ptr("ewogICJ2ZXJzaW9uIjogIjQuMC..HRpbmdzIjoge30KfQ=="), PayloadType: to.Ptr(semanticmodel.PayloadTypeInlineBase64), }, { Path: to.Ptr(".platform"), Payload: to.Ptr("ZG90UGxhdGZvcm1CYXNlNjRTdHJpbmc="), PayloadType: to.Ptr(semanticmodel.PayloadTypeInlineBase64), }}, }, }, &semanticmodel.ItemsClientBeginUpdateSemanticModelDefinitionOptions{UpdateMetadata: to.Ptr(true)}) 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) CreateSemanticModel ¶
func (client *ItemsClient) CreateSemanticModel(ctx context.Context, workspaceID string, createSemanticModelRequest CreateSemanticModelRequest, options *ItemsClientBeginCreateSemanticModelOptions) (ItemsClientCreateSemanticModelResponse, error)
CreateSemanticModel - returns ItemsClientCreateSemanticModelResponse in sync mode. This API supports long running operations (LRO) [/rest/api/fabric/articles/long-running-operation].
This API requires a definition [/rest/api/fabric/articles/item-management/definitions/semantic-model-definition].
PERMISSIONS The caller must have contributor or higher workspace role.
REQUIRED DELEGATED SCOPES SemanticModel.ReadWrite.All or Item.ReadWrite.All ¶
LIMITATIONS
- To create a semantic model, the user must have the appropriate license. 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] and Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes |
INTERFACE Generated from API version v1
- workspaceID - The workspace ID.
- createSemanticModelRequest - Create item request payload.
- options - ItemsClientBeginCreateSemanticModelOptions contains the optional parameters for the ItemsClient.BeginCreateSemanticModel method.
func (*ItemsClient) DeleteSemanticModel ¶
func (client *ItemsClient) DeleteSemanticModel(ctx context.Context, workspaceID string, semanticModelID string, options *ItemsClientDeleteSemanticModelOptions) (ItemsClientDeleteSemanticModelResponse, error)
DeleteSemanticModel - PERMISSIONS The caller must have contributor or higher workspace role. REQUIRED DELEGATED SCOPES SemanticModel.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] and 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.
- semanticModelID - The semantic model ID.
- options - ItemsClientDeleteSemanticModelOptions contains the optional parameters for the ItemsClient.DeleteSemanticModel 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/semanticmodel" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := semanticmodel.NewClientFactory(cred, nil, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewItemsClient().DeleteSemanticModel(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) GetSemanticModel ¶
func (client *ItemsClient) GetSemanticModel(ctx context.Context, workspaceID string, semanticModelID string, options *ItemsClientGetSemanticModelOptions) (ItemsClientGetSemanticModelResponse, error)
GetSemanticModel - PERMISSIONS The caller must have viewer or higher workspace role. REQUIRED DELEGATED SCOPES SemanticModel.Read.All or SemanticModel.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] and 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.
- semanticModelID - The semantic model ID.
- options - ItemsClientGetSemanticModelOptions contains the optional parameters for the ItemsClient.GetSemanticModel 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/semanticmodel" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := semanticmodel.NewClientFactory(cred, nil, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewItemsClient().GetSemanticModel(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.SemanticModel = semanticmodel.SemanticModel{ // Type: to.Ptr(semanticmodel.ItemTypeSemanticModel), // Description: to.Ptr("A semantic model description."), // DisplayName: to.Ptr("SemanticModel 1"), // ID: to.Ptr("5b218778-e7a5-4d73-8187-f10824047715"), // WorkspaceID: to.Ptr("cfafbeb1-8037-4d0c-896e-a46fb27ff229"), // } }
Output:
func (*ItemsClient) GetSemanticModelDefinition ¶
func (client *ItemsClient) GetSemanticModelDefinition(ctx context.Context, workspaceID string, semanticModelID string, options *ItemsClientBeginGetSemanticModelDefinitionOptions) (ItemsClientGetSemanticModelDefinitionResponse, error)
GetSemanticModelDefinition - returns ItemsClientGetSemanticModelDefinitionResponse in sync mode. This API supports long running operations (LRO) [/rest/api/fabric/articles/long-running-operation].
When you get a semantic model's public definition, the sensitivity label is not a part of the definition.
PERMISSIONS The caller must have contributor or higher workspace role.
REQUIRED DELEGATED SCOPES SemanticModel.ReadWrite.All or Item.ReadWrite.All ¶
LIMITATIONS This API is blocked for a semantic model with an encrypted sensitivity label.
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] and Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes |
INTERFACE Generated from API version v1
- workspaceID - The workspace ID.
- semanticModelID - The semantic model ID.
- options - ItemsClientBeginGetSemanticModelDefinitionOptions contains the optional parameters for the ItemsClient.BeginGetSemanticModelDefinition method.
func (*ItemsClient) ListSemanticModels ¶
func (client *ItemsClient) ListSemanticModels(ctx context.Context, workspaceID string, options *ItemsClientListSemanticModelsOptions) ([]SemanticModel, error)
ListSemanticModels - returns array of SemanticModel 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] and Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes |
INTERFACE Generated from API version v1
- workspaceID - The workspace ID.
- options - ItemsClientListSemanticModelsOptions contains the optional parameters for the ItemsClient.NewListSemanticModelsPager method.
func (*ItemsClient) NewListSemanticModelsPager ¶
func (client *ItemsClient) NewListSemanticModelsPager(workspaceID string, options *ItemsClientListSemanticModelsOptions) *runtime.Pager[ItemsClientListSemanticModelsResponse]
NewListSemanticModelsPager - 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] and Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes | INTERFACE
Generated from API version v1
- workspaceID - The workspace ID.
- options - ItemsClientListSemanticModelsOptions contains the optional parameters for the ItemsClient.NewListSemanticModelsPager 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/semanticmodel" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := semanticmodel.NewClientFactory(cred, nil, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewItemsClient().NewListSemanticModelsPager("cfafbeb1-8037-4d0c-896e-a46fb27ff229", &semanticmodel.ItemsClientListSemanticModelsOptions{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.SemanticModels = semanticmodel.SemanticModels{ // Value: []semanticmodel.SemanticModel{ // { // Type: to.Ptr(semanticmodel.ItemTypeSemanticModel), // Description: to.Ptr("A semantic model description."), // DisplayName: to.Ptr("SemanticModel Name 1"), // ID: to.Ptr("3546052c-ae64-4526-b1a8-52af7761426f"), // WorkspaceID: to.Ptr("cfafbeb1-8037-4d0c-896e-a46fb27ff229"), // }}, // } } }
Output:
func (*ItemsClient) UpdateSemanticModel ¶
func (client *ItemsClient) UpdateSemanticModel(ctx context.Context, workspaceID string, semanticModelID string, updateSemanticModelRequest UpdateSemanticModelRequest, options *ItemsClientUpdateSemanticModelOptions) (ItemsClientUpdateSemanticModelResponse, error)
UpdateSemanticModel - PERMISSIONS The caller must have contributor or higher workspace role. REQUIRED DELEGATED SCOPES SemanticModel.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] and 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.
- semanticModelID - The semantic model ID.
- updateSemanticModelRequest - Update semantic model request payload.
- options - ItemsClientUpdateSemanticModelOptions contains the optional parameters for the ItemsClient.UpdateSemanticModel 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/semanticmodel" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := semanticmodel.NewClientFactory(cred, nil, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewItemsClient().UpdateSemanticModel(ctx, "cfafbeb1-8037-4d0c-896e-a46fb27ff255", "5b218778-e7a5-4d73-8187-f10824047751", semanticmodel.UpdateSemanticModelRequest{ Description: to.Ptr("A new description for semantic model."), DisplayName: to.Ptr("Semantic models's 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.SemanticModel = semanticmodel.SemanticModel{ // Type: to.Ptr(semanticmodel.ItemTypeSemanticModel), // Description: to.Ptr("A new description for semantic model."), // DisplayName: to.Ptr("Semantic models's New name"), // ID: to.Ptr("5b218778-e7a5-4d73-8187-f10824047751"), // WorkspaceID: to.Ptr("cfafbeb1-8037-4d0c-896e-a46fb27ff255"), // } }
Output:
func (*ItemsClient) UpdateSemanticModelDefinition ¶
func (client *ItemsClient) UpdateSemanticModelDefinition(ctx context.Context, workspaceID string, semanticModelID string, updateSemanticModelDefinitionRequest UpdateSemanticModelDefinitionRequest, options *ItemsClientBeginUpdateSemanticModelDefinitionOptions) (ItemsClientUpdateSemanticModelDefinitionResponse, error)
UpdateSemanticModelDefinition - returns ItemsClientUpdateSemanticModelDefinitionResponse in sync mode. This API supports long running operations (LRO) [/rest/api/fabric/articles/long-running-operation].
Updating the semantic model's definition, does not affect its sensitivity label.
PERMISSIONS The API caller must have contributor or higher workspace role.
REQUIRED DELEGATED SCOPES SemanticModel.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] and Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes |
INTERFACE Generated from API version v1
- workspaceID - The workspace ID.
- semanticModelID - The semantic model ID.
- updateSemanticModelDefinitionRequest - Update semantic model definition request payload.
- options - ItemsClientBeginUpdateSemanticModelDefinitionOptions contains the optional parameters for the ItemsClient.BeginUpdateSemanticModelDefinition method.
type ItemsClientBeginCreateSemanticModelOptions ¶
type ItemsClientBeginCreateSemanticModelOptions struct { // Resumes the long-running operation from the provided token. ResumeToken string }
ItemsClientBeginCreateSemanticModelOptions contains the optional parameters for the ItemsClient.BeginCreateSemanticModel method.
type ItemsClientBeginGetSemanticModelDefinitionOptions ¶
type ItemsClientBeginGetSemanticModelDefinitionOptions struct { // The format of the semantic model definition. // The following formats are allowed (case sensitive) // * - TMDL // // // * - TMSL // // If not specified, the default is 'TMDL'. Format *string // Resumes the long-running operation from the provided token. ResumeToken string }
ItemsClientBeginGetSemanticModelDefinitionOptions contains the optional parameters for the ItemsClient.BeginGetSemanticModelDefinition method.
type ItemsClientBeginUpdateSemanticModelDefinitionOptions ¶
type ItemsClientBeginUpdateSemanticModelDefinitionOptions struct { // Resumes the long-running operation from the provided token. ResumeToken string // When set to true and the .platform file is provided as part of the definition, the item's metadata is updated using the // metadata in the .platform file UpdateMetadata *bool }
ItemsClientBeginUpdateSemanticModelDefinitionOptions contains the optional parameters for the ItemsClient.BeginUpdateSemanticModelDefinition method.
type ItemsClientCreateSemanticModelResponse ¶
type ItemsClientCreateSemanticModelResponse struct { // A semantic model object. SemanticModel }
ItemsClientCreateSemanticModelResponse contains the response from method ItemsClient.BeginCreateSemanticModel.
type ItemsClientDeleteSemanticModelOptions ¶
type ItemsClientDeleteSemanticModelOptions struct { }
ItemsClientDeleteSemanticModelOptions contains the optional parameters for the ItemsClient.DeleteSemanticModel method.
type ItemsClientDeleteSemanticModelResponse ¶
type ItemsClientDeleteSemanticModelResponse struct { }
ItemsClientDeleteSemanticModelResponse contains the response from method ItemsClient.DeleteSemanticModel.
type ItemsClientGetSemanticModelDefinitionResponse ¶
type ItemsClientGetSemanticModelDefinitionResponse struct { // Semantic model public definition response. DefinitionResponse }
ItemsClientGetSemanticModelDefinitionResponse contains the response from method ItemsClient.BeginGetSemanticModelDefinition.
type ItemsClientGetSemanticModelOptions ¶
type ItemsClientGetSemanticModelOptions struct { }
ItemsClientGetSemanticModelOptions contains the optional parameters for the ItemsClient.GetSemanticModel method.
type ItemsClientGetSemanticModelResponse ¶
type ItemsClientGetSemanticModelResponse struct { // A semantic model object. SemanticModel }
ItemsClientGetSemanticModelResponse contains the response from method ItemsClient.GetSemanticModel.
type ItemsClientListSemanticModelsOptions ¶
type ItemsClientListSemanticModelsOptions struct { // A token for retrieving the next page of results. ContinuationToken *string }
ItemsClientListSemanticModelsOptions contains the optional parameters for the ItemsClient.NewListSemanticModelsPager method.
type ItemsClientListSemanticModelsResponse ¶
type ItemsClientListSemanticModelsResponse struct { // A list of semantic models. SemanticModels }
ItemsClientListSemanticModelsResponse contains the response from method ItemsClient.NewListSemanticModelsPager.
type ItemsClientUpdateSemanticModelDefinitionResponse ¶
type ItemsClientUpdateSemanticModelDefinitionResponse struct { }
ItemsClientUpdateSemanticModelDefinitionResponse contains the response from method ItemsClient.BeginUpdateSemanticModelDefinition.
type ItemsClientUpdateSemanticModelOptions ¶
type ItemsClientUpdateSemanticModelOptions struct { }
ItemsClientUpdateSemanticModelOptions contains the optional parameters for the ItemsClient.UpdateSemanticModel method.
type ItemsClientUpdateSemanticModelResponse ¶
type ItemsClientUpdateSemanticModelResponse struct { // A semantic model object. SemanticModel }
ItemsClientUpdateSemanticModelResponse contains the response from method ItemsClient.UpdateSemanticModel.
type PayloadType ¶
type PayloadType string
PayloadType - The type of the definition part payload. Additional payload types may be added over time.
const ( // PayloadTypeInlineBase64 - Inline Base 64. PayloadTypeInlineBase64 PayloadType = "InlineBase64" )
func PossiblePayloadTypeValues ¶
func PossiblePayloadTypeValues() []PayloadType
PossiblePayloadTypeValues returns the possible values for the PayloadType const type.
type SemanticModel ¶
type SemanticModel struct { // REQUIRED; The item type. Type *ItemType // The item description. Description *string // The item display name. DisplayName *string // READ-ONLY; The item ID. ID *string // READ-ONLY; The workspace ID. WorkspaceID *string }
SemanticModel - A semantic model object.
func (SemanticModel) MarshalJSON ¶
func (s SemanticModel) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SemanticModel.
func (*SemanticModel) UnmarshalJSON ¶
func (s *SemanticModel) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SemanticModel.
type SemanticModels ¶
type SemanticModels struct { // REQUIRED; A list of semantic models. Value []SemanticModel // 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 }
SemanticModels - A list of semantic models.
func (SemanticModels) MarshalJSON ¶
func (s SemanticModels) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SemanticModels.
func (*SemanticModels) UnmarshalJSON ¶
func (s *SemanticModels) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SemanticModels.
type UpdateSemanticModelDefinitionRequest ¶
type UpdateSemanticModelDefinitionRequest struct { // REQUIRED; Semantic model public definition [/rest/api/fabric/articles/item-management/definitions/semantic-model-definition] // object. Definition *Definition }
UpdateSemanticModelDefinitionRequest - Update semantic model public definition request payload.
func (UpdateSemanticModelDefinitionRequest) MarshalJSON ¶
func (u UpdateSemanticModelDefinitionRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateSemanticModelDefinitionRequest.
func (*UpdateSemanticModelDefinitionRequest) UnmarshalJSON ¶
func (u *UpdateSemanticModelDefinitionRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateSemanticModelDefinitionRequest.
type UpdateSemanticModelRequest ¶
type UpdateSemanticModelRequest struct { // The semantic model description. Maximum length is 256 characters. Description *string // The semantic model display name. The display name must follow naming rules according to item type. DisplayName *string }
UpdateSemanticModelRequest - Update semantic model request.
func (UpdateSemanticModelRequest) MarshalJSON ¶
func (u UpdateSemanticModelRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateSemanticModelRequest.
func (*UpdateSemanticModelRequest) UnmarshalJSON ¶
func (u *UpdateSemanticModelRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateSemanticModelRequest.