async def create_sync_job(
self,
workspace_id: "capo_iottwinmaker.types.id.Id",
sync_source: "capo_iottwinmaker.types.sync_source.SyncSource",
sync_role: "capo_iottwinmaker.types.role_arn.RoleArn",
*,
config_overrides: Optional[AsyncIoTTwinMakerClientConfig] = None,
tags: Optional["capo_iottwinmaker.types.tag_map.TagMap"] = None,
) -> "capo_iottwinmaker.types.create_sync_job_response.CreateSyncJobResponse":
"""<p>This action creates a SyncJob.</p>
Args:
workspace_id: <p>The workspace ID.</p>
sync_source: <p>The sync source.</p> <note> <p>Currently the only supported syncSoource is <code>SITEWISE </code>.</p> </note>
sync_role: <p>The SyncJob IAM role. This IAM role is used by the SyncJob to read from the syncSource, and create, update, or delete the corresponding resources.</p>
tags: <p>The SyncJob tags.</p>
Raises:
capo_iottwinmaker.errors.access_denied_exception.AccessDeniedException: <p>Access is denied.</p>
capo_iottwinmaker.errors.conflict_exception.ConflictException: <p>A conflict occurred.</p>
capo_iottwinmaker.errors.internal_server_exception.InternalServerException: <p>An unexpected error has occurred.</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.
"""
async def _handler(
req: "AsyncOperationRequest[capo_iottwinmaker.types.create_sync_job_request.CreateSyncJobRequest]",
) -> AsyncOperationResponse[
"capo_iottwinmaker.types.create_sync_job_response.CreateSyncJobResponse"
]:
import capo_iottwinmaker._operations.aws_io_t_twin_maker.create_sync_job
(
output,
http_response,
) = await capo_iottwinmaker._operations.aws_io_t_twin_maker.create_sync_job.async_create_sync_job(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateSyncJob")
)
input_: capo_iottwinmaker.types.create_sync_job_request.CreateSyncJobRequest = {
"workspace_id": workspace_id,
"sync_source": sync_source,
"sync_role": sync_role,
}
if tags is not None:
input_["tags"] = tags
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output