create_provisioning_roles_for_organization
async
¶
create_provisioning_roles_for_organization(
domain_id: DomainId,
target_account_id: AccountId,
*,
config_overrides: Optional[AsyncCloudWatchOmniClientConfig] = None,
space_data_access_role_configuration: Optional[
SpaceDataAccessRoleConfiguration
] = None,
agent_core_evaluation_role_configuration: Optional[
AgentCoreEvaluationRoleConfiguration
] = None,
client_token: Optional[ClientToken] = None,
) -> CreateProvisioningRolesForOrganizationOutput
Creates the IAM roles that an organization member account needs before a space can be set up in it: the provisioning role, the space data access role, and the dataset integration role. It also creates an AgentCore evaluation role when agentCoreEvaluationRoleConfiguration is set. The provisioning role is reused when it already exists in the target account. The other roles are created once per clientToken: retrying with the same token and input returns the same roles. The caller must be the organization's management account or a delegated administrator with an access grant on the organization domain. The target account must be an active member of the same organization as the domain, and must not be the management account. Fails with ServiceQuotaExceededException when the target member account already has the maximum number of roles of a type the call creates, or has reached an IAM quota.
Parameters:
-
domain_id(DomainId) –The ID of the organization domain.
-
target_account_id(AccountId) –The ID of the member account to create the roles in.
-
space_data_access_role_configuration(Optional[SpaceDataAccessRoleConfiguration], default:None) –Settings for the space data access role, which is always created. Omit for the default: only CloudWatchOmniSpaceAccessPolicy is attached.
-
agent_core_evaluation_role_configuration(Optional[AgentCoreEvaluationRoleConfiguration], default:None) –Settings for the AgentCore evaluation role. Omit this to create none.
-
client_token(Optional[ClientToken], default:None) –A unique token that makes retries create a single set of roles. Reusing a token with different input is an error. A concurrent request with the same token returns a ConflictException and can be retried.
Raises:
-
AccessDeniedException–The caller is not authorized to perform this action.
-
ConflictException–The operation could not be completed because of a conflict with the current state of the resource.
-
InternalServerException–An unexpected error occurred while processing the request.
-
ResourceNotFoundException–The specified resource does not exist.
-
ServiceQuotaExceededException–A service quota was exceeded.
-
ThrottlingException–The request was throttled due to exceeding the allowed request rate.
-
ValidationException–A parameter is specified incorrectly.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Create the default provisioning role and other roles required to set up an Omni space and enable dataset forwarding in a member account The following example creates the provisioning role, the space data access role, the dataset integration role, and an AgentCore evaluation role in an organization member account. CloudWatchOmniSpaceAccessPolicy is always attached to the space data access role and is not configurable; the example also attaches the optional model inference, DevOps agent, and AWS integration policies to it. Payloads are shown as JSON; on the wire they are CBOR-encoded.
>>> await client.create_provisioning_roles_for_organization(domain_id='d-1a2b3c4d5e', target_account_id='123456789012', space_data_access_role_configuration={'includePolicies': ['MODEL_INFERENCE', 'DEVOPS_AGENT', 'AWS_INTEGRATION']}, agent_core_evaluation_role_configuration={})
Source code in docs_src/capo_cloudwatchomni/_services/async_cloud_watch_omni.py
1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 | |