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 | awscc.iotsitewise.portals |
Fields
- get (all properties)
- list (identifiers only)
| 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. |
portal_type | string | The type of portal |
portal_type_configuration | object | Map to associate detail of configuration related with a PortalType. |
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. |
| Name | Datatype | Description |
|---|---|---|
portal_id | string | The ID of the portal. |
region | string | AWS region. |
For more information, see AWS::IoTSiteWise::Portal.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | portals | INSERT | PortalContactEmail, PortalName, RoleArn, region |
delete_resource | portals | DELETE | Identifier, region |
update_resource | portals | UPDATE | Identifier, PatchDocument, region |
list_resources | portals_list_only | SELECT | region |
get_resource | portals | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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,
portal_type,
portal_type_configuration,
role_arn,
notification_sender_email,
alarms,
tags
FROM awscc.iotsitewise.portals
WHERE
region = 'us-east-1' AND
Identifier = '{{ portal_id }}';
Lists all portals in a region.
SELECT
region,
portal_id
FROM awscc.iotsitewise.portals_list_only
WHERE
region = 'us-east-1';
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 awscc.iotsitewise.portals (
PortalContactEmail,
PortalName,
RoleArn,
region
)
SELECT
'{{ portal_contact_email }}',
'{{ portal_name }}',
'{{ role_arn }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.iotsitewise.portals (
PortalAuthMode,
PortalContactEmail,
PortalDescription,
PortalName,
PortalType,
PortalTypeConfiguration,
RoleArn,
NotificationSenderEmail,
Alarms,
Tags,
region
)
SELECT
'{{ portal_auth_mode }}',
'{{ portal_contact_email }}',
'{{ portal_description }}',
'{{ portal_name }}',
'{{ portal_type }}',
'{{ portal_type_configuration }}',
'{{ role_arn }}',
'{{ notification_sender_email }}',
'{{ 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: portal_auth_mode
value: '{{ portal_auth_mode }}'
- name: portal_contact_email
value: '{{ portal_contact_email }}'
- name: portal_description
value: '{{ portal_description }}'
- name: portal_name
value: '{{ portal_name }}'
- name: portal_type
value: '{{ portal_type }}'
- name: portal_type_configuration
value: {}
- name: role_arn
value: '{{ role_arn }}'
- name: notification_sender_email
value: '{{ notification_sender_email }}'
- name: alarms
value:
alarm_role_arn: '{{ alarm_role_arn }}'
notification_lambda_arn: '{{ notification_lambda_arn }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a portal resource, using stack-deploy.
/*+ update */
UPDATE awscc.iotsitewise.portals
SET PatchDocument = string('{{ {
"PortalContactEmail": portal_contact_email,
"PortalDescription": portal_description,
"PortalName": portal_name,
"PortalTypeConfiguration": portal_type_configuration,
"RoleArn": role_arn,
"NotificationSenderEmail": notification_sender_email,
"Alarms": alarms,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ portal_id }}';
DELETE example
/*+ delete */
DELETE FROM awscc.iotsitewise.portals
WHERE
Identifier = '{{ portal_id }}' AND
region = 'us-east-1';
Permissions
To operate on the portals resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
iotsitewise:CreatePortal,
iotsitewise:DescribePortal,
iotsitewise:ListTagsForResource,
iotsitewise:TagResource,
iam:PassRole,
sso:CreateManagedApplicationInstance,
sso:DescribeRegisteredRegions
iotsitewise:DescribePortal,
iotsitewise:ListTagsForResource
iotsitewise:DescribePortal,
iotsitewise:ListTagsForResource,
iotsitewise:TagResource,
iotsitewise:UpdatePortal,
iotsitewise:UntagResource,
iam:PassRole,
sso:GetManagedApplicationInstance,
sso:UpdateApplicationInstanceDisplayData
iotsitewise:DescribePortal,
iotsitewise:DeletePortal,
sso:DeleteManagedApplicationInstance
iotsitewise:ListPortals,
iotsitewise:ListTagsForResource