sync_jobs
Creates, updates, deletes or gets a sync_job resource or lists sync_jobs in a region
Overview
| Name | sync_jobs |
| Type | Resource |
| Description | Resource schema for AWS::IoTTwinMaker::SyncJob |
| Id | awscc.iottwinmaker.sync_jobs |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
workspace_id | string | The ID of the workspace. |
sync_source | string | The source of the SyncJob. |
sync_role | string | The IAM Role that execute SyncJob. |
creation_date_time | string | The date and time when the sync job was created. |
arn | string | The ARN of the SyncJob. |
state | string | The state of SyncJob. |
tags | object | A key-value pair to associate with a resource. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
workspace_id | string | The ID of the workspace. |
sync_source | string | The source of the SyncJob. |
region | string | AWS region. |
For more information, see AWS::IoTTwinMaker::SyncJob.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | sync_jobs | INSERT | WorkspaceId, SyncSource, SyncRole, region |
delete_resource | sync_jobs | DELETE | Identifier, region |
list_resources | sync_jobs_list_only | SELECT | region |
get_resource | sync_jobs | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual sync_job.
SELECT
region,
workspace_id,
sync_source,
sync_role,
creation_date_time,
update_date_time,
arn,
state,
tags
FROM awscc.iottwinmaker.sync_jobs
WHERE
region = '{{ region }}' AND
Identifier = '{{ workspace_id }}|{{ sync_source }}';
Lists all sync_jobs in a region.
SELECT
region,
workspace_id,
sync_source
FROM awscc.iottwinmaker.sync_jobs_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new sync_job resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.iottwinmaker.sync_jobs (
WorkspaceId,
SyncSource,
SyncRole,
region
)
SELECT
'{{ workspace_id }}',
'{{ sync_source }}',
'{{ sync_role }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.iottwinmaker.sync_jobs (
WorkspaceId,
SyncSource,
SyncRole,
Tags,
region
)
SELECT
'{{ workspace_id }}',
'{{ sync_source }}',
'{{ sync_role }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: sync_job
props:
- name: workspace_id
value: '{{ workspace_id }}'
- name: sync_source
value: '{{ sync_source }}'
- name: sync_role
value: '{{ sync_role }}'
- name: tags
value: {}
DELETE example
/*+ delete */
DELETE FROM awscc.iottwinmaker.sync_jobs
WHERE
Identifier = '{{ workspace_id }}|{{ sync_source }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the sync_jobs resource, the following permissions are required:
- Create
- Read
- Delete
- List
iam:PassRole,
iottwinmaker:CreateSyncJob,
iottwinmaker:GetSyncJob,
iottwinmaker:GetWorkspace,
iottwinmaker:ListTagsForResource,
iottwinmaker:TagResource
iottwinmaker:GetSyncJob,
iottwinmaker:GetWorkspace,
iottwinmaker:ListTagsForResource
iottwinmaker:DeleteSyncJob,
iottwinmaker:GetSyncJob,
iottwinmaker:GetWorkspace
iottwinmaker:GetWorkspace,
iottwinmaker:ListSyncJobs,
iottwinmaker:ListTagsForResource