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

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:34:09.744Z") @Stability(Stable) public class CfnHub extends CfnResource implements IInspectable, ITaggable
The AWS::SecurityHub::Hub resource specifies the enablement of the AWS Security Hub service in your AWS account .

The service is enabled in the current AWS Region or the specified Region. You create a separate Hub resource in each Region in which you want to enable Security Hub .

When you use this resource to enable Security Hub , default security standards are enabled. To disable default standards, set the EnableDefaultStandards property to false . You can use the AWS::SecurityHub::Standard resource to enable additional standards.

When you use this resource to enable Security Hub , new controls are automatically enabled for your enabled standards. To disable automatic enablement of new controls, set the AutoEnableControls property to false .

You must create an AWS::SecurityHub::Hub resource for an account before you can create other types of Security Hub resources for the account through AWS CloudFormation . Use a DependsOn attribute , such as "DependsOn": "Hub" , to ensure that you've created an AWS::SecurityHub::Hub resource before creating other Security Hub resources for an account.

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.*;
 Object tags;
 CfnHub cfnHub = CfnHub.Builder.create(this, "MyCfnHub")
         .autoEnableControls(false)
         .controlFindingGenerator("controlFindingGenerator")
         .enableDefaultStandards(false)
         .tags(tags)
         .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

    • CfnHub

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

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

      @Stability(Stable) public CfnHub(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnHubProps 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.
    • CfnHub

      @Stability(Stable) public CfnHub(@NotNull software.constructs.Construct scope, @NotNull String id)
      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.
  • 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.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The Amazon Resource Name (ARN) of the Hub resource that was retrieved.
    • getAttrSubscribedAt

      @Stability(Stable) @NotNull public String getAttrSubscribedAt()
      The date and time when Security Hub was enabled in your account.
    • getCfnProperties

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

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getAutoEnableControls

      @Stability(Stable) @Nullable public Object getAutoEnableControls()
      Whether to automatically enable new controls when they are added to standards that are enabled.
    • setAutoEnableControls

      @Stability(Stable) public void setAutoEnableControls(@Nullable Boolean value)
      Whether to automatically enable new controls when they are added to standards that are enabled.
    • setAutoEnableControls

      @Stability(Stable) public void setAutoEnableControls(@Nullable IResolvable value)
      Whether to automatically enable new controls when they are added to standards that are enabled.
    • getControlFindingGenerator

      @Stability(Stable) @Nullable public String getControlFindingGenerator()
      Specifies whether an account has consolidated control findings turned on or off.
    • setControlFindingGenerator

      @Stability(Stable) public void setControlFindingGenerator(@Nullable String value)
      Specifies whether an account has consolidated control findings turned on or off.
    • getEnableDefaultStandards

      @Stability(Stable) @Nullable public Object getEnableDefaultStandards()
      Whether to enable the security standards that Security Hub has designated as automatically enabled.
    • setEnableDefaultStandards

      @Stability(Stable) public void setEnableDefaultStandards(@Nullable Boolean value)
      Whether to enable the security standards that Security Hub has designated as automatically enabled.
    • setEnableDefaultStandards

      @Stability(Stable) public void setEnableDefaultStandards(@Nullable IResolvable value)
      Whether to enable the security standards that Security Hub has designated as automatically enabled.
    • getTagsRaw

      @Stability(Stable) @Nullable public Object getTagsRaw()
      An array of key-value pairs to apply to this resource.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable Object value)
      An array of key-value pairs to apply to this resource.