class SiteCreationData
A data class representing site creation information for SharePoint Online tenant administration, including creation count and source GUID.
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/tenant/administration/sites/creation_data.py
4 - 11
simple
Purpose
This class encapsulates data required for SharePoint site creation operations within Microsoft 365/SharePoint Online tenant administration. It inherits from ClientValue, making it suitable for serialization and transmission in SharePoint REST API calls. The class stores metadata about site creation requests, including how many sites to create and the GUID identifying the creation source template or configuration.
Source Code
class SiteCreationData(ClientValue):
def __init__(self, count=None, site_creation_source_guid=None):
self.Count = count
self.SiteCreationSourceGuid = site_creation_source_guid
@property
def entity_type_name(self):
return "Microsoft.Online.SharePoint.TenantAdministration.SiteCreationData"
Parameters
| Name | Type | Default | Kind |
|---|---|---|---|
bases |
ClientValue | - |
Parameter Details
count: Optional integer specifying the number of sites to create. Can be None if not specified. Represents the quantity of SharePoint sites that should be provisioned in a batch operation.
site_creation_source_guid: Optional string containing a GUID that identifies the source template, configuration, or blueprint from which sites should be created. Can be None if using default settings. This GUID typically references a site design or site script in SharePoint.
Return Value
Instantiation returns a SiteCreationData object with Count and SiteCreationSourceGuid attributes set to the provided values (or None). The entity_type_name property returns the string 'Microsoft.Online.SharePoint.TenantAdministration.SiteCreationData', which is used for type identification in SharePoint API serialization.
Class Interface
Methods
__init__(self, count=None, site_creation_source_guid=None)
Purpose: Initializes a new SiteCreationData instance with optional count and source GUID parameters
Parameters:
count: Optional integer specifying the number of sites to createsite_creation_source_guid: Optional string GUID identifying the site creation source template
Returns: None (constructor)
@property entity_type_name(self) -> str
property
Purpose: Returns the fully qualified entity type name used for SharePoint API serialization and type identification
Returns: String 'Microsoft.Online.SharePoint.TenantAdministration.SiteCreationData' representing the SharePoint entity type
Attributes
| Name | Type | Description | Scope |
|---|---|---|---|
Count |
int or None | The number of SharePoint sites to create in the operation. Can be None if not specified. | instance |
SiteCreationSourceGuid |
str or None | GUID string identifying the source template or configuration for site creation. Can be None if using defaults. | instance |
Dependencies
office365
Required Imports
from office365.runtime.client_value import ClientValue
Usage Example
from office365.runtime.client_value import ClientValue
from office365.sharepoint.tenant.administration.site_creation_data import SiteCreationData
# Create site creation data with count only
site_data = SiteCreationData(count=5)
# Create site creation data with both parameters
site_data_full = SiteCreationData(
count=3,
site_creation_source_guid='12345678-1234-1234-1234-123456789abc'
)
# Access attributes
print(site_data_full.Count) # Output: 3
print(site_data_full.SiteCreationSourceGuid) # Output: 12345678-1234-1234-1234-123456789abc
print(site_data_full.entity_type_name) # Output: Microsoft.Online.SharePoint.TenantAdministration.SiteCreationData
Best Practices
- This class is primarily a data container and should be instantiated with appropriate values before being passed to SharePoint tenant administration API methods
- The Count attribute should be a positive integer when specified, representing the number of sites to create
- The SiteCreationSourceGuid should be a valid GUID string format if provided, referencing an existing site design or template
- This class inherits from ClientValue, which means it's designed for serialization in SharePoint API calls - do not modify the entity_type_name property
- Instances are typically created and passed to tenant administration methods rather than being used standalone
- Both parameters are optional (can be None), but at least one should typically be provided for meaningful site creation operations
Tags
Similar Components
AI-powered semantic similarity - components with related functionality:
-
class SiteCreationSource 85.3% similar
-
class SiteCreationProperties 82.8% similar
-
class SiteScriptCreationInfo 75.7% similar
-
class SiteDesignCreationInfo 75.5% similar
-
class SPSiteCreationResponse 75.2% similar