Update-FabricMirroredDatabaseDefinition
Updates the definition of a MirroredDatabase in a Microsoft Fabric workspace.
Syntax
Update-FabricMirroredDatabaseDefinition [-WorkspaceId] <guid> [-MirroredDatabaseId] <guid>
[-MirroredDatabasePathDefinition] <string> [[-MirroredDatabasePathPlatformDefinition] <string>]
[-WhatIf] [-Confirm] [<CommonParameters>]Description
This function allows updating the content or metadata of a MirroredDatabase in a Microsoft Fabric workspace. The MirroredDatabase content can be provided as file paths, and metadata updates can optionally be enabled.
Examples
Example 1
Updates the content of the MirroredDatabase with ID 67890 in the workspace 12345 using the specified MirroredDatabase file.
Update-FabricMirroredDatabaseDefinition -WorkspaceId "12345" -MirroredDatabaseId "67890" -MirroredDatabasePathDefinition "C:\MirroredDatabases\MirroredDatabase.json"Example 2
Updates both the content and metadata of the MirroredDatabase with ID 67890 in the workspace 12345.
Update-FabricMirroredDatabaseDefinition -WorkspaceId "12345" -MirroredDatabaseId "67890" -MirroredDatabasePathDefinition "C:\MirroredDatabases\MirroredDatabase.json" -UpdateMetadata $trueParameters
| Name | Type | Req. | Pos. | Pipeline | Description |
|---|---|---|---|---|---|
| -MirroredDatabaseId | guid | ✓Required | 1 | – | (Mandatory) The unique identifier of the MirroredDatabase to be updated. |
| -MirroredDatabasePathDefinition | string | ✓Required | 2 | – | (Mandatory) The file path to the MirroredDatabase content definition file. The content will be encoded as Base64 and sent in the request. |
| -WorkspaceId | guid | ✓Required | 0 | – | (Mandatory) The unique identifier of the workspace where the MirroredDatabase resides. |
| -Confirmalias: cf | switch | Named | – | Prompts you for confirmation before running the cmdlet. |
|
| -MirroredDatabasePathPlatformDefinition | string | 3 | – | (Optional) The file path to the MirroredDatabase's platform-specific definition file. The content will be encoded as Base64 and sent in the request. |
|
| -WhatIfalias: wi | switch | Named | – | Runs the command in a mode that only reports what would happen without performing the actions. |
This cmdlet also supports the common parameters, such as -Verbose and -ErrorAction. See about_CommonParameters.
Notes
- Requires
$FabricConfigglobal configuration, includingBaseUrlandFabricHeaders. - Calls
Confirm-TokenStateto ensure token validity before making the API request. - The MirroredDatabase content is encoded as Base64 before being sent to the Fabric API.
- This function handles asynchronous operations and retrieves operation results if required.
Author: Tiago Balabuch, Kamil Nowinski