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 = '{{ region }}' 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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.detective.organization_admins
WHERE
Identifier = '{{ account_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:

ParameterDescription
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 organization_admins resource, the following permissions are required:

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