PolicyAttribute

class aws_cdk.aws_bedrockagentcore.PolicyAttribute(*args: Any, **kwargs)

Bases: object

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:

from aws_cdk.aws_bedrockagentcore import PolicyAttribute


PolicyAttribute.principal("department") # principal.department
PolicyAttribute.resource("confidential") # resource.confidential
PolicyAttribute.context("sourceIp")

Static Methods

classmethod context(attribute)

An attribute of the request context, meaning the request environment rather than either entity.

For example sourceIp, environment or timestamp.

Parameters:

attribute (str) –

  • The attribute name.

Return type:

PolicyAttribute

classmethod principal(attribute)

An attribute of the principal, meaning the authenticated user or service making the request.

For example username, department or groups.

Parameters:

attribute (str) –

  • The attribute name.

Return type:

PolicyAttribute

classmethod resource(attribute)

An attribute of the resource being accessed.

For example owner or classification.

Parameters:

attribute (str) –

  • The attribute name.

Return type:

PolicyAttribute