Skip to main content

trust_anchors

Creates, updates, deletes or gets a trust_anchor resource or lists trust_anchors in a region

Overview

Nametrust_anchors
TypeResource
DescriptionDefinition of AWS::RolesAnywhere::TrustAnchor Resource Type.
Idawscc.rolesanywhere.trust_anchors

Fields

NameDatatypeDescription
enabledboolean
namestring
notification_settingsarray
sourceobject
tagsarray
trust_anchor_idstring
trust_anchor_arnstring
regionstringAWS region.

For more information, see AWS::RolesAnywhere::TrustAnchor.

Methods

NameResourceAccessible byRequired Params
create_resourcetrust_anchorsINSERTName, Source, region
delete_resourcetrust_anchorsDELETEIdentifier, region
update_resourcetrust_anchorsUPDATEIdentifier, PatchDocument, region
list_resourcestrust_anchors_list_onlySELECTregion
get_resourcetrust_anchorsSELECTIdentifier, region

SELECT examples

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

INSERT example

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

/*+ create */
INSERT INTO awscc.rolesanywhere.trust_anchors (
Name,
Source,
region
)
SELECT
'{{ name }}',
'{{ source }}',
'{{ 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 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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.rolesanywhere.trust_anchors
WHERE
Identifier = '{{ trust_anchor_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 trust_anchors resource, the following permissions are required:

iam:CreateServiceLinkedRole,
rolesanywhere:CreateTrustAnchor,
rolesanywhere:TagResource