interface PolicyAttributes
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.BedrockAgentCore.PolicyAttributes |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsbedrockagentcore#PolicyAttributes |
Java | software.amazon.awscdk.services.bedrockagentcore.PolicyAttributes |
Python | aws_cdk.aws_bedrockagentcore.PolicyAttributes |
TypeScript (source) | aws-cdk-lib » aws_bedrockagentcore » 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 (