1. Packages
  2. AWS
  3. API Docs
  4. securityhub
  5. Account
AWS v6.62.1 published on Monday, Dec 2, 2024 by Pulumi

aws.securityhub.Account

Explore with Pulumi AI

aws logo
AWS v6.62.1 published on Monday, Dec 2, 2024 by Pulumi

    Enables Security Hub for this AWS account.

    NOTE: Destroying this resource will disable Security Hub for this AWS account.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.securityhub.Account("example", {});
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.securityhub.Account("example")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/securityhub"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := securityhub.NewAccount(ctx, "example", nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.SecurityHub.Account("example");
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.securityhub.Account;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new Account("example");
    
        }
    }
    
    resources:
      example:
        type: aws:securityhub:Account
    

    Create Account Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Account(name: string, args?: AccountArgs, opts?: CustomResourceOptions);
    @overload
    def Account(resource_name: str,
                args: Optional[AccountArgs] = None,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Account(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                auto_enable_controls: Optional[bool] = None,
                control_finding_generator: Optional[str] = None,
                enable_default_standards: Optional[bool] = None)
    func NewAccount(ctx *Context, name string, args *AccountArgs, opts ...ResourceOption) (*Account, error)
    public Account(string name, AccountArgs? args = null, CustomResourceOptions? opts = null)
    public Account(String name, AccountArgs args)
    public Account(String name, AccountArgs args, CustomResourceOptions options)
    
    type: aws:securityhub:Account
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args AccountArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args AccountArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args AccountArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AccountArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AccountArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var exampleaccountResourceResourceFromSecurityhubaccount = new Aws.SecurityHub.Account("exampleaccountResourceResourceFromSecurityhubaccount", new()
    {
        AutoEnableControls = false,
        ControlFindingGenerator = "string",
        EnableDefaultStandards = false,
    });
    
    example, err := securityhub.NewAccount(ctx, "exampleaccountResourceResourceFromSecurityhubaccount", &securityhub.AccountArgs{
    	AutoEnableControls:      pulumi.Bool(false),
    	ControlFindingGenerator: pulumi.String("string"),
    	EnableDefaultStandards:  pulumi.Bool(false),
    })
    
    var exampleaccountResourceResourceFromSecurityhubaccount = new Account("exampleaccountResourceResourceFromSecurityhubaccount", AccountArgs.builder()
        .autoEnableControls(false)
        .controlFindingGenerator("string")
        .enableDefaultStandards(false)
        .build());
    
    exampleaccount_resource_resource_from_securityhubaccount = aws.securityhub.Account("exampleaccountResourceResourceFromSecurityhubaccount",
        auto_enable_controls=False,
        control_finding_generator="string",
        enable_default_standards=False)
    
    const exampleaccountResourceResourceFromSecurityhubaccount = new aws.securityhub.Account("exampleaccountResourceResourceFromSecurityhubaccount", {
        autoEnableControls: false,
        controlFindingGenerator: "string",
        enableDefaultStandards: false,
    });
    
    type: aws:securityhub:Account
    properties:
        autoEnableControls: false
        controlFindingGenerator: string
        enableDefaultStandards: false
    

    Account Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Account resource accepts the following input properties:

    AutoEnableControls bool
    Whether to automatically enable new controls when they are added to standards that are enabled. By default, this is set to true, and new controls are enabled automatically. To not automatically enable new controls, set this to false.
    ControlFindingGenerator string
    Updates whether the calling account has consolidated control findings turned on. If the value for this field is set to SECURITY_CONTROL, Security Hub generates a single finding for a control check even when the check applies to multiple enabled standards. If the value for this field is set to STANDARD_CONTROL, Security Hub generates separate findings for a control check when the check applies to multiple enabled standards. For accounts that are part of an organization, this value can only be updated in the administrator account.
    EnableDefaultStandards bool
    Whether to enable the security standards that Security Hub has designated as automatically enabled including: AWS Foundational Security Best Practices v1.0.0 and CIS AWS Foundations Benchmark v1.2.0. Defaults to true.
    AutoEnableControls bool
    Whether to automatically enable new controls when they are added to standards that are enabled. By default, this is set to true, and new controls are enabled automatically. To not automatically enable new controls, set this to false.
    ControlFindingGenerator string
    Updates whether the calling account has consolidated control findings turned on. If the value for this field is set to SECURITY_CONTROL, Security Hub generates a single finding for a control check even when the check applies to multiple enabled standards. If the value for this field is set to STANDARD_CONTROL, Security Hub generates separate findings for a control check when the check applies to multiple enabled standards. For accounts that are part of an organization, this value can only be updated in the administrator account.
    EnableDefaultStandards bool
    Whether to enable the security standards that Security Hub has designated as automatically enabled including: AWS Foundational Security Best Practices v1.0.0 and CIS AWS Foundations Benchmark v1.2.0. Defaults to true.
    autoEnableControls Boolean
    Whether to automatically enable new controls when they are added to standards that are enabled. By default, this is set to true, and new controls are enabled automatically. To not automatically enable new controls, set this to false.
    controlFindingGenerator String
    Updates whether the calling account has consolidated control findings turned on. If the value for this field is set to SECURITY_CONTROL, Security Hub generates a single finding for a control check even when the check applies to multiple enabled standards. If the value for this field is set to STANDARD_CONTROL, Security Hub generates separate findings for a control check when the check applies to multiple enabled standards. For accounts that are part of an organization, this value can only be updated in the administrator account.
    enableDefaultStandards Boolean
    Whether to enable the security standards that Security Hub has designated as automatically enabled including: AWS Foundational Security Best Practices v1.0.0 and CIS AWS Foundations Benchmark v1.2.0. Defaults to true.
    autoEnableControls boolean
    Whether to automatically enable new controls when they are added to standards that are enabled. By default, this is set to true, and new controls are enabled automatically. To not automatically enable new controls, set this to false.
    controlFindingGenerator string
    Updates whether the calling account has consolidated control findings turned on. If the value for this field is set to SECURITY_CONTROL, Security Hub generates a single finding for a control check even when the check applies to multiple enabled standards. If the value for this field is set to STANDARD_CONTROL, Security Hub generates separate findings for a control check when the check applies to multiple enabled standards. For accounts that are part of an organization, this value can only be updated in the administrator account.
    enableDefaultStandards boolean
    Whether to enable the security standards that Security Hub has designated as automatically enabled including: AWS Foundational Security Best Practices v1.0.0 and CIS AWS Foundations Benchmark v1.2.0. Defaults to true.
    auto_enable_controls bool
    Whether to automatically enable new controls when they are added to standards that are enabled. By default, this is set to true, and new controls are enabled automatically. To not automatically enable new controls, set this to false.
    control_finding_generator str
    Updates whether the calling account has consolidated control findings turned on. If the value for this field is set to SECURITY_CONTROL, Security Hub generates a single finding for a control check even when the check applies to multiple enabled standards. If the value for this field is set to STANDARD_CONTROL, Security Hub generates separate findings for a control check when the check applies to multiple enabled standards. For accounts that are part of an organization, this value can only be updated in the administrator account.
    enable_default_standards bool
    Whether to enable the security standards that Security Hub has designated as automatically enabled including: AWS Foundational Security Best Practices v1.0.0 and CIS AWS Foundations Benchmark v1.2.0. Defaults to true.
    autoEnableControls Boolean
    Whether to automatically enable new controls when they are added to standards that are enabled. By default, this is set to true, and new controls are enabled automatically. To not automatically enable new controls, set this to false.
    controlFindingGenerator String
    Updates whether the calling account has consolidated control findings turned on. If the value for this field is set to SECURITY_CONTROL, Security Hub generates a single finding for a control check even when the check applies to multiple enabled standards. If the value for this field is set to STANDARD_CONTROL, Security Hub generates separate findings for a control check when the check applies to multiple enabled standards. For accounts that are part of an organization, this value can only be updated in the administrator account.
    enableDefaultStandards Boolean
    Whether to enable the security standards that Security Hub has designated as automatically enabled including: AWS Foundational Security Best Practices v1.0.0 and CIS AWS Foundations Benchmark v1.2.0. Defaults to true.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Account resource produces the following output properties:

    Arn string
    ARN of the SecurityHub Hub created in the account.
    Id string
    The provider-assigned unique ID for this managed resource.
    Arn string
    ARN of the SecurityHub Hub created in the account.
    Id string
    The provider-assigned unique ID for this managed resource.
    arn String
    ARN of the SecurityHub Hub created in the account.
    id String
    The provider-assigned unique ID for this managed resource.
    arn string
    ARN of the SecurityHub Hub created in the account.
    id string
    The provider-assigned unique ID for this managed resource.
    arn str
    ARN of the SecurityHub Hub created in the account.
    id str
    The provider-assigned unique ID for this managed resource.
    arn String
    ARN of the SecurityHub Hub created in the account.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Account Resource

    Get an existing Account resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: AccountState, opts?: CustomResourceOptions): Account
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            auto_enable_controls: Optional[bool] = None,
            control_finding_generator: Optional[str] = None,
            enable_default_standards: Optional[bool] = None) -> Account
    func GetAccount(ctx *Context, name string, id IDInput, state *AccountState, opts ...ResourceOption) (*Account, error)
    public static Account Get(string name, Input<string> id, AccountState? state, CustomResourceOptions? opts = null)
    public static Account get(String name, Output<String> id, AccountState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Arn string
    ARN of the SecurityHub Hub created in the account.
    AutoEnableControls bool
    Whether to automatically enable new controls when they are added to standards that are enabled. By default, this is set to true, and new controls are enabled automatically. To not automatically enable new controls, set this to false.
    ControlFindingGenerator string
    Updates whether the calling account has consolidated control findings turned on. If the value for this field is set to SECURITY_CONTROL, Security Hub generates a single finding for a control check even when the check applies to multiple enabled standards. If the value for this field is set to STANDARD_CONTROL, Security Hub generates separate findings for a control check when the check applies to multiple enabled standards. For accounts that are part of an organization, this value can only be updated in the administrator account.
    EnableDefaultStandards bool
    Whether to enable the security standards that Security Hub has designated as automatically enabled including: AWS Foundational Security Best Practices v1.0.0 and CIS AWS Foundations Benchmark v1.2.0. Defaults to true.
    Arn string
    ARN of the SecurityHub Hub created in the account.
    AutoEnableControls bool
    Whether to automatically enable new controls when they are added to standards that are enabled. By default, this is set to true, and new controls are enabled automatically. To not automatically enable new controls, set this to false.
    ControlFindingGenerator string
    Updates whether the calling account has consolidated control findings turned on. If the value for this field is set to SECURITY_CONTROL, Security Hub generates a single finding for a control check even when the check applies to multiple enabled standards. If the value for this field is set to STANDARD_CONTROL, Security Hub generates separate findings for a control check when the check applies to multiple enabled standards. For accounts that are part of an organization, this value can only be updated in the administrator account.
    EnableDefaultStandards bool
    Whether to enable the security standards that Security Hub has designated as automatically enabled including: AWS Foundational Security Best Practices v1.0.0 and CIS AWS Foundations Benchmark v1.2.0. Defaults to true.
    arn String
    ARN of the SecurityHub Hub created in the account.
    autoEnableControls Boolean
    Whether to automatically enable new controls when they are added to standards that are enabled. By default, this is set to true, and new controls are enabled automatically. To not automatically enable new controls, set this to false.
    controlFindingGenerator String
    Updates whether the calling account has consolidated control findings turned on. If the value for this field is set to SECURITY_CONTROL, Security Hub generates a single finding for a control check even when the check applies to multiple enabled standards. If the value for this field is set to STANDARD_CONTROL, Security Hub generates separate findings for a control check when the check applies to multiple enabled standards. For accounts that are part of an organization, this value can only be updated in the administrator account.
    enableDefaultStandards Boolean
    Whether to enable the security standards that Security Hub has designated as automatically enabled including: AWS Foundational Security Best Practices v1.0.0 and CIS AWS Foundations Benchmark v1.2.0. Defaults to true.
    arn string
    ARN of the SecurityHub Hub created in the account.
    autoEnableControls boolean
    Whether to automatically enable new controls when they are added to standards that are enabled. By default, this is set to true, and new controls are enabled automatically. To not automatically enable new controls, set this to false.
    controlFindingGenerator string
    Updates whether the calling account has consolidated control findings turned on. If the value for this field is set to SECURITY_CONTROL, Security Hub generates a single finding for a control check even when the check applies to multiple enabled standards. If the value for this field is set to STANDARD_CONTROL, Security Hub generates separate findings for a control check when the check applies to multiple enabled standards. For accounts that are part of an organization, this value can only be updated in the administrator account.
    enableDefaultStandards boolean
    Whether to enable the security standards that Security Hub has designated as automatically enabled including: AWS Foundational Security Best Practices v1.0.0 and CIS AWS Foundations Benchmark v1.2.0. Defaults to true.
    arn str
    ARN of the SecurityHub Hub created in the account.
    auto_enable_controls bool
    Whether to automatically enable new controls when they are added to standards that are enabled. By default, this is set to true, and new controls are enabled automatically. To not automatically enable new controls, set this to false.
    control_finding_generator str
    Updates whether the calling account has consolidated control findings turned on. If the value for this field is set to SECURITY_CONTROL, Security Hub generates a single finding for a control check even when the check applies to multiple enabled standards. If the value for this field is set to STANDARD_CONTROL, Security Hub generates separate findings for a control check when the check applies to multiple enabled standards. For accounts that are part of an organization, this value can only be updated in the administrator account.
    enable_default_standards bool
    Whether to enable the security standards that Security Hub has designated as automatically enabled including: AWS Foundational Security Best Practices v1.0.0 and CIS AWS Foundations Benchmark v1.2.0. Defaults to true.
    arn String
    ARN of the SecurityHub Hub created in the account.
    autoEnableControls Boolean
    Whether to automatically enable new controls when they are added to standards that are enabled. By default, this is set to true, and new controls are enabled automatically. To not automatically enable new controls, set this to false.
    controlFindingGenerator String
    Updates whether the calling account has consolidated control findings turned on. If the value for this field is set to SECURITY_CONTROL, Security Hub generates a single finding for a control check even when the check applies to multiple enabled standards. If the value for this field is set to STANDARD_CONTROL, Security Hub generates separate findings for a control check when the check applies to multiple enabled standards. For accounts that are part of an organization, this value can only be updated in the administrator account.
    enableDefaultStandards Boolean
    Whether to enable the security standards that Security Hub has designated as automatically enabled including: AWS Foundational Security Best Practices v1.0.0 and CIS AWS Foundations Benchmark v1.2.0. Defaults to true.

    Import

    Using pulumi import, import an existing Security Hub enabled account using the AWS account ID. For example:

    $ pulumi import aws:securityhub/account:Account example 123456789012
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.62.1 published on Monday, Dec 2, 2024 by Pulumi