sessions
Creates, updates, deletes or gets a session
resource or lists sessions
in a region
Overview
Name | sessions |
Type | Resource |
Description | The AWS::Macie::Session resource specifies a new Amazon Macie session. A session is an object that represents the Amazon Macie service. A session is required for Amazon Macie to become operational. |
Id | aws.macie.sessions |
Fields
Name | Datatype | Description |
---|---|---|
aws_account_id | string | AWS account ID of customer |
status | string | A enumeration value that specifies the status of the Macie Session. |
finding_publishing_frequency | string | A enumeration value that specifies how frequently finding updates are published. |
service_role | string | Service role used by Macie |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all sessions
in a region.
SELECT
region,
aws_account_id,
status,
finding_publishing_frequency,
service_role
FROM aws.macie.sessions
WHERE region = 'us-east-1';
Gets all properties from an individual session
.
SELECT
region,
aws_account_id,
status,
finding_publishing_frequency,
service_role
FROM aws.macie.sessions
WHERE region = 'us-east-1' AND data__Identifier = '<AwsAccountId>';
INSERT
example
Use the following StackQL query and manifest file to create a new session
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.macie.sessions (
Status,
FindingPublishingFrequency,
region
)
SELECT
'{{ Status }}',
'{{ FindingPublishingFrequency }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.macie.sessions (
Status,
FindingPublishingFrequency,
region
)
SELECT
'{{ Status }}',
'{{ FindingPublishingFrequency }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: session
props:
- name: Status
value: '{{ Status }}'
- name: FindingPublishingFrequency
value: '{{ FindingPublishingFrequency }}'
DELETE
example
/*+ delete */
DELETE FROM aws.macie.sessions
WHERE data__Identifier = '<AwsAccountId>'
AND region = 'us-east-1';
Permissions
To operate on the sessions
resource, the following permissions are required:
Create
macie2:GetMacieSession,
macie2:EnableMacie
Read
macie2:GetMacieSession
List
macie2:GetMacieSession
Update
macie2:GetMacieSession,
macie2:UpdateMacieSession
Delete
macie2:DisableMacie