Class PolicyProps.Builder
java.lang.Object
software.amazon.awscdk.services.bedrockagentcore.PolicyProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<PolicyProps>
- Enclosing interface:
PolicyProps
@Stability(Stable)
public static final class PolicyProps.Builder
extends Object
implements software.amazon.jsii.Builder<PolicyProps>
A builder for
PolicyProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.description(String description) Sets the value ofPolicyProps.getDescription()policyEngine(IPolicyEngine policyEngine) Sets the value ofPolicyProps.getPolicyEngine()policyName(String policyName) Sets the value ofPolicyProps.getPolicyName()statement(PolicyStatement statement) Sets the value ofPolicyProps.getStatement()validationMode(PolicyValidationMode validationMode) Sets the value ofPolicyProps.getValidationMode()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
policyEngine
Sets the value ofPolicyProps.getPolicyEngine()- Parameters:
policyEngine- The policy engine this policy belongs to. This parameter is required. [disable-awslint:prefer-ref-interface]- Returns:
this
-
statement
Sets the value ofPolicyProps.getStatement()- Parameters:
statement- The Cedar policy statement for this policy. This parameter is required. Build a type-safe statement with thePolicyStatementfactories, which validate at synthesis time and reject values that cannot be represented safely in Cedar.For raw Cedar (features this API does not model, or migrating an existing policy), use
PolicyStatement.fromCedar('...'). That string is used exactly as given: the module does not escape, quote, or validate it, so it is treated as trusted input and you own its correctness and safety. Do not assemble it from values that come from outside your application, such as a request body or a database record.- Returns:
this
-
description
Sets the value ofPolicyProps.getDescription()- Parameters:
description- Optional description for the policy. Maximum length of 4096.- Returns:
this
-
policyName
Sets the value ofPolicyProps.getPolicyName()- Parameters:
policyName- The name of the policy. Valid characters: a-z, A-Z, 0-9, _ (underscore) Must start with a letter, 1-48 characters Pattern: ^[A-Za-z][A-Za-z0-9_]*$- Returns:
this
-
validationMode
Sets the value ofPolicyProps.getValidationMode()- Parameters:
validationMode- Validation mode for the policy. Controls how Cedar analyzer validation findings are handled.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<PolicyProps>- Returns:
- a new instance of
PolicyProps - Throws:
NullPointerException- if any required attribute was not provided
-