java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, IPolicyRef, IEnvironmentAware, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)", date="2026-03-19T12:55:00.034Z") @Stability(Stable) public class CfnPolicy extends CfnResource implements IInspectable, IPolicyRef
Resource Type definition for AWS::BedrockAgentCore::Policy.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.bedrockagentcore.*;
 CfnPolicy cfnPolicy = CfnPolicy.Builder.create(this, "MyCfnPolicy")
         .definition(PolicyDefinitionProperty.builder()
                 .cedar(CedarPolicyProperty.builder()
                         .statement("statement")
                         .build())
                 .build())
         .name("name")
         .policyEngineId("policyEngineId")
         // the properties below are optional
         .description("description")
         .validationMode("validationMode")
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnPolicy

      protected CfnPolicy(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnPolicy

      protected CfnPolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnPolicy

      @Stability(Stable) public CfnPolicy(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnPolicyProps props)
      Create a new AWS::BedrockAgentCore::Policy.

      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • arnForPolicy

      @Stability(Stable) @NotNull public static String arnForPolicy(@NotNull IPolicyRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnPolicy

      @Stability(Stable) @NotNull public static Boolean isCfnPolicy(@NotNull Object x)
      Checks whether the given object is a CfnPolicy.

      Parameters:
      x - This parameter is required.
    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrCreatedAt

      @Stability(Stable) @NotNull public String getAttrCreatedAt()
      The timestamp when the policy was created.
    • getAttrPolicyArn

      @Stability(Stable) @NotNull public String getAttrPolicyArn()
      The Amazon Resource Name (ARN) of the policy.
    • getAttrPolicyId

      @Stability(Stable) @NotNull public String getAttrPolicyId()
      The unique identifier for the policy.
    • getAttrStatus

      @Stability(Stable) @NotNull public String getAttrStatus()
    • getAttrStatusReasons

      @Stability(Stable) @NotNull public List<String> getAttrStatusReasons()
      Additional information about the policy status.
    • getAttrUpdatedAt

      @Stability(Stable) @NotNull public String getAttrUpdatedAt()
      The timestamp when the policy was last updated.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getPolicyRef

      @Stability(Stable) @NotNull public PolicyReference getPolicyRef()
      A reference to a Policy resource.
      Specified by:
      getPolicyRef in interface IPolicyRef
    • getDefinition

      @Stability(Stable) @NotNull public Object getDefinition()
      The definition structure for policies.

      Returns union: either IResolvable or CfnPolicy.PolicyDefinitionProperty

    • setDefinition

      @Stability(Stable) public void setDefinition(@NotNull IResolvable value)
      The definition structure for policies.
    • setDefinition

      @Stability(Stable) public void setDefinition(@NotNull CfnPolicy.PolicyDefinitionProperty value)
      The definition structure for policies.
    • getName

      @Stability(Stable) @NotNull public String getName()
      The customer-assigned immutable name for the policy.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The customer-assigned immutable name for the policy.
    • getPolicyEngineId

      @Stability(Stable) @NotNull public String getPolicyEngineId()
      The identifier of the policy engine which contains this policy.
    • setPolicyEngineId

      @Stability(Stable) public void setPolicyEngineId(@NotNull String value)
      The identifier of the policy engine which contains this policy.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      A human-readable description of the policy's purpose and functionality.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      A human-readable description of the policy's purpose and functionality.
    • getValidationMode

      @Stability(Stable) @Nullable public String getValidationMode()
      The validation mode for the policy.
    • setValidationMode

      @Stability(Stable) public void setValidationMode(@Nullable String value)
      The validation mode for the policy.