ProductSubscription
Subscribes to a Security Hub product.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var exampleAccount = new Aws.SecurityHub.Account("exampleAccount", new Aws.SecurityHub.AccountArgs
{
});
var current = Output.Create(Aws.GetRegion.InvokeAsync());
var exampleProductSubscription = new Aws.SecurityHub.ProductSubscription("exampleProductSubscription", new Aws.SecurityHub.ProductSubscriptionArgs
{
ProductArn = current.Apply(current => $"arn:aws:securityhub:{current.Name}:733251395267:product/alertlogic/althreatmanagement"),
}, new CustomResourceOptions
{
DependsOn =
{
"aws_securityhub_account.example",
},
});
}
}
package main
import (
"fmt"
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws"
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/securityhub"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := securityhub.NewAccount(ctx, "exampleAccount", nil)
if err != nil {
return err
}
current, err := aws.GetRegion(ctx, nil, nil)
if err != nil {
return err
}
_, err = securityhub.NewProductSubscription(ctx, "exampleProductSubscription", &securityhub.ProductSubscriptionArgs{
ProductArn: pulumi.String(fmt.Sprintf("%v%v%v", "arn:aws:securityhub:", current.Name, ":733251395267:product/alertlogic/althreatmanagement")),
}, pulumi.DependsOn([]pulumi.Resource{
"aws_securityhub_account.example",
}))
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
example_account = aws.securityhub.Account("exampleAccount")
current = aws.get_region()
example_product_subscription = aws.securityhub.ProductSubscription("exampleProductSubscription", product_arn=f"arn:aws:securityhub:{current.name}:733251395267:product/alertlogic/althreatmanagement",
opts=ResourceOptions(depends_on=["aws_securityhub_account.example"]))import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleAccount = new aws.securityhub.Account("example", {});
const current = pulumi.output(aws.getRegion({ async: true }));
const exampleProductSubscription = new aws.securityhub.ProductSubscription("example", {
productArn: pulumi.interpolate`arn:aws:securityhub:${current.name!}:733251395267:product/alertlogic/althreatmanagement`,
}, { dependsOn: [exampleAccount] });Create a ProductSubscription Resource
new ProductSubscription(name: string, args: ProductSubscriptionArgs, opts?: CustomResourceOptions);def ProductSubscription(resource_name, opts=None, product_arn=None, __props__=None);func NewProductSubscription(ctx *Context, name string, args ProductSubscriptionArgs, opts ...ResourceOption) (*ProductSubscription, error)public ProductSubscription(string name, ProductSubscriptionArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args ProductSubscriptionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ProductSubscriptionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProductSubscriptionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
ProductSubscription Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The ProductSubscription resource accepts the following input properties:
- Product
Arn string The ARN of the product that generates findings that you want to import into Security Hub - see below.
- Product
Arn string The ARN of the product that generates findings that you want to import into Security Hub - see below.
- product
Arn string The ARN of the product that generates findings that you want to import into Security Hub - see below.
- product_
arn str The ARN of the product that generates findings that you want to import into Security Hub - see below.
Outputs
All input properties are implicitly available as output properties. Additionally, the ProductSubscription resource produces the following output properties:
Look up an Existing ProductSubscription Resource
Get an existing ProductSubscription 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?: ProductSubscriptionState, opts?: CustomResourceOptions): ProductSubscriptionstatic get(resource_name, id, opts=None, arn=None, product_arn=None, __props__=None);func GetProductSubscription(ctx *Context, name string, id IDInput, state *ProductSubscriptionState, opts ...ResourceOption) (*ProductSubscription, error)public static ProductSubscription Get(string name, Input<string> id, ProductSubscriptionState? state, CustomResourceOptions? opts = null)- 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.
The following state arguments are supported:
- Arn string
The ARN of a resource that represents your subscription to the product that generates the findings that you want to import into Security Hub.
- Product
Arn string The ARN of the product that generates findings that you want to import into Security Hub - see below.
- Arn string
The ARN of a resource that represents your subscription to the product that generates the findings that you want to import into Security Hub.
- Product
Arn string The ARN of the product that generates findings that you want to import into Security Hub - see below.
- arn string
The ARN of a resource that represents your subscription to the product that generates the findings that you want to import into Security Hub.
- product
Arn string The ARN of the product that generates findings that you want to import into Security Hub - see below.
- arn str
The ARN of a resource that represents your subscription to the product that generates the findings that you want to import into Security Hub.
- product_
arn str The ARN of the product that generates findings that you want to import into Security Hub - see below.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.