Interface CreatePolicyRequest.Builder
- All Superinterfaces:
AwsRequest.Builder,BedrockAgentCoreControlRequest.Builder,Buildable,CopyableBuilder<CreatePolicyRequest.Builder,,CreatePolicyRequest> SdkBuilder<CreatePolicyRequest.Builder,,CreatePolicyRequest> SdkPojo,SdkRequest.Builder
- Enclosing class:
CreatePolicyRequest
-
Method Summary
Modifier and TypeMethodDescriptionclientToken(String clientToken) A unique, case-sensitive identifier to ensure the idempotency of the request.default CreatePolicyRequest.Builderdefinition(Consumer<PolicyDefinition.Builder> definition) The Cedar policy statement that defines the access control rules.definition(PolicyDefinition definition) The Cedar policy statement that defines the access control rules.description(String description) A human-readable description of the policy's purpose and functionality (1-4,096 characters).The customer-assigned immutable name for the policy.overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Add an optional request override configuration.overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Add an optional request override configuration.policyEngineId(String policyEngineId) The identifier of the policy engine which contains this policy.validationMode(String validationMode) The validation mode for the policy creation.validationMode(PolicyValidationMode validationMode) The validation mode for the policy creation.Methods inherited from interface software.amazon.awssdk.awscore.AwsRequest.Builder
overrideConfigurationMethods inherited from interface software.amazon.awssdk.services.bedrockagentcorecontrol.model.BedrockAgentCoreControlRequest.Builder
buildMethods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
name
The customer-assigned immutable name for the policy. Must be unique within the account. This name is used for policy identification and cannot be changed after creation.
- Parameters:
name- The customer-assigned immutable name for the policy. Must be unique within the account. This name is used for policy identification and cannot be changed after creation.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
definition
The Cedar policy statement that defines the access control rules. This contains the actual policy logic written in Cedar policy language, specifying effect (permit or forbid), principals, actions, resources, and conditions for agent behavior control.
- Parameters:
definition- The Cedar policy statement that defines the access control rules. This contains the actual policy logic written in Cedar policy language, specifying effect (permit or forbid), principals, actions, resources, and conditions for agent behavior control.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
definition
The Cedar policy statement that defines the access control rules. This contains the actual policy logic written in Cedar policy language, specifying effect (permit or forbid), principals, actions, resources, and conditions for agent behavior control.
This is a convenience method that creates an instance of thePolicyDefinition.Builderavoiding the need to create one manually viaPolicyDefinition.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed todefinition(PolicyDefinition).- Parameters:
definition- a consumer that will call methods onPolicyDefinition.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
description
A human-readable description of the policy's purpose and functionality (1-4,096 characters). This helps policy administrators understand the policy's intent, business rules, and operational scope. Use this field to document why the policy exists, what business requirement it addresses, and any special considerations for maintenance. Clear descriptions are essential for policy governance, auditing, and troubleshooting.
- Parameters:
description- A human-readable description of the policy's purpose and functionality (1-4,096 characters). This helps policy administrators understand the policy's intent, business rules, and operational scope. Use this field to document why the policy exists, what business requirement it addresses, and any special considerations for maintenance. Clear descriptions are essential for policy governance, auditing, and troubleshooting.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
validationMode
The validation mode for the policy creation. Determines how Cedar analyzer validation results are handled during policy creation. FAIL_ON_ANY_FINDINGS (default) runs the Cedar analyzer to validate the policy against the Cedar schema and tool context, failing creation if the analyzer detects any validation issues to ensure strict conformance. IGNORE_ALL_FINDINGS runs the Cedar analyzer but allows policy creation even if validation issues are detected, useful for testing or when the policy schema is evolving. Use FAIL_ON_ANY_FINDINGS for production policies to ensure correctness, and IGNORE_ALL_FINDINGS only when you understand and accept the analyzer findings.
- Parameters:
validationMode- The validation mode for the policy creation. Determines how Cedar analyzer validation results are handled during policy creation. FAIL_ON_ANY_FINDINGS (default) runs the Cedar analyzer to validate the policy against the Cedar schema and tool context, failing creation if the analyzer detects any validation issues to ensure strict conformance. IGNORE_ALL_FINDINGS runs the Cedar analyzer but allows policy creation even if validation issues are detected, useful for testing or when the policy schema is evolving. Use FAIL_ON_ANY_FINDINGS for production policies to ensure correctness, and IGNORE_ALL_FINDINGS only when you understand and accept the analyzer findings.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
validationMode
The validation mode for the policy creation. Determines how Cedar analyzer validation results are handled during policy creation. FAIL_ON_ANY_FINDINGS (default) runs the Cedar analyzer to validate the policy against the Cedar schema and tool context, failing creation if the analyzer detects any validation issues to ensure strict conformance. IGNORE_ALL_FINDINGS runs the Cedar analyzer but allows policy creation even if validation issues are detected, useful for testing or when the policy schema is evolving. Use FAIL_ON_ANY_FINDINGS for production policies to ensure correctness, and IGNORE_ALL_FINDINGS only when you understand and accept the analyzer findings.
- Parameters:
validationMode- The validation mode for the policy creation. Determines how Cedar analyzer validation results are handled during policy creation. FAIL_ON_ANY_FINDINGS (default) runs the Cedar analyzer to validate the policy against the Cedar schema and tool context, failing creation if the analyzer detects any validation issues to ensure strict conformance. IGNORE_ALL_FINDINGS runs the Cedar analyzer but allows policy creation even if validation issues are detected, useful for testing or when the policy schema is evolving. Use FAIL_ON_ANY_FINDINGS for production policies to ensure correctness, and IGNORE_ALL_FINDINGS only when you understand and accept the analyzer findings.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
policyEngineId
The identifier of the policy engine which contains this policy. Policy engines group related policies and provide the execution context for policy evaluation.
- Parameters:
policyEngineId- The identifier of the policy engine which contains this policy. Policy engines group related policies and provide the execution context for policy evaluation.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
clientToken
A unique, case-sensitive identifier to ensure the idempotency of the request. The AWS SDK automatically generates this token, so you don't need to provide it in most cases. If you retry a request with the same client token, the service returns the same response without creating a duplicate policy.
- Parameters:
clientToken- A unique, case-sensitive identifier to ensure the idempotency of the request. The AWS SDK automatically generates this token, so you don't need to provide it in most cases. If you retry a request with the same client token, the service returns the same response without creating a duplicate policy.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
overrideConfiguration
CreatePolicyRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Description copied from interface:AwsRequest.BuilderAdd an optional request override configuration.- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder- Parameters:
overrideConfiguration- The override configuration.- Returns:
- This object for method chaining.
-
overrideConfiguration
CreatePolicyRequest.Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Description copied from interface:AwsRequest.BuilderAdd an optional request override configuration.- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder- Parameters:
builderConsumer- AConsumerto which an emptyAwsRequestOverrideConfiguration.Builderwill be given.- Returns:
- This object for method chaining.
-