ConnectorV2 class
Manages a Security Hub V2 connector.
> NOTE: Connectors must be created in the aggregation (home) region. A Security Hub V2 Aggregator (aws.securityhub.AggregatorV2) must exist before creating connectors.
> NOTE: After creation, the connector will be in PENDING_AUTHORIZATION status. Use the authUrl output to complete the OAuth authorization flow.
Example Usage
Jira Cloud
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],
});
const exampleConnectorV2 = new aws.securityhub.ConnectorV2("example", {
connectorProvider: {
jiraCloud: {
projectKey: "SEC",
},
},
name: "jira-connector",
}, {
dependsOn: [exampleAggregatorV2],
});
export const authUrl = exampleConnectorV2.authUrl;
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]))
example_connector_v2 = aws.securityhub.ConnectorV2("example",
connector_provider={
"jira_cloud": {
"project_key": "SEC",
},
},
name="jira-connector",
opts = pulumi.ResourceOptions(depends_on=[example_aggregator_v2]))
pulumi.export("authUrl", example_connector_v2.auth_url)
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,
},
});
var exampleConnectorV2 = new Aws.SecurityHub.ConnectorV2("example", new()
{
ConnectorProvider = new Aws.SecurityHub.Inputs.ConnectorV2ConnectorProviderArgs
{
JiraCloud = new Aws.SecurityHub.Inputs.ConnectorV2ConnectorProviderJiraCloudArgs
{
ProjectKey = "SEC",
},
},
Name = "jira-connector",
}, new CustomResourceOptions
{
DependsOn =
{
exampleAggregatorV2,
},
});
return new Dictionary<string, object?>
{
["authUrl"] = exampleConnectorV2.AuthUrl,
};
});
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
}
exampleAggregatorV2, err := securityhub.NewAggregatorV2(ctx, "example", &securityhub.AggregatorV2Args{
RegionLinkingMode: pulumi.String("ALL_REGIONS"),
}, pulumi.DependsOn([]pulumi.Resource{
example,
}))
if err != nil {
return err
}
exampleConnectorV2, err := securityhub.NewConnectorV2(ctx, "example", &securityhub.ConnectorV2Args{
ConnectorProvider: &securityhub.ConnectorV2ConnectorProviderArgs{
JiraCloud: &securityhub.ConnectorV2ConnectorProviderJiraCloudArgs{
ProjectKey: pulumi.String("SEC"),
},
},
Name: pulumi.String("jira-connector"),
}, pulumi.DependsOn([]pulumi.Resource{
exampleAggregatorV2,
}))
if err != nil {
return err
}
ctx.Export("authUrl", pulumi.Any(exampleConnectorV2.AuthUrl))
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"
}
resource "aws_securityhub_connectorv2" "example" {
depends_on = [aws_securityhub_aggregatorv2.example]
connector_provider = {
jira_cloud = {
project_key = "SEC"
}
}
name = "jira-connector"
}
output "authUrl" {
value = aws_securityhub_connectorv2.example.authUrl
}
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.aws.securityhub.ConnectorV2;
import com.pulumi.aws.securityhub.ConnectorV2Args;
import com.pulumi.aws.securityhub.inputs.ConnectorV2ConnectorProviderArgs;
import com.pulumi.aws.securityhub.inputs.ConnectorV2ConnectorProviderJiraCloudArgs;
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());
var exampleConnectorV2 = new ConnectorV2("exampleConnectorV2", ConnectorV2Args.builder()
.connectorProvider(ConnectorV2ConnectorProviderArgs.builder()
.jiraCloud(ConnectorV2ConnectorProviderJiraCloudArgs.builder()
.projectKey("SEC")
.build())
.build())
.name("jira-connector")
.build(), CustomResourceOptions.builder()
.dependsOn(exampleAggregatorV2)
.build());
ctx.export("authUrl", exampleConnectorV2.authUrl());
}
}
resources:
example:
type: aws:securityhub:AccountV2
exampleAggregatorV2:
type: aws:securityhub:AggregatorV2
name: example
properties:
regionLinkingMode: ALL_REGIONS
options:
dependsOn:
- ${example}
exampleConnectorV2:
type: aws:securityhub:ConnectorV2
name: example
properties:
connectorProvider:
jiraCloud:
projectKey: SEC
name: jira-connector
options:
dependsOn:
- ${exampleAggregatorV2}
outputs:
authUrl: ${exampleConnectorV2.authUrl}
With Description and KMS Key
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.securityhub.ConnectorV2("example", {
connectorProvider: {
jiraCloud: {
projectKey: "SEC",
},
},
name: "jira-connector",
description: "Jira Cloud integration for security findings",
kmsKeyArn: exampleAwsKmsKey.arn,
}, {
dependsOn: [exampleAwsSecurityhubAggregatorV2],
});
import pulumi
import pulumi_aws as aws
example = aws.securityhub.ConnectorV2("example",
connector_provider={
"jira_cloud": {
"project_key": "SEC",
},
},
name="jira-connector",
description="Jira Cloud integration for security findings",
kms_key_arn=example_aws_kms_key["arn"],
opts = pulumi.ResourceOptions(depends_on=[example_aws_securityhub_aggregator_v2]))
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.SecurityHub.ConnectorV2("example", new()
{
ConnectorProvider = new Aws.SecurityHub.Inputs.ConnectorV2ConnectorProviderArgs
{
JiraCloud = new Aws.SecurityHub.Inputs.ConnectorV2ConnectorProviderJiraCloudArgs
{
ProjectKey = "SEC",
},
},
Name = "jira-connector",
Description = "Jira Cloud integration for security findings",
KmsKeyArn = exampleAwsKmsKey.Arn,
}, new CustomResourceOptions
{
DependsOn =
{
exampleAwsSecurityhubAggregatorV2,
},
});
});
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 {
_, err := securityhub.NewConnectorV2(ctx, "example", &securityhub.ConnectorV2Args{
ConnectorProvider: &securityhub.ConnectorV2ConnectorProviderArgs{
JiraCloud: &securityhub.ConnectorV2ConnectorProviderJiraCloudArgs{
ProjectKey: pulumi.String("SEC"),
},
},
Name: pulumi.String("jira-connector"),
Description: pulumi.String("Jira Cloud integration for security findings"),
KmsKeyArn: pulumi.Any(exampleAwsKmsKey.Arn),
}, pulumi.DependsOn([]pulumi.Resource{
exampleAwsSecurityhubAggregatorV2,
}))
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_securityhub_connectorv2" "example" {
depends_on = [exampleAwsSecurityhubAggregatorV2]
connector_provider = {
jira_cloud = {
project_key = "SEC"
}
}
name = "jira-connector"
description = "Jira Cloud integration for security findings"
kms_key_arn = exampleAwsKmsKey.arn
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.securityhub.ConnectorV2;
import com.pulumi.aws.securityhub.ConnectorV2Args;
import com.pulumi.aws.securityhub.inputs.ConnectorV2ConnectorProviderArgs;
import com.pulumi.aws.securityhub.inputs.ConnectorV2ConnectorProviderJiraCloudArgs;
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 ConnectorV2("example", ConnectorV2Args.builder()
.connectorProvider(ConnectorV2ConnectorProviderArgs.builder()
.jiraCloud(ConnectorV2ConnectorProviderJiraCloudArgs.builder()
.projectKey("SEC")
.build())
.build())
.name("jira-connector")
.description("Jira Cloud integration for security findings")
.kmsKeyArn(exampleAwsKmsKey.arn())
.build(), CustomResourceOptions.builder()
.dependsOn(exampleAwsSecurityhubAggregatorV2)
.build());
}
}
resources:
example:
type: aws:securityhub:ConnectorV2
properties:
connectorProvider:
jiraCloud:
projectKey: SEC
name: jira-connector
description: Jira Cloud integration for security findings
kmsKeyArn: ${exampleAwsKmsKey.arn}
options:
dependsOn:
- ${exampleAwsSecurityhubAggregatorV2}
Import
Identity Schema
Required
connectorId(String) ID of the Security Hub V2 connector.
Optional
accountId(String) AWS Account where this resource is managed.region(String) Region where this resource is managed.
Using pulumi import, import Security Hub V2 connectors using connectorId. For example:
$ pulumi import aws:securityhub/connectorV2:ConnectorV2 example 8ecf045f-5a95-c24d-6769-5d52f6929563
Constructors
- ConnectorV2(String name, {ConnectorV2Args? args, CustomResourceOptions? options})
-
Creates a new ConnectorV2.
nameThe Pulumi resource name.argsArguments used to configure this ConnectorV2. The set of arguments for ConnectorV2.optionsResource options controlling this resource's behavior. - ConnectorV2.reference(String urn)
- Creates a typed reference to an existing ConnectorV2 resource.
Properties
-
arn
↔ Output<
String> -
ARN of the connector.
latefinal
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
connectorId
↔ Output<
String> -
ID of the connector.
latefinal
-
connectorProvider
↔ Output<
ConnectorV2ConnectorProvider> -
Third-party provider details. See
connectorProviderbelow.latefinal -
description
↔ Output<
String?> -
A description of the connector.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
-
healths
↔ Output<
List< ConnectorV2Health> > -
Current health status. See
healthbelow.latefinal -
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
-
kmsKeyArn
↔ Output<
String?> -
ARN of KMS key for connector encryption.
latefinal
-
name
↔ Output<
String> -
The name of the connector.
latefinal
-
region
↔ Output<
String> -
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
Map of tags to assign to the resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.latefinal -
Map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration 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, {ConnectorV2State? state, CustomResourceOptions? options}) → ConnectorV2 -
Gets an existing ConnectorV2 resource's state with the given
nameandid.