projects
Creates, updates, deletes or gets a project resource or lists projects in a region
Overview
| Name | projects |
| Type | Resource |
| Description | Resource schema for AWS::IoTSiteWise::Project |
| Id | awscc.iotsitewise.projects |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
portal_id | string | The ID of the portal in which to create the project. |
project_id | string | The ID of the project. |
project_name | string | A friendly name for the project. |
project_description | string | A description for the project. |
project_arn | string | The ARN of the project. |
asset_ids | array | The IDs of the assets to be associated to the project. |
tags | array | A list of key-value pairs that contain metadata for the project. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
project_id | string | The ID of the project. |
region | string | AWS region. |
For more information, see AWS::IoTSiteWise::Project.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | projects | INSERT | PortalId, ProjectName, region |
delete_resource | projects | DELETE | Identifier, region |
update_resource | projects | UPDATE | Identifier, PatchDocument, region |
list_resources | projects_list_only | SELECT | region |
get_resource | projects | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual project.
SELECT
region,
portal_id,
project_id,
project_name,
project_description,
project_arn,
asset_ids,
tags
FROM awscc.iotsitewise.projects
WHERE
region = 'us-east-1' AND
Identifier = '{{ project_id }}';
Lists all projects in a region.
SELECT
region,
project_id
FROM awscc.iotsitewise.projects_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new project resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.iotsitewise.projects (
PortalId,
ProjectName,
region
)
SELECT
'{{ portal_id }}',
'{{ project_name }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.iotsitewise.projects (
PortalId,
ProjectName,
ProjectDescription,
AssetIds,
Tags,
region
)
SELECT
'{{ portal_id }}',
'{{ project_name }}',
'{{ project_description }}',
'{{ asset_ids }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: project
props:
- name: portal_id
value: '{{ portal_id }}'
- name: project_name
value: '{{ project_name }}'
- name: project_description
value: '{{ project_description }}'
- name: asset_ids
value:
- '{{ asset_ids[0] }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a project resource, using stack-deploy.
/*+ update */
UPDATE awscc.iotsitewise.projects
SET PatchDocument = string('{{ {
"ProjectName": project_name,
"ProjectDescription": project_description,
"AssetIds": asset_ids,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ project_id }}';
DELETE example
/*+ delete */
DELETE FROM awscc.iotsitewise.projects
WHERE
Identifier = '{{ project_id }}' AND
region = 'us-east-1';
Permissions
To operate on the projects resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
iotsitewise:CreateProject,
iotsitewise:DescribeProject,
iotsitewise:ListProjectAssets,
iotsitewise:ListTagsForResource,
iotsitewise:TagResource,
iotsitewise:BatchAssociateProjectAssets
iotsitewise:DescribeProject,
iotsitewise:ListTagsForResource,
iotsitewise:ListProjectAssets
iotsitewise:DescribeProject,
iotsitewise:UpdateProject,
iotsitewise:BatchAssociateProjectAssets,
iotsitewise:BatchDisAssociateProjectAssets,
iotsitewise:ListProjectAssets,
iotsitewise:TagResource,
iotsitewise:UntagResource,
iotsitewise:ListTagsForResource
iotsitewise:DescribeProject,
iotsitewise:DeleteProject
iotsitewise:ListPortals,
iotsitewise:ListProjects,
iotsitewise:ListTagsForResource