trusted_entity_sets
Creates, updates, deletes or gets a trusted_entity_set resource or lists trusted_entity_sets in a region
Overview
| Name | trusted_entity_sets |
| Type | Resource |
| Description | Resource Type definition for AWS::GuardDuty::TrustedEntitySet |
| Id | awscc.guardduty.trusted_entity_sets |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
id | string | |
format | string | |
activate | boolean | |
status | string | |
created_at | string | |
updated_at | string | |
error_details | string | |
detector_id | string | |
name | string | |
location | string | |
expected_bucket_owner | string | |
tags | array | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
id | string | |
detector_id | string | |
region | string | AWS region. |
For more information, see AWS::GuardDuty::TrustedEntitySet.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | trusted_entity_sets | INSERT | Format, Location, region |
delete_resource | trusted_entity_sets | DELETE | Identifier, region |
update_resource | trusted_entity_sets | UPDATE | Identifier, PatchDocument, region |
list_resources | trusted_entity_sets_list_only | SELECT | region |
get_resource | trusted_entity_sets | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual trusted_entity_set.
SELECT
region,
id,
format,
activate,
status,
created_at,
updated_at,
error_details,
detector_id,
name,
location,
expected_bucket_owner,
tags
FROM awscc.guardduty.trusted_entity_sets
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}|{{ detector_id }}';
Lists all trusted_entity_sets in a region.
SELECT
region,
id,
detector_id
FROM awscc.guardduty.trusted_entity_sets_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new trusted_entity_set resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.guardduty.trusted_entity_sets (
Format,
Location,
region
)
SELECT
'{{ format }}',
'{{ location }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.guardduty.trusted_entity_sets (
Format,
Activate,
DetectorId,
Name,
Location,
ExpectedBucketOwner,
Tags,
region
)
SELECT
'{{ format }}',
'{{ activate }}',
'{{ detector_id }}',
'{{ name }}',
'{{ location }}',
'{{ expected_bucket_owner }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: trusted_entity_set
props:
- name: format
value: '{{ format }}'
- name: activate
value: '{{ activate }}'
- name: detector_id
value: '{{ detector_id }}'
- name: name
value: '{{ name }}'
- name: location
value: '{{ location }}'
- name: expected_bucket_owner
value: '{{ expected_bucket_owner }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a trusted_entity_set resource, using stack-deploy.
/*+ update */
UPDATE awscc.guardduty.trusted_entity_sets
SET PatchDocument = string('{{ {
"Activate": activate,
"Name": name,
"Location": location,
"ExpectedBucketOwner": expected_bucket_owner,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}|{{ detector_id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.guardduty.trusted_entity_sets
WHERE
Identifier = '{{ id }}|{{ detector_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:
| Parameter | Description |
|---|---|
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 trusted_entity_sets resource, the following permissions are required:
- Create
- Read
- Delete
- Update
- List
guardduty:CreateTrustedEntitySet,
guardduty:GetTrustedEntitySet,
guardduty:TagResource,
s3:GetObject
guardduty:GetTrustedEntitySet
guardduty:ListDetectors,
guardduty:ListTrustedEntitySets,
guardduty:DeleteTrustedEntitySet,
guardduty:GetTrustedEntitySet
guardduty:UpdateTrustedEntitySet,
guardduty:GetTrustedEntitySet,
guardduty:ListTrustedEntitySets,
guardduty:TagResource,
guardduty:UntagResource,
s3:GetObject
guardduty:ListTrustedEntitySets