AggregatorV2 class

Manages a Security Hub V2 Aggregator, which enables cross-region finding aggregation.

> NOTE: Security Hub V2 must be enabled (aws.securityhub.AccountV2) before creating an aggregator.

Example Usage

All Regions

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.securityhub.AccountV2("example", {});
const exampleAggregatorV2 = new aws.securityhub.AggregatorV2("example", {regionLinkingMode: "ALL_REGIONS"}, {
    dependsOn: [example],
});
import pulumi
import pulumi_aws as aws

example = aws.securityhub.AccountV2("example")
example_aggregator_v2 = aws.securityhub.AggregatorV2("example", region_linking_mode="ALL_REGIONS",
opts = pulumi.ResourceOptions(depends_on=[example]))
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var example = new Aws.SecurityHub.AccountV2("example");

    var exampleAggregatorV2 = new Aws.SecurityHub.AggregatorV2("example", new()
    {
        RegionLinkingMode = "ALL_REGIONS",
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            example,
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/securityhub"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := securityhub.NewAccountV2(ctx, "example", nil)
		if err != nil {
			return err
		}
		_, err = securityhub.NewAggregatorV2(ctx, "example", &securityhub.AggregatorV2Args{
			RegionLinkingMode: pulumi.String("ALL_REGIONS"),
		}, pulumi.DependsOn([]pulumi.Resource{
			example,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_securityhub_accountv2" "example" {
}
resource "aws_securityhub_aggregatorv2" "example" {
  depends_on          = [aws_securityhub_accountv2.example]
  region_linking_mode = "ALL_REGIONS"
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.securityhub.AccountV2;
import com.pulumi.aws.securityhub.AggregatorV2;
import com.pulumi.aws.securityhub.AggregatorV2Args;
import com.pulumi.resources.CustomResourceOptions;
import java.util.ArrayList;
import java.util.Arrays;
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 AccountV2("example");

        var exampleAggregatorV2 = new AggregatorV2("exampleAggregatorV2", AggregatorV2Args.builder()
            .regionLinkingMode("ALL_REGIONS")
            .build(), CustomResourceOptions.builder()
                .dependsOn(example)
                .build());

    }
}
resources:
  example:
    type: aws:securityhub:AccountV2
  exampleAggregatorV2:
    type: aws:securityhub:AggregatorV2
    name: example
    properties:
      regionLinkingMode: ALL_REGIONS
    options:
      dependsOn:
        - ${example}

Specified Regions

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.securityhub.AccountV2("example", {});
const exampleAggregatorV2 = new aws.securityhub.AggregatorV2("example", {
    regionLinkingMode: "SPECIFIED_REGIONS",
    linkedRegions: [
        "us-west-2",
        "eu-west-1",
    ],
}, {
    dependsOn: [example],
});
import pulumi
import pulumi_aws as aws

example = aws.securityhub.AccountV2("example")
example_aggregator_v2 = aws.securityhub.AggregatorV2("example",
    region_linking_mode="SPECIFIED_REGIONS",
    linked_regions=[
        "us-west-2",
        "eu-west-1",
    ],
    opts = pulumi.ResourceOptions(depends_on=[example]))
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var example = new Aws.SecurityHub.AccountV2("example");

    var exampleAggregatorV2 = new Aws.SecurityHub.AggregatorV2("example", new()
    {
        RegionLinkingMode = "SPECIFIED_REGIONS",
        LinkedRegions = new[]
        {
            "us-west-2",
            "eu-west-1",
        },
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            example,
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/securityhub"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := securityhub.NewAccountV2(ctx, "example", nil)
		if err != nil {
			return err
		}
		_, err = securityhub.NewAggregatorV2(ctx, "example", &securityhub.AggregatorV2Args{
			RegionLinkingMode: pulumi.String("SPECIFIED_REGIONS"),
			LinkedRegions: pulumi.StringArray{
				pulumi.String("us-west-2"),
				pulumi.String("eu-west-1"),
			},
		}, pulumi.DependsOn([]pulumi.Resource{
			example,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_securityhub_accountv2" "example" {
}
resource "aws_securityhub_aggregatorv2" "example" {
  depends_on          = [aws_securityhub_accountv2.example]
  region_linking_mode = "SPECIFIED_REGIONS"
  linked_regions      = ["us-west-2", "eu-west-1"]
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.securityhub.AccountV2;
import com.pulumi.aws.securityhub.AggregatorV2;
import com.pulumi.aws.securityhub.AggregatorV2Args;
import com.pulumi.resources.CustomResourceOptions;
import java.util.ArrayList;
import java.util.Arrays;
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 AccountV2("example");

        var exampleAggregatorV2 = new AggregatorV2("exampleAggregatorV2", AggregatorV2Args.builder()
            .regionLinkingMode("SPECIFIED_REGIONS")
            .linkedRegions(
                "us-west-2",
                "eu-west-1")
            .build(), CustomResourceOptions.builder()
                .dependsOn(example)
                .build());

    }
}
resources:
  example:
    type: aws:securityhub:AccountV2
  exampleAggregatorV2:
    type: aws:securityhub:AggregatorV2
    name: example
    properties:
      regionLinkingMode: SPECIFIED_REGIONS
      linkedRegions:
        - us-west-2
        - eu-west-1
    options:
      dependsOn:
        - ${example}

Import

Identity Schema

Required

  • arn (String) ARN of the Security Hub V2 aggregator.

Using pulumi import, import Security Hub V2 aggregators using arn. For example:

$ pulumi import aws:securityhub/aggregatorV2:AggregatorV2 example arn:aws:securityhub:us-east-1:123456789012:aggregator/v2/example

Constructors

AggregatorV2(String name, {AggregatorV2Args? args, CustomResourceOptions? options})
Creates a new AggregatorV2. name The Pulumi resource name. args Arguments used to configure this AggregatorV2. The set of arguments for AggregatorV2. options Resource options controlling this resource's behavior.
AggregatorV2.reference(String urn)
Creates a typed reference to an existing AggregatorV2 resource.

Properties

aggregationRegion ↔ Output<String>
The AWS Region where data is aggregated.
latefinal
arn ↔ Output<String>
ARN of the Security Hub V2 Aggregator.
latefinal
childResources Set<Resource>
finalinherited
completionSources Map<String, IOutputCompletionSource>
latefinalinherited
hashCode int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
isCustom bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference bool
Whether this instance represents a resource value returned over RPC.
finalinherited
linkedRegions ↔ Output<List<String>?>
List of Regions linked to the aggregation Region. Required when regionLinkingMode is SPECIFIED_REGIONS or ALL_REGIONS_EXCEPT_SPECIFIED.
latefinal
region ↔ Output<String>
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
regionLinkingMode ↔ Output<String>
Determines how Regions are linked to the aggregator. Valid values: ALL_REGIONS, ALL_REGIONS_EXCEPT_SPECIFIED, SPECIFIED_REGIONS.
latefinal
resourceTransforms List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tags ↔ Output<Map<String, String>?>
Map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
latefinal
tagsAll ↔ Output<Map<String, String>>
Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
latefinal
transformations List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
urn ↔ Output<String>
latefinalinherited

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() String
Returns this resource's logical name.
inherited
getResourceType() String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {AggregatorV2State? state, CustomResourceOptions? options}) AggregatorV2
Gets an existing AggregatorV2 resource's state with the given name and id.