ConditionBuilder
- class aws_cdk.aws_bedrock_agentcore_alpha.ConditionBuilder
Bases:
object(experimental) Builder for condition expressions in Cedar policies.
Conditions define when a policy statement should apply or not apply. Supports logical operators (AND, OR) and various comparison operators.
- Stability:
experimental
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_bedrock_agentcore_alpha as bedrock_agentcore_alpha condition_builder = bedrock_agentcore_alpha.ConditionBuilder()
- Stability:
experimental
Methods
- and_()
(experimental) Logical AND operator - all conditions must be true.
- Stability:
experimental
- Return type:
- context_attribute(attribute)
(experimental) Access a context attribute for comparison.
Context attributes come from the request environment. Common attributes: sourceIp, timestamp, environment, region, etc.
- Parameters:
attribute (
str) –The attribute name (e.g., ‘sourceIp’, ‘environment’, ‘timestamp’).
- Stability:
experimental
- Return type:
- or_()
(experimental) Logical OR operator - at least one condition must be true.
- Stability:
experimental
- Return type:
- principal_attribute(attribute)
(experimental) Access a principal attribute for comparison.
Principal attributes come from the authenticated user/service making the request. Common attributes: username, role, department, groups, etc.
- Parameters:
attribute (
str) –The attribute name (e.g., ‘department’, ‘role’, ‘username’).
- Stability:
experimental
- Return type:
- resource_attribute(attribute)
(experimental) Access a resource attribute for comparison.
Resource attributes come from the target resource being accessed. Common attributes: arn, type, tags, owner, etc.
- Parameters:
attribute (
str) –The attribute name (e.g., ‘confidential’, ‘owner’, ‘classification’).
- Stability:
experimental
- Return type: