AWS Classic v5.41.0, May 15 23
AWS Classic v5.41.0, May 15 23
aws.securityhub.ProductSubscription
Explore with Pulumi AI
Subscribes to a Security Hub product.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var exampleAccount = new Aws.SecurityHub.Account("exampleAccount");
var current = Aws.GetRegion.Invoke();
var exampleProductSubscription = new Aws.SecurityHub.ProductSubscription("exampleProductSubscription", new()
{
ProductArn = $"arn:aws:securityhub:{current.Apply(getRegionResult => getRegionResult.Name)}:733251395267:product/alertlogic/althreatmanagement",
}, new CustomResourceOptions
{
DependsOn = new[]
{
exampleAccount,
},
});
});
package main
import (
"fmt"
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws"
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/securityhub"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleAccount, 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("arn:aws:securityhub:%v:733251395267:product/alertlogic/althreatmanagement", current.Name)),
}, pulumi.DependsOn([]pulumi.Resource{
exampleAccount,
}))
if err != nil {
return err
}
return nil
})
}
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.AwsFunctions;
import com.pulumi.aws.inputs.GetRegionArgs;
import com.pulumi.aws.securityhub.ProductSubscription;
import com.pulumi.aws.securityhub.ProductSubscriptionArgs;
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 exampleAccount = new Account("exampleAccount");
final var current = AwsFunctions.getRegion();
var exampleProductSubscription = new ProductSubscription("exampleProductSubscription", ProductSubscriptionArgs.builder()
.productArn(String.format("arn:aws:securityhub:%s:733251395267:product/alertlogic/althreatmanagement", current.applyValue(getRegionResult -> getRegionResult.name())))
.build(), CustomResourceOptions.builder()
.dependsOn(exampleAccount)
.build());
}
}
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=pulumi.ResourceOptions(depends_on=[example_account]))
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleAccount = new aws.securityhub.Account("exampleAccount", {});
const current = aws.getRegion({});
const exampleProductSubscription = new aws.securityhub.ProductSubscription("exampleProductSubscription", {productArn: current.then(current => `arn:aws:securityhub:${current.name}:733251395267:product/alertlogic/althreatmanagement`)}, {
dependsOn: [exampleAccount],
});
resources:
exampleAccount:
type: aws:securityhub:Account
exampleProductSubscription:
type: aws:securityhub:ProductSubscription
properties:
productArn: arn:aws:securityhub:${current.name}:733251395267:product/alertlogic/althreatmanagement
options:
dependson:
- ${exampleAccount}
variables:
current:
fn::invoke:
Function: aws:getRegion
Arguments: {}
Create ProductSubscription Resource
new ProductSubscription(name: string, args: ProductSubscriptionArgs, opts?: CustomResourceOptions);
@overload
def ProductSubscription(resource_name: str,
opts: Optional[ResourceOptions] = None,
product_arn: Optional[str] = None)
@overload
def ProductSubscription(resource_name: str,
args: ProductSubscriptionArgs,
opts: Optional[ResourceOptions] = None)
func NewProductSubscription(ctx *Context, name string, args ProductSubscriptionArgs, opts ...ResourceOption) (*ProductSubscription, error)
public ProductSubscription(string name, ProductSubscriptionArgs args, CustomResourceOptions? opts = null)
public ProductSubscription(String name, ProductSubscriptionArgs args)
public ProductSubscription(String name, ProductSubscriptionArgs args, CustomResourceOptions options)
type: aws:securityhub:ProductSubscription
properties: # The arguments to resource properties.
options: # 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.
- resource_name str
- The unique name of the resource.
- args ProductSubscriptionArgs
- 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 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.
- name String
- The unique name of the resource.
- args ProductSubscriptionArgs
- The arguments to resource properties.
- options 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 Architecture and Concepts 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 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.
- product
Arn String 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 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): ProductSubscription
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
product_arn: Optional[str] = None) -> ProductSubscription
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)
public static ProductSubscription get(String name, Output<String> id, ProductSubscriptionState 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.
- 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 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.
- 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.
Import
Security Hub product subscriptions can be imported in the form product_arn,arn
, e.g.,
$ pulumi import aws:securityhub/productSubscription:ProductSubscription example arn:aws:securityhub:eu-west-1:733251395267:product/alertlogic/althreatmanagement,arn:aws:securityhub:eu-west-1:123456789012:product-subscription/alertlogic/althreatmanagement
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.