msfabricpysdkcore 0.2.1__py3-none-any.whl → 0.2.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- msfabricpysdkcore/adminapi.py +142 -2
- msfabricpysdkcore/coreapi.py +475 -8
- msfabricpysdkcore/item.py +6 -4
- msfabricpysdkcore/otheritems.py +93 -0
- msfabricpysdkcore/tests/__init__.py +0 -0
- msfabricpysdkcore/tests/test_admin_apis.py +174 -0
- msfabricpysdkcore/tests/test_connection.py +111 -0
- msfabricpysdkcore/tests/test_datapipelines.py +45 -0
- msfabricpysdkcore/tests/test_deployment_pipeline.py +63 -0
- msfabricpysdkcore/tests/test_domains.py +126 -0
- msfabricpysdkcore/tests/test_environments.py +114 -0
- msfabricpysdkcore/tests/test_evenhouses.py +56 -0
- msfabricpysdkcore/tests/test_evenstreams.py +52 -0
- msfabricpysdkcore/tests/test_external_data_shares.py +51 -0
- msfabricpysdkcore/tests/test_fabric_azure_client.py +80 -0
- msfabricpysdkcore/tests/test_gateways.py +99 -0
- msfabricpysdkcore/tests/test_git.py +66 -0
- msfabricpysdkcore/tests/test_graphqlapi.py +44 -0
- msfabricpysdkcore/tests/test_items.py +97 -0
- msfabricpysdkcore/tests/test_jobs.py +96 -0
- msfabricpysdkcore/tests/test_kql_dashboards.py +63 -0
- msfabricpysdkcore/tests/test_kql_queryset.py +64 -0
- msfabricpysdkcore/tests/test_kqldatabases.py +56 -0
- msfabricpysdkcore/tests/test_lakehouse.py +93 -0
- msfabricpysdkcore/tests/test_managed_private_endpoints.py +61 -0
- msfabricpysdkcore/tests/test_mirroreddatabases.py +80 -0
- msfabricpysdkcore/tests/test_ml_experiments.py +47 -0
- msfabricpysdkcore/tests/test_ml_models.py +47 -0
- msfabricpysdkcore/tests/test_mounted_adf.py +64 -0
- msfabricpysdkcore/tests/test_notebooks.py +57 -0
- msfabricpysdkcore/tests/test_one_lake_data_access_security.py +63 -0
- msfabricpysdkcore/tests/test_other_items.py +45 -0
- msfabricpysdkcore/tests/test_reflex.py +57 -0
- msfabricpysdkcore/tests/test_reports.py +56 -0
- msfabricpysdkcore/tests/test_semantic_model.py +56 -0
- msfabricpysdkcore/tests/test_shortcuts.py +60 -0
- msfabricpysdkcore/tests/test_spark.py +91 -0
- msfabricpysdkcore/tests/test_sparkjobdefinition.py +55 -0
- msfabricpysdkcore/tests/test_sqldatabases.py +45 -0
- msfabricpysdkcore/tests/test_warehouses.py +50 -0
- msfabricpysdkcore/tests/test_workspaces_capacities.py +159 -0
- msfabricpysdkcore/workspace.py +149 -5
- {msfabricpysdkcore-0.2.1.dist-info → msfabricpysdkcore-0.2.2.dist-info}/METADATA +31 -5
- msfabricpysdkcore-0.2.2.dist-info/RECORD +65 -0
- {msfabricpysdkcore-0.2.1.dist-info → msfabricpysdkcore-0.2.2.dist-info}/WHEEL +1 -1
- msfabricpysdkcore-0.2.1.dist-info/RECORD +0 -28
- {msfabricpysdkcore-0.2.1.dist-info → msfabricpysdkcore-0.2.2.dist-info}/LICENSE +0 -0
- {msfabricpysdkcore-0.2.1.dist-info → msfabricpysdkcore-0.2.2.dist-info}/top_level.txt +0 -0
msfabricpysdkcore/adminapi.py
CHANGED
@@ -505,6 +505,25 @@ class FabricClientAdmin(FabricClient):
|
|
505
505
|
|
506
506
|
# Tenant Settings APIs
|
507
507
|
|
508
|
+
# DELETE https://api.fabric.microsoft.com/v1/admin/capacities/{capacityId}/delegatedTenantSettingOverrides/{tenantSettingName}
|
509
|
+
def delete_capacity_tenant_setting_override(self, capacity_id, tenant_setting_name):
|
510
|
+
"""Delete a tenant setting override at the capacity
|
511
|
+
|
512
|
+
Args:
|
513
|
+
capacity_id (str): The ID of the capacity
|
514
|
+
tenant_setting_name (str): The name of the tenant setting
|
515
|
+
|
516
|
+
Returns:
|
517
|
+
int: The status code of the response
|
518
|
+
"""
|
519
|
+
url = f"https://api.fabric.microsoft.com/v1/admin/capacities/{capacity_id}/delegatedTenantSettingOverrides/{tenant_setting_name}"
|
520
|
+
|
521
|
+
response:requests.Response = self.calling_routine(url = url, operation = "DELETE", response_codes = [200, 429],
|
522
|
+
error_message = "Error deleting capacity tenant setting override",
|
523
|
+
return_format="response")
|
524
|
+
|
525
|
+
return response.status_code
|
526
|
+
|
508
527
|
def list_capacities_tenant_settings_overrides(self):
|
509
528
|
"""Returns list of tenant setting overrides that override at the capacities
|
510
529
|
|
@@ -516,10 +535,42 @@ class FabricClientAdmin(FabricClient):
|
|
516
535
|
|
517
536
|
items: list = self.calling_routine(url = url, operation = "GET", response_codes = [200, 429],
|
518
537
|
error_message = "Error listing capacities tenant settings overrides",
|
519
|
-
return_format="
|
538
|
+
return_format="value", paging=True)
|
520
539
|
|
521
540
|
return items
|
541
|
+
|
542
|
+
# GET https://api.fabric.microsoft.com/v1/admin/capacities/{capacityId}/delegatedTenantSettingOverrides?continuationToken={continuationToken}
|
543
|
+
def list_capacity_tenant_settings_overrides_by_capacity_id(self, capacity_id):
|
544
|
+
"""Returns list of tenant setting overrides that override at the capacity
|
545
|
+
|
546
|
+
Args:
|
547
|
+
capacity_id (str): The ID of the capacity
|
548
|
+
Returns:
|
549
|
+
list: The capacities tenant settings overrides
|
550
|
+
"""
|
551
|
+
url = f"https://api.fabric.microsoft.com/v1/admin/capacities/{capacity_id}/delegatedTenantSettingOverrides"
|
552
|
+
|
553
|
+
items: list = self.calling_routine(url = url, operation = "GET", response_codes = [200, 429],
|
554
|
+
error_message = "Error listing capacity tenant settings overrides",
|
555
|
+
return_format="value", paging=True)
|
556
|
+
|
557
|
+
return items
|
558
|
+
|
559
|
+
# GET https://api.fabric.microsoft.com/v1/admin/domains/delegatedTenantSettingOverrides?continuationToken={continuationToken}
|
560
|
+
def list_domain_tenant_settings_overrides(self):
|
561
|
+
"""Returns list of tenant setting overrides that override at the domains
|
562
|
+
|
563
|
+
Returns:
|
564
|
+
list: The domains tenant settings overrides
|
565
|
+
"""
|
566
|
+
url = "https://api.fabric.microsoft.com/v1/admin/domains/delegatedTenantSettingOverrides"
|
567
|
+
|
568
|
+
items: list = self.calling_routine(url = url, operation = "GET", response_codes = [200, 429],
|
569
|
+
error_message = "Error listing domain tenant settings overrides",
|
570
|
+
return_format="value", paging=True)
|
522
571
|
|
572
|
+
return items
|
573
|
+
|
523
574
|
def list_tenant_settings(self):
|
524
575
|
"""Get the tenant settings
|
525
576
|
|
@@ -529,9 +580,98 @@ class FabricClientAdmin(FabricClient):
|
|
529
580
|
url = "https://api.fabric.microsoft.com/v1/admin/tenantsettings"
|
530
581
|
|
531
582
|
response_json = self.calling_routine(url = url, operation = "GET", response_codes = [200, 429],
|
532
|
-
error_message = "Error getting tenant settings", return_format="
|
583
|
+
error_message = "Error getting tenant settings", paging= True, return_format="value")
|
533
584
|
return response_json
|
534
585
|
|
586
|
+
# GET https://api.fabric.microsoft.com/v1/admin/workspaces/delegatedTenantSettingOverrides?continuationToken={continuationToken}
|
587
|
+
def list_workspace_tenant_settings_overrides(self):
|
588
|
+
"""Returns list of tenant setting overrides that override at the workspaces
|
589
|
+
|
590
|
+
Returns:
|
591
|
+
list: The workspaces tenant settings overrides
|
592
|
+
"""
|
593
|
+
url = "https://api.fabric.microsoft.com/v1/admin/workspaces/delegatedTenantSettingOverrides"
|
594
|
+
|
595
|
+
items: list = self.calling_routine(url = url, operation = "GET", response_codes = [200, 429],
|
596
|
+
error_message = "Error listing workspace tenant settings overrides",
|
597
|
+
return_format="value", paging=True)
|
598
|
+
|
599
|
+
return items
|
600
|
+
|
601
|
+
# POST https://api.fabric.microsoft.com/v1/admin/capacities/{capacityId}/delegatedTenantSettingOverrides/{tenantSettingName}/update
|
602
|
+
def update_capacity_tenant_setting_override(self, capacity_id, tenant_setting_name, enabled, delegate_to_workspace = None,
|
603
|
+
enabled_security_groups = None, excluded_security_groups = None):
|
604
|
+
"""Update a tenant setting override at the capacity
|
605
|
+
|
606
|
+
Args:
|
607
|
+
capacity_id (str): The ID of the capacity
|
608
|
+
tenant_setting_name (str): The name of the tenant setting
|
609
|
+
enabled (bool): Whether the tenant setting is enabled
|
610
|
+
delegate_to_workspace (bool): Indicates whether the tenant setting can be delegated to a workspace admin. False - Workspace admin cannot override the tenant setting. True - Workspace admin can override the tenant setting.
|
611
|
+
enabled_security_groups (list): The list of enabled security groups
|
612
|
+
excluded_security_groups (list): The list of excluded security groups
|
613
|
+
Returns:
|
614
|
+
dict: The overrides
|
615
|
+
"""
|
616
|
+
url = f"https://api.fabric.microsoft.com/v1/admin/capacities/{capacity_id}/delegatedTenantSettingOverrides/{tenant_setting_name}/update"
|
617
|
+
body = {
|
618
|
+
"enabled": enabled
|
619
|
+
}
|
620
|
+
if delegate_to_workspace:
|
621
|
+
body["delegateToWorkspace"] = delegate_to_workspace
|
622
|
+
if enabled_security_groups:
|
623
|
+
body["enabledSecurityGroups"] = enabled_security_groups
|
624
|
+
if excluded_security_groups:
|
625
|
+
body["excludedSecurityGroups"] = excluded_security_groups
|
626
|
+
|
627
|
+
response_json : dict = self.calling_routine(url = url, operation = "POST", body = body, response_codes = [200, 429],
|
628
|
+
error_message = "Error updating capacity tenant setting override", return_format="json")
|
629
|
+
|
630
|
+
return response_json
|
631
|
+
|
632
|
+
# POST https://api.fabric.microsoft.com/v1/admin/tenantsettings/{tenantSettingName}/update
|
633
|
+
def update_tenant_setting(self, tenant_setting_name, enabled, delegate_to_capacity = None, delegate_to_domain = None,
|
634
|
+
delegate_to_workspace = None, enabled_security_groups = None, excluded_security_groups = None, properties = None):
|
635
|
+
"""Update a tenant setting
|
636
|
+
|
637
|
+
Args:
|
638
|
+
capacity_id (str): The ID of the capacity
|
639
|
+
tenant_setting_name (str): The name of the tenant setting
|
640
|
+
enabled (bool): Whether the tenant setting is enabled
|
641
|
+
delegate_to_capacity (bool): Indicates whether the tenant setting can be delegated to a capacity admin. False - Capacity admin cannot override the tenant setting. True - Capacity admin can override the tenant setting.
|
642
|
+
delegate_to_domain (bool): Indicates whether the tenant setting can be delegated to a domain admin. False - Domain admin cannot override the tenant setting. True - Domain admin can override the tenant setting.
|
643
|
+
delegate_to_workspace (bool): Indicates whether the tenant setting can be delegated to a workspace admin. False - Workspace admin cannot override the tenant setting. True - Workspace admin can override the tenant setting.
|
644
|
+
enabled_security_groups (list): The list of enabled security groups
|
645
|
+
excluded_security_groups (list): The list of excluded security groups
|
646
|
+
Returns:
|
647
|
+
dict: The tenant settings
|
648
|
+
"""
|
649
|
+
|
650
|
+
url = f"https://api.fabric.microsoft.com/v1/admin/tenantsettings/{tenant_setting_name}/update"
|
651
|
+
|
652
|
+
body = {
|
653
|
+
"enabled": enabled
|
654
|
+
}
|
655
|
+
if delegate_to_capacity:
|
656
|
+
body["delegateToCapacity"] = delegate_to_capacity
|
657
|
+
if delegate_to_domain:
|
658
|
+
body["delegateToDomain"] = delegate_to_domain
|
659
|
+
if delegate_to_workspace:
|
660
|
+
body["delegateToWorkspace"] = delegate_to_workspace
|
661
|
+
if enabled_security_groups:
|
662
|
+
body["enabledSecurityGroups"] = enabled_security_groups
|
663
|
+
if excluded_security_groups:
|
664
|
+
body["excludedSecurityGroups"] = excluded_security_groups
|
665
|
+
if properties:
|
666
|
+
body["properties"] = properties
|
667
|
+
|
668
|
+
response_json : dict = self.calling_routine(url = url, operation = "POST", body = body, response_codes = [200, 429],
|
669
|
+
error_message = "Error updating tenant setting", return_format="json")
|
670
|
+
|
671
|
+
return response_json
|
672
|
+
|
673
|
+
|
674
|
+
|
535
675
|
# Users APIs
|
536
676
|
|
537
677
|
def list_access_entities(self, user_id, type = None):
|