Skip to main content

sessions

Creates, updates, deletes or gets a session resource or lists sessions in a region

Overview

Namesessions
TypeResource
DescriptionThe 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.
Idaws.macie.sessions

Fields

NameDatatypeDescription
aws_account_idstringAWS account ID of customer
statusstringA enumeration value that specifies the status of the Macie Session.
finding_publishing_frequencystringA enumeration value that specifies how frequently finding updates are published.
service_rolestringService role used by Macie
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTregion
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__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.

/*+ create */
INSERT INTO aws.macie.sessions (
Status,
FindingPublishingFrequency,
region
)
SELECT
'{{ Status }}',
'{{ FindingPublishingFrequency }}',
'{{ region }}';

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