aws.securityhub.FindingAggregator
Explore with Pulumi AI
Manages a Security Hub finding aggregator. Security Hub needs to be enabled in a region in order for the aggregator to pull through findings.
Example Usage
All Regions Usage
The following example will enable the aggregator for every region.
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.securityhub.Account("example", {});
const exampleFindingAggregator = new aws.securityhub.FindingAggregator("example", {linkingMode: "ALL_REGIONS"}, {
dependsOn: [example],
});
import pulumi
import pulumi_aws as aws
example = aws.securityhub.Account("example")
example_finding_aggregator = aws.securityhub.FindingAggregator("example", linking_mode="ALL_REGIONS",
opts = pulumi.ResourceOptions(depends_on=[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 {
example, err := securityhub.NewAccount(ctx, "example", nil)
if err != nil {
return err
}
_, err = securityhub.NewFindingAggregator(ctx, "example", &securityhub.FindingAggregatorArgs{
LinkingMode: pulumi.String("ALL_REGIONS"),
}, pulumi.DependsOn([]pulumi.Resource{
example,
}))
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");
var exampleFindingAggregator = new Aws.SecurityHub.FindingAggregator("example", new()
{
LinkingMode = "ALL_REGIONS",
}, new CustomResourceOptions
{
DependsOn =
{
example,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.securityhub.Account;
import com.pulumi.aws.securityhub.FindingAggregator;
import com.pulumi.aws.securityhub.FindingAggregatorArgs;
import com.pulumi.resources.CustomResourceOptions;
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");
var exampleFindingAggregator = new FindingAggregator("exampleFindingAggregator", FindingAggregatorArgs.builder()
.linkingMode("ALL_REGIONS")
.build(), CustomResourceOptions.builder()
.dependsOn(example)
.build());
}
}
resources:
example:
type: aws:securityhub:Account
exampleFindingAggregator:
type: aws:securityhub:FindingAggregator
name: example
properties:
linkingMode: ALL_REGIONS
options:
dependson:
- ${example}
All Regions Except Specified Regions Usage
The following example will enable the aggregator for every region except those specified in specified_regions
.
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.securityhub.Account("example", {});
const exampleFindingAggregator = new aws.securityhub.FindingAggregator("example", {
linkingMode: "ALL_REGIONS_EXCEPT_SPECIFIED",
specifiedRegions: [
"eu-west-1",
"eu-west-2",
],
}, {
dependsOn: [example],
});
import pulumi
import pulumi_aws as aws
example = aws.securityhub.Account("example")
example_finding_aggregator = aws.securityhub.FindingAggregator("example",
linking_mode="ALL_REGIONS_EXCEPT_SPECIFIED",
specified_regions=[
"eu-west-1",
"eu-west-2",
],
opts = pulumi.ResourceOptions(depends_on=[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 {
example, err := securityhub.NewAccount(ctx, "example", nil)
if err != nil {
return err
}
_, err = securityhub.NewFindingAggregator(ctx, "example", &securityhub.FindingAggregatorArgs{
LinkingMode: pulumi.String("ALL_REGIONS_EXCEPT_SPECIFIED"),
SpecifiedRegions: pulumi.StringArray{
pulumi.String("eu-west-1"),
pulumi.String("eu-west-2"),
},
}, pulumi.DependsOn([]pulumi.Resource{
example,
}))
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");
var exampleFindingAggregator = new Aws.SecurityHub.FindingAggregator("example", new()
{
LinkingMode = "ALL_REGIONS_EXCEPT_SPECIFIED",
SpecifiedRegions = new[]
{
"eu-west-1",
"eu-west-2",
},
}, new CustomResourceOptions
{
DependsOn =
{
example,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.securityhub.Account;
import com.pulumi.aws.securityhub.FindingAggregator;
import com.pulumi.aws.securityhub.FindingAggregatorArgs;
import com.pulumi.resources.CustomResourceOptions;
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");
var exampleFindingAggregator = new FindingAggregator("exampleFindingAggregator", FindingAggregatorArgs.builder()
.linkingMode("ALL_REGIONS_EXCEPT_SPECIFIED")
.specifiedRegions(
"eu-west-1",
"eu-west-2")
.build(), CustomResourceOptions.builder()
.dependsOn(example)
.build());
}
}
resources:
example:
type: aws:securityhub:Account
exampleFindingAggregator:
type: aws:securityhub:FindingAggregator
name: example
properties:
linkingMode: ALL_REGIONS_EXCEPT_SPECIFIED
specifiedRegions:
- eu-west-1
- eu-west-2
options:
dependson:
- ${example}
Specified Regions Usage
The following example will enable the aggregator for every region specified in specified_regions
.
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.securityhub.Account("example", {});
const exampleFindingAggregator = new aws.securityhub.FindingAggregator("example", {
linkingMode: "SPECIFIED_REGIONS",
specifiedRegions: [
"eu-west-1",
"eu-west-2",
],
}, {
dependsOn: [example],
});
import pulumi
import pulumi_aws as aws
example = aws.securityhub.Account("example")
example_finding_aggregator = aws.securityhub.FindingAggregator("example",
linking_mode="SPECIFIED_REGIONS",
specified_regions=[
"eu-west-1",
"eu-west-2",
],
opts = pulumi.ResourceOptions(depends_on=[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 {
example, err := securityhub.NewAccount(ctx, "example", nil)
if err != nil {
return err
}
_, err = securityhub.NewFindingAggregator(ctx, "example", &securityhub.FindingAggregatorArgs{
LinkingMode: pulumi.String("SPECIFIED_REGIONS"),
SpecifiedRegions: pulumi.StringArray{
pulumi.String("eu-west-1"),
pulumi.String("eu-west-2"),
},
}, pulumi.DependsOn([]pulumi.Resource{
example,
}))
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");
var exampleFindingAggregator = new Aws.SecurityHub.FindingAggregator("example", new()
{
LinkingMode = "SPECIFIED_REGIONS",
SpecifiedRegions = new[]
{
"eu-west-1",
"eu-west-2",
},
}, new CustomResourceOptions
{
DependsOn =
{
example,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.securityhub.Account;
import com.pulumi.aws.securityhub.FindingAggregator;
import com.pulumi.aws.securityhub.FindingAggregatorArgs;
import com.pulumi.resources.CustomResourceOptions;
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");
var exampleFindingAggregator = new FindingAggregator("exampleFindingAggregator", FindingAggregatorArgs.builder()
.linkingMode("SPECIFIED_REGIONS")
.specifiedRegions(
"eu-west-1",
"eu-west-2")
.build(), CustomResourceOptions.builder()
.dependsOn(example)
.build());
}
}
resources:
example:
type: aws:securityhub:Account
exampleFindingAggregator:
type: aws:securityhub:FindingAggregator
name: example
properties:
linkingMode: SPECIFIED_REGIONS
specifiedRegions:
- eu-west-1
- eu-west-2
options:
dependson:
- ${example}
Create FindingAggregator Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new FindingAggregator(name: string, args: FindingAggregatorArgs, opts?: CustomResourceOptions);
@overload
def FindingAggregator(resource_name: str,
args: FindingAggregatorArgs,
opts: Optional[ResourceOptions] = None)
@overload
def FindingAggregator(resource_name: str,
opts: Optional[ResourceOptions] = None,
linking_mode: Optional[str] = None,
specified_regions: Optional[Sequence[str]] = None)
func NewFindingAggregator(ctx *Context, name string, args FindingAggregatorArgs, opts ...ResourceOption) (*FindingAggregator, error)
public FindingAggregator(string name, FindingAggregatorArgs args, CustomResourceOptions? opts = null)
public FindingAggregator(String name, FindingAggregatorArgs args)
public FindingAggregator(String name, FindingAggregatorArgs args, CustomResourceOptions options)
type: aws:securityhub:FindingAggregator
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 FindingAggregatorArgs
- 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 FindingAggregatorArgs
- 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 FindingAggregatorArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FindingAggregatorArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FindingAggregatorArgs
- 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 findingAggregatorResource = new Aws.SecurityHub.FindingAggregator("findingAggregatorResource", new()
{
LinkingMode = "string",
SpecifiedRegions = new[]
{
"string",
},
});
example, err := securityhub.NewFindingAggregator(ctx, "findingAggregatorResource", &securityhub.FindingAggregatorArgs{
LinkingMode: pulumi.String("string"),
SpecifiedRegions: pulumi.StringArray{
pulumi.String("string"),
},
})
var findingAggregatorResource = new FindingAggregator("findingAggregatorResource", FindingAggregatorArgs.builder()
.linkingMode("string")
.specifiedRegions("string")
.build());
finding_aggregator_resource = aws.securityhub.FindingAggregator("findingAggregatorResource",
linking_mode="string",
specified_regions=["string"])
const findingAggregatorResource = new aws.securityhub.FindingAggregator("findingAggregatorResource", {
linkingMode: "string",
specifiedRegions: ["string"],
});
type: aws:securityhub:FindingAggregator
properties:
linkingMode: string
specifiedRegions:
- string
FindingAggregator Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The FindingAggregator resource accepts the following input properties:
- Linking
Mode string - Indicates whether to aggregate findings from all of the available Regions or from a specified list. The options are
ALL_REGIONS
,ALL_REGIONS_EXCEPT_SPECIFIED
orSPECIFIED_REGIONS
. WhenALL_REGIONS
orALL_REGIONS_EXCEPT_SPECIFIED
are used, Security Hub will automatically aggregate findings from new Regions as Security Hub supports them and you opt into them. - Specified
Regions List<string> - List of regions to include or exclude (required if
linking_mode
is set toALL_REGIONS_EXCEPT_SPECIFIED
orSPECIFIED_REGIONS
)
- Linking
Mode string - Indicates whether to aggregate findings from all of the available Regions or from a specified list. The options are
ALL_REGIONS
,ALL_REGIONS_EXCEPT_SPECIFIED
orSPECIFIED_REGIONS
. WhenALL_REGIONS
orALL_REGIONS_EXCEPT_SPECIFIED
are used, Security Hub will automatically aggregate findings from new Regions as Security Hub supports them and you opt into them. - Specified
Regions []string - List of regions to include or exclude (required if
linking_mode
is set toALL_REGIONS_EXCEPT_SPECIFIED
orSPECIFIED_REGIONS
)
- linking
Mode String - Indicates whether to aggregate findings from all of the available Regions or from a specified list. The options are
ALL_REGIONS
,ALL_REGIONS_EXCEPT_SPECIFIED
orSPECIFIED_REGIONS
. WhenALL_REGIONS
orALL_REGIONS_EXCEPT_SPECIFIED
are used, Security Hub will automatically aggregate findings from new Regions as Security Hub supports them and you opt into them. - specified
Regions List<String> - List of regions to include or exclude (required if
linking_mode
is set toALL_REGIONS_EXCEPT_SPECIFIED
orSPECIFIED_REGIONS
)
- linking
Mode string - Indicates whether to aggregate findings from all of the available Regions or from a specified list. The options are
ALL_REGIONS
,ALL_REGIONS_EXCEPT_SPECIFIED
orSPECIFIED_REGIONS
. WhenALL_REGIONS
orALL_REGIONS_EXCEPT_SPECIFIED
are used, Security Hub will automatically aggregate findings from new Regions as Security Hub supports them and you opt into them. - specified
Regions string[] - List of regions to include or exclude (required if
linking_mode
is set toALL_REGIONS_EXCEPT_SPECIFIED
orSPECIFIED_REGIONS
)
- linking_
mode str - Indicates whether to aggregate findings from all of the available Regions or from a specified list. The options are
ALL_REGIONS
,ALL_REGIONS_EXCEPT_SPECIFIED
orSPECIFIED_REGIONS
. WhenALL_REGIONS
orALL_REGIONS_EXCEPT_SPECIFIED
are used, Security Hub will automatically aggregate findings from new Regions as Security Hub supports them and you opt into them. - specified_
regions Sequence[str] - List of regions to include or exclude (required if
linking_mode
is set toALL_REGIONS_EXCEPT_SPECIFIED
orSPECIFIED_REGIONS
)
- linking
Mode String - Indicates whether to aggregate findings from all of the available Regions or from a specified list. The options are
ALL_REGIONS
,ALL_REGIONS_EXCEPT_SPECIFIED
orSPECIFIED_REGIONS
. WhenALL_REGIONS
orALL_REGIONS_EXCEPT_SPECIFIED
are used, Security Hub will automatically aggregate findings from new Regions as Security Hub supports them and you opt into them. - specified
Regions List<String> - List of regions to include or exclude (required if
linking_mode
is set toALL_REGIONS_EXCEPT_SPECIFIED
orSPECIFIED_REGIONS
)
Outputs
All input properties are implicitly available as output properties. Additionally, the FindingAggregator resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing FindingAggregator Resource
Get an existing FindingAggregator 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?: FindingAggregatorState, opts?: CustomResourceOptions): FindingAggregator
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
linking_mode: Optional[str] = None,
specified_regions: Optional[Sequence[str]] = None) -> FindingAggregator
func GetFindingAggregator(ctx *Context, name string, id IDInput, state *FindingAggregatorState, opts ...ResourceOption) (*FindingAggregator, error)
public static FindingAggregator Get(string name, Input<string> id, FindingAggregatorState? state, CustomResourceOptions? opts = null)
public static FindingAggregator get(String name, Output<String> id, FindingAggregatorState 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.
- Linking
Mode string - Indicates whether to aggregate findings from all of the available Regions or from a specified list. The options are
ALL_REGIONS
,ALL_REGIONS_EXCEPT_SPECIFIED
orSPECIFIED_REGIONS
. WhenALL_REGIONS
orALL_REGIONS_EXCEPT_SPECIFIED
are used, Security Hub will automatically aggregate findings from new Regions as Security Hub supports them and you opt into them. - Specified
Regions List<string> - List of regions to include or exclude (required if
linking_mode
is set toALL_REGIONS_EXCEPT_SPECIFIED
orSPECIFIED_REGIONS
)
- Linking
Mode string - Indicates whether to aggregate findings from all of the available Regions or from a specified list. The options are
ALL_REGIONS
,ALL_REGIONS_EXCEPT_SPECIFIED
orSPECIFIED_REGIONS
. WhenALL_REGIONS
orALL_REGIONS_EXCEPT_SPECIFIED
are used, Security Hub will automatically aggregate findings from new Regions as Security Hub supports them and you opt into them. - Specified
Regions []string - List of regions to include or exclude (required if
linking_mode
is set toALL_REGIONS_EXCEPT_SPECIFIED
orSPECIFIED_REGIONS
)
- linking
Mode String - Indicates whether to aggregate findings from all of the available Regions or from a specified list. The options are
ALL_REGIONS
,ALL_REGIONS_EXCEPT_SPECIFIED
orSPECIFIED_REGIONS
. WhenALL_REGIONS
orALL_REGIONS_EXCEPT_SPECIFIED
are used, Security Hub will automatically aggregate findings from new Regions as Security Hub supports them and you opt into them. - specified
Regions List<String> - List of regions to include or exclude (required if
linking_mode
is set toALL_REGIONS_EXCEPT_SPECIFIED
orSPECIFIED_REGIONS
)
- linking
Mode string - Indicates whether to aggregate findings from all of the available Regions or from a specified list. The options are
ALL_REGIONS
,ALL_REGIONS_EXCEPT_SPECIFIED
orSPECIFIED_REGIONS
. WhenALL_REGIONS
orALL_REGIONS_EXCEPT_SPECIFIED
are used, Security Hub will automatically aggregate findings from new Regions as Security Hub supports them and you opt into them. - specified
Regions string[] - List of regions to include or exclude (required if
linking_mode
is set toALL_REGIONS_EXCEPT_SPECIFIED
orSPECIFIED_REGIONS
)
- linking_
mode str - Indicates whether to aggregate findings from all of the available Regions or from a specified list. The options are
ALL_REGIONS
,ALL_REGIONS_EXCEPT_SPECIFIED
orSPECIFIED_REGIONS
. WhenALL_REGIONS
orALL_REGIONS_EXCEPT_SPECIFIED
are used, Security Hub will automatically aggregate findings from new Regions as Security Hub supports them and you opt into them. - specified_
regions Sequence[str] - List of regions to include or exclude (required if
linking_mode
is set toALL_REGIONS_EXCEPT_SPECIFIED
orSPECIFIED_REGIONS
)
- linking
Mode String - Indicates whether to aggregate findings from all of the available Regions or from a specified list. The options are
ALL_REGIONS
,ALL_REGIONS_EXCEPT_SPECIFIED
orSPECIFIED_REGIONS
. WhenALL_REGIONS
orALL_REGIONS_EXCEPT_SPECIFIED
are used, Security Hub will automatically aggregate findings from new Regions as Security Hub supports them and you opt into them. - specified
Regions List<String> - List of regions to include or exclude (required if
linking_mode
is set toALL_REGIONS_EXCEPT_SPECIFIED
orSPECIFIED_REGIONS
)
Import
Using pulumi import
, import an existing Security Hub finding aggregator using the arn
. For example:
$ pulumi import aws:securityhub/findingAggregator:FindingAggregator example arn:aws:securityhub:eu-west-1:123456789098:finding-aggregator/abcd1234-abcd-1234-1234-abcdef123456
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.