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 | aws.iotsitewise.projects |
Fields
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. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | PortalId, ProjectName, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all projects
in a region.
SELECT
region,
portal_id,
project_id,
project_name,
project_description,
project_arn,
asset_ids,
tags
FROM aws.iotsitewise.projects
WHERE region = 'us-east-1';
Gets all properties from an individual project
.
SELECT
region,
portal_id,
project_id,
project_name,
project_description,
project_arn,
asset_ids,
tags
FROM aws.iotsitewise.projects
WHERE region = 'us-east-1' AND data__Identifier = '<ProjectId>';
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 aws.iotsitewise.projects (
PortalId,
ProjectName,
region
)
SELECT
'{{ PortalId }}',
'{{ ProjectName }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.iotsitewise.projects (
PortalId,
ProjectName,
ProjectDescription,
AssetIds,
Tags,
region
)
SELECT
'{{ PortalId }}',
'{{ ProjectName }}',
'{{ ProjectDescription }}',
'{{ AssetIds }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: project
props:
- name: PortalId
value: '{{ PortalId }}'
- name: ProjectName
value: '{{ ProjectName }}'
- name: ProjectDescription
value: '{{ ProjectDescription }}'
- name: AssetIds
value:
- '{{ AssetIds[0] }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.iotsitewise.projects
WHERE data__Identifier = '<ProjectId>'
AND region = 'us-east-1';
Permissions
To operate on the projects
resource, the following permissions are required:
Create
iotsitewise:CreateProject,
iotsitewise:DescribeProject,
iotsitewise:ListProjectAssets,
iotsitewise:ListTagsForResource,
iotsitewise:TagResource,
iotsitewise:BatchAssociateProjectAssets
Read
iotsitewise:DescribeProject,
iotsitewise:ListTagsForResource,
iotsitewise:ListProjectAssets
Update
iotsitewise:DescribeProject,
iotsitewise:UpdateProject,
iotsitewise:BatchAssociateProjectAssets,
iotsitewise:BatchDisAssociateProjectAssets,
iotsitewise:ListProjectAssets,
iotsitewise:TagResource,
iotsitewise:UntagResource,
iotsitewise:ListTagsForResource
Delete
iotsitewise:DescribeProject,
iotsitewise:DeleteProject
List
iotsitewise:ListProjects