portals
Creates, updates, deletes or gets a portal
resource or lists portals
in a region
Overview
Name | portals |
Type | Resource |
Description | Resource schema for AWS::IoTSiteWise::Portal |
Id | aws.iotsitewise.portals |
Fields
Name | Datatype | Description |
---|---|---|
portal_auth_mode | string | The service to use to authenticate users to the portal. Choose from SSO or IAM. You can't change this value after you create a portal. |
portal_arn | string | The ARN of the portal, which has the following format. |
portal_client_id | string | The AWS SSO application generated client ID (used with AWS SSO APIs). |
portal_contact_email | string | The AWS administrator's contact email address. |
portal_description | string | A description for the portal. |
portal_id | string | The ID of the portal. |
portal_name | string | A friendly name for the portal. |
portal_start_url | string | The public root URL for the AWS IoT AWS IoT SiteWise Monitor application portal. |
role_arn | string | The ARN of a service role that allows the portal's users to access your AWS IoT SiteWise resources on your behalf. |
notification_sender_email | string | The email address that sends alarm notifications. |
alarms | object | Contains the configuration information of an alarm created in an AWS IoT SiteWise Monitor portal. You can use the alarm to monitor an asset property and get notified when the asset property value is outside a specified range. |
tags | array | A list of key-value pairs that contain metadata for the portal. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | PortalContactEmail, PortalName, RoleArn, 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 portals
in a region.
SELECT
region,
portal_auth_mode,
portal_arn,
portal_client_id,
portal_contact_email,
portal_description,
portal_id,
portal_name,
portal_start_url,
role_arn,
notification_sender_email,
alarms,
tags
FROM aws.iotsitewise.portals
WHERE region = 'us-east-1';
Gets all properties from an individual portal
.
SELECT
region,
portal_auth_mode,
portal_arn,
portal_client_id,
portal_contact_email,
portal_description,
portal_id,
portal_name,
portal_start_url,
role_arn,
notification_sender_email,
alarms,
tags
FROM aws.iotsitewise.portals
WHERE region = 'us-east-1' AND data__Identifier = '<PortalId>';
INSERT
example
Use the following StackQL query and manifest file to create a new portal
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.iotsitewise.portals (
PortalContactEmail,
PortalName,
RoleArn,
region
)
SELECT
'{{ PortalContactEmail }}',
'{{ PortalName }}',
'{{ RoleArn }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.iotsitewise.portals (
PortalAuthMode,
PortalContactEmail,
PortalDescription,
PortalName,
RoleArn,
NotificationSenderEmail,
Alarms,
Tags,
region
)
SELECT
'{{ PortalAuthMode }}',
'{{ PortalContactEmail }}',
'{{ PortalDescription }}',
'{{ PortalName }}',
'{{ RoleArn }}',
'{{ NotificationSenderEmail }}',
'{{ Alarms }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: portal
props:
- name: PortalAuthMode
value: '{{ PortalAuthMode }}'
- name: PortalContactEmail
value: '{{ PortalContactEmail }}'
- name: PortalDescription
value: '{{ PortalDescription }}'
- name: PortalName
value: '{{ PortalName }}'
- name: RoleArn
value: '{{ RoleArn }}'
- name: NotificationSenderEmail
value: '{{ NotificationSenderEmail }}'
- name: Alarms
value:
AlarmRoleArn: '{{ AlarmRoleArn }}'
NotificationLambdaArn: '{{ NotificationLambdaArn }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.iotsitewise.portals
WHERE data__Identifier = '<PortalId>'
AND region = 'us-east-1';
Permissions
To operate on the portals
resource, the following permissions are required:
Create
iotsitewise:CreatePortal,
iotsitewise:DescribePortal,
iotsitewise:ListTagsForResource,
iotsitewise:TagResource,
iam:PassRole,
sso:CreateManagedApplicationInstance,
sso:DescribeRegisteredRegions
Read
iotsitewise:DescribePortal,
iotsitewise:ListTagsForResource
Update
iotsitewise:DescribePortal,
iotsitewise:ListTagsForResource,
iotsitewise:TagResource,
iotsitewise:UpdatePortal,
iotsitewise:UntagResource,
iam:PassRole,
sso:GetManagedApplicationInstance,
sso:UpdateApplicationInstanceDisplayData
Delete
iotsitewise:DescribePortal,
iotsitewise:DeletePortal,
sso:DeleteManagedApplicationInstance
List
iotsitewise:ListPortals