Class CfnPolicyAssociation

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

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:24:09.553Z") @Stability(Stable) public class CfnPolicyAssociation extends CfnResource implements IInspectable
The AWS::SecurityHub::PolicyAssociation resource specifies associations for a configuration policy or a self-managed configuration.

You can associate a AWS Security Hub configuration policy or self-managed configuration with the organization root, organizational units (OUs), or AWS accounts . After a successful association, the configuration policy takes effect in the specified targets. For more information, see Creating and associating Security Hub configuration policies in the AWS Security Hub User Guide .

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.securityhub.*;
 CfnPolicyAssociation cfnPolicyAssociation = CfnPolicyAssociation.Builder.create(this, "MyCfnPolicyAssociation")
         .configurationPolicyId("configurationPolicyId")
         .targetId("targetId")
         .targetType("targetType")
         .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

    • CfnPolicyAssociation

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

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

      @Stability(Stable) public CfnPolicyAssociation(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnPolicyAssociationProps props)
      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

    • 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.
    • getAttrAssociationIdentifier

      @Stability(Stable) @NotNull public String getAttrAssociationIdentifier()
      The association identifier, formatted as TargetType/TargetId .

      For example, ACCOUNT/123456789012 .

    • getAttrAssociationStatus

      @Stability(Stable) @NotNull public String getAttrAssociationStatus()
      The current status of the association between the specified target and the configuration.
    • getAttrAssociationStatusMessage

      @Stability(Stable) @NotNull public String getAttrAssociationStatusMessage()
      The explanation for a FAILED value for AssociationStatus .
    • getAttrAssociationType

      @Stability(Stable) @NotNull public String getAttrAssociationType()
      Indicates whether the association between the specified target and the configuration was directly applied by the AWS Security Hub delegated administrator or inherited from a parent.
    • getAttrUpdatedAt

      @Stability(Stable) @NotNull public String getAttrUpdatedAt()
      The date and time, in UTC and ISO 8601 format, that the configuration policy association was last updated.
    • getCfnProperties

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

      @Stability(Stable) @NotNull public String getConfigurationPolicyId()
      The universally unique identifier (UUID) of the configuration policy.
    • setConfigurationPolicyId

      @Stability(Stable) public void setConfigurationPolicyId(@NotNull String value)
      The universally unique identifier (UUID) of the configuration policy.
    • getTargetId

      @Stability(Stable) @NotNull public String getTargetId()
      The identifier of the target account, organizational unit, or the root.
    • setTargetId

      @Stability(Stable) public void setTargetId(@NotNull String value)
      The identifier of the target account, organizational unit, or the root.
    • getTargetType

      @Stability(Stable) @NotNull public String getTargetType()
      Specifies whether the target is an AWS account , organizational unit, or the root.
    • setTargetType

      @Stability(Stable) public void setTargetType(@NotNull String value)
      Specifies whether the target is an AWS account , organizational unit, or the root.