interface PolicyAttributes
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Bedrock.Agentcore.Alpha.PolicyAttributes |
Go | github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2#PolicyAttributes |
Java | software.amazon.awscdk.services.bedrock.agentcore.alpha.PolicyAttributes |
Python | aws_cdk.aws_bedrock_agentcore_alpha.PolicyAttributes |
TypeScript (source) | @aws-cdk/aws-bedrock-agentcore-alpha ยป PolicyAttributes |
Attributes for importing an existing Policy.
Example
const importedEngine = agentcore.PolicyEngine.fromPolicyEngineAttributes(
this,
"ImportedEngine",
{
policyEngineArn: "policy-engine/my-engine-id",
}
);
const importedPolicy = agentcore.Policy.fromPolicyAttributes(
this,
"ImportedPolicy",
{
policyArn: "my-policy-arn",
policyEngine: importedEngine,
}
);
// Grant permissions to the imported policy
const role = new iam.Role(this, "PolicyRole", {
assumedBy: new iam.ServicePrincipal("lambda.amazonaws.com"),
});
importedPolicy.grantRead(role);
Properties
| Name | Type | Description |
|---|---|---|
| policy | string | The ARN of the policy. |
| policy | IPolicy | The policy engine this policy belongs to [disable-awslint:prefer-ref-interface]. |
policyArn
Type:
string
The ARN of the policy.
policyEngine
Type:
IPolicy
The policy engine this policy belongs to [disable-awslint:prefer-ref-interface].

.NET
Go
Java
Python
TypeScript (