class SynchronizationQuarantine
A data class that represents the quarantine state of a synchronization job, encapsulating error information when a synchronization job is quarantined.
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/directory/synchronization/quarantine.py
5 - 13
simple
Purpose
This class serves as a data container (ClientValue) to provide structured information about why and how a synchronization job was placed into quarantine. It inherits from ClientValue, indicating it's part of the Office365 API client library and is used to represent server-side data structures. The class is primarily used in Microsoft Graph API synchronization scenarios to track and report synchronization failures that result in job quarantine.
Source Code
class SynchronizationQuarantine(ClientValue):
"""Provides information about the quarantine state of a synchronizationJob."""
def __init__(self, error=SynchronizationError()):
"""
:param SynchronizationError error: Describes the error(s) that occurred when putting the synchronization job
into quarantine.
"""
self.error = error
Parameters
| Name | Type | Default | Kind |
|---|---|---|---|
bases |
ClientValue | - |
Parameter Details
error: A SynchronizationError object that describes the error(s) that occurred when the synchronization job was put into quarantine. Defaults to an empty SynchronizationError() instance if not provided. This parameter captures the detailed error information including error codes, messages, and other diagnostic data related to the quarantine event.
Return Value
Instantiation returns a SynchronizationQuarantine object that contains error information about the quarantine state. The object itself doesn't have methods that return values, but serves as a data structure to be accessed by its 'error' attribute.
Class Interface
Methods
__init__(self, error=SynchronizationError()) -> None
Purpose: Initializes a new SynchronizationQuarantine instance with error information about why a synchronization job was quarantined
Parameters:
error: A SynchronizationError object containing details about the error(s) that caused the quarantine. Defaults to an empty SynchronizationError instance.
Returns: None (constructor)
Attributes
| Name | Type | Description | Scope |
|---|---|---|---|
error |
SynchronizationError | Stores the error information that describes why the synchronization job was placed into quarantine. Contains details about the failure that triggered the quarantine state. | instance |
Dependencies
office365
Required Imports
from office365.directory.synchronization.error import SynchronizationError
from office365.directory.synchronization.quarantine import SynchronizationQuarantine
Usage Example
from office365.directory.synchronization.error import SynchronizationError
from office365.directory.synchronization.quarantine import SynchronizationQuarantine
# Create a synchronization error
error = SynchronizationError()
# Create a quarantine object with the error
quarantine = SynchronizationQuarantine(error=error)
# Access the error information
print(quarantine.error)
# Create with default error
default_quarantine = SynchronizationQuarantine()
print(default_quarantine.error)
Best Practices
- This is a data container class (inherits from ClientValue), so it should be treated as immutable after creation for thread safety
- Always provide a meaningful SynchronizationError object when creating instances to ensure proper error tracking
- This class is typically instantiated by the Office365 API client library when deserializing API responses, rather than being manually created by end users
- The class follows the Office365 REST Python Client pattern for representing Microsoft Graph API entities
- Since it inherits from ClientValue, it may have serialization/deserialization capabilities provided by the parent class
- Do not modify the error attribute after instantiation unless you have a specific reason, as this represents a snapshot of the quarantine state
Tags
Similar Components
AI-powered semantic similarity - components with related functionality:
-
class SynchronizationStatus 81.0% similar
-
class SynchronizationProgress 64.6% similar
-
class SynchronizationError 62.8% similar
-
class SynchronizationJobRestartCriteria 60.0% similar
-
class SynchronizationJob 59.7% similar