🔍 Code Extractor

class SiteCreationData

Maturity: 29

A data class representing site creation information for SharePoint Online tenant administration, including creation count and source GUID.

File:
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/tenant/administration/sites/creation_data.py
Lines:
4 - 11
Complexity:
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 create
  • site_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

Similar Components

AI-powered semantic similarity - components with related functionality:

  • class SiteCreationSource 85.3% similar

    A client value class representing a source for SharePoint site creation, containing a collection of site creation data objects.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/tenant/administration/sites/creation_source.py
  • class SiteCreationProperties 82.8% similar

    A data class that encapsulates the properties required to create a new SharePoint site, including URL, owner, title, and template information.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/tenant/administration/sites/creation_properties.py
  • class SiteScriptCreationInfo 75.7% similar

    SiteScriptCreationInfo is a data transfer object class that inherits from ClientValue, used to encapsulate information required for creating site scripts in SharePoint/Office 365.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/sitescripts/creation_info.py
  • class SiteDesignCreationInfo 75.5% similar

    A data class representing the configuration information needed to create a SharePoint site design, including title, description, template type, and associated site scripts.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/sitedesigns/creation_info.py
  • class SPSiteCreationResponse 75.2% similar

    A data transfer object representing the response from a SharePoint site creation operation, containing site ID, status, and URL information.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/portal/sites/creation_response.py
← Back to Browse