Office365-REST-Python-Client 3.1.0__py3-none-any.whl → 3.2.0__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.
- office365/communications/callrecords/call_record.py +18 -0
- office365/communications/calls/call.py +3 -0
- office365/communications/presences/presence.py +3 -0
- office365/communications/quotas.py +66 -0
- office365/communications/virtualevents/virtual_event.py +3 -0
- office365/directory/domains/domain.py +3 -0
- office365/directory/licenses/subscribed_sku.py +3 -0
- office365/directory/objects/object.py +3 -0
- office365/directory/quotas.py +34 -0
- office365/entity_collection.py +2 -2
- office365/graph_client.py +46 -2
- office365/limits.py +66 -0
- office365/migration/__init__.py +6 -1
- office365/migration/adapters/__init__.py +14 -4
- office365/migration/adapters/filesystem.py +4 -1
- office365/migration/assessment/export.py +5 -5
- office365/migration/assessment/issue.py +19 -0
- office365/migration/assessment/report.py +11 -0
- office365/migration/assessment/scanners/base.py +37 -49
- office365/migration/base.py +33 -8
- office365/migration/checkpoint.py +1 -1
- office365/migration/outlook/assessor.py +4 -4
- office365/migration/package/__init__.py +82 -0
- office365/migration/package/builder.py +603 -0
- office365/migration/package/crypto.py +54 -0
- office365/migration/package/manifest_xml.py +495 -0
- office365/migration/package/staging.py +180 -0
- office365/migration/report.py +7 -2
- office365/migration/report_io.py +79 -0
- office365/migration/runner.py +117 -10
- office365/migration/server_job.py +126 -14
- office365/migration/session.py +132 -49
- office365/migration/settings.py +67 -0
- office365/migration/sharepoint/__init__.py +2 -0
- office365/migration/sharepoint/adapters.py +207 -41
- office365/migration/sharepoint/assessor.py +45 -9
- office365/migration/sharepoint/options.py +57 -0
- office365/migration/sharepoint/package_target.py +209 -0
- office365/migration/sharepoint/registry.py +22 -0
- office365/migration/sharepoint/resolvers.py +96 -0
- office365/migration/sharepoint/scanners/__init__.py +29 -0
- office365/migration/sharepoint/scanners/browser_file_handling.py +55 -0
- office365/migration/sharepoint/scanners/checked_out_files.py +57 -0
- office365/migration/sharepoint/scanners/file_versions.py +56 -0
- office365/migration/sharepoint/scanners/files.py +5 -2
- office365/migration/sharepoint/scanners/large_excel_files.py +56 -0
- office365/migration/sharepoint/scanners/large_lists.py +58 -0
- office365/migration/sharepoint/scanners/large_sites.py +4 -3
- office365/migration/sharepoint/scanners/long_onedrive_urls.py +52 -0
- office365/migration/sharepoint/scanners/lookup.py +38 -0
- office365/migration/sharepoint/scanners/paths.py +9 -4
- office365/migration/sharepoint/scanners/permissions.py +20 -2
- office365/migration/sharepoint/scanners/smat.py +51 -0
- office365/migration/sharepoint/scanners/summary.py +1 -0
- office365/migration/sharepoint/scanners/thicket_folders.py +38 -0
- office365/migration/sharepoint/scanners/unsupported_site_templates.py +90 -0
- office365/migration/sharepoint/tenant_assessor.py +5 -3
- office365/migration/sharepoint/transfer.py +4 -2
- office365/migration/tasks.py +121 -0
- office365/migration/validators.py +2 -19
- office365/onedrive/driveitems/driveItem.py +116 -12
- office365/onedrive/termstore/groups/collection.py +2 -9
- office365/onedrive/termstore/sets/collection.py +2 -9
- office365/onedrive/termstore/terms/collection.py +3 -10
- office365/onedrive/workbooks/workbook.py +7 -0
- office365/outlook/contacts/folders/collection.py +4 -13
- office365/runtime/auth/authentication_context.py +5 -0
- office365/runtime/client_object.py +18 -0
- office365/runtime/client_object_collection.py +75 -245
- office365/runtime/client_request.py +77 -1
- office365/runtime/client_request_exception.py +127 -39
- office365/runtime/client_runtime_context.py +79 -8
- office365/runtime/converters/csv_writer.py +10 -4
- office365/runtime/converters/dataframe.py +84 -4
- office365/runtime/converters/json_file.py +12 -3
- office365/runtime/converters/parquet.py +67 -0
- office365/runtime/converters/records.py +31 -12
- office365/runtime/converters/registry.py +185 -0
- office365/runtime/converters/scalars.py +31 -0
- office365/runtime/converters/sql.py +69 -0
- office365/runtime/converters/streamers.py +105 -0
- office365/runtime/converters/streams.py +42 -0
- office365/runtime/converters/upsert.py +101 -0
- office365/runtime/exceptions.py +105 -0
- office365/runtime/http/prefer.py +26 -0
- office365/runtime/http/throttling.py +258 -56
- office365/runtime/imports.py +571 -0
- office365/runtime/limits.py +455 -0
- office365/runtime/odata/request.py +11 -2
- office365/runtime/odata/type.py +1 -0
- office365/runtime/odata/v3/batch_request.py +4 -2
- office365/runtime/odata/v4/batch_request.py +22 -7
- office365/runtime/operations.py +29 -0
- office365/runtime/parallel.py +12 -14
- office365/runtime/paths/v4/entity.py +2 -2
- office365/runtime/queries/batch.py +18 -1
- office365/runtime/queries/get_or_create.py +109 -0
- office365/runtime/record_collection.py +443 -0
- office365/runtime/retry.py +92 -26
- office365/runtime/transport/base.py +6 -1
- office365/runtime/transport/requests_transport.py +4 -0
- office365/runtime/transport/throttled_transport.py +67 -0
- office365/runtime/verification.py +40 -0
- office365/sharepoint/activities/logger.py +118 -8
- office365/sharepoint/administration/analytics/usage_service.py +15 -7
- office365/sharepoint/administration/sitemove/service.py +791 -8
- office365/sharepoint/alerts/alert.py +79 -0
- office365/sharepoint/apps/app_collection.py +25 -0
- office365/sharepoint/apps/launcher.py +16 -0
- office365/sharepoint/authpolicy/tenant/compliancereport.py +5 -0
- office365/sharepoint/businessdata/app_bdc_catalog.py +135 -0
- office365/sharepoint/businessdata/entityfieldvaluedictionary.py +65 -0
- office365/sharepoint/businessdata/entityidentifier.py +23 -0
- office365/sharepoint/businessdata/entityinstance.py +52 -0
- office365/sharepoint/businessdata/entityview.py +31 -0
- office365/sharepoint/businessdata/externalsubscriptionstore.py +9 -0
- office365/sharepoint/businessdata/typedescriptor.py +37 -0
- office365/sharepoint/client_context.py +40 -23
- office365/sharepoint/clientsidecomponent/hostedapps/app.py +21 -0
- office365/sharepoint/clientsidecomponent/hostedapps/manager.py +16 -0
- office365/sharepoint/comments/comment.py +84 -2
- office365/sharepoint/contentcenter/machinelearning/models/model.py +0 -23
- office365/sharepoint/contentcenter/machinelearning/publications/publication.py +0 -9
- office365/sharepoint/contentcenter/machinelearning/samples/sample.py +0 -14
- office365/sharepoint/contentcenter/machinelearning/workitems/item.py +0 -80
- office365/sharepoint/contentsolution/template_api.py +148 -0
- office365/sharepoint/contenttypes/collection.py +32 -10
- office365/sharepoint/convergence/addnoliveblobsinodcservicestateapi.py +9 -0
- office365/sharepoint/convergence/consumer_permissions.py +15 -0
- office365/sharepoint/convergence/migration_complete_state_api.py +25 -0
- office365/sharepoint/convergence/odcmetadatacleanedupapi.py +9 -0
- office365/sharepoint/documentmanagement/document_id.py +12 -0
- office365/sharepoint/entity.py +11 -2
- office365/sharepoint/entity_collection.py +2 -2
- office365/sharepoint/exceptions.py +194 -0
- office365/sharepoint/fields/builtin_field_id.py +45 -34
- office365/sharepoint/fields/builtin_field_name.py +123 -0
- office365/sharepoint/fields/coercion.py +131 -0
- office365/sharepoint/fields/collection.py +54 -37
- office365/sharepoint/fields/field.py +17 -0
- office365/sharepoint/fields/name.py +46 -2
- office365/sharepoint/files/collection.py +7 -1
- office365/sharepoint/files/file.py +54 -8
- office365/sharepoint/files/versions/version.py +38 -13
- office365/sharepoint/folders/collection.py +4 -0
- office365/sharepoint/folders/folder.py +91 -21
- office365/sharepoint/htmlpages/html_page.py +16 -0
- office365/sharepoint/htmlpages/html_page_service.py +19 -0
- office365/sharepoint/ir/migration.py +9 -0
- office365/sharepoint/listitems/caml/__init__.py +31 -0
- office365/sharepoint/listitems/caml/builder.py +129 -0
- office365/sharepoint/listitems/caml/expressions.py +424 -0
- office365/sharepoint/listitems/caml/fields.py +68 -0
- office365/sharepoint/listitems/caml/guard.py +63 -0
- office365/sharepoint/listitems/caml/query.py +71 -2
- office365/sharepoint/listitems/caml/values.py +113 -0
- office365/sharepoint/listitems/collection.py +21 -20
- office365/sharepoint/listitems/upsert.py +75 -0
- office365/sharepoint/lists/collection.py +29 -22
- office365/sharepoint/lists/exporter.py +4 -3
- office365/sharepoint/lists/list.py +397 -39
- office365/sharepoint/lists/smart_wiki_library_utility.py +58 -0
- office365/sharepoint/logger/export.py +12 -0
- office365/sharepoint/marketplace/app_metadata.py +97 -1
- office365/sharepoint/marketplace/appstatequeryjobdefinition.py +9 -0
- office365/sharepoint/marketplace/corporatecuratedgallery/carddesigns/card_designs.py +35 -0
- office365/sharepoint/marketplace/sitecollection/appcatalog/allowed_item.py +5 -0
- office365/sharepoint/marketplace/tenant/appcatalog/accessor.py +107 -30
- office365/sharepoint/microfeed/data.py +0 -6
- office365/sharepoint/microservice/manager.py +61 -0
- office365/sharepoint/migrationcenter/common/task.py +193 -4
- office365/sharepoint/migrationcenter/common/task_entity_data.py +1 -1
- office365/sharepoint/migrationcenter/deploy_status.py +13 -0
- office365/sharepoint/migrationcenter/service/properties.py +20 -0
- office365/sharepoint/migrationcenter/service/storage.py +34 -0
- office365/sharepoint/migrationcenter/spflight.py +13 -0
- office365/sharepoint/migrationcenter/urlparseresult.py +77 -0
- office365/sharepoint/multigeo/service/spmultigeoproxy.py +13 -0
- office365/sharepoint/navigation/servicerest.py +127 -0
- office365/sharepoint/oauth/authentication.py +13 -0
- office365/sharepoint/portal/theme_manager.py +120 -8
- office365/sharepoint/principal/users/user.py +10 -0
- office365/sharepoint/publishing/campaign/campaign.py +36 -1
- office365/sharepoint/publishing/feedvideopage.py +0 -7
- office365/sharepoint/publishing/pages/3d/page.py +0 -6
- office365/sharepoint/publishing/pages/page.py +0 -117
- office365/sharepoint/publishing/pages/reposts/repost.py +0 -7
- office365/sharepoint/publishing/pages/topics/topic.py +0 -7
- office365/sharepoint/publishing/subtitlefile.py +0 -40
- office365/sharepoint/quotamanagement/consumer/consumer_quota_info_api.py +14 -0
- office365/sharepoint/quotamanagement/consumer/non_quota_backfill_api.py +23 -0
- office365/sharepoint/quotamanagement/consumer/nonquotamigrationapi.py +9 -0
- office365/sharepoint/quotamanagement/consumer/quotamigrationapi.py +13 -0
- office365/sharepoint/request.py +57 -16
- office365/sharepoint/search/administration/document_crawl_log.py +24 -7
- office365/sharepoint/search/administration/providers/crawl_versions_info.py +29 -0
- office365/sharepoint/search/administration/providers/recycle_bin_info.py +23 -0
- office365/sharepoint/search/administration/providers/site_content_processing_info.py +67 -0
- office365/sharepoint/sites/site.py +976 -65
- office365/sharepoint/sites/siteprovisioninginfoprovider.py +13 -0
- office365/sharepoint/tenant/administration/datagovernance/insight_client.py +292 -23
- office365/sharepoint/tenant/administration/ddiadapter.py +97 -0
- office365/sharepoint/tenant/administration/internal/aad/collection.py +20 -0
- office365/sharepoint/tenant/administration/internal/aad/permission_grant.py +0 -19
- office365/sharepoint/tenant/administration/internal/appservice/permission_request.py +72 -1
- office365/sharepoint/tenant/administration/internal/appservice/principal.py +1 -3
- office365/sharepoint/tenant/administration/odb_license_enforcement_service.py +26 -0
- office365/sharepoint/tenant/administration/sites/properties.py +564 -6
- office365/sharepoint/tenant/administration/spdatagovernancesarrestapiclient.py +60 -1
- office365/sharepoint/tenant/insights/reports/manager.py +24 -12
- office365/sharepoint/tenant/management/office365_tenant.py +451 -2
- office365/sharepoint/tenantadministration/catalog_management_collection.py +69 -0
- office365/sharepoint/tenantadministration/catalog_management_custom_properties_collection.py +237 -0
- office365/sharepoint/tenantadministration/catalog_management_restricted_content_discovery_collection.py +56 -0
- office365/sharepoint/tenantadministration/sp_data_governance_client_exception.py +7 -0
- office365/sharepoint/thresholds.py +529 -0
- office365/sharepoint/translation/jobs/job.py +72 -2
- office365/sharepoint/translation/jobs/status.py +47 -9
- office365/sharepoint/translation/sync_translator.py +15 -2
- office365/sharepoint/utilities/move_copy_util.py +2 -1
- office365/sharepoint/viva/connections/page.py +27 -0
- office365/sharepoint/viva/home.py +38 -0
- office365/sharepoint/viva/learningmanager.py +9 -0
- office365/sharepoint/viva/vivaresources.py +60 -0
- office365/sharepoint/webhooks/subscription.py +0 -11
- office365/sharepoint/webparts/definitions/definition.py +13 -0
- office365/sharepoint/webparts/limited_manager.py +29 -7
- office365/sharepoint/webs/context_web_information.py +14 -9
- office365/sharepoint/webs/templates/__init__.py +11 -0
- office365/sharepoint/webs/templates/type.py +74 -15
- office365/sharepoint/workflow/definition.py +6 -0
- office365/sharepoint/workflow/deployment_service.py +155 -0
- office365/sharepoint/workflow/instances/service.py +33 -0
- office365/sharepoint/workflow/interopservice.py +68 -0
- office365/sharepoint/workflow/messagingservice.py +24 -0
- office365/sharepoint/workflow/servicesmanager.py +41 -2
- office365/sharepoint/workflow/subscriptions/service.py +67 -0
- office365/sharepoint/workflow/subscriptions/subscription.py +31 -0
- office365/sharepoint/workflow/task.py +425 -0
- office365_rest_python_client-3.2.0.dist-info/METADATA +605 -0
- {office365_rest_python_client-3.1.0.dist-info → office365_rest_python_client-3.2.0.dist-info}/RECORD +242 -185
- office365/migration/_util.py +0 -73
- office365/sharepoint/listitems/caml/types.py +0 -70
- office365_rest_python_client-3.1.0.dist-info/METADATA +0 -475
- {office365_rest_python_client-3.1.0.dist-info → office365_rest_python_client-3.2.0.dist-info}/WHEEL +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
import base64
|
|
3
4
|
from datetime import datetime
|
|
4
5
|
from typing import TYPE_CHECKING, Optional, Union
|
|
5
6
|
from uuid import UUID
|
|
@@ -10,45 +11,61 @@ from office365.runtime.client_result import ClientResult
|
|
|
10
11
|
from office365.runtime.client_value_collection import ClientValueCollection
|
|
11
12
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
12
13
|
from office365.runtime.paths.service_operation import ServiceOperationPath
|
|
14
|
+
from office365.runtime.queries.function import FunctionQuery
|
|
13
15
|
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
16
|
+
from office365.runtime.types.collections import GuidCollection, StringCollection
|
|
17
|
+
from office365.sharepoint.administration.unlicensedodblicenseenforcementwarningcontext import (
|
|
18
|
+
UnlicensedOdbLicenseEnforcementWarningContext,
|
|
19
|
+
)
|
|
14
20
|
from office365.sharepoint.audit.audit import Audit
|
|
15
21
|
from office365.sharepoint.changes.collection import ChangeCollection
|
|
16
22
|
from office365.sharepoint.changes.query import ChangeQuery
|
|
17
23
|
from office365.sharepoint.changes.token import ChangeToken
|
|
24
|
+
from office365.sharepoint.clientsidecomponent.updatecard import UpdateCard
|
|
25
|
+
from office365.sharepoint.compliance.sensitivitylabels.info import SensitivityLabelInfo
|
|
18
26
|
from office365.sharepoint.compliance.store_proxy import SPPolicyStoreProxy
|
|
19
27
|
from office365.sharepoint.compliance.tags.tag import ComplianceTag
|
|
28
|
+
from office365.sharepoint.documents.customizedformspagecollection import CustomizedFormsPageCollection
|
|
29
|
+
from office365.sharepoint.documents.encryptionoption import EncryptionOption
|
|
20
30
|
from office365.sharepoint.entity import Entity
|
|
21
31
|
from office365.sharepoint.entity_collection import EntityCollection
|
|
22
|
-
from office365.sharepoint.eventreceivers.definition_collection import
|
|
23
|
-
EventReceiverDefinitionCollection,
|
|
24
|
-
)
|
|
32
|
+
from office365.sharepoint.eventreceivers.definition_collection import EventReceiverDefinitionCollection
|
|
25
33
|
from office365.sharepoint.features.collection import FeatureCollection
|
|
34
|
+
from office365.sharepoint.files.versionbatchdeleteparameters import FileVersionBatchDeleteParameters
|
|
26
35
|
from office365.sharepoint.lists.list import List
|
|
27
36
|
from office365.sharepoint.lists.templates.type import ListTemplateType
|
|
37
|
+
from office365.sharepoint.onboarding.customerkeyinfo import CustomerKeyInfo
|
|
38
|
+
from office365.sharepoint.onboarding.customerkeystatusinfo import CustomerKeyStatusInfo
|
|
39
|
+
from office365.sharepoint.onboarding.customerkeyvaultinfo import CustomerKeyVaultInfo
|
|
28
40
|
from office365.sharepoint.portal.sites.icon_manager import SiteIconManager
|
|
41
|
+
from office365.sharepoint.principal.groups.group import Group
|
|
29
42
|
from office365.sharepoint.principal.users.user import User
|
|
30
43
|
from office365.sharepoint.recyclebin.item_collection import RecycleBinItemCollection
|
|
31
|
-
from office365.sharepoint.sites.
|
|
32
|
-
|
|
33
|
-
|
|
44
|
+
from office365.sharepoint.sites.asyncreadjobinfo import AsyncReadJobInfo
|
|
45
|
+
from office365.sharepoint.sites.asyncreadoptions import AsyncReadOptions
|
|
46
|
+
from office365.sharepoint.sites.autolabellingworkinformation import AutoLabellingWorkInformation
|
|
47
|
+
from office365.sharepoint.sites.azure_container_Info import ProvisionedTemporaryAzureContainerInfo
|
|
34
48
|
from office365.sharepoint.sites.copy_job_progress import CopyJobProgress
|
|
35
49
|
from office365.sharepoint.sites.copy_migration_iInfo import CopyMigrationInfo
|
|
50
|
+
from office365.sharepoint.sites.enqueuejobinformation import EnqueueJobInformation
|
|
36
51
|
from office365.sharepoint.sites.health.summary import SiteHealthSummary
|
|
37
52
|
from office365.sharepoint.sites.home.site import SPHSite
|
|
38
|
-
from office365.sharepoint.sites.html_field_security_setting import
|
|
39
|
-
|
|
40
|
-
)
|
|
53
|
+
from office365.sharepoint.sites.html_field_security_setting import HTMLFieldSecuritySetting
|
|
54
|
+
from office365.sharepoint.sites.migration.copyoptions import CopyMigrationOptions
|
|
41
55
|
from office365.sharepoint.sites.migration.job_status import SPMigrationJobStatus
|
|
56
|
+
from office365.sharepoint.sites.migration.jobprogress import MigrationJobProgress
|
|
57
|
+
from office365.sharepoint.sites.provisionedmigrationcontainersinfo import ProvisionedMigrationContainersInfo
|
|
58
|
+
from office365.sharepoint.sites.provisionedmigrationqueueinfo import ProvisionedMigrationQueueInfo
|
|
59
|
+
from office365.sharepoint.sites.restrictaccesscontrolupdate import RestrictAccessControlUpdate
|
|
60
|
+
from office365.sharepoint.sites.restrictcontentorgwidepolicyupdate import RestrictContentOrgWidePolicyUpdate
|
|
61
|
+
from office365.sharepoint.sites.script_safe_domain import ScriptSafeDomain
|
|
42
62
|
from office365.sharepoint.sites.upgrade_info import UpgradeInfo
|
|
43
63
|
from office365.sharepoint.sites.usage_info import UsageInfo
|
|
44
64
|
from office365.sharepoint.sites.version_policy_manager import SiteVersionPolicyManager
|
|
45
65
|
from office365.sharepoint.storagemetrics.storage_metrics import StorageMetrics
|
|
46
|
-
from office365.sharepoint.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
from office365.sharepoint.tenant.administration.sites.administrators_info import (
|
|
50
|
-
SiteAdministratorsInfo,
|
|
51
|
-
)
|
|
66
|
+
from office365.sharepoint.teams.channel_capabilities import ChannelCapabilities
|
|
67
|
+
from office365.sharepoint.tenant.administration.hubsites.creation_information import HubSiteCreationInformation
|
|
68
|
+
from office365.sharepoint.tenant.administration.sites.administrators_info import SiteAdministratorsInfo
|
|
52
69
|
from office365.sharepoint.types.resource_path import ResourcePath as SPResPath
|
|
53
70
|
from office365.sharepoint.usercustomactions.collection import UserCustomActionCollection
|
|
54
71
|
from office365.sharepoint.webs.templates.collection import WebTemplateCollection
|
|
@@ -58,6 +75,15 @@ if TYPE_CHECKING:
|
|
|
58
75
|
from office365.sharepoint.client_context import ClientContext
|
|
59
76
|
|
|
60
77
|
|
|
78
|
+
def _aes_key_base64(value: str | bytes) -> str:
|
|
79
|
+
"""Normalize an AES256CBC key to the base64 text the REST payload expects.
|
|
80
|
+
|
|
81
|
+
``provision_migration_containers`` returns it already base64-encoded (the
|
|
82
|
+
``bytes`` annotation is a C# ``byte[]`` artifact); raw bytes are encoded here.
|
|
83
|
+
"""
|
|
84
|
+
return base64.b64encode(value).decode("ascii") if isinstance(value, bytes) else value
|
|
85
|
+
|
|
86
|
+
|
|
61
87
|
class Site(Entity):
|
|
62
88
|
"""
|
|
63
89
|
Represents a collection of sites in a Web application, including a top-level website and all its sub sites.
|
|
@@ -93,11 +119,7 @@ class Site(Entity):
|
|
|
93
119
|
def create_copy_job(self, export_object_uris, destination_uri, options=None) -> ClientResult[CopyMigrationInfo]:
|
|
94
120
|
""""""
|
|
95
121
|
return_type = ClientResult(self.context, CopyMigrationInfo())
|
|
96
|
-
payload = {
|
|
97
|
-
"exportObjectUris": export_object_uris,
|
|
98
|
-
"destinationUri": destination_uri,
|
|
99
|
-
"options": options,
|
|
100
|
-
}
|
|
122
|
+
payload = {"exportObjectUris": export_object_uris, "destinationUri": destination_uri, "options": options}
|
|
101
123
|
qry = ServiceOperationQuery(self, "CreateCopyJob", None, payload, None, return_type)
|
|
102
124
|
self.context.add_query(qry)
|
|
103
125
|
return return_type
|
|
@@ -107,8 +129,8 @@ class Site(Entity):
|
|
|
107
129
|
g_web_id: Union[str, UUID],
|
|
108
130
|
azure_container_source_uri: str,
|
|
109
131
|
azure_container_manifest_uri: str,
|
|
110
|
-
azure_queue_report_uri: str,
|
|
111
|
-
ingestion_task_key: str,
|
|
132
|
+
azure_queue_report_uri: str | None = None,
|
|
133
|
+
ingestion_task_key: str | None = None,
|
|
112
134
|
) -> ClientResult[str]:
|
|
113
135
|
"""Creates a migration ingestion job for content migration via Azure storage.
|
|
114
136
|
|
|
@@ -116,8 +138,8 @@ class Site(Entity):
|
|
|
116
138
|
g_web_id: Web identifier.
|
|
117
139
|
azure_container_source_uri: Azure container source URI.
|
|
118
140
|
azure_container_manifest_uri: Azure container manifest URI.
|
|
119
|
-
azure_queue_report_uri: Azure queue report URI.
|
|
120
|
-
ingestion_task_key:
|
|
141
|
+
azure_queue_report_uri: Optional Azure queue report URI.
|
|
142
|
+
ingestion_task_key: Optional ingestion task key.
|
|
121
143
|
|
|
122
144
|
Returns:
|
|
123
145
|
ClientResult[str]: Migration job ID.
|
|
@@ -136,12 +158,22 @@ class Site(Entity):
|
|
|
136
158
|
|
|
137
159
|
def create_migration_job(
|
|
138
160
|
self,
|
|
139
|
-
g_web_id=None,
|
|
140
|
-
azure_container_source_uri=None,
|
|
141
|
-
azure_container_manifest_uri=None,
|
|
142
|
-
azure_queue_report_uri=None,
|
|
161
|
+
g_web_id: Union[str, UUID] | None = None,
|
|
162
|
+
azure_container_source_uri: str | None = None,
|
|
163
|
+
azure_container_manifest_uri: str | None = None,
|
|
164
|
+
azure_queue_report_uri: str | None = None,
|
|
143
165
|
) -> ClientResult[str]:
|
|
144
|
-
"""
|
|
166
|
+
"""Creates a migration import job for the package in the source container.
|
|
167
|
+
|
|
168
|
+
Args:
|
|
169
|
+
g_web_id: Identifier of the destination web.
|
|
170
|
+
azure_container_source_uri: Content container URI (with SAS token).
|
|
171
|
+
azure_container_manifest_uri: Manifest container URI (with SAS token).
|
|
172
|
+
azure_queue_report_uri: Optional Azure queue URI receiving progress events.
|
|
173
|
+
|
|
174
|
+
Returns:
|
|
175
|
+
ClientResult[str]: Migration job ID.
|
|
176
|
+
"""
|
|
145
177
|
return_type = ClientResult(self.context, str())
|
|
146
178
|
payload = {
|
|
147
179
|
"gWebId": g_web_id,
|
|
@@ -153,6 +185,78 @@ class Site(Entity):
|
|
|
153
185
|
self.context.add_query(qry)
|
|
154
186
|
return return_type
|
|
155
187
|
|
|
188
|
+
def create_migration_job_encrypted(
|
|
189
|
+
self,
|
|
190
|
+
g_web_id: Union[str, UUID],
|
|
191
|
+
azure_container_source_uri: str,
|
|
192
|
+
azure_container_manifest_uri: str,
|
|
193
|
+
aes256_cbc_key: str | bytes,
|
|
194
|
+
azure_queue_report_uri: str | None = None,
|
|
195
|
+
) -> ClientResult[str]:
|
|
196
|
+
"""Creates a migration import job for an AES-256-CBC encrypted package.
|
|
197
|
+
|
|
198
|
+
Required for SharePoint-provided containers (which are encrypted at rest);
|
|
199
|
+
use the ``EncryptionKey`` returned by :meth:`provision_migration_containers`
|
|
200
|
+
(a base64 string, which is decoded to bytes here).
|
|
201
|
+
|
|
202
|
+
Args:
|
|
203
|
+
g_web_id: Identifier of the destination web.
|
|
204
|
+
azure_container_source_uri: Content container URI (with SAS token).
|
|
205
|
+
azure_container_manifest_uri: Manifest container URI (with SAS token).
|
|
206
|
+
aes256_cbc_key: AES256CBC encryption key (raw bytes or base64 string).
|
|
207
|
+
azure_queue_report_uri: Optional Azure queue URI receiving progress events.
|
|
208
|
+
|
|
209
|
+
Returns:
|
|
210
|
+
ClientResult[str]: Migration job ID.
|
|
211
|
+
"""
|
|
212
|
+
return_type = ClientResult(self.context, str())
|
|
213
|
+
payload = {
|
|
214
|
+
"options": {"AES256CBCKey": _aes_key_base64(aes256_cbc_key)},
|
|
215
|
+
"gWebId": g_web_id,
|
|
216
|
+
"azureContainerSourceUri": azure_container_source_uri,
|
|
217
|
+
"azureContainerManifestUri": azure_container_manifest_uri,
|
|
218
|
+
"azureQueueReportUri": azure_queue_report_uri,
|
|
219
|
+
}
|
|
220
|
+
qry = ServiceOperationQuery(self, "CreateMigrationJobEncrypted", None, payload, None, return_type)
|
|
221
|
+
self.context.add_query(qry)
|
|
222
|
+
return return_type
|
|
223
|
+
|
|
224
|
+
def get_migration_job_progress(self, job_id: str, next_token: str = "0") -> ClientResult[MigrationJobProgress]:
|
|
225
|
+
"""Retrieves a page of migration job progress events.
|
|
226
|
+
|
|
227
|
+
Args:
|
|
228
|
+
job_id: Migration job ID (returned by ``create_migration_job``).
|
|
229
|
+
next_token: Paging token; use ``"0"`` for the initial request.
|
|
230
|
+
|
|
231
|
+
Returns:
|
|
232
|
+
ClientResult[MigrationJobProgress]: The event logs and the next token.
|
|
233
|
+
"""
|
|
234
|
+
return_type = ClientResult(self.context, MigrationJobProgress())
|
|
235
|
+
qry = ServiceOperationQuery(
|
|
236
|
+
self, "GetMigrationJobProgress", {"jobId": job_id, "nextToken": next_token}, None, None, return_type
|
|
237
|
+
)
|
|
238
|
+
self.context.add_query(qry)
|
|
239
|
+
return return_type
|
|
240
|
+
|
|
241
|
+
def provision_migration_containers(self) -> ClientResult[ProvisionedMigrationContainersInfo]:
|
|
242
|
+
"""Provisions SharePoint-provided Azure containers for migration content and manifest.
|
|
243
|
+
|
|
244
|
+
The returned URIs embed SAS tokens; the containers are encrypted at rest, so
|
|
245
|
+
submit jobs with :meth:`create_migration_job_encrypted` and the returned
|
|
246
|
+
``EncryptionKey``.
|
|
247
|
+
"""
|
|
248
|
+
return_type = ClientResult(self.context, ProvisionedMigrationContainersInfo())
|
|
249
|
+
qry = ServiceOperationQuery(self, "ProvisionMigrationContainers", None, None, None, return_type)
|
|
250
|
+
self.context.add_query(qry)
|
|
251
|
+
return return_type
|
|
252
|
+
|
|
253
|
+
def provision_migration_queue(self) -> ClientResult[ProvisionedMigrationQueueInfo]:
|
|
254
|
+
"""Provisions a SharePoint-provided Azure queue for migration job progress."""
|
|
255
|
+
return_type = ClientResult(self.context, ProvisionedMigrationQueueInfo())
|
|
256
|
+
qry = ServiceOperationQuery(self, "ProvisionMigrationQueue", None, None, None, return_type)
|
|
257
|
+
self.context.add_query(qry)
|
|
258
|
+
return return_type
|
|
259
|
+
|
|
156
260
|
def create_preview_site(self, upgrade: Optional[bool] = None, sendemail: Optional[str] = None) -> Self:
|
|
157
261
|
"""Schedules the creation of an evaluation copy of the site collection for the purposes of evaluating an upgrade
|
|
158
262
|
of the site collection to a newer version
|
|
@@ -174,9 +278,11 @@ class Site(Entity):
|
|
|
174
278
|
|
|
175
279
|
def _delete_object():
|
|
176
280
|
if self.group_id == "00000000-0000-0000-0000-000000000000":
|
|
177
|
-
self.
|
|
281
|
+
assert self.id is not None
|
|
282
|
+
self.context.site_manager.delete(self.id)
|
|
178
283
|
else:
|
|
179
|
-
self.
|
|
284
|
+
assert self.url is not None
|
|
285
|
+
self.context.group_site_manager.delete(self.url)
|
|
180
286
|
|
|
181
287
|
self.ensure_properties(["Url", "GroupId", "Id"]).after_execute(lambda _: _delete_object())
|
|
182
288
|
return self
|
|
@@ -227,10 +333,7 @@ class Site(Entity):
|
|
|
227
333
|
return_type = ClientResult(self.context, ComplianceTag())
|
|
228
334
|
|
|
229
335
|
def _loaded(tags: ClientResult[ClientValueCollection[ComplianceTag]]):
|
|
230
|
-
tag = next(
|
|
231
|
-
(t for t in tags.value if tag_name.lower() in (t.DisplayName or t.TagName or "").lower()),
|
|
232
|
-
None,
|
|
233
|
-
)
|
|
336
|
+
tag = next((t for t in tags.value if tag_name.lower() in (t.DisplayName or t.TagName or "").lower()), None)
|
|
234
337
|
return_type.set_property("__value", tag)
|
|
235
338
|
|
|
236
339
|
self.get_available_tags().after_execute(_loaded)
|
|
@@ -265,7 +368,8 @@ class Site(Entity):
|
|
|
265
368
|
return_type = ClientResult(self.context, bytes())
|
|
266
369
|
|
|
267
370
|
def _get_site_logo():
|
|
268
|
-
self.
|
|
371
|
+
assert self.url is not None
|
|
372
|
+
self.context.site_icon_manager.get_site_logo(self.url, return_type=return_type)
|
|
269
373
|
|
|
270
374
|
self.ensure_property("Url").after_execute(lambda _: _get_site_logo())
|
|
271
375
|
return return_type
|
|
@@ -357,7 +461,8 @@ class Site(Entity):
|
|
|
357
461
|
return_type = ClientResult(self.context, ClientValueCollection(SiteAdministratorsInfo))
|
|
358
462
|
|
|
359
463
|
def _get_site_administrators():
|
|
360
|
-
self.
|
|
464
|
+
assert self.id is not None
|
|
465
|
+
self.context.tenant.get_site_administrators(self.id, return_type)
|
|
361
466
|
|
|
362
467
|
self.ensure_property("Id").after_execute(lambda _: _get_site_administrators())
|
|
363
468
|
return return_type
|
|
@@ -369,7 +474,6 @@ class Site(Entity):
|
|
|
369
474
|
"""
|
|
370
475
|
params = {"siteId": site_id, "webId": web_id}
|
|
371
476
|
return_type = ClientResult(self.context, SPResPath())
|
|
372
|
-
|
|
373
477
|
qry = ServiceOperationQuery(self, "GetWebPath", params, None, None, return_type)
|
|
374
478
|
self.context.add_query(qry)
|
|
375
479
|
return return_type
|
|
@@ -386,10 +490,8 @@ class Site(Entity):
|
|
|
386
490
|
"""
|
|
387
491
|
params = {"LCID": lcid, "overrideCompatLevel": override_compat_level}
|
|
388
492
|
return_type = WebTemplateCollection(
|
|
389
|
-
self.context,
|
|
390
|
-
ServiceOperationPath("GetWebTemplates", params, self.resource_path),
|
|
493
|
+
self.context, ServiceOperationPath("GetWebTemplates", params, self.resource_path)
|
|
391
494
|
)
|
|
392
|
-
|
|
393
495
|
qry = ServiceOperationQuery(self, "GetWebTemplates", params, None, None, return_type)
|
|
394
496
|
self.context.add_query(qry)
|
|
395
497
|
return return_type
|
|
@@ -413,19 +515,13 @@ class Site(Entity):
|
|
|
413
515
|
recursive (bool): If "true", child upgradable objects will be inspected; otherwise "false".
|
|
414
516
|
"""
|
|
415
517
|
return_type = ClientResult(self.context)
|
|
416
|
-
payload = {
|
|
417
|
-
"versionUpgrade": version_upgrade,
|
|
418
|
-
"recursive": recursive,
|
|
419
|
-
}
|
|
518
|
+
payload = {"versionUpgrade": version_upgrade, "recursive": recursive}
|
|
420
519
|
qry = ServiceOperationQuery(self, "NeedsUpgradeByType", None, payload, None, return_type)
|
|
421
520
|
self.context.add_query(qry)
|
|
422
521
|
return return_type
|
|
423
522
|
|
|
424
523
|
def join_hub_site(
|
|
425
|
-
self,
|
|
426
|
-
hub_site_id: str,
|
|
427
|
-
approval_token: Optional[str] = None,
|
|
428
|
-
approval_correlation_id: Optional[str] = None,
|
|
524
|
+
self, hub_site_id: str, approval_token: Optional[str] = None, approval_correlation_id: Optional[str] = None
|
|
429
525
|
) -> Self:
|
|
430
526
|
"""Associates a site with an existing hub site.
|
|
431
527
|
|
|
@@ -494,7 +590,8 @@ class Site(Entity):
|
|
|
494
590
|
return_type = ClientResult(self.context, bool())
|
|
495
591
|
|
|
496
592
|
def _is_site_deletable():
|
|
497
|
-
|
|
593
|
+
assert self.url is not None
|
|
594
|
+
SPPolicyStoreProxy.is_site_deletable(self.context, self.url, return_type)
|
|
498
595
|
|
|
499
596
|
self.ensure_property("Url").after_execute(lambda _: _is_site_deletable())
|
|
500
597
|
return return_type
|
|
@@ -506,10 +603,7 @@ class Site(Entity):
|
|
|
506
603
|
Args:
|
|
507
604
|
type_catalog (int):
|
|
508
605
|
"""
|
|
509
|
-
return List(
|
|
510
|
-
self.context,
|
|
511
|
-
ServiceOperationPath("getCatalog", [int(type_catalog)], self.resource_path),
|
|
512
|
-
)
|
|
606
|
+
return List(self.context, ServiceOperationPath("getCatalog", [int(type_catalog)], self.resource_path))
|
|
513
607
|
|
|
514
608
|
def open_web(self, str_url: str) -> Web:
|
|
515
609
|
"""Returns the specified Web site from the site collection.
|
|
@@ -535,9 +629,7 @@ class Site(Entity):
|
|
|
535
629
|
self.context.add_query(qry)
|
|
536
630
|
return return_type
|
|
537
631
|
|
|
538
|
-
def provision_temporary_azure_container(
|
|
539
|
-
self,
|
|
540
|
-
) -> ClientResult[ProvisionedTemporaryAzureContainerInfo]:
|
|
632
|
+
def provision_temporary_azure_container(self) -> ClientResult[ProvisionedTemporaryAzureContainerInfo]:
|
|
541
633
|
""""""
|
|
542
634
|
return_type = ClientResult(self.context, ProvisionedTemporaryAzureContainerInfo())
|
|
543
635
|
qry = ServiceOperationQuery(self, "ProvisionTemporaryAzureContainer", None, None, None, return_type)
|
|
@@ -805,24 +897,21 @@ class Site(Entity):
|
|
|
805
897
|
def secondary_contact(self) -> User:
|
|
806
898
|
"""Gets or sets the secondary contact that is used for the site collection."""
|
|
807
899
|
return self.properties.get(
|
|
808
|
-
"SecondaryContact",
|
|
809
|
-
User(self.context, ResourcePath("SecondaryContact", self.resource_path)),
|
|
900
|
+
"SecondaryContact", User(self.context, ResourcePath("SecondaryContact", self.resource_path))
|
|
810
901
|
)
|
|
811
902
|
|
|
812
903
|
@property
|
|
813
904
|
def recycle_bin(self) -> RecycleBinItemCollection:
|
|
814
905
|
"""Get recycle bin"""
|
|
815
906
|
return self.properties.get(
|
|
816
|
-
"RecycleBin",
|
|
817
|
-
RecycleBinItemCollection(self.context, ResourcePath("RecycleBin", self.resource_path)),
|
|
907
|
+
"RecycleBin", RecycleBinItemCollection(self.context, ResourcePath("RecycleBin", self.resource_path))
|
|
818
908
|
)
|
|
819
909
|
|
|
820
910
|
@property
|
|
821
911
|
def features(self) -> FeatureCollection:
|
|
822
912
|
"""Get features"""
|
|
823
913
|
return self.properties.get(
|
|
824
|
-
"Features",
|
|
825
|
-
FeatureCollection(self.context, ResourcePath("Features", self.resource_path), self),
|
|
914
|
+
"Features", FeatureCollection(self.context, ResourcePath("Features", self.resource_path), self)
|
|
826
915
|
)
|
|
827
916
|
|
|
828
917
|
@property
|
|
@@ -918,11 +1007,240 @@ class Site(Entity):
|
|
|
918
1007
|
return self.properties.get(
|
|
919
1008
|
"VersionPolicyForNewLibrariesTemplate",
|
|
920
1009
|
SiteVersionPolicyManager(
|
|
921
|
-
self.context,
|
|
922
|
-
|
|
1010
|
+
self.context, ResourcePath("VersionPolicyForNewLibrariesTemplate", self.resource_path)
|
|
1011
|
+
),
|
|
1012
|
+
)
|
|
1013
|
+
|
|
1014
|
+
@property
|
|
1015
|
+
def allow_external_embedding_wrapper(self) -> Optional[int]:
|
|
1016
|
+
"""Gets the AllowExternalEmbeddingWrapper property"""
|
|
1017
|
+
return self.properties.get("AllowExternalEmbeddingWrapper", None)
|
|
1018
|
+
|
|
1019
|
+
@property
|
|
1020
|
+
def allow_save_declarative_workflow_as_template(self) -> Optional[bool]:
|
|
1021
|
+
"""Gets the AllowSaveDeclarativeWorkflowAsTemplate property"""
|
|
1022
|
+
return self.properties.get("AllowSaveDeclarativeWorkflowAsTemplate", None)
|
|
1023
|
+
|
|
1024
|
+
@property
|
|
1025
|
+
def allow_save_publish_declarative_workflow(self) -> Optional[bool]:
|
|
1026
|
+
"""Gets the AllowSavePublishDeclarativeWorkflow property"""
|
|
1027
|
+
return self.properties.get("AllowSavePublishDeclarativeWorkflow", None)
|
|
1028
|
+
|
|
1029
|
+
@property
|
|
1030
|
+
def allow_self_service_upgrade(self) -> Optional[bool]:
|
|
1031
|
+
"""Gets the AllowSelfServiceUpgrade property"""
|
|
1032
|
+
return self.properties.get("AllowSelfServiceUpgrade", None)
|
|
1033
|
+
|
|
1034
|
+
@property
|
|
1035
|
+
def allow_self_service_upgrade_evaluation(self) -> Optional[bool]:
|
|
1036
|
+
"""Gets the AllowSelfServiceUpgradeEvaluation property"""
|
|
1037
|
+
return self.properties.get("AllowSelfServiceUpgradeEvaluation", None)
|
|
1038
|
+
|
|
1039
|
+
@property
|
|
1040
|
+
def audit_log_trimming_retention(self) -> Optional[int]:
|
|
1041
|
+
"""Gets the AuditLogTrimmingRetention property"""
|
|
1042
|
+
return self.properties.get("AuditLogTrimmingRetention", None)
|
|
1043
|
+
|
|
1044
|
+
@property
|
|
1045
|
+
def can_sync_hub_site_permissions(self) -> Optional[bool]:
|
|
1046
|
+
"""Gets the CanSyncHubSitePermissions property"""
|
|
1047
|
+
return self.properties.get("CanSyncHubSitePermissions", None)
|
|
1048
|
+
|
|
1049
|
+
@property
|
|
1050
|
+
def channel_capabilities(self) -> ChannelCapabilities:
|
|
1051
|
+
"""Gets the ChannelCapabilities property"""
|
|
1052
|
+
return self.properties.get("ChannelCapabilities", ChannelCapabilities())
|
|
1053
|
+
|
|
1054
|
+
@property
|
|
1055
|
+
def compliance_attribute(self) -> Optional[str]:
|
|
1056
|
+
"""Gets the ComplianceAttribute property"""
|
|
1057
|
+
return self.properties.get("ComplianceAttribute", None)
|
|
1058
|
+
|
|
1059
|
+
@property
|
|
1060
|
+
def customized_forms_pages(self) -> CustomizedFormsPageCollection:
|
|
1061
|
+
"""Gets the CustomizedFormsPages property"""
|
|
1062
|
+
return self.properties.get("CustomizedFormsPages", CustomizedFormsPageCollection())
|
|
1063
|
+
|
|
1064
|
+
@property
|
|
1065
|
+
def disable_app_views(self) -> Optional[bool]:
|
|
1066
|
+
"""Gets the DisableAppViews property"""
|
|
1067
|
+
return self.properties.get("DisableAppViews", None)
|
|
1068
|
+
|
|
1069
|
+
@property
|
|
1070
|
+
def disable_company_wide_sharing_links(self) -> Optional[bool]:
|
|
1071
|
+
"""Gets the DisableCompanyWideSharingLinks property"""
|
|
1072
|
+
return self.properties.get("DisableCompanyWideSharingLinks", None)
|
|
1073
|
+
|
|
1074
|
+
@property
|
|
1075
|
+
def id_(self) -> Optional[UUID]:
|
|
1076
|
+
"""Gets the Id property"""
|
|
1077
|
+
return self.properties.get("Id", None)
|
|
1078
|
+
|
|
1079
|
+
@property
|
|
1080
|
+
def sensitivity_label_id(self) -> Optional[str]:
|
|
1081
|
+
"""Gets the SensitivityLabelId property"""
|
|
1082
|
+
return self.properties.get("SensitivityLabelId", None)
|
|
1083
|
+
|
|
1084
|
+
@property
|
|
1085
|
+
def sensitivity_label(self) -> Optional[UUID]:
|
|
1086
|
+
"""Gets the SensitivityLabel property"""
|
|
1087
|
+
return self.properties.get("SensitivityLabel", None)
|
|
1088
|
+
|
|
1089
|
+
@property
|
|
1090
|
+
def is_personal_site_over_license_quota(self) -> Optional[bool]:
|
|
1091
|
+
"""Gets the IsPersonalSiteOverLicenseQuota property"""
|
|
1092
|
+
return self.properties.get("IsPersonalSiteOverLicenseQuota", None)
|
|
1093
|
+
|
|
1094
|
+
@property
|
|
1095
|
+
def is_personal_site_storage_limit_set_on_payg_tenant(self) -> Optional[bool]:
|
|
1096
|
+
"""Gets the IsPersonalSiteStorageLimitSetOnPaygTenant property"""
|
|
1097
|
+
return self.properties.get("IsPersonalSiteStorageLimitSetOnPaygTenant", None)
|
|
1098
|
+
|
|
1099
|
+
@property
|
|
1100
|
+
def is_restrict_content_org_wide_search_policy_enforced_on_site(self) -> Optional[bool]:
|
|
1101
|
+
"""Gets the IsRestrictContentOrgWideSearchPolicyEnforcedOnSite property"""
|
|
1102
|
+
return self.properties.get("IsRestrictContentOrgWideSearchPolicyEnforcedOnSite", None)
|
|
1103
|
+
|
|
1104
|
+
@property
|
|
1105
|
+
def is_restricted_access_control_policy_enforced_on_site(self) -> Optional[bool]:
|
|
1106
|
+
"""Gets the IsRestrictedAccessControlPolicyEnforcedOnSite property"""
|
|
1107
|
+
return self.properties.get("IsRestrictedAccessControlPolicyEnforcedOnSite", None)
|
|
1108
|
+
|
|
1109
|
+
@property
|
|
1110
|
+
def is_restricted_content_discoveryfor_copilot_and_agents_enabled(self) -> Optional[bool]:
|
|
1111
|
+
"""Gets the IsRestrictedContentDiscoveryforCopilotAndAgentsEnabled property"""
|
|
1112
|
+
return self.properties.get("IsRestrictedContentDiscoveryforCopilotAndAgentsEnabled", None)
|
|
1113
|
+
|
|
1114
|
+
@property
|
|
1115
|
+
def is_scheduled_for_removal(self) -> Optional[bool]:
|
|
1116
|
+
"""Gets the IsScheduledForRemoval property"""
|
|
1117
|
+
return self.properties.get("IsScheduledForRemoval", None)
|
|
1118
|
+
|
|
1119
|
+
@property
|
|
1120
|
+
def is_unlicensed_odb(self) -> Optional[bool]:
|
|
1121
|
+
"""Gets the IsUnlicensedOdb property"""
|
|
1122
|
+
return self.properties.get("IsUnlicensedOdb", None)
|
|
1123
|
+
|
|
1124
|
+
@property
|
|
1125
|
+
def media_transcription_disabled(self) -> Optional[bool]:
|
|
1126
|
+
"""Gets the MediaTranscriptionDisabled property"""
|
|
1127
|
+
return self.properties.get("MediaTranscriptionDisabled", None)
|
|
1128
|
+
|
|
1129
|
+
@property
|
|
1130
|
+
def needs_b2_b_upgrade(self) -> Optional[bool]:
|
|
1131
|
+
"""Gets the NeedsB2BUpgrade property"""
|
|
1132
|
+
return self.properties.get("NeedsB2BUpgrade", None)
|
|
1133
|
+
|
|
1134
|
+
@property
|
|
1135
|
+
def primary_uri(self) -> Optional[str]:
|
|
1136
|
+
"""Gets the PrimaryUri property"""
|
|
1137
|
+
return self.properties.get("PrimaryUri", None)
|
|
1138
|
+
|
|
1139
|
+
@property
|
|
1140
|
+
def related_group_id(self) -> Optional[UUID]:
|
|
1141
|
+
"""Gets the RelatedGroupId property"""
|
|
1142
|
+
return self.properties.get("RelatedGroupId", None)
|
|
1143
|
+
|
|
1144
|
+
@property
|
|
1145
|
+
def restrict_content_org_wide_search_update(self) -> RestrictContentOrgWidePolicyUpdate:
|
|
1146
|
+
"""Gets the RestrictContentOrgWideSearchUpdate property"""
|
|
1147
|
+
return self.properties.get("RestrictContentOrgWideSearchUpdate", RestrictContentOrgWidePolicyUpdate())
|
|
1148
|
+
|
|
1149
|
+
@property
|
|
1150
|
+
def restricted_access_control_groups_delegated_on_site(self) -> RestrictAccessControlUpdate:
|
|
1151
|
+
"""Gets the RestrictedAccessControlGroupsDelegatedOnSite property"""
|
|
1152
|
+
return self.properties.get("RestrictedAccessControlGroupsDelegatedOnSite", RestrictAccessControlUpdate())
|
|
1153
|
+
|
|
1154
|
+
@property
|
|
1155
|
+
def restricted_access_control_groups_enforced_on_site(self) -> StringCollection:
|
|
1156
|
+
"""Gets the RestrictedAccessControlGroupsEnforcedOnSite property"""
|
|
1157
|
+
return self.properties.get("RestrictedAccessControlGroupsEnforcedOnSite", StringCollection())
|
|
1158
|
+
|
|
1159
|
+
@property
|
|
1160
|
+
def sandboxed_code_activation_capability(self) -> Optional[int]:
|
|
1161
|
+
"""Gets the SandboxedCodeActivationCapability property"""
|
|
1162
|
+
return self.properties.get("SandboxedCodeActivationCapability", None)
|
|
1163
|
+
|
|
1164
|
+
@property
|
|
1165
|
+
def scheduled_date_for_removal(self) -> Optional[str]:
|
|
1166
|
+
"""Gets the ScheduledDateForRemoval property"""
|
|
1167
|
+
return self.properties.get("ScheduledDateForRemoval", None)
|
|
1168
|
+
|
|
1169
|
+
@property
|
|
1170
|
+
def search_box_in_nav_bar(self) -> Optional[int]:
|
|
1171
|
+
"""Gets the SearchBoxInNavBar property"""
|
|
1172
|
+
return self.properties.get("SearchBoxInNavBar", None)
|
|
1173
|
+
|
|
1174
|
+
@property
|
|
1175
|
+
def search_box_placeholder_text(self) -> Optional[str]:
|
|
1176
|
+
"""Gets the SearchBoxPlaceholderText property"""
|
|
1177
|
+
return self.properties.get("SearchBoxPlaceholderText", None)
|
|
1178
|
+
|
|
1179
|
+
@property
|
|
1180
|
+
def sensitivity_label_info(self) -> SensitivityLabelInfo:
|
|
1181
|
+
"""Gets the SensitivityLabelInfo property"""
|
|
1182
|
+
return self.properties.get("SensitivityLabelInfo", SensitivityLabelInfo())
|
|
1183
|
+
|
|
1184
|
+
@property
|
|
1185
|
+
def share_by_link_enabled(self) -> Optional[bool]:
|
|
1186
|
+
"""Gets the ShareByLinkEnabled property"""
|
|
1187
|
+
return self.properties.get("ShareByLinkEnabled", None)
|
|
1188
|
+
|
|
1189
|
+
@property
|
|
1190
|
+
def show_people_picker_suggestions_for_guest_users(self) -> Optional[bool]:
|
|
1191
|
+
"""Gets the ShowPeoplePickerSuggestionsForGuestUsers property"""
|
|
1192
|
+
return self.properties.get("ShowPeoplePickerSuggestionsForGuestUsers", None)
|
|
1193
|
+
|
|
1194
|
+
@property
|
|
1195
|
+
def site_policy_enabled(self) -> Optional[bool]:
|
|
1196
|
+
"""Gets the SitePolicyEnabled property"""
|
|
1197
|
+
return self.properties.get("SitePolicyEnabled", None)
|
|
1198
|
+
|
|
1199
|
+
@property
|
|
1200
|
+
def social_bar_on_site_pages_disabled(self) -> Optional[bool]:
|
|
1201
|
+
"""Gets the SocialBarOnSitePagesDisabled property"""
|
|
1202
|
+
return self.properties.get("SocialBarOnSitePagesDisabled", None)
|
|
1203
|
+
|
|
1204
|
+
@property
|
|
1205
|
+
def thicket_support_disabled(self) -> Optional[bool]:
|
|
1206
|
+
"""Gets the ThicketSupportDisabled property"""
|
|
1207
|
+
return self.properties.get("ThicketSupportDisabled", None)
|
|
1208
|
+
|
|
1209
|
+
@property
|
|
1210
|
+
def unified_domain_url(self) -> Optional[str]:
|
|
1211
|
+
"""Gets the UnifiedDomainUrl property"""
|
|
1212
|
+
return self.properties.get("UnifiedDomainUrl", None)
|
|
1213
|
+
|
|
1214
|
+
@property
|
|
1215
|
+
def unlicensed_odb_license_enforcement_warning_context(self) -> UnlicensedOdbLicenseEnforcementWarningContext:
|
|
1216
|
+
"""Gets the UnlicensedOdbLicenseEnforcementWarningContext property"""
|
|
1217
|
+
return self.properties.get(
|
|
1218
|
+
"UnlicensedOdbLicenseEnforcementWarningContext", UnlicensedOdbLicenseEnforcementWarningContext()
|
|
1219
|
+
)
|
|
1220
|
+
|
|
1221
|
+
@property
|
|
1222
|
+
def usage(self) -> UsageInfo:
|
|
1223
|
+
"""Gets the Usage property"""
|
|
1224
|
+
return self.properties.get("Usage", UsageInfo())
|
|
1225
|
+
|
|
1226
|
+
@property
|
|
1227
|
+
def custom_script_safe_domains(self) -> EntityCollection[ScriptSafeDomain]:
|
|
1228
|
+
"""Gets the CustomScriptSafeDomains property"""
|
|
1229
|
+
return self.properties.get(
|
|
1230
|
+
"CustomScriptSafeDomains",
|
|
1231
|
+
EntityCollection[ScriptSafeDomain](
|
|
1232
|
+
self.context, ScriptSafeDomain, ResourcePath("CustomScriptSafeDomains", self.resource_path)
|
|
923
1233
|
),
|
|
924
1234
|
)
|
|
925
1235
|
|
|
1236
|
+
@property
|
|
1237
|
+
def hub_site_synchronizable_visitor_group(self) -> Group:
|
|
1238
|
+
"""Gets the HubSiteSynchronizableVisitorGroup property"""
|
|
1239
|
+
return self.properties.get(
|
|
1240
|
+
"HubSiteSynchronizableVisitorGroup",
|
|
1241
|
+
Group(self.context, ResourcePath("HubSiteSynchronizableVisitorGroup", self.resource_path)),
|
|
1242
|
+
)
|
|
1243
|
+
|
|
926
1244
|
def get_property(self, name, default_value=None):
|
|
927
1245
|
if default_value is None:
|
|
928
1246
|
property_mapping = {
|
|
@@ -948,3 +1266,596 @@ class Site(Entity):
|
|
|
948
1266
|
else:
|
|
949
1267
|
super().set_property(name, value, persist_changes)
|
|
950
1268
|
return self
|
|
1269
|
+
|
|
1270
|
+
def create_copy_jobs(
|
|
1271
|
+
self, export_object_uris: list[str], destination_uri: str, options: CopyMigrationOptions
|
|
1272
|
+
) -> ClientResult[ClientValueCollection[CopyMigrationInfo]]:
|
|
1273
|
+
"""CreateCopyJobs operation.
|
|
1274
|
+
|
|
1275
|
+
Args:
|
|
1276
|
+
export_object_uris (list[str]): exportObjectUris parameter
|
|
1277
|
+
destination_uri (str): destinationUri parameter
|
|
1278
|
+
options (CopyMigrationOptions): options parameter
|
|
1279
|
+
"""
|
|
1280
|
+
return_type = ClientResult(self.context, ClientValueCollection[CopyMigrationInfo]())
|
|
1281
|
+
qry = ServiceOperationQuery(
|
|
1282
|
+
self,
|
|
1283
|
+
"CreateCopyJobs",
|
|
1284
|
+
None,
|
|
1285
|
+
{
|
|
1286
|
+
"exportObjectUris": StringCollection(export_object_uris),
|
|
1287
|
+
"destinationUri": destination_uri,
|
|
1288
|
+
"options": options,
|
|
1289
|
+
},
|
|
1290
|
+
None,
|
|
1291
|
+
return_type,
|
|
1292
|
+
)
|
|
1293
|
+
self.context.add_query(qry)
|
|
1294
|
+
return return_type
|
|
1295
|
+
|
|
1296
|
+
def create_preview_sp_site(self, upgrade: bool, sendemail: bool) -> Self:
|
|
1297
|
+
"""CreatePreviewSPSite operation.
|
|
1298
|
+
|
|
1299
|
+
Args:
|
|
1300
|
+
upgrade (bool): upgrade parameter
|
|
1301
|
+
sendemail (bool): sendemail parameter
|
|
1302
|
+
"""
|
|
1303
|
+
qry = ServiceOperationQuery(
|
|
1304
|
+
self, "CreatePreviewSPSite", None, {"upgrade": upgrade, "sendemail": sendemail}, None, None
|
|
1305
|
+
)
|
|
1306
|
+
self.context.add_query(qry)
|
|
1307
|
+
return self
|
|
1308
|
+
|
|
1309
|
+
def create_sp_async_read_job(
|
|
1310
|
+
self,
|
|
1311
|
+
url: str,
|
|
1312
|
+
read_options: AsyncReadOptions,
|
|
1313
|
+
encryption_option: EncryptionOption,
|
|
1314
|
+
azure_container_manifest_uri: str,
|
|
1315
|
+
azure_queue_report_uri: str,
|
|
1316
|
+
) -> ClientResult[AsyncReadJobInfo]:
|
|
1317
|
+
"""CreateSPAsyncReadJob operation.
|
|
1318
|
+
|
|
1319
|
+
Args:
|
|
1320
|
+
url (str): url parameter
|
|
1321
|
+
read_options (AsyncReadOptions): readOptions parameter
|
|
1322
|
+
encryption_option (EncryptionOption): encryptionOption parameter
|
|
1323
|
+
azure_container_manifest_uri (str): azureContainerManifestUri parameter
|
|
1324
|
+
azure_queue_report_uri (str): azureQueueReportUri parameter
|
|
1325
|
+
"""
|
|
1326
|
+
return_type = ClientResult(self.context, AsyncReadJobInfo())
|
|
1327
|
+
qry = ServiceOperationQuery(
|
|
1328
|
+
self,
|
|
1329
|
+
"CreateSPAsyncReadJob",
|
|
1330
|
+
None,
|
|
1331
|
+
{
|
|
1332
|
+
"url": url,
|
|
1333
|
+
"readOptions": read_options,
|
|
1334
|
+
"encryptionOption": encryption_option,
|
|
1335
|
+
"azureContainerManifestUri": azure_container_manifest_uri,
|
|
1336
|
+
"azureQueueReportUri": azure_queue_report_uri,
|
|
1337
|
+
},
|
|
1338
|
+
None,
|
|
1339
|
+
return_type,
|
|
1340
|
+
)
|
|
1341
|
+
self.context.add_query(qry)
|
|
1342
|
+
return return_type
|
|
1343
|
+
|
|
1344
|
+
def create_sp_async_read_job_with_multi_url(
|
|
1345
|
+
self,
|
|
1346
|
+
urls: list[str],
|
|
1347
|
+
read_options: AsyncReadOptions,
|
|
1348
|
+
encryption_option: EncryptionOption,
|
|
1349
|
+
azure_container_manifest_uri: str,
|
|
1350
|
+
azure_queue_report_uri: str,
|
|
1351
|
+
) -> ClientResult[AsyncReadJobInfo]:
|
|
1352
|
+
"""CreateSPAsyncReadJobWithMultiUrl operation.
|
|
1353
|
+
|
|
1354
|
+
Args:
|
|
1355
|
+
urls (list[str]): urls parameter
|
|
1356
|
+
read_options (AsyncReadOptions): readOptions parameter
|
|
1357
|
+
encryption_option (EncryptionOption): encryptionOption parameter
|
|
1358
|
+
azure_container_manifest_uri (str): azureContainerManifestUri parameter
|
|
1359
|
+
azure_queue_report_uri (str): azureQueueReportUri parameter
|
|
1360
|
+
"""
|
|
1361
|
+
return_type = ClientResult(self.context, AsyncReadJobInfo())
|
|
1362
|
+
qry = ServiceOperationQuery(
|
|
1363
|
+
self,
|
|
1364
|
+
"CreateSPAsyncReadJobWithMultiUrl",
|
|
1365
|
+
None,
|
|
1366
|
+
{
|
|
1367
|
+
"urls": StringCollection(urls),
|
|
1368
|
+
"readOptions": read_options,
|
|
1369
|
+
"encryptionOption": encryption_option,
|
|
1370
|
+
"azureContainerManifestUri": azure_container_manifest_uri,
|
|
1371
|
+
"azureQueueReportUri": azure_queue_report_uri,
|
|
1372
|
+
},
|
|
1373
|
+
None,
|
|
1374
|
+
return_type,
|
|
1375
|
+
)
|
|
1376
|
+
self.context.add_query(qry)
|
|
1377
|
+
return return_type
|
|
1378
|
+
|
|
1379
|
+
def delete_migration_job(self, id_: UUID) -> ClientResult[bool]:
|
|
1380
|
+
"""DeleteMigrationJob operation.
|
|
1381
|
+
|
|
1382
|
+
Args:
|
|
1383
|
+
id_ (UUID): id parameter
|
|
1384
|
+
"""
|
|
1385
|
+
return_type = ClientResult(self.context, bool())
|
|
1386
|
+
qry = ServiceOperationQuery(self, "DeleteMigrationJob", None, {"id": id_}, None, return_type)
|
|
1387
|
+
self.context.add_query(qry)
|
|
1388
|
+
return return_type
|
|
1389
|
+
|
|
1390
|
+
def enqueue_apply_sensitivity_label_work(
|
|
1391
|
+
self, work_item_information: AutoLabellingWorkInformation
|
|
1392
|
+
) -> ClientResult[EnqueueJobInformation]:
|
|
1393
|
+
"""EnqueueApplySensitivityLabelWork operation.
|
|
1394
|
+
|
|
1395
|
+
Args:
|
|
1396
|
+
work_item_information (AutoLabellingWorkInformation): workItemInformation parameter
|
|
1397
|
+
"""
|
|
1398
|
+
return_type = ClientResult(self.context, EnqueueJobInformation())
|
|
1399
|
+
qry = ServiceOperationQuery(
|
|
1400
|
+
self,
|
|
1401
|
+
"EnqueueApplySensitivityLabelWork",
|
|
1402
|
+
None,
|
|
1403
|
+
{"workItemInformation": work_item_information},
|
|
1404
|
+
None,
|
|
1405
|
+
return_type,
|
|
1406
|
+
)
|
|
1407
|
+
self.context.add_query(qry)
|
|
1408
|
+
return return_type
|
|
1409
|
+
|
|
1410
|
+
def get_bring_your_own_key_recovery_key_mode(self) -> ClientResult[int]:
|
|
1411
|
+
"""GetBringYourOwnKeyRecoveryKeyMode operation."""
|
|
1412
|
+
return_type = ClientResult(self.context, int())
|
|
1413
|
+
qry = ServiceOperationQuery(self, "GetBringYourOwnKeyRecoveryKeyMode", None, {}, None, return_type)
|
|
1414
|
+
self.context.add_query(qry)
|
|
1415
|
+
return return_type
|
|
1416
|
+
|
|
1417
|
+
def get_bring_your_own_key_site_status(self) -> ClientResult[CustomerKeyStatusInfo]:
|
|
1418
|
+
"""GetBringYourOwnKeySiteStatus operation."""
|
|
1419
|
+
return_type = ClientResult(self.context, CustomerKeyStatusInfo())
|
|
1420
|
+
qry = ServiceOperationQuery(self, "GetBringYourOwnKeySiteStatus", None, {}, None, return_type)
|
|
1421
|
+
self.context.add_query(qry)
|
|
1422
|
+
return return_type
|
|
1423
|
+
|
|
1424
|
+
def get_bring_your_own_key_tenant_status(self) -> ClientResult[CustomerKeyStatusInfo]:
|
|
1425
|
+
"""GetBringYourOwnKeyTenantStatus operation."""
|
|
1426
|
+
return_type = ClientResult(self.context, CustomerKeyStatusInfo())
|
|
1427
|
+
qry = ServiceOperationQuery(self, "GetBringYourOwnKeyTenantStatus", None, {}, None, return_type)
|
|
1428
|
+
self.context.add_query(qry)
|
|
1429
|
+
return return_type
|
|
1430
|
+
|
|
1431
|
+
@staticmethod
|
|
1432
|
+
def get_ebar_protection_units_exist_by_ids(
|
|
1433
|
+
context: ClientContext, site_subscription_id: UUID, protection_unit_ids: list[UUID]
|
|
1434
|
+
) -> ClientResult[dict]:
|
|
1435
|
+
"""GetEbarProtectionUnitsExistByIds operation.
|
|
1436
|
+
|
|
1437
|
+
Args:
|
|
1438
|
+
site_subscription_id (UUID): siteSubscriptionId parameter
|
|
1439
|
+
protection_unit_ids (list[UUID]): protectionUnitIds parameter
|
|
1440
|
+
"""
|
|
1441
|
+
return_type = ClientResult(context, dict())
|
|
1442
|
+
qry = FunctionQuery(
|
|
1443
|
+
Site(context),
|
|
1444
|
+
"GetEbarProtectionUnitsExistByIds",
|
|
1445
|
+
[site_subscription_id, GuidCollection(protection_unit_ids)],
|
|
1446
|
+
return_type,
|
|
1447
|
+
)
|
|
1448
|
+
context.add_query(qry)
|
|
1449
|
+
return return_type
|
|
1450
|
+
|
|
1451
|
+
@staticmethod
|
|
1452
|
+
def get_ebar_restore_session_exists_by_id(
|
|
1453
|
+
context: ClientContext, site_subscription_id: UUID, restore_session_id: UUID
|
|
1454
|
+
) -> ClientResult[bool]:
|
|
1455
|
+
"""GetEbarRestoreSessionExistsById operation.
|
|
1456
|
+
|
|
1457
|
+
Args:
|
|
1458
|
+
site_subscription_id (UUID): siteSubscriptionId parameter
|
|
1459
|
+
restore_session_id (UUID): restoreSessionId parameter
|
|
1460
|
+
"""
|
|
1461
|
+
return_type = ClientResult(context, bool())
|
|
1462
|
+
qry = FunctionQuery(
|
|
1463
|
+
Site(context), "GetEbarRestoreSessionExistsById", [site_subscription_id, restore_session_id], return_type
|
|
1464
|
+
)
|
|
1465
|
+
context.add_query(qry)
|
|
1466
|
+
return return_type
|
|
1467
|
+
|
|
1468
|
+
def get_hub_site_join_approval_correlation_id(self) -> ClientResult[str]:
|
|
1469
|
+
"""GetHubSiteJoinApprovalCorrelationId operation."""
|
|
1470
|
+
return_type = ClientResult(self.context, str())
|
|
1471
|
+
qry = FunctionQuery(self, "GetHubSiteJoinApprovalCorrelationId", [], return_type)
|
|
1472
|
+
self.context.add_query(qry)
|
|
1473
|
+
return return_type
|
|
1474
|
+
|
|
1475
|
+
def get_migration_job_status(self, id_: UUID) -> ClientResult[int]:
|
|
1476
|
+
"""GetMigrationJobStatus operation.
|
|
1477
|
+
|
|
1478
|
+
Args:
|
|
1479
|
+
id_ (UUID): id parameter
|
|
1480
|
+
"""
|
|
1481
|
+
return_type = ClientResult(self.context, int())
|
|
1482
|
+
qry = ServiceOperationQuery(self, "GetMigrationJobStatus", None, {"id": id_}, None, return_type)
|
|
1483
|
+
self.context.add_query(qry)
|
|
1484
|
+
return return_type
|
|
1485
|
+
|
|
1486
|
+
def get_progress_for_delete_file_versions(self) -> ClientResult[str]:
|
|
1487
|
+
"""GetProgressForDeleteFileVersions operation."""
|
|
1488
|
+
return_type = ClientResult(self.context, str())
|
|
1489
|
+
qry = ServiceOperationQuery(self, "GetProgressForDeleteFileVersions", None, {}, None, return_type)
|
|
1490
|
+
self.context.add_query(qry)
|
|
1491
|
+
return return_type
|
|
1492
|
+
|
|
1493
|
+
def get_progress_for_expire_file_versions_by_schedule(self, schedule_file_path: ResourcePath) -> ClientResult[str]:
|
|
1494
|
+
"""GetProgressForExpireFileVersionsBySchedule operation.
|
|
1495
|
+
|
|
1496
|
+
Args:
|
|
1497
|
+
schedule_file_path (ResourcePath): scheduleFilePath parameter
|
|
1498
|
+
"""
|
|
1499
|
+
return_type = ClientResult(self.context, str())
|
|
1500
|
+
qry = ServiceOperationQuery(
|
|
1501
|
+
self,
|
|
1502
|
+
"GetProgressForExpireFileVersionsBySchedule",
|
|
1503
|
+
None,
|
|
1504
|
+
{"scheduleFilePath": schedule_file_path},
|
|
1505
|
+
None,
|
|
1506
|
+
return_type,
|
|
1507
|
+
)
|
|
1508
|
+
self.context.add_query(qry)
|
|
1509
|
+
return return_type
|
|
1510
|
+
|
|
1511
|
+
def get_progress_for_file_version_expiration_report(self, report_file_url: str) -> ClientResult[str]:
|
|
1512
|
+
"""GetProgressForFileVersionExpirationReport operation.
|
|
1513
|
+
|
|
1514
|
+
Args:
|
|
1515
|
+
report_file_url (str): reportFileUrl parameter
|
|
1516
|
+
"""
|
|
1517
|
+
return_type = ClientResult(self.context, str())
|
|
1518
|
+
qry = ServiceOperationQuery(
|
|
1519
|
+
self,
|
|
1520
|
+
"GetProgressForFileVersionExpirationReport",
|
|
1521
|
+
None,
|
|
1522
|
+
{"reportFileUrl": report_file_url},
|
|
1523
|
+
None,
|
|
1524
|
+
return_type,
|
|
1525
|
+
)
|
|
1526
|
+
self.context.add_query(qry)
|
|
1527
|
+
return return_type
|
|
1528
|
+
|
|
1529
|
+
def get_progress_for_set_version_policy_for_doc_libs(self) -> ClientResult[str]:
|
|
1530
|
+
"""GetProgressForSetVersionPolicyForDocLibs operation."""
|
|
1531
|
+
return_type = ClientResult(self.context, str())
|
|
1532
|
+
qry = ServiceOperationQuery(self, "GetProgressForSetVersionPolicyForDocLibs", None, {}, None, return_type)
|
|
1533
|
+
self.context.add_query(qry)
|
|
1534
|
+
return return_type
|
|
1535
|
+
|
|
1536
|
+
@staticmethod
|
|
1537
|
+
def get_sites_exist_by_site_ids(
|
|
1538
|
+
context: ClientContext, site_subscription_id: UUID, site_ids: list[UUID]
|
|
1539
|
+
) -> ClientResult[dict]:
|
|
1540
|
+
"""GetSitesExistBySiteIds operation.
|
|
1541
|
+
|
|
1542
|
+
Args:
|
|
1543
|
+
site_subscription_id (UUID): siteSubscriptionId parameter
|
|
1544
|
+
site_ids (list[UUID]): siteIds parameter
|
|
1545
|
+
"""
|
|
1546
|
+
return_type = ClientResult(context, dict())
|
|
1547
|
+
qry = FunctionQuery(
|
|
1548
|
+
Site(context), "GetSitesExistBySiteIds", [site_subscription_id, GuidCollection(site_ids)], return_type
|
|
1549
|
+
)
|
|
1550
|
+
context.add_query(qry)
|
|
1551
|
+
return return_type
|
|
1552
|
+
|
|
1553
|
+
@staticmethod
|
|
1554
|
+
def get_sites_exist_by_site_urls(
|
|
1555
|
+
context: ClientContext, site_subscription_id: UUID, urls: list[str]
|
|
1556
|
+
) -> ClientResult[dict]:
|
|
1557
|
+
"""GetSitesExistBySiteUrls operation.
|
|
1558
|
+
|
|
1559
|
+
Args:
|
|
1560
|
+
site_subscription_id (UUID): siteSubscriptionId parameter
|
|
1561
|
+
urls (list[str]): urls parameter
|
|
1562
|
+
"""
|
|
1563
|
+
return_type = ClientResult(context, dict())
|
|
1564
|
+
qry = FunctionQuery(
|
|
1565
|
+
Site(context), "GetSitesExistBySiteUrls", [site_subscription_id, StringCollection(urls)], return_type
|
|
1566
|
+
)
|
|
1567
|
+
context.add_query(qry)
|
|
1568
|
+
return return_type
|
|
1569
|
+
|
|
1570
|
+
def multi_geo_copy_job(self, job_id: UUID, user_id: int, binary_payload: bytes) -> Self:
|
|
1571
|
+
"""MultiGeoCopyJob operation.
|
|
1572
|
+
|
|
1573
|
+
Args:
|
|
1574
|
+
job_id (UUID): jobId parameter
|
|
1575
|
+
user_id (int): userId parameter
|
|
1576
|
+
binary_payload (bytes): binaryPayload parameter
|
|
1577
|
+
"""
|
|
1578
|
+
qry = ServiceOperationQuery(
|
|
1579
|
+
self,
|
|
1580
|
+
"MultiGeoCopyJob",
|
|
1581
|
+
None,
|
|
1582
|
+
{"jobId": job_id, "userId": user_id, "binaryPayload": binary_payload},
|
|
1583
|
+
None,
|
|
1584
|
+
None,
|
|
1585
|
+
)
|
|
1586
|
+
self.context.add_query(qry)
|
|
1587
|
+
return self
|
|
1588
|
+
|
|
1589
|
+
def needs_upgrade_by_type_from_spo_shell(self, version_upgrade: bool, recursive: bool) -> ClientResult[bool]:
|
|
1590
|
+
"""NeedsUpgradeByTypeFromSpoShell operation.
|
|
1591
|
+
|
|
1592
|
+
Args:
|
|
1593
|
+
version_upgrade (bool): versionUpgrade parameter
|
|
1594
|
+
recursive (bool): recursive parameter
|
|
1595
|
+
"""
|
|
1596
|
+
return_type = ClientResult(self.context, bool())
|
|
1597
|
+
qry = FunctionQuery(self, "NeedsUpgradeByTypeFromSpoShell", [version_upgrade, recursive], return_type)
|
|
1598
|
+
self.context.add_query(qry)
|
|
1599
|
+
return return_type
|
|
1600
|
+
|
|
1601
|
+
def onboard_tenant_for_bring_your_own_key(self, key_info: CustomerKeyInfo) -> ClientResult[CustomerKeyStatusInfo]:
|
|
1602
|
+
"""OnboardTenantForBringYourOwnKey operation.
|
|
1603
|
+
|
|
1604
|
+
Args:
|
|
1605
|
+
key_info (CustomerKeyInfo): keyInfo parameter
|
|
1606
|
+
"""
|
|
1607
|
+
return_type = ClientResult(self.context, CustomerKeyStatusInfo())
|
|
1608
|
+
qry = ServiceOperationQuery(
|
|
1609
|
+
self, "OnboardTenantForBringYourOwnKey", None, {"keyInfo": key_info}, None, return_type
|
|
1610
|
+
)
|
|
1611
|
+
self.context.add_query(qry)
|
|
1612
|
+
return return_type
|
|
1613
|
+
|
|
1614
|
+
def on_hub_site_join_request_approved(self, joining_site_id: UUID) -> ClientResult[str]:
|
|
1615
|
+
"""OnHubSiteJoinRequestApproved operation.
|
|
1616
|
+
|
|
1617
|
+
Args:
|
|
1618
|
+
joining_site_id (UUID): joiningSiteId parameter
|
|
1619
|
+
"""
|
|
1620
|
+
return_type = ClientResult(self.context, str())
|
|
1621
|
+
qry = ServiceOperationQuery(
|
|
1622
|
+
self, "OnHubSiteJoinRequestApproved", None, {"joiningSiteId": joining_site_id}, None, return_type
|
|
1623
|
+
)
|
|
1624
|
+
self.context.add_query(qry)
|
|
1625
|
+
return return_type
|
|
1626
|
+
|
|
1627
|
+
def on_hub_site_join_request_canceled(self, approval_correlation_id: str) -> Self:
|
|
1628
|
+
"""OnHubSiteJoinRequestCanceled operation.
|
|
1629
|
+
|
|
1630
|
+
Args:
|
|
1631
|
+
approval_correlation_id (str): approvalCorrelationId parameter
|
|
1632
|
+
"""
|
|
1633
|
+
qry = ServiceOperationQuery(
|
|
1634
|
+
self, "OnHubSiteJoinRequestCanceled", None, {"approvalCorrelationId": approval_correlation_id}, None, None
|
|
1635
|
+
)
|
|
1636
|
+
self.context.add_query(qry)
|
|
1637
|
+
return self
|
|
1638
|
+
|
|
1639
|
+
def on_hub_site_join_request_started(self, approval_correlation_id: str) -> Self:
|
|
1640
|
+
"""OnHubSiteJoinRequestStarted operation.
|
|
1641
|
+
|
|
1642
|
+
Args:
|
|
1643
|
+
approval_correlation_id (str): approvalCorrelationId parameter
|
|
1644
|
+
"""
|
|
1645
|
+
qry = ServiceOperationQuery(
|
|
1646
|
+
self, "OnHubSiteJoinRequestStarted", None, {"approvalCorrelationId": approval_correlation_id}, None, None
|
|
1647
|
+
)
|
|
1648
|
+
self.context.add_query(qry)
|
|
1649
|
+
return self
|
|
1650
|
+
|
|
1651
|
+
def recover_tenant_for_bring_your_own_key(self, key_info: CustomerKeyInfo) -> ClientResult[CustomerKeyStatusInfo]:
|
|
1652
|
+
"""RecoverTenantForBringYourOwnKey operation.
|
|
1653
|
+
|
|
1654
|
+
Args:
|
|
1655
|
+
key_info (CustomerKeyInfo): keyInfo parameter
|
|
1656
|
+
"""
|
|
1657
|
+
return_type = ClientResult(self.context, CustomerKeyStatusInfo())
|
|
1658
|
+
qry = ServiceOperationQuery(
|
|
1659
|
+
self, "RecoverTenantForBringYourOwnKey", None, {"keyInfo": key_info}, None, return_type
|
|
1660
|
+
)
|
|
1661
|
+
self.context.add_query(qry)
|
|
1662
|
+
return return_type
|
|
1663
|
+
|
|
1664
|
+
def roll_tenant_bring_your_own_key(
|
|
1665
|
+
self, key_type: int, key_vault_info: CustomerKeyVaultInfo
|
|
1666
|
+
) -> ClientResult[CustomerKeyStatusInfo]:
|
|
1667
|
+
"""RollTenantBringYourOwnKey operation.
|
|
1668
|
+
|
|
1669
|
+
Args:
|
|
1670
|
+
key_type (int): keyType parameter
|
|
1671
|
+
key_vault_info (CustomerKeyVaultInfo): keyVaultInfo parameter
|
|
1672
|
+
"""
|
|
1673
|
+
return_type = ClientResult(self.context, CustomerKeyStatusInfo())
|
|
1674
|
+
qry = ServiceOperationQuery(
|
|
1675
|
+
self,
|
|
1676
|
+
"RollTenantBringYourOwnKey",
|
|
1677
|
+
None,
|
|
1678
|
+
{"keyType": key_type, "keyVaultInfo": key_vault_info},
|
|
1679
|
+
None,
|
|
1680
|
+
return_type,
|
|
1681
|
+
)
|
|
1682
|
+
self.context.add_query(qry)
|
|
1683
|
+
return return_type
|
|
1684
|
+
|
|
1685
|
+
def run_upgrade_site_session(self, version_upgrade: bool, queue_only: bool, send_email: bool) -> Self:
|
|
1686
|
+
"""RunUpgradeSiteSession operation.
|
|
1687
|
+
|
|
1688
|
+
Args:
|
|
1689
|
+
version_upgrade (bool): versionUpgrade parameter
|
|
1690
|
+
queue_only (bool): queueOnly parameter
|
|
1691
|
+
send_email (bool): sendEmail parameter
|
|
1692
|
+
"""
|
|
1693
|
+
qry = ServiceOperationQuery(
|
|
1694
|
+
self,
|
|
1695
|
+
"RunUpgradeSiteSession",
|
|
1696
|
+
None,
|
|
1697
|
+
{"versionUpgrade": version_upgrade, "queueOnly": queue_only, "sendEmail": send_email},
|
|
1698
|
+
None,
|
|
1699
|
+
None,
|
|
1700
|
+
)
|
|
1701
|
+
self.context.add_query(qry)
|
|
1702
|
+
return self
|
|
1703
|
+
|
|
1704
|
+
def set_block_download_policy_for_files(self, block_download_policy_file_type_ids: list[str]) -> Self:
|
|
1705
|
+
"""SetBlockDownloadPolicyForFiles operation.
|
|
1706
|
+
|
|
1707
|
+
Args:
|
|
1708
|
+
block_download_policy_file_type_ids (list[str]): blockDownloadPolicyFileTypeIds parameter
|
|
1709
|
+
"""
|
|
1710
|
+
qry = ServiceOperationQuery(
|
|
1711
|
+
self,
|
|
1712
|
+
"SetBlockDownloadPolicyForFiles",
|
|
1713
|
+
None,
|
|
1714
|
+
{"blockDownloadPolicyFileTypeIds": StringCollection(block_download_policy_file_type_ids)},
|
|
1715
|
+
None,
|
|
1716
|
+
None,
|
|
1717
|
+
)
|
|
1718
|
+
self.context.add_query(qry)
|
|
1719
|
+
return self
|
|
1720
|
+
|
|
1721
|
+
def set_is_contributor_owner_enabled_property_for_default_doc_lib(
|
|
1722
|
+
self,
|
|
1723
|
+
property_value: bool,
|
|
1724
|
+
force_doc_lib_activation: bool,
|
|
1725
|
+
delete_if_doc_lib_already_exists: bool,
|
|
1726
|
+
allow_delete_of_contributor_owner_enabled_doc_lib: bool,
|
|
1727
|
+
) -> ClientResult[bool]:
|
|
1728
|
+
"""SetIsContributorOwnerEnabledPropertyForDefaultDocLib operation.
|
|
1729
|
+
|
|
1730
|
+
Args:
|
|
1731
|
+
property_value (bool): propertyValue parameter
|
|
1732
|
+
force_doc_lib_activation (bool): forceDocLibActivation parameter
|
|
1733
|
+
delete_if_doc_lib_already_exists (bool): deleteIfDocLibAlreadyExists parameter
|
|
1734
|
+
allow_delete_of_contributor_owner_enabled_doc_lib (bool): allowDeleteOfContributorOwnerEnabledDocLib param
|
|
1735
|
+
"""
|
|
1736
|
+
return_type = ClientResult(self.context, bool())
|
|
1737
|
+
qry = ServiceOperationQuery(
|
|
1738
|
+
self,
|
|
1739
|
+
"SetIsContributorOwnerEnabledPropertyForDefaultDocLib",
|
|
1740
|
+
None,
|
|
1741
|
+
{
|
|
1742
|
+
"propertyValue": property_value,
|
|
1743
|
+
"forceDocLibActivation": force_doc_lib_activation,
|
|
1744
|
+
"deleteIfDocLibAlreadyExists": delete_if_doc_lib_already_exists,
|
|
1745
|
+
"allowDeleteOfContributorOwnerEnabledDocLib": allow_delete_of_contributor_owner_enabled_doc_lib,
|
|
1746
|
+
},
|
|
1747
|
+
None,
|
|
1748
|
+
return_type,
|
|
1749
|
+
)
|
|
1750
|
+
self.context.add_query(qry)
|
|
1751
|
+
return return_type
|
|
1752
|
+
|
|
1753
|
+
def start_delete_file_versions(self, delete_older_than_days: int) -> Self:
|
|
1754
|
+
"""StartDeleteFileVersions operation.
|
|
1755
|
+
|
|
1756
|
+
Args:
|
|
1757
|
+
delete_older_than_days (int): deleteOlderThanDays parameter
|
|
1758
|
+
"""
|
|
1759
|
+
qry = ServiceOperationQuery(
|
|
1760
|
+
self, "StartDeleteFileVersions", None, {"deleteOlderThanDays": delete_older_than_days}, None, None
|
|
1761
|
+
)
|
|
1762
|
+
self.context.add_query(qry)
|
|
1763
|
+
return self
|
|
1764
|
+
|
|
1765
|
+
def start_delete_file_versions_by_mode(self, batch_delete_parameters: FileVersionBatchDeleteParameters) -> Self:
|
|
1766
|
+
"""StartDeleteFileVersionsByMode operation.
|
|
1767
|
+
|
|
1768
|
+
Args:
|
|
1769
|
+
batch_delete_parameters (FileVersionBatchDeleteParameters): batchDeleteParameters parameter
|
|
1770
|
+
"""
|
|
1771
|
+
qry = ServiceOperationQuery(
|
|
1772
|
+
self, "StartDeleteFileVersionsByMode", None, {"batchDeleteParameters": batch_delete_parameters}, None, None
|
|
1773
|
+
)
|
|
1774
|
+
self.context.add_query(qry)
|
|
1775
|
+
return self
|
|
1776
|
+
|
|
1777
|
+
def start_expire_file_versions_by_schedule(self, schedule_file_path: ResourcePath) -> Self:
|
|
1778
|
+
"""StartExpireFileVersionsBySchedule operation.
|
|
1779
|
+
|
|
1780
|
+
Args:
|
|
1781
|
+
schedule_file_path (ResourcePath): scheduleFilePath parameter
|
|
1782
|
+
"""
|
|
1783
|
+
qry = ServiceOperationQuery(
|
|
1784
|
+
self, "StartExpireFileVersionsBySchedule", None, {"scheduleFilePath": schedule_file_path}, None, None
|
|
1785
|
+
)
|
|
1786
|
+
self.context.add_query(qry)
|
|
1787
|
+
return self
|
|
1788
|
+
|
|
1789
|
+
def start_file_version_expiration_report(self, report_file_url: str) -> Self:
|
|
1790
|
+
"""StartFileVersionExpirationReport operation.
|
|
1791
|
+
|
|
1792
|
+
Args:
|
|
1793
|
+
report_file_url (str): reportFileUrl parameter
|
|
1794
|
+
"""
|
|
1795
|
+
qry = ServiceOperationQuery(
|
|
1796
|
+
self, "StartFileVersionExpirationReport", None, {"reportFileUrl": report_file_url}, None, None
|
|
1797
|
+
)
|
|
1798
|
+
self.context.add_query(qry)
|
|
1799
|
+
return self
|
|
1800
|
+
|
|
1801
|
+
def start_set_version_policy_for_doc_libs(
|
|
1802
|
+
self,
|
|
1803
|
+
enable_auto_trim: bool,
|
|
1804
|
+
major_version_limit: int,
|
|
1805
|
+
major_with_minor_versions_limit: int,
|
|
1806
|
+
expire_after_days: int,
|
|
1807
|
+
) -> Self:
|
|
1808
|
+
"""StartSetVersionPolicyForDocLibs operation.
|
|
1809
|
+
|
|
1810
|
+
Args:
|
|
1811
|
+
enable_auto_trim (bool): enableAutoTrim parameter
|
|
1812
|
+
major_version_limit (int): majorVersionLimit parameter
|
|
1813
|
+
major_with_minor_versions_limit (int): majorWithMinorVersionsLimit parameter
|
|
1814
|
+
expire_after_days (int): expireAfterDays parameter
|
|
1815
|
+
"""
|
|
1816
|
+
qry = ServiceOperationQuery(
|
|
1817
|
+
self,
|
|
1818
|
+
"StartSetVersionPolicyForDocLibs",
|
|
1819
|
+
None,
|
|
1820
|
+
{
|
|
1821
|
+
"enableAutoTrim": enable_auto_trim,
|
|
1822
|
+
"majorVersionLimit": major_version_limit,
|
|
1823
|
+
"majorWithMinorVersionsLimit": major_with_minor_versions_limit,
|
|
1824
|
+
"expireAfterDays": expire_after_days,
|
|
1825
|
+
},
|
|
1826
|
+
None,
|
|
1827
|
+
None,
|
|
1828
|
+
)
|
|
1829
|
+
self.context.add_query(qry)
|
|
1830
|
+
return self
|
|
1831
|
+
|
|
1832
|
+
def update_inactive_site_properties(self, operation: str, execution_id: int) -> ClientResult[UpdateCard]:
|
|
1833
|
+
"""UpdateInactiveSiteProperties operation.
|
|
1834
|
+
|
|
1835
|
+
Args:
|
|
1836
|
+
operation (str): operation parameter
|
|
1837
|
+
execution_id (int): executionId parameter
|
|
1838
|
+
"""
|
|
1839
|
+
return_type = ClientResult(self.context, UpdateCard())
|
|
1840
|
+
qry = ServiceOperationQuery(
|
|
1841
|
+
self,
|
|
1842
|
+
"UpdateInactiveSiteProperties",
|
|
1843
|
+
None,
|
|
1844
|
+
{"operation": operation, "executionId": execution_id},
|
|
1845
|
+
None,
|
|
1846
|
+
return_type,
|
|
1847
|
+
)
|
|
1848
|
+
self.context.add_query(qry)
|
|
1849
|
+
return return_type
|
|
1850
|
+
|
|
1851
|
+
def validate_hub_site_join_approval_token(self, joining_site_id: UUID, approval_token: str) -> ClientResult[bool]:
|
|
1852
|
+
"""ValidateHubSiteJoinApprovalToken operation.
|
|
1853
|
+
|
|
1854
|
+
Args:
|
|
1855
|
+
joining_site_id (UUID): joiningSiteId parameter
|
|
1856
|
+
approval_token (str): approvalToken parameter
|
|
1857
|
+
"""
|
|
1858
|
+
return_type = ClientResult(self.context, bool())
|
|
1859
|
+
qry = FunctionQuery(self, "ValidateHubSiteJoinApprovalToken", [joining_site_id, approval_token], return_type)
|
|
1860
|
+
self.context.add_query(qry)
|
|
1861
|
+
return return_type
|