Skip to main content

approval_teams

Creates, updates, deletes, gets or lists an approval_teams resource.

Overview

Nameapproval_teams
TypeResource
Idaws.mpa.approval_teams

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
approval_strategyobjectAn ApprovalStrategyResponse object. Contains details for how the team grants approval.
approversarrayAn array of GetApprovalTeamResponseApprover objects. Contains details for the approvers in the team.
arnstringAmazon Resource Name (ARN) for the team.
creation_timestring (date-time)Timestamp when the team was created.
descriptionstringDescription for the team.
last_update_timestring (date-time)Timestamp when the team was last updated.
namestringName of the approval team.
number_of_approversintegerTotal number of approvers in the team.
pending_updateobjectA PendingUpdate object. Contains details for the pending updates for the team, if applicable.
policiesarrayAn array of PolicyReference objects. Contains a list of policies that define the permissions for team resources.
statusstringStatus for the team. For more information, see Team health in the Multi-party approval User Guide. (ACTIVE, INACTIVE, DELETING, PENDING)
status_codestringStatus code for the approval team. For more information, see Team health in the Multi-party approval User Guide. (VALIDATING, PENDING_ACTIVATION, FAILED_VALIDATION, FAILED_ACTIVATION, UPDATE_PENDING_APPROVAL, UPDATE_PENDING_ACTIVATION, UPDATE_FAILED_APPROVAL, UPDATE_FAILED_ACTIVATION, UPDATE_FAILED_VALIDATION, DELETE_PENDING_APPROVAL, DELETE_FAILED_APPROVAL, DELETE_FAILED_VALIDATION)
status_messagestringMessage describing the status for the team.
update_session_arnstringAmazon Resource Name (ARN) for the session.
version_idstringVersion ID for the team.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_approval_teamselectarn, regionReturns details for an approval team.
list_approval_teamsselectregionMaxResults, NextTokenReturns a list of approval teams.
create_approval_teaminsertregion, ApprovalStrategyCreates a new approval team. For more information, see Approval team in the Multi-party approval User Guide.
update_approval_teamupdatearn, regionUpdates an approval team. You can request to update the team description, approval threshold, and approvers in the team. Updates require team approval Updates to an active team must be approved by the team.
start_approval_team_baselineexecarn, regionStarts a baseline session for specified approvers on an ACTIVE approval team.

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
arnstringAmazon Resource Name (ARN) for the approval team.
regionstringAWS region (default: us-east-1)
MaxResultsintegerThe maximum number of items to return in the response. If more results exist than the specified MaxResults value, a token is included in the response so that you can retrieve the remaining results.
NextTokenstringIf present, indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a next call to the operation to get more output. You can repeat this until the NextToken response element returns null.

SELECT examples

Returns details for an approval team.

SELECT
approval_strategy,
approvers,
arn,
creation_time,
description,
last_update_time,
name,
number_of_approvers,
pending_update,
policies,
status,
status_code,
status_message,
update_session_arn,
version_id
FROM aws.mpa.approval_teams
WHERE arn = '{{ arn }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a new approval team. For more information, see Approval team in the Multi-party approval User Guide.

INSERT INTO aws.mpa.approval_teams (
ClientToken,
ApprovalStrategy,
Approvers,
Description,
Policies,
Name,
Tags,
region
)
SELECT
'{{ ClientToken }}',
'{{ ApprovalStrategy }}' /* required */,
'{{ Approvers }}',
'{{ Description }}',
'{{ Policies }}',
'{{ Name }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
arn,
creation_time,
name,
version_id
;

UPDATE examples

Updates an approval team. You can request to update the team description, approval threshold, and approvers in the team. Updates require team approval Updates to an active team must be approved by the team.

UPDATE aws.mpa.approval_teams
SET
ApprovalStrategy = '{{ ApprovalStrategy }}',
Approvers = '{{ Approvers }}',
Description = '{{ Description }}',
UpdateActions = '{{ UpdateActions }}'
WHERE
arn = '{{ arn }}' --required
AND region = '{{ region }}' --required
RETURNING
version_id;

Lifecycle Methods

Starts a baseline session for specified approvers on an ACTIVE approval team.

EXEC aws.mpa.approval_teams.start_approval_team_baseline
@arn='{{ arn }}' --required,
@region='{{ region }}' --required
@@json=
'{
"ApproverIds": "{{ ApproverIds }}"
}'
;