class PolicyAttribute
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.BedrockAgentCore.PolicyAttribute |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsbedrockagentcore#PolicyAttribute |
Java | software.amazon.awscdk.services.bedrockagentcore.PolicyAttribute |
Python | aws_cdk.aws_bedrockagentcore.PolicyAttribute |
TypeScript (source) | aws-cdk-lib » aws_bedrockagentcore » PolicyAttribute |
An attribute of the request that a condition can compare against.
Cedar exposes three sources of attributes. Which one you want depends on where the value comes from: the caller, the thing being accessed, or the request environment.
Example
import { PolicyAttribute } from 'aws-cdk-lib/aws-bedrockagentcore';
PolicyAttribute.principal('department'); // principal.department
PolicyAttribute.resource('confidential'); // resource.confidential
PolicyAttribute.context('sourceIp'); // context.sourceIp
Methods
| Name | Description |
|---|---|
| static context(attribute) | An attribute of the request context, meaning the request environment rather than either entity. |
| static principal(attribute) | An attribute of the principal, meaning the authenticated user or service making the request. |
| static resource(attribute) | An attribute of the resource being accessed. |
static context(attribute)
public static context(attribute: string): PolicyAttribute
Parameters
- attribute
string— - The attribute name.
Returns
An attribute of the request context, meaning the request environment rather than either entity.
For example sourceIp, environment or timestamp.
static principal(attribute)
public static principal(attribute: string): PolicyAttribute
Parameters
- attribute
string— - The attribute name.
Returns
An attribute of the principal, meaning the authenticated user or service making the request.
For example username, department or groups.
static resource(attribute)
public static resource(attribute: string): PolicyAttribute
Parameters
- attribute
string— - The attribute name.
Returns
An attribute of the resource being accessed.
For example owner or
classification.

.NET
Go
Java
Python
TypeScript (