🔍 Code Extractor

class SynchronizationQuarantine

Maturity: 40

A data class that represents the quarantine state of a synchronization job, encapsulating error information when a synchronization job is quarantined.

File:
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/directory/synchronization/quarantine.py
Lines:
5 - 13
Complexity:
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

Similar Components

AI-powered semantic similarity - components with related functionality:

  • class SynchronizationStatus 81.0% similar

    A data class representing the current status of a synchronization job, including progress details and quarantine information.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/directory/synchronization/status.py
  • class SynchronizationProgress 64.6% similar

    A class representing the progress of a synchronization job toward completion in Microsoft Office 365 services.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/directory/synchronization/progress.py
  • class SynchronizationError 62.8% similar

    SynchronizationError is an exception class that represents errors occurring during synchronization operations in Office 365 client operations.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/directory/synchronization/error.py
  • class SynchronizationJobRestartCriteria 60.0% similar

    A class representing the criteria for restarting a synchronization job in Microsoft 365/Office 365 services.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/directory/synchronization/job_restart_criteria.py
  • class SynchronizationJob 59.7% similar

    Manages Microsoft 365 directory synchronization jobs that periodically poll for changes in one directory and push them to another directory, specific to an application instance in a tenant.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/directory/synchronization/job.py
← Back to Browse