trust_anchors
Creates, updates, deletes or gets a trust_anchor resource or lists trust_anchors in a region
Overview
| Name | trust_anchors |
| Type | Resource |
| Description | Definition of AWS::RolesAnywhere::TrustAnchor Resource Type. |
| Id | awscc.rolesanywhere.trust_anchors |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
enabled | boolean | |
name | string | |
notification_settings | array | |
source | object | |
tags | array | |
trust_anchor_id | string | |
trust_anchor_arn | string | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
trust_anchor_id | string | |
region | string | AWS region. |
For more information, see AWS::RolesAnywhere::TrustAnchor.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | trust_anchors | INSERT | Name, Source, region |
delete_resource | trust_anchors | DELETE | Identifier, region |
update_resource | trust_anchors | UPDATE | Identifier, PatchDocument, region |
list_resources | trust_anchors_list_only | SELECT | region |
get_resource | trust_anchors | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual trust_anchor.
SELECT
region,
enabled,
name,
notification_settings,
source,
tags,
trust_anchor_id,
trust_anchor_arn
FROM awscc.rolesanywhere.trust_anchors
WHERE
region = 'us-east-1' AND
Identifier = '{{ trust_anchor_id }}';
Lists all trust_anchors in a region.
SELECT
region,
trust_anchor_id
FROM awscc.rolesanywhere.trust_anchors_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new trust_anchor resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.rolesanywhere.trust_anchors (
Name,
Source,
region
)
SELECT
'{{ name }}',
'{{ source }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.rolesanywhere.trust_anchors (
Enabled,
Name,
NotificationSettings,
Source,
Tags,
region
)
SELECT
'{{ enabled }}',
'{{ name }}',
'{{ notification_settings }}',
'{{ source }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: trust_anchor
props:
- name: enabled
value: '{{ enabled }}'
- name: name
value: '{{ name }}'
- name: notification_settings
value:
- enabled: '{{ enabled }}'
event: '{{ event }}'
threshold: null
channel: '{{ channel }}'
- name: source
value:
source_type: '{{ source_type }}'
source_data: null
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a trust_anchor resource, using stack-deploy.
/*+ update */
UPDATE awscc.rolesanywhere.trust_anchors
SET PatchDocument = string('{{ {
"Enabled": enabled,
"Name": name,
"NotificationSettings": notification_settings,
"Source": source,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ trust_anchor_id }}';
DELETE example
/*+ delete */
DELETE FROM awscc.rolesanywhere.trust_anchors
WHERE
Identifier = '{{ trust_anchor_id }}' AND
region = 'us-east-1';
Permissions
To operate on the trust_anchors resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
iam:CreateServiceLinkedRole,
rolesanywhere:CreateTrustAnchor,
rolesanywhere:TagResource
rolesanywhere:GetTrustAnchor,
rolesanywhere:ListTagsForResource
acm-pca:GetCertificateAuthorityCertificate,
rolesanywhere:ListTagsForResource,
rolesanywhere:TagResource,
rolesanywhere:UntagResource,
rolesanywhere:EnableTrustAnchor,
rolesanywhere:DisableTrustAnchor,
rolesanywhere:UpdateTrustAnchor,
rolesanywhere:GetTrustAnchor,
rolesanywhere:PutNotificationSettings,
rolesanywhere:ResetNotificationSettings
rolesanywhere:DeleteTrustAnchor
rolesanywhere:ListTrustAnchors,
rolesanywhere:ListTagsForResource