Skip to main content

portals

Creates, updates, deletes or gets a portal resource or lists portals in a region

Overview

Nameportals
TypeResource
DescriptionResource schema for AWS::IoTSiteWise::Portal
Idawscc.iotsitewise.portals

Fields

NameDatatypeDescription
portal_auth_modestringThe 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_arnstringThe ARN of the portal, which has the following format.
portal_client_idstringThe AWS SSO application generated client ID (used with AWS SSO APIs).
portal_contact_emailstringThe AWS administrator's contact email address.
portal_descriptionstringA description for the portal.
portal_idstringThe ID of the portal.
portal_namestringA friendly name for the portal.
portal_start_urlstringThe public root URL for the AWS IoT AWS IoT SiteWise Monitor application portal.
portal_typestringThe type of portal
portal_type_configurationobjectMap to associate detail of configuration related with a PortalType.
role_arnstringThe ARN of a service role that allows the portal's users to access your AWS IoT SiteWise resources on your behalf.
notification_sender_emailstringThe email address that sends alarm notifications.
alarmsobjectContains 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.
tagsarrayA list of key-value pairs that contain metadata for the portal.
regionstringAWS region.

For more information, see AWS::IoTSiteWise::Portal.

Methods

NameResourceAccessible byRequired Params
create_resourceportalsINSERTPortalContactEmail, PortalName, RoleArn, region
delete_resourceportalsDELETEIdentifier, region
update_resourceportalsUPDATEIdentifier, PatchDocument, region
list_resourcesportals_list_onlySELECTregion
get_resourceportalsSELECTIdentifier, region

SELECT examples

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 = '{{ region }}' AND
Identifier = '{{ portal_id }}';

INSERT example

Use the following StackQL query and manifest file to create a new portal resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.iotsitewise.portals (
PortalContactEmail,
PortalName,
RoleArn,
region
)
SELECT
'{{ portal_contact_email }}',
'{{ portal_name }}',
'{{ role_arn }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.iotsitewise.portals
WHERE
Identifier = '{{ portal_id }}' 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:

ParameterDescription
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 portals resource, the following permissions are required:

iotsitewise:CreatePortal,
iotsitewise:DescribePortal,
iotsitewise:ListTagsForResource,
iotsitewise:TagResource,
iam:PassRole,
sso:CreateManagedApplicationInstance,
sso:DescribeRegisteredRegions