Skip to main content

sessions

Creates, updates, deletes, gets or lists a sessions resource.

Overview

Namesessions
TypeResource
Idaws.mpa.sessions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
action_completion_strategystringStrategy for executing the protected operation. AUTO_COMPLETION_UPON_APPROVAL means the operation is automatically executed using the requester's permissions, if approved. (AUTO_COMPLETION_UPON_APPROVAL)
action_namestringName of the protected operation.
additional_security_requirementsarrayA list of AdditionalSecurityRequirement applied to the session.
approval_strategyobjectAn ApprovalStrategyResponse object. Contains details for how the team grants approval
approval_team_arnstringAmazon Resource Name (ARN) for the approval team. (pattern: <code>arn:aws(-[^:]+)?:mpa:[a-z0-9-]{1,20}:[0-9]{12}:approval-team/[a-zA-Z0-9._-]+</code>)
approval_team_namestringName of the approval team. (pattern: <code>[a-zA-Z0-9._-]+</code>)
approver_responsesarrayAn array of GetSessionResponseApproverResponse objects. Contains details for approver responses in the session.
completion_timestring (date-time)Timestamp when the session completed.
descriptionstringDescription for the session.
execution_statusstringStatus for the protected operation. For example, if the operation is PENDING. (EXECUTED, FAILED, PENDING)
expiration_timestring (date-time)Timestamp when the session will expire.
initiation_timestring (date-time)Timestamp when the session was initiated.
metadataobjectMetadata for the session.
number_of_approversintegerTotal number of approvers in the session.
protected_resource_arnstringAmazon Resource Name (ARN) for the protected operation.
requester_account_idstringID for the account that made the operation request. (pattern: <code>\d{12}</code>)
requester_commentstringMessage from the account that made the operation request
requester_principal_arnstringIAM principal that made the operation request.
requester_regionstringAmazon Web Services Region where the operation request originated.
requester_service_principalstringService principal for the service associated with the protected operation.
session_arnstringAmazon Resource Name (ARN) for the session. (pattern: <code>arn:aws(-[^:]+)?:mpa:[a-z0-9-]{1,20}:[0-9]{12}:session/[a-zA-Z0-9.-]+/[a-zA-Z0-9-]+</code>)
statusstringStatus for the session. For example, if the team has approved the requested operation. (PENDING, CANCELLED, APPROVED, FAILED, CREATING)
status_codestringStatus code of the session. (REJECTED, EXPIRED, CONFIGURATION_CHANGED, ALL_APPROVERS_IN_SESSION)
status_messagestringMessage describing the status for session.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_sessionselectsession_arn, regionReturns details for an approval session. For more information, see Session in the Multi-party approval User Guide.
list_sessionsselectapproval_team_arn, regionReturns a list of approval sessions. For more information, see Session in the Multi-party approval User Guide.
cancel_sessionexecsession_arn, regionCancels an approval session. For more information, see Session in the Multi-party approval User Guide.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
approval_team_arnstringAmazon Resource Name (ARN) for the approval team.
regionstringAWS region (default: us-east-1)
session_arnstringAmazon Resource Name (ARN) for the session.

SELECT examples

Returns details for an approval session. For more information, see Session in the Multi-party approval User Guide.

SELECT
action_completion_strategy,
action_name,
additional_security_requirements,
approval_strategy,
approval_team_arn,
approval_team_name,
approver_responses,
completion_time,
description,
execution_status,
expiration_time,
initiation_time,
metadata,
number_of_approvers,
protected_resource_arn,
requester_account_id,
requester_comment,
requester_principal_arn,
requester_region,
requester_service_principal,
session_arn,
status,
status_code,
status_message
FROM aws.mpa.sessions
WHERE session_arn = '{{ session_arn }}' -- required
AND region = '{{ region }}' -- required
;

Lifecycle Methods

Cancels an approval session. For more information, see Session in the Multi-party approval User Guide.

EXEC aws.mpa.sessions.cancel_session
@session_arn='{{ session_arn }}' --required,
@region='{{ region }}' --required
;