You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
23
23
-`Remove-FabricWorkspaceFromStage`,
24
24
-`Start-FabricDeploymentPipelineStage`
25
25
- Added private function `Get-FabricContinuationToken` to facilitate pagination
26
+
-`Invoke-FabricRestMethod` handles throttling (error 429) by pausing and repeating the request (#88)
26
27
27
28
### Changed
28
29
@@ -32,6 +33,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
32
33
-`Get-FabricSqlDatabase` accepts Workspace as a pipeline, handles errors correctly and can filter by name (#117).
33
34
- Applied splatting for several parameters in `Invoke-FabricRestMethod` and output results in debug mode
34
35
-`Remove-FabricSQLDatabase` uses unified function to handle API results
36
+
- Internal function `Invoke-FabricRestMethod`: (#143)
37
+
- handles API response, no need to use `Test-FabricApiResponse` from parent public function
38
+
- handles pagination automatically (when `-HandleResponse` is provided)
39
+
- All Deployment Pipeline functions raise an error when an exception is caught. Used splatting for params.
40
+
- Refactored SQL Database functions to use enhanced capability in `Invoke-FabricRestMethod`. Used splatting for params.
41
+
-`Write-Message` uses PSFramework function for logging, which logs function name (#84)
35
42
36
43
Updated the `WorkspaceId`, `CapacitiesIds`,`CapacityId`,`CopyJobId`,`datamartId`,`DataPipelineId`,`DataWarehouseGUID`,`DomainId`,`EnvironmentId`,`EventhouseId`,`EventstreamId`,`ExternalDataShareId`,`ItemId`,`KQLDashboardId`,`KQLDatabaseId`,`KQLQuerysetId`,`LakehouseId`,`MirroredDatabaseId`,`MirroredWarehouseId`,`MLExperimentId`,`MLModelId`,`NotebookId`,`operationId`,`PaginatedReportId`,`ParentDomainId`,`parentEventhouseId`,`PrincipalId`,`ReflexId`,`ReportId`,`SemanticModelId`,`SparkCustomPoolId`,`SparkJobDefinitionId`,`SQLDatabaseId`,`SQLEndpointId`,`subscriptionID`,`UserId`,`WarehouseId`,`WorkspaceGUID`,`WorkspaceId`,`WorkspaceIds`,and `WorkspaceRoleAssignmentId` parameters to the datatype GUID [#125](https://github.com/dataplat/FabricTools/issues/125)
37
44
@@ -40,6 +47,7 @@ Updated the `WorkspaceId`, `CapacitiesIds`,`CapacityId`,`CopyJobId`,`datamartId`
40
47
- Enhanced logic in unified function `Test-FabricApiResponse` to handle API results and moved it to private functions
41
48
- Fixed bug in `Get-FabricLongRunningOperation` - Uri was incorectly created (#131)
42
49
- Fixed bug in `Get-FabricLongRunningOperationResult` - uses correct statusCode (#131)
50
+
- Fixed `Start-FabricDeploymentPipelineStage` that supports `-NoWait` correctly
Copy file name to clipboardExpand all lines: source/Private/Test-FabricApiResponse.ps1
+70-21Lines changed: 70 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -10,12 +10,26 @@ function Test-FabricApiResponse {
10
10
.PARAMETERResponse
11
11
The response body from the API call.
12
12
13
+
.PARAMETERResponseHeader
14
+
The response headers from the API call. This is used to retrieve operation IDs and other metadata.
15
+
16
+
.PARAMETERStatusCode
17
+
The HTTP status code returned by the API call. This is used to determine how to handle the response.
18
+
19
+
.PARAMETEROperation
20
+
The operation being performed by parent function (e.g., 'New', 'Update', 'Remove', 'Get'). It helps in logging appropriate messages.
21
+
This parameter is optional and can be used to customize the logging message based on the operation type.
22
+
13
23
.PARAMETERObjectIdOrName
14
24
The name or ID of the resource being operated.
15
25
16
26
.PARAMETERTypeName
17
27
The type of resource being operated (default: 'Fabric Item').
18
28
29
+
.PARAMETERSuccessMessage
30
+
A custom success message to log upon successful completion of the operation. This overrides the default message based on Operation, TypeName, ObjectIdOrName.
31
+
This parameter is optional and can be used to provide a specific success message for the operation.
32
+
19
33
.PARAMETERNoWait
20
34
If specified, the function will not wait for the operation to complete and will return immediately.
21
35
@@ -33,48 +47,61 @@ function Test-FabricApiResponse {
33
47
- This function is designed to be used within the context of a Fabric API client.
34
48
- It requires the `Write-Message` function to log messages at different levels (Info, Debug, Error).
35
49
- The function handles long-running operations by checking the status of the operation and retrieving the result if it has succeeded.
50
+
- Supports handling of API rate limiting (HTTP 429) by waiting for the specified retry duration before returning a command to repeat the request.
36
51
37
52
Author: Kamil Nowinski
38
53
39
54
#>
40
55
41
56
[CmdletBinding()]
42
57
param (
43
-
[Parameter(Mandatory=$false)]
58
+
[Parameter(Mandatory=$false)]# Response is $null when Response Code is 202
0 commit comments