member_invitations
Creates, updates, deletes or gets a member_invitation resource or lists member_invitations in a region
Overview
| Name | member_invitations |
| Type | Resource |
| Description | Resource schema for AWS::Detective::MemberInvitation |
| Id | awscc.detective.member_invitations |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
graph_arn | string | The ARN of the graph to which the member account will be invited |
member_id | string | The AWS account ID to be invited to join the graph as a member |
member_email_address | string | The root email address for the account to be invited, for validation. Updating this field has no effect. |
disable_email_notification | boolean | When set to true, invitation emails are not sent to the member accounts. Member accounts must still accept the invitation before they are added to the behavior graph. Updating this field has no effect. |
message | string | A message to be included in the email invitation sent to the invited account. Updating this field has no effect. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
graph_arn | string | The ARN of the graph to which the member account will be invited |
member_id | string | The AWS account ID to be invited to join the graph as a member |
region | string | AWS region. |
For more information, see AWS::Detective::MemberInvitation.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | member_invitations | INSERT | GraphArn, MemberId, MemberEmailAddress, region |
delete_resource | member_invitations | DELETE | Identifier, region |
list_resources | member_invitations_list_only | SELECT | region |
get_resource | member_invitations | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual member_invitation.
SELECT
region,
graph_arn,
member_id,
member_email_address,
disable_email_notification,
message
FROM awscc.detective.member_invitations
WHERE
region = '{{ region }}' AND
Identifier = '{{ graph_arn }}|{{ member_id }}';
Lists all member_invitations in a region.
SELECT
region,
graph_arn,
member_id
FROM awscc.detective.member_invitations_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new member_invitation resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.detective.member_invitations (
GraphArn,
MemberId,
MemberEmailAddress,
region
)
SELECT
'{{ graph_arn }}',
'{{ member_id }}',
'{{ member_email_address }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.detective.member_invitations (
GraphArn,
MemberId,
MemberEmailAddress,
DisableEmailNotification,
Message,
region
)
SELECT
'{{ graph_arn }}',
'{{ member_id }}',
'{{ member_email_address }}',
'{{ disable_email_notification }}',
'{{ message }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: member_invitation
props:
- name: graph_arn
value: '{{ graph_arn }}'
- name: member_id
value: '{{ member_id }}'
- name: member_email_address
value: '{{ member_email_address }}'
- name: disable_email_notification
value: '{{ disable_email_notification }}'
- name: message
value: '{{ message }}'
DELETE example
/*+ delete */
DELETE FROM awscc.detective.member_invitations
WHERE
Identifier = '{{ graph_arn }}|{{ member_id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the member_invitations resource, the following permissions are required:
- Create
- Read
- Delete
- List
detective:CreateMembers,
detective:GetMembers
detective:GetMembers
detective:DeleteMembers
detective:ListGraphs,
detective:ListMembers