create_policy_engine
async
¶
create_policy_engine(
name: PolicyEngineName,
*,
config_overrides: Optional[AsyncBedrockAgentCoreControlClientConfig] = None,
description: Optional[Description] = None,
client_token: Optional[ClientToken] = None,
encryption_key_arn: Optional[KmsKeyArn] = None,
tags: Optional[TagsMap] = None,
) -> CreatePolicyEngineResponse
Creates a new policy engine within the AgentCore Policy system. A policy engine is a collection of policies that evaluates and authorizes agent tool calls. When associated with Gateways (each Gateway can be associated with at most one policy engine, but multiple Gateways can be associated with the same engine), the policy engine intercepts all agent requests and determines whether to allow or deny each action based on the defined policies. This is an asynchronous operation. Use the GetPolicyEngine operation to poll the status field to track completion.
Parameters:
-
name(PolicyEngineName) –The customer-assigned immutable name for the policy engine. This name identifies the policy engine and cannot be changed after creation.
-
description(Optional[Description], default:None) –A human-readable description of the policy engine's purpose and scope (1-4,096 characters). This helps administrators understand the policy engine's role in the overall governance strategy. Document which Gateway this engine will be associated with, what types of tools or workflows it governs, and the team or service responsible for maintaining it. Clear descriptions are essential when managing multiple policy engines across different services or environments.
-
client_token(Optional[ClientToken], default:None) –A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you retry a request with the same client token, the service returns the same response without creating a duplicate policy engine.
-
encryption_key_arn(Optional[KmsKeyArn], default:None) –The Amazon Resource Name (ARN) of the KMS key used to encrypt the policy engine data.
-
tags(Optional[TagsMap], default:None) –A map of tag keys and values to assign to an AgentCore Policy. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment.
Raises:
-
AccessDeniedException–This exception is thrown when a request is denied per access permissions
-
ConflictException–This exception is thrown when there is a conflict performing an operation
-
InternalServerException–This exception is thrown if there was an unexpected error during processing of request
-
ServiceQuotaExceededException–This exception is thrown when a request is made beyond the service quota
-
ThrottlingException–This exception is thrown when the number of requests exceeds the limit
-
ValidationException–The input fails to satisfy the constraints specified by the service.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_bedrock_agentcore_control/_services/async_bedrock_agent_core_control.py
11341 11342 11343 11344 11345 11346 11347 11348 11349 11350 11351 11352 11353 11354 11355 11356 11357 11358 11359 11360 11361 11362 11363 11364 11365 11366 11367 11368 11369 11370 11371 11372 11373 11374 11375 11376 11377 11378 11379 11380 11381 11382 11383 11384 11385 11386 11387 11388 11389 11390 11391 11392 11393 11394 11395 11396 11397 11398 11399 11400 11401 11402 11403 11404 11405 11406 11407 11408 11409 11410 11411 11412 11413 11414 11415 11416 11417 11418 11419 11420 11421 11422 11423 11424 11425 11426 11427 11428 11429 11430 11431 11432 11433 11434 11435 11436 | |