Skip to content

get_sync_job

get_sync_job(
    sync_source: SyncSource,
    *,
    config_overrides: Optional[IoTTwinMakerClientConfig] = None,
    workspace_id: Optional[Id] = None,
) -> GetSyncJobResponse

Gets the SyncJob.

Parameters:

  • sync_source (SyncSource) –

    The sync source.

    Currently the only supported syncSource is SITEWISE .

  • workspace_id (Optional[Id], default: None ) –

    The workspace ID.

Raises:

Source code in docs_src/capo_iottwinmaker/_services/io_t_twin_maker.py
def get_sync_job(
    self,
    sync_source: "capo_iottwinmaker.types.sync_source.SyncSource",
    *,
    config_overrides: Optional[IoTTwinMakerClientConfig] = None,
    workspace_id: Optional["capo_iottwinmaker.types.id.Id"] = None,
) -> "capo_iottwinmaker.types.get_sync_job_response.GetSyncJobResponse":
    """<p>Gets the SyncJob.</p>

    Args:
        sync_source: <p>The sync source.</p> <note> <p>Currently the only supported syncSource is <code>SITEWISE </code>.</p> </note>
        workspace_id: <p>The workspace ID.</p>

    Raises:
        capo_iottwinmaker.errors.access_denied_exception.AccessDeniedException: <p>Access is denied.</p>
        capo_iottwinmaker.errors.internal_server_exception.InternalServerException: <p>An unexpected error has occurred.</p>
        capo_iottwinmaker.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource wasn't found.</p>
        capo_iottwinmaker.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The service quota was exceeded.</p>
        capo_iottwinmaker.errors.throttling_exception.ThrottlingException: <p>The rate exceeds the limit.</p>
        capo_iottwinmaker.errors.validation_exception.ValidationException: <p>Failed</p>
        capo_iottwinmaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_iottwinmaker.types.get_sync_job_request.GetSyncJobRequest]",
    ) -> OperationResponse[
        "capo_iottwinmaker.types.get_sync_job_response.GetSyncJobResponse"
    ]:
        import capo_iottwinmaker._operations.aws_io_t_twin_maker.get_sync_job

        output, http_response = (
            capo_iottwinmaker._operations.aws_io_t_twin_maker.get_sync_job.get_sync_job(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetSyncJob")
    )
    input_: capo_iottwinmaker.types.get_sync_job_request.GetSyncJobRequest = {
        "sync_source": sync_source
    }
    if workspace_id is not None:
        input_["workspace_id"] = workspace_id

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output