Skip to main content

organization_admins

Creates, updates, deletes or gets an organization_admin resource or lists organization_admins in a region

Overview

Nameorganization_admins
TypeResource
DescriptionResource schema for AWS::Detective::OrganizationAdmin
Idawscc.detective.organization_admins

Fields

NameDatatypeDescription
account_idstringThe account ID of the account that should be registered as your Organization's delegated administrator for Detective
graph_arnstringThe Detective graph ARN
regionstringAWS region.

For more information, see AWS::Detective::OrganizationAdmin.

Methods

NameResourceAccessible byRequired Params
create_resourceorganization_adminsINSERTAccountId, region
delete_resourceorganization_adminsDELETEIdentifier, region
list_resourcesorganization_admins_list_onlySELECTregion
get_resourceorganization_adminsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual organization_admin.

SELECT
region,
account_id,
graph_arn
FROM awscc.detective.organization_admins
WHERE
region = 'us-east-1' AND
Identifier = '{{ account_id }}';

INSERT example

Use the following StackQL query and manifest file to create a new organization_admin resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.detective.organization_admins (
AccountId,
region
)
SELECT
'{{ account_id }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM awscc.detective.organization_admins
WHERE
Identifier = '{{ account_id }}' AND
region = 'us-east-1';

Permissions

To operate on the organization_admins resource, the following permissions are required:

detective:EnableOrganizationAdminAccount,
detective:ListOrganizationAdminAccount,
iam:CreateServiceLinkedRole,
organizations:RegisterDelegatedAdministrator,
organizations:DescribeOrganization,
organizations:EnableAWSServiceAccess,
organizations:ListAccounts