approval_teams
Creates, updates, deletes, gets or lists an approval_teams resource.
Overview
| Name | approval_teams |
| Type | Resource |
| Id | aws.mpa.approval_teams |
Fields
The following fields are returned by SELECT queries:
- get_approval_team
- list_approval_teams
| Name | Datatype | Description |
|---|---|---|
approval_strategy | object | An ApprovalStrategyResponse object. Contains details for how the team grants approval. |
approvers | array | An array of GetApprovalTeamResponseApprover objects. Contains details for the approvers in the team. |
arn | string | Amazon Resource Name (ARN) for the team. |
creation_time | string (date-time) | Timestamp when the team was created. |
description | string | Description for the team. |
last_update_time | string (date-time) | Timestamp when the team was last updated. |
name | string | Name of the approval team. |
number_of_approvers | integer | Total number of approvers in the team. |
pending_update | object | A PendingUpdate object. Contains details for the pending updates for the team, if applicable. |
policies | array | An array of PolicyReference objects. Contains a list of policies that define the permissions for team resources. |
status | string | Status for the team. For more information, see Team health in the Multi-party approval User Guide. (ACTIVE, INACTIVE, DELETING, PENDING) |
status_code | string | Status 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_message | string | Message describing the status for the team. |
update_session_arn | string | Amazon Resource Name (ARN) for the session. |
version_id | string | Version ID for the team. |
| Name | Datatype | Description |
|---|---|---|
approval_strategy | object | An ApprovalStrategyResponse object. Contains details for how an approval team grants approval. |
arn | string | Amazon Resource Name (ARN) for the team. (pattern: <code>arn:aws(-[^:]+)?:mpa:[a-z0-9-]{1,20}:[0-9]{12}:approval-team/[a-zA-Z0-9._-]+</code>) |
creation_time | string (date-time) | Timestamp when the team was created. |
description | string | Description for the team. |
name | string | Name of the team. (pattern: <code>[a-zA-Z0-9._-]+</code>) |
number_of_approvers | integer | Total number of approvers in the team. |
status | string | Status for the team. For more information, see Team health in the Multi-party approval User Guide. (ACTIVE, INACTIVE, DELETING, PENDING) |
status_code | string | Status code for the 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_message | string | Message describing the status for the team. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_approval_team | select | arn, region | Returns details for an approval team. | |
list_approval_teams | select | region | MaxResults, NextToken | Returns a list of approval teams. |
create_approval_team | insert | region, ApprovalStrategy | Creates a new approval team. For more information, see Approval team in the Multi-party approval User Guide. | |
update_approval_team | update | arn, region | 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. | |
start_approval_team_baseline | exec | arn, region | Starts 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.
| Name | Datatype | Description |
|---|---|---|
arn | string | Amazon Resource Name (ARN) for the approval team. |
region | string | AWS region (default: us-east-1) |
MaxResults | integer | The 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. |
NextToken | string | If 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
- get_approval_team
- list_approval_teams
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
;
Returns a list of approval teams.
SELECT
approval_strategy,
arn,
creation_time,
description,
name,
number_of_approvers,
status,
status_code,
status_message
FROM aws.mpa.approval_teams
WHERE region = '{{ region }}' -- required
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
;
INSERT examples
- create_approval_team
- Manifest
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
;
# Description fields are for documentation purposes
- name: approval_teams
props:
- name: region
value: "{{ region }}"
description: Required parameter for the approval_teams resource.
- name: ClientToken
value: "{{ ClientToken }}"
- name: ApprovalStrategy
description: |
Strategy for how an approval team grants approval.
value:
MofN:
MinApprovalsRequired: {{ MinApprovalsRequired }}
- name: Approvers
value:
- PrimaryIdentityId: "{{ PrimaryIdentityId }}"
PrimaryIdentitySourceArn: "{{ PrimaryIdentitySourceArn }}"
- name: Description
value: "{{ Description }}"
- name: Policies
value:
- PolicyArn: "{{ PolicyArn }}"
- name: Name
value: "{{ Name }}"
- name: Tags
value: "{{ Tags }}"
UPDATE examples
- update_approval_team
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
- start_approval_team_baseline
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 }}"
}'
;