sessions
Creates, updates, deletes, gets or lists a sessions resource.
Overview
| Name | sessions |
| Type | Resource |
| Id | aws.mpa.sessions |
Fields
The following fields are returned by SELECT queries:
- get_session
- list_sessions
| Name | Datatype | Description |
|---|---|---|
action_completion_strategy | string | Strategy 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_name | string | Name of the protected operation. |
additional_security_requirements | array | A list of AdditionalSecurityRequirement applied to the session. |
approval_strategy | object | An ApprovalStrategyResponse object. Contains details for how the team grants approval |
approval_team_arn | string | Amazon 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_name | string | Name of the approval team. (pattern: <code>[a-zA-Z0-9._-]+</code>) |
approver_responses | array | An array of GetSessionResponseApproverResponse objects. Contains details for approver responses in the session. |
completion_time | string (date-time) | Timestamp when the session completed. |
description | string | Description for the session. |
execution_status | string | Status for the protected operation. For example, if the operation is PENDING. (EXECUTED, FAILED, PENDING) |
expiration_time | string (date-time) | Timestamp when the session will expire. |
initiation_time | string (date-time) | Timestamp when the session was initiated. |
metadata | object | Metadata for the session. |
number_of_approvers | integer | Total number of approvers in the session. |
protected_resource_arn | string | Amazon Resource Name (ARN) for the protected operation. |
requester_account_id | string | ID for the account that made the operation request. (pattern: <code>\d{12}</code>) |
requester_comment | string | Message from the account that made the operation request |
requester_principal_arn | string | IAM principal that made the operation request. |
requester_region | string | Amazon Web Services Region where the operation request originated. |
requester_service_principal | string | Service principal for the service associated with the protected operation. |
session_arn | string | Amazon 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>) |
status | string | Status for the session. For example, if the team has approved the requested operation. (PENDING, CANCELLED, APPROVED, FAILED, CREATING) |
status_code | string | Status code of the session. (REJECTED, EXPIRED, CONFIGURATION_CHANGED, ALL_APPROVERS_IN_SESSION) |
status_message | string | Message describing the status for session. |
| Name | Datatype | Description |
|---|---|---|
action_completion_strategy | string | Strategy for executing the protected operation. AUTO_COMPLETION_UPON_APPROVAL means the operation is executed automatically using the requester's permissions, if approved. (AUTO_COMPLETION_UPON_APPROVAL) |
action_name | string | Name of the protected operation. |
additional_security_requirements | array | A list of AdditionalSecurityRequirement applied to the session. |
approval_team_arn | string | Amazon 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_name | string | Name of the approval team. (pattern: <code>[a-zA-Z0-9._-]+</code>) |
completion_time | string (date-time) | Timestamp when the session was completed. |
description | string | Description for the team. |
expiration_time | string (date-time) | Timestamp when the session was expire. |
initiation_time | string (date-time) | Timestamp when the session was initiated. |
protected_resource_arn | string | Amazon Resource Name (ARN) for the protected operation. |
requester_account_id | string | ID for the account that made the operation request. (pattern: <code>\d{12}</code>) |
requester_principal_arn | string | IAM principal that made the operation request. |
requester_region | string | Amazon Web Services Region where the operation request originated. |
requester_service_principal | string | Service principal for the service associated with the protected operation. |
session_arn | string | Amazon 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>) |
status | string | Status for the protected operation. For example, if the operation is PENDING. (PENDING, CANCELLED, APPROVED, FAILED, CREATING) |
status_code | string | Status code of the session. (REJECTED, EXPIRED, CONFIGURATION_CHANGED, ALL_APPROVERS_IN_SESSION) |
status_message | string | Message describing the status for session. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_session | select | session_arn, region | Returns details for an approval session. For more information, see Session in the Multi-party approval User Guide. | |
list_sessions | select | approval_team_arn, region | Returns a list of approval sessions. For more information, see Session in the Multi-party approval User Guide. | |
cancel_session | exec | session_arn, region | Cancels 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.
| Name | Datatype | Description |
|---|---|---|
approval_team_arn | string | Amazon Resource Name (ARN) for the approval team. |
region | string | AWS region (default: us-east-1) |
session_arn | string | Amazon Resource Name (ARN) for the session. |
SELECT examples
- get_session
- list_sessions
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
;
Returns a list of approval sessions. For more information, see Session in the Multi-party approval User Guide.
SELECT
action_completion_strategy,
action_name,
additional_security_requirements,
approval_team_arn,
approval_team_name,
completion_time,
description,
expiration_time,
initiation_time,
protected_resource_arn,
requester_account_id,
requester_principal_arn,
requester_region,
requester_service_principal,
session_arn,
status,
status_code,
status_message
FROM aws.mpa.sessions
WHERE approval_team_arn = '{{ approval_team_arn }}' -- required
AND region = '{{ region }}' -- required
;
Lifecycle Methods
- cancel_session
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
;