Documentation
¶
Index ¶
- type ClientFactory
- type CopyJob
- type CopyJobs
- type CreateCopyJobRequest
- type Definition
- type DefinitionPart
- type DefinitionResponse
- type ItemTag
- type ItemType
- type ItemsClient
- func (client *ItemsClient) BeginCreateCopyJob(ctx context.Context, workspaceID string, ...) (*runtime.Poller[ItemsClientCreateCopyJobResponse], error)
- func (client *ItemsClient) BeginGetCopyJobDefinition(ctx context.Context, workspaceID string, copyJobID string, ...) (*runtime.Poller[ItemsClientGetCopyJobDefinitionResponse], error)
- func (client *ItemsClient) BeginUpdateCopyJobDefinition(ctx context.Context, workspaceID string, copyJobID string, ...) (*runtime.Poller[ItemsClientUpdateCopyJobDefinitionResponse], error)
- func (client *ItemsClient) CreateCopyJob(ctx context.Context, workspaceID string, ...) (ItemsClientCreateCopyJobResponse, error)
- func (client *ItemsClient) DeleteCopyJob(ctx context.Context, workspaceID string, copyJobID string, ...) (ItemsClientDeleteCopyJobResponse, error)
- func (client *ItemsClient) GetCopyJob(ctx context.Context, workspaceID string, copyJobID string, ...) (ItemsClientGetCopyJobResponse, error)
- func (client *ItemsClient) GetCopyJobDefinition(ctx context.Context, workspaceID string, copyJobID string, ...) (ItemsClientGetCopyJobDefinitionResponse, error)
- func (client *ItemsClient) ListCopyJobs(ctx context.Context, workspaceID string, ...) ([]CopyJob, error)
- func (client *ItemsClient) NewListCopyJobsPager(workspaceID string, options *ItemsClientListCopyJobsOptions) *runtime.Pager[ItemsClientListCopyJobsResponse]
- func (client *ItemsClient) UpdateCopyJob(ctx context.Context, workspaceID string, copyJobID string, ...) (ItemsClientUpdateCopyJobResponse, error)
- func (client *ItemsClient) UpdateCopyJobDefinition(ctx context.Context, workspaceID string, copyJobID string, ...) (ItemsClientUpdateCopyJobDefinitionResponse, error)
- type ItemsClientBeginCreateCopyJobOptions
- type ItemsClientBeginGetCopyJobDefinitionOptions
- type ItemsClientBeginUpdateCopyJobDefinitionOptions
- type ItemsClientCreateCopyJobResponse
- type ItemsClientDeleteCopyJobOptions
- type ItemsClientDeleteCopyJobResponse
- type ItemsClientGetCopyJobDefinitionResponse
- type ItemsClientGetCopyJobOptions
- type ItemsClientGetCopyJobResponse
- type ItemsClientListCopyJobsOptions
- type ItemsClientListCopyJobsResponse
- type ItemsClientUpdateCopyJobDefinitionResponse
- type ItemsClientUpdateCopyJobOptions
- type ItemsClientUpdateCopyJobResponse
- type PayloadType
- type UpdateCopyJobDefinitionRequest
- type UpdateCopyJobRequest
Examples ¶
- ItemsClient.BeginCreateCopyJob (CreateACopyJobExample)
- ItemsClient.BeginCreateCopyJob (CreateACopyJobWithPublicDefinitionExample)
- ItemsClient.BeginGetCopyJobDefinition
- ItemsClient.BeginUpdateCopyJobDefinition
- ItemsClient.DeleteCopyJob
- ItemsClient.GetCopyJob
- ItemsClient.NewListCopyJobsPager
- ItemsClient.UpdateCopyJob
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 CopyJob ¶
type CopyJob struct { // REQUIRED; The item type. Type *ItemType // The item description. Description *string // The item display name. DisplayName *string // READ-ONLY; The folder ID. FolderID *string // READ-ONLY; The item ID. ID *string // READ-ONLY; List of applied tags. Tags []ItemTag // READ-ONLY; The workspace ID. WorkspaceID *string }
CopyJob - A CopyJob object.
func (CopyJob) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type CopyJob.
func (*CopyJob) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type CopyJob.
type CopyJobs ¶
type CopyJobs struct { // REQUIRED; A list of CopyJobs. Value []CopyJob // 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 }
CopyJobs - A list of CopyJobs.
func (CopyJobs) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type CopyJobs.
func (*CopyJobs) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type CopyJobs.
type CreateCopyJobRequest ¶
type CreateCopyJobRequest struct { // REQUIRED; The CopyJob display name. The display name must follow naming rules according to item type. DisplayName *string // The CopyJob public definition. Definition *Definition // The CopyJob description. Maximum length is 256 characters. Description *string // The folder ID. If not specified or null, the CopyJob is created with the workspace as its folder. FolderID *string }
CreateCopyJobRequest - Create CopyJob request payload.
func (CreateCopyJobRequest) MarshalJSON ¶
func (c CreateCopyJobRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CreateCopyJobRequest.
func (*CreateCopyJobRequest) UnmarshalJSON ¶
func (c *CreateCopyJobRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CreateCopyJobRequest.
type Definition ¶
type Definition struct { // REQUIRED; A list of definition parts. Parts []DefinitionPart // The format of the item definition. Format *string }
Definition - CopyJob public definition object. Refer to Copy job definition [/rest/api/fabric/articles/item-management/definitions/copyjob-definition] for more details on how to craft a CopyJob public definition.
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 CopyJob public definition part path. Path *string // The CopyJob public definition part payload. Payload *string // The payload type. PayloadType *PayloadType }
DefinitionPart - CopyJob 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; CopyJob public definition object. Refer to Copy job definition [/rest/api/fabric/articles/item-management/definitions/copyjob-definition] // for more details on how to craft a CopyJob public definition. Definition *Definition }
DefinitionResponse - CopyJob 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 ItemTag ¶ added in v0.2.0
type ItemTag struct { // REQUIRED; The name of the tag. DisplayName *string // REQUIRED; The tag ID. ID *string }
ItemTag - Represents a tag applied on an item.
func (ItemTag) MarshalJSON ¶ added in v0.2.0
MarshalJSON implements the json.Marshaller interface for type ItemTag.
func (*ItemTag) UnmarshalJSON ¶ added in v0.2.0
UnmarshalJSON implements the json.Unmarshaller interface for type ItemTag.
type ItemType ¶
type ItemType string
ItemType - The type of the item. Additional item types may be added over time.
const ( // ItemTypeApacheAirflowJob - An ApacheAirflowJob. ItemTypeApacheAirflowJob ItemType = "ApacheAirflowJob" // ItemTypeCopyJob - A Copy job. ItemTypeCopyJob ItemType = "CopyJob" // ItemTypeDashboard - PowerBI dashboard. ItemTypeDashboard ItemType = "Dashboard" // ItemTypeDataPipeline - A data pipeline. ItemTypeDataPipeline ItemType = "DataPipeline" // ItemTypeDataflow - A Dataflow. ItemTypeDataflow ItemType = "Dataflow" // ItemTypeDatamart - PowerBI datamart. ItemTypeDatamart ItemType = "Datamart" // ItemTypeDigitalTwinBuilder - A DigitalTwinBuilder. ItemTypeDigitalTwinBuilder ItemType = "DigitalTwinBuilder" // ItemTypeDigitalTwinBuilderFlow - A Digital Twin Builder Flow. ItemTypeDigitalTwinBuilderFlow ItemType = "DigitalTwinBuilderFlow" // 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" // ItemTypeMirroredAzureDatabricksCatalog - A mirrored azure databricks catalog. ItemTypeMirroredAzureDatabricksCatalog ItemType = "MirroredAzureDatabricksCatalog" // ItemTypeMirroredDatabase - A mirrored database. ItemTypeMirroredDatabase ItemType = "MirroredDatabase" // ItemTypeMirroredWarehouse - A mirrored warehouse. ItemTypeMirroredWarehouse ItemType = "MirroredWarehouse" // ItemTypeMountedDataFactory - A MountedDataFactory. ItemTypeMountedDataFactory ItemType = "MountedDataFactory" // 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" // ItemTypeSQLDatabase - A SQLDatabase. ItemTypeSQLDatabase ItemType = "SQLDatabase" // ItemTypeSQLEndpoint - An SQL endpoint. ItemTypeSQLEndpoint ItemType = "SQLEndpoint" // ItemTypeSemanticModel - PowerBI semantic model. ItemTypeSemanticModel ItemType = "SemanticModel" // ItemTypeSparkJobDefinition - A spark job definition. ItemTypeSparkJobDefinition ItemType = "SparkJobDefinition" // ItemTypeVariableLibrary - A VariableLibrary. ItemTypeVariableLibrary ItemType = "VariableLibrary" // ItemTypeWarehouse - A warehouse. ItemTypeWarehouse ItemType = "Warehouse" // ItemTypeWarehouseSnapshot - A Warehouse snapshot. ItemTypeWarehouseSnapshot ItemType = "WarehouseSnapshot" )
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) BeginCreateCopyJob ¶
func (client *ItemsClient) BeginCreateCopyJob(ctx context.Context, workspaceID string, createCopyJobRequest CreateCopyJobRequest, options *ItemsClientBeginCreateCopyJobOptions) (*runtime.Poller[ItemsClientCreateCopyJobResponse], error)
BeginCreateCopyJob - This API supports long running operations (LRO) [/rest/api/fabric/articles/long-running-operation]. To create CopyJob with a public definition, refer to CopyJob [/rest/api/fabric/articles/item-management/definitions/CopyJob]. PERMISSIONS THE CALLER MUST HAVE A CONTRIBUTOR WORKSPACE ROLE. REQUIRED DELEGATED SCOPES CopyJob.ReadWrite.All or Item.ReadWrite.All LIMITATIONS * To create a CopyJob 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] 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.
- createCopyJobRequest - Create item request payload.
- options - ItemsClientBeginCreateCopyJobOptions contains the optional parameters for the ItemsClient.BeginCreateCopyJob method.
Example (CreateACopyJobExample) ¶
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/copyjob" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := copyjob.NewClientFactory(cred, nil, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewItemsClient().BeginCreateCopyJob(ctx, "cfafbeb1-8037-4d0c-896e-a46fb27ff229", copyjob.CreateCopyJobRequest{ Description: to.Ptr("A Copy job description."), DisplayName: to.Ptr("CopyJob 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) } }
Example (CreateACopyJobWithPublicDefinitionExample) ¶
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/copyjob" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := copyjob.NewClientFactory(cred, nil, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewItemsClient().BeginCreateCopyJob(ctx, "cfafbeb1-8037-4d0c-896e-a46fb27ff229", copyjob.CreateCopyJobRequest{ Description: to.Ptr("A Copy job description."), Definition: ©job.Definition{ Parts: []copyjob.DefinitionPart{ { Path: to.Ptr("copyjob-content.json"), Payload: to.Ptr("ewogICJwcm9wZXJ0aWVzIjogewogICAgImpvYk1vZGUiOiAiQmF0Y2giCiAgfSwKICAiYWN0aXZpdGllcyI6IFtdCn0="), PayloadType: to.Ptr(copyjob.PayloadTypeInlineBase64), }, { Path: to.Ptr(".platform"), Payload: to.Ptr("ZG90UGxhdGZvcm1CYXNlNjRTdHJpbmc="), PayloadType: to.Ptr(copyjob.PayloadTypeInlineBase64), }}, }, DisplayName: to.Ptr("CopyJob 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) } }
func (*ItemsClient) BeginGetCopyJobDefinition ¶
func (client *ItemsClient) BeginGetCopyJobDefinition(ctx context.Context, workspaceID string, copyJobID string, options *ItemsClientBeginGetCopyJobDefinitionOptions) (*runtime.Poller[ItemsClientGetCopyJobDefinitionResponse], error)
BeginGetCopyJobDefinition - This API supports long running operations (LRO) [/rest/api/fabric/articles/long-running-operation]. When you get a CopyJob's public definition, the sensitivity label is not a part of the definition. PERMISSIONS The caller must have read and write permissions for the copy job. 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.
- copyJobID - The CopyJob ID.
- options - ItemsClientBeginGetCopyJobDefinitionOptions contains the optional parameters for the ItemsClient.BeginGetCopyJobDefinition 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/copyjob" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := copyjob.NewClientFactory(cred, nil, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewItemsClient().BeginGetCopyJobDefinition(ctx, "6e335e92-a2a2-4b5a-970a-bd6a89fbb765", "cfafbeb1-8037-4d0c-896e-a46fb27ff229", ©job.ItemsClientBeginGetCopyJobDefinitionOptions{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 = copyjob.DefinitionResponse{ // Definition: ©job.Definition{ // Parts: []copyjob.DefinitionPart{ // { // Path: to.Ptr("copyjob-content.json"), // Payload: to.Ptr("ewogICJwcm9wZXJ0aWVzIjogewogICAgImpvYk1vZGUiOiAiQmF0Y2giCiAgfSwKICAiYWN0aXZpdGllcyI6IFtdCn0="), // PayloadType: to.Ptr(copyjob.PayloadTypeInlineBase64), // }, // { // Path: to.Ptr(".platform"), // Payload: to.Ptr("ZG90UGxhdGZvcm1CYXNlNjRTdHJpbmc="), // PayloadType: to.Ptr(copyjob.PayloadTypeInlineBase64), // }}, // }, // } }
func (*ItemsClient) BeginUpdateCopyJobDefinition ¶
func (client *ItemsClient) BeginUpdateCopyJobDefinition(ctx context.Context, workspaceID string, copyJobID string, updateCopyJobDefinitionRequest UpdateCopyJobDefinitionRequest, options *ItemsClientBeginUpdateCopyJobDefinitionOptions) (*runtime.Poller[ItemsClientUpdateCopyJobDefinitionResponse], error)
BeginUpdateCopyJobDefinition - This API supports long running operations (LRO) [/rest/api/fabric/articles/long-running-operation]. Updating the CopyJob's definition, does not affect its sensitivity label. PERMISSIONS The caller must have read and write permissions for the copy job. REQUIRED DELEGATED SCOPES CopyJob.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.
- copyJobID - The CopyJob ID.
- updateCopyJobDefinitionRequest - Update CopyJob definition request payload.
- options - ItemsClientBeginUpdateCopyJobDefinitionOptions contains the optional parameters for the ItemsClient.BeginUpdateCopyJobDefinition 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/copyjob" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := copyjob.NewClientFactory(cred, nil, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewItemsClient().BeginUpdateCopyJobDefinition(ctx, "cfafbeb1-8037-4d0c-896e-a46fb27ff229", "5b218778-e7a5-4d73-8187-f10824047715", copyjob.UpdateCopyJobDefinitionRequest{ Definition: ©job.Definition{ Parts: []copyjob.DefinitionPart{ { Path: to.Ptr("copyjob-content.json"), Payload: to.Ptr("ewogICJwcm9wZXJ0aWVzIjogewogICAgImpvYk1vZGUiOiAiQ0RDIgogIH0sCiAgImFjdGl2aXRpZXMiOiBbXQp9"), PayloadType: to.Ptr(copyjob.PayloadTypeInlineBase64), }, { Path: to.Ptr(".platform"), Payload: to.Ptr("ZG90UGxhdGZvcm1CYXNlNjRTdHJpbmc="), PayloadType: to.Ptr(copyjob.PayloadTypeInlineBase64), }}, }, }, ©job.ItemsClientBeginUpdateCopyJobDefinitionOptions{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) } }
func (*ItemsClient) CreateCopyJob ¶
func (client *ItemsClient) CreateCopyJob(ctx context.Context, workspaceID string, createCopyJobRequest CreateCopyJobRequest, options *ItemsClientBeginCreateCopyJobOptions) (ItemsClientCreateCopyJobResponse, error)
CreateCopyJob - returns ItemsClientCreateCopyJobResponse in sync mode. This API supports long running operations (LRO) [/rest/api/fabric/articles/long-running-operation].
To create CopyJob with a public definition, refer to CopyJob [/rest/api/fabric/articles/item-management/definitions/CopyJob].
PERMISSIONS THE CALLER MUST HAVE A CONTRIBUTOR WORKSPACE ROLE. REQUIRED DELEGATED SCOPES CopyJob.ReadWrite.All or Item.ReadWrite.All
LIMITATIONS
- To create a CopyJob 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] and Managed identities [/entra/identity/managed-identities-azure-resources/overview] | Yes |
INTERFACE Generated from API version v1
- workspaceID - The workspace ID.
- createCopyJobRequest - Create item request payload.
- options - ItemsClientBeginCreateCopyJobOptions contains the optional parameters for the ItemsClient.BeginCreateCopyJob method.
func (*ItemsClient) DeleteCopyJob ¶
func (client *ItemsClient) DeleteCopyJob(ctx context.Context, workspaceID string, copyJobID string, options *ItemsClientDeleteCopyJobOptions) (ItemsClientDeleteCopyJobResponse, error)
DeleteCopyJob - PERMISSIONS The caller must have write permissions for the copy job. REQUIRED DELEGATED SCOPES CopyJob.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.
- copyJobID - The CopyJob ID.
- options - ItemsClientDeleteCopyJobOptions contains the optional parameters for the ItemsClient.DeleteCopyJob 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/copyjob" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := copyjob.NewClientFactory(cred, nil, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewItemsClient().DeleteCopyJob(ctx, "cfafbeb1-8037-4d0c-896e-a46fb27ff229", "5b218778-e7a5-4d73-8187-f10824047715", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
func (*ItemsClient) GetCopyJob ¶
func (client *ItemsClient) GetCopyJob(ctx context.Context, workspaceID string, copyJobID string, options *ItemsClientGetCopyJobOptions) (ItemsClientGetCopyJobResponse, error)
GetCopyJob - PERMISSIONS The caller must have read permissions for the copy job. REQUIRED DELEGATED SCOPES CopyJob.Read.All or CopyJob.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.
- copyJobID - The CopyJob ID.
- options - ItemsClientGetCopyJobOptions contains the optional parameters for the ItemsClient.GetCopyJob 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/copyjob" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := copyjob.NewClientFactory(cred, nil, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewItemsClient().GetCopyJob(ctx, "f089354e-8366-4e18-aea3-4cb4a3a50b48", "41ce06d1-d81b-4ea0-bc6d-2ce3dd2f8e87", 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.CopyJob = copyjob.CopyJob{ // Type: to.Ptr(copyjob.ItemTypeCopyJob), // Description: to.Ptr("A Copy job description."), // DisplayName: to.Ptr("CopyJob 1"), // ID: to.Ptr("5b218778-e7a5-4d73-8187-f10824047715"), // WorkspaceID: to.Ptr("cfafbeb1-8037-4d0c-896e-a46fb27ff229"), // } }
func (*ItemsClient) GetCopyJobDefinition ¶
func (client *ItemsClient) GetCopyJobDefinition(ctx context.Context, workspaceID string, copyJobID string, options *ItemsClientBeginGetCopyJobDefinitionOptions) (ItemsClientGetCopyJobDefinitionResponse, error)
GetCopyJobDefinition - returns ItemsClientGetCopyJobDefinitionResponse in sync mode. This API supports long running operations (LRO) [/rest/api/fabric/articles/long-running-operation].
When you get a CopyJob's public definition, the sensitivity label is not a part of the definition.
PERMISSIONS The caller must have read and write permissions for the copy job.
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.
- copyJobID - The CopyJob ID.
- options - ItemsClientBeginGetCopyJobDefinitionOptions contains the optional parameters for the ItemsClient.BeginGetCopyJobDefinition method.
func (*ItemsClient) ListCopyJobs ¶
func (client *ItemsClient) ListCopyJobs(ctx context.Context, workspaceID string, options *ItemsClientListCopyJobsOptions) ([]CopyJob, error)
ListCopyJobs - returns array of CopyJob from all pages. This API supports pagination [/rest/api/fabric/articles/pagination].
PERMISSIONS The caller must have a viewer 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 - ItemsClientListCopyJobsOptions contains the optional parameters for the ItemsClient.NewListCopyJobsPager method.
func (*ItemsClient) NewListCopyJobsPager ¶
func (client *ItemsClient) NewListCopyJobsPager(workspaceID string, options *ItemsClientListCopyJobsOptions) *runtime.Pager[ItemsClientListCopyJobsResponse]
NewListCopyJobsPager - This API supports pagination [/rest/api/fabric/articles/pagination]. PERMISSIONS The caller must have a viewer 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 - ItemsClientListCopyJobsOptions contains the optional parameters for the ItemsClient.NewListCopyJobsPager 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/copyjob" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := copyjob.NewClientFactory(cred, nil, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewItemsClient().NewListCopyJobsPager("cfafbeb1-8037-4d0c-896e-a46fb27ff229", ©job.ItemsClientListCopyJobsOptions{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.CopyJobs = copyjob.CopyJobs{ // Value: []copyjob.CopyJob{ // { // Type: to.Ptr(copyjob.ItemTypeCopyJob), // Description: to.Ptr("A Copy job description."), // DisplayName: to.Ptr("CopyJob Name 1"), // ID: to.Ptr("3546052c-ae64-4526-b1a8-52af7761426f"), // WorkspaceID: to.Ptr("cfafbeb1-8037-4d0c-896e-a46fb27ff229"), // }, // { // Type: to.Ptr(copyjob.ItemTypeCopyJob), // Description: to.Ptr("A Copy job description."), // DisplayName: to.Ptr("CopyJob Name 2"), // ID: to.Ptr("f697fb63-abd4-4399-9548-be7e3c3c0dac"), // WorkspaceID: to.Ptr("cfafbeb1-8037-4d0c-896e-a46fb27ff229"), // }}, // } } }
func (*ItemsClient) UpdateCopyJob ¶
func (client *ItemsClient) UpdateCopyJob(ctx context.Context, workspaceID string, copyJobID string, updateCopyJobRequest UpdateCopyJobRequest, options *ItemsClientUpdateCopyJobOptions) (ItemsClientUpdateCopyJobResponse, error)
UpdateCopyJob - PERMISSIONS The caller must have read and write permissions for the copy job. REQUIRED DELEGATED SCOPES CopyJob.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.
- copyJobID - The CopyJob ID.
- updateCopyJobRequest - Update CopyJob request payload.
- options - ItemsClientUpdateCopyJobOptions contains the optional parameters for the ItemsClient.UpdateCopyJob 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/copyjob" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := copyjob.NewClientFactory(cred, nil, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewItemsClient().UpdateCopyJob(ctx, "cfafbeb1-8037-4d0c-896e-a46fb27ff229", "5b218778-e7a5-4d73-8187-f10824047715", copyjob.UpdateCopyJobRequest{ Description: to.Ptr("CopyJob's New description"), DisplayName: to.Ptr("CopyJob'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.CopyJob = copyjob.CopyJob{ // Type: to.Ptr(copyjob.ItemTypeCopyJob), // Description: to.Ptr("CopyJob's New description"), // DisplayName: to.Ptr("CopyJob's New name"), // ID: to.Ptr("5b218778-e7a5-4d73-8187-f10824047715"), // WorkspaceID: to.Ptr("cfafbeb1-8037-4d0c-896e-a46fb27ff229"), // } }
func (*ItemsClient) UpdateCopyJobDefinition ¶
func (client *ItemsClient) UpdateCopyJobDefinition(ctx context.Context, workspaceID string, copyJobID string, updateCopyJobDefinitionRequest UpdateCopyJobDefinitionRequest, options *ItemsClientBeginUpdateCopyJobDefinitionOptions) (ItemsClientUpdateCopyJobDefinitionResponse, error)
UpdateCopyJobDefinition - returns ItemsClientUpdateCopyJobDefinitionResponse in sync mode. This API supports long running operations (LRO) [/rest/api/fabric/articles/long-running-operation].
Updating the CopyJob's definition, does not affect its sensitivity label.
PERMISSIONS The caller must have read and write permissions for the copy job.
REQUIRED DELEGATED SCOPES CopyJob.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.
- copyJobID - The CopyJob ID.
- updateCopyJobDefinitionRequest - Update CopyJob definition request payload.
- options - ItemsClientBeginUpdateCopyJobDefinitionOptions contains the optional parameters for the ItemsClient.BeginUpdateCopyJobDefinition method.
type ItemsClientBeginCreateCopyJobOptions ¶
type ItemsClientBeginCreateCopyJobOptions struct { // Resumes the long-running operation from the provided token. ResumeToken string }
ItemsClientBeginCreateCopyJobOptions contains the optional parameters for the ItemsClient.BeginCreateCopyJob method.
type ItemsClientBeginGetCopyJobDefinitionOptions ¶
type ItemsClientBeginGetCopyJobDefinitionOptions struct { // The format of the CopyJob public definition. Format *string // Resumes the long-running operation from the provided token. ResumeToken string }
ItemsClientBeginGetCopyJobDefinitionOptions contains the optional parameters for the ItemsClient.BeginGetCopyJobDefinition method.
type ItemsClientBeginUpdateCopyJobDefinitionOptions ¶
type ItemsClientBeginUpdateCopyJobDefinitionOptions 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 }
ItemsClientBeginUpdateCopyJobDefinitionOptions contains the optional parameters for the ItemsClient.BeginUpdateCopyJobDefinition method.
type ItemsClientCreateCopyJobResponse ¶
type ItemsClientCreateCopyJobResponse struct { // A CopyJob object. CopyJob }
ItemsClientCreateCopyJobResponse contains the response from method ItemsClient.BeginCreateCopyJob.
type ItemsClientDeleteCopyJobOptions ¶
type ItemsClientDeleteCopyJobOptions struct { }
ItemsClientDeleteCopyJobOptions contains the optional parameters for the ItemsClient.DeleteCopyJob method.
type ItemsClientDeleteCopyJobResponse ¶
type ItemsClientDeleteCopyJobResponse struct { }
ItemsClientDeleteCopyJobResponse contains the response from method ItemsClient.DeleteCopyJob.
type ItemsClientGetCopyJobDefinitionResponse ¶
type ItemsClientGetCopyJobDefinitionResponse struct { // CopyJob public definition response. DefinitionResponse }
ItemsClientGetCopyJobDefinitionResponse contains the response from method ItemsClient.BeginGetCopyJobDefinition.
type ItemsClientGetCopyJobOptions ¶
type ItemsClientGetCopyJobOptions struct { }
ItemsClientGetCopyJobOptions contains the optional parameters for the ItemsClient.GetCopyJob method.
type ItemsClientGetCopyJobResponse ¶
type ItemsClientGetCopyJobResponse struct { // A CopyJob object. CopyJob }
ItemsClientGetCopyJobResponse contains the response from method ItemsClient.GetCopyJob.
type ItemsClientListCopyJobsOptions ¶
type ItemsClientListCopyJobsOptions struct { // A token for retrieving the next page of results. ContinuationToken *string }
ItemsClientListCopyJobsOptions contains the optional parameters for the ItemsClient.NewListCopyJobsPager method.
type ItemsClientListCopyJobsResponse ¶
type ItemsClientListCopyJobsResponse struct { // A list of CopyJobs. CopyJobs }
ItemsClientListCopyJobsResponse contains the response from method ItemsClient.NewListCopyJobsPager.
type ItemsClientUpdateCopyJobDefinitionResponse ¶
type ItemsClientUpdateCopyJobDefinitionResponse struct { }
ItemsClientUpdateCopyJobDefinitionResponse contains the response from method ItemsClient.BeginUpdateCopyJobDefinition.
type ItemsClientUpdateCopyJobOptions ¶
type ItemsClientUpdateCopyJobOptions struct { }
ItemsClientUpdateCopyJobOptions contains the optional parameters for the ItemsClient.UpdateCopyJob method.
type ItemsClientUpdateCopyJobResponse ¶
type ItemsClientUpdateCopyJobResponse struct { // A CopyJob object. CopyJob }
ItemsClientUpdateCopyJobResponse contains the response from method ItemsClient.UpdateCopyJob.
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 UpdateCopyJobDefinitionRequest ¶
type UpdateCopyJobDefinitionRequest struct { // REQUIRED; CopyJob public definition object. Refer to Copy job definition [/rest/api/fabric/articles/item-management/definitions/copyjob-definition] // for more details on how to craft a CopyJob public definition. Definition *Definition }
UpdateCopyJobDefinitionRequest - Update CopyJob public definition request payload.
func (UpdateCopyJobDefinitionRequest) MarshalJSON ¶
func (u UpdateCopyJobDefinitionRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateCopyJobDefinitionRequest.
func (*UpdateCopyJobDefinitionRequest) UnmarshalJSON ¶
func (u *UpdateCopyJobDefinitionRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateCopyJobDefinitionRequest.
type UpdateCopyJobRequest ¶
type UpdateCopyJobRequest struct { // The CopyJob description. Maximum length is 256 characters. Description *string // The CopyJob display name. The display name must follow naming rules according to item type. DisplayName *string }
UpdateCopyJobRequest - Update CopyJob request.
func (UpdateCopyJobRequest) MarshalJSON ¶
func (u UpdateCopyJobRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateCopyJobRequest.
func (*UpdateCopyJobRequest) UnmarshalJSON ¶
func (u *UpdateCopyJobRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateCopyJobRequest.