AWS Classic

Pulumi Official
Package maintained by Pulumi
v5.11.0 published on Wednesday, Aug 17, 2022 by Pulumi

ActionTarget

Creates Security Hub custom action.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

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

    var exampleActionTarget = new Aws.SecurityHub.ActionTarget("exampleActionTarget", new()
    {
        Identifier = "SendToChat",
        Description = "This is custom action sends selected findings to chat",
    }, new CustomResourceOptions
    {
        DependsOn = new[]
        {
            exampleAccount,
        },
    });

});
package main

import (
	"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
		}
		_, err = securityhub.NewActionTarget(ctx, "exampleActionTarget", &securityhub.ActionTargetArgs{
			Identifier:  pulumi.String("SendToChat"),
			Description: pulumi.String("This is custom action sends selected findings to chat"),
		}, 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.securityhub.ActionTarget;
import com.pulumi.aws.securityhub.ActionTargetArgs;
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");

        var exampleActionTarget = new ActionTarget("exampleActionTarget", ActionTargetArgs.builder()        
            .identifier("SendToChat")
            .description("This is custom action sends selected findings to chat")
            .build(), CustomResourceOptions.builder()
                .dependsOn(exampleAccount)
                .build());

    }
}
import pulumi
import pulumi_aws as aws

example_account = aws.securityhub.Account("exampleAccount")
example_action_target = aws.securityhub.ActionTarget("exampleActionTarget",
    identifier="SendToChat",
    description="This is custom action sends selected findings to chat",
    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 exampleActionTarget = new aws.securityhub.ActionTarget("exampleActionTarget", {
    identifier: "SendToChat",
    description: "This is custom action sends selected findings to chat",
}, {
    dependsOn: [exampleAccount],
});
resources:
  exampleAccount:
    type: aws:securityhub:Account
  exampleActionTarget:
    type: aws:securityhub:ActionTarget
    properties:
      identifier: SendToChat
      description: This is custom action sends selected findings to chat
    options:
      dependson:
        - ${exampleAccount}

Create a ActionTarget Resource

new ActionTarget(name: string, args: ActionTargetArgs, opts?: CustomResourceOptions);
@overload
def ActionTarget(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 description: Optional[str] = None,
                 identifier: Optional[str] = None,
                 name: Optional[str] = None)
@overload
def ActionTarget(resource_name: str,
                 args: ActionTargetArgs,
                 opts: Optional[ResourceOptions] = None)
func NewActionTarget(ctx *Context, name string, args ActionTargetArgs, opts ...ResourceOption) (*ActionTarget, error)
public ActionTarget(string name, ActionTargetArgs args, CustomResourceOptions? opts = null)
public ActionTarget(String name, ActionTargetArgs args)
public ActionTarget(String name, ActionTargetArgs args, CustomResourceOptions options)
type: aws:securityhub:ActionTarget
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args ActionTargetArgs
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 ActionTargetArgs
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 ActionTargetArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ActionTargetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args ActionTargetArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

ActionTarget 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 ActionTarget resource accepts the following input properties:

Description string

The name of the custom action target.

Identifier string

The ID for the custom action target.

Name string

The description for the custom action target.

Description string

The name of the custom action target.

Identifier string

The ID for the custom action target.

Name string

The description for the custom action target.

description String

The name of the custom action target.

identifier String

The ID for the custom action target.

name String

The description for the custom action target.

description string

The name of the custom action target.

identifier string

The ID for the custom action target.

name string

The description for the custom action target.

description str

The name of the custom action target.

identifier str

The ID for the custom action target.

name str

The description for the custom action target.

description String

The name of the custom action target.

identifier String

The ID for the custom action target.

name String

The description for the custom action target.

Outputs

All input properties are implicitly available as output properties. Additionally, the ActionTarget resource produces the following output properties:

Arn string

Amazon Resource Name (ARN) of the Security Hub custom action target.

Id string

The provider-assigned unique ID for this managed resource.

Arn string

Amazon Resource Name (ARN) of the Security Hub custom action target.

Id string

The provider-assigned unique ID for this managed resource.

arn String

Amazon Resource Name (ARN) of the Security Hub custom action target.

id String

The provider-assigned unique ID for this managed resource.

arn string

Amazon Resource Name (ARN) of the Security Hub custom action target.

id string

The provider-assigned unique ID for this managed resource.

arn str

Amazon Resource Name (ARN) of the Security Hub custom action target.

id str

The provider-assigned unique ID for this managed resource.

arn String

Amazon Resource Name (ARN) of the Security Hub custom action target.

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing ActionTarget Resource

Get an existing ActionTarget 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?: ActionTargetState, opts?: CustomResourceOptions): ActionTarget
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arn: Optional[str] = None,
        description: Optional[str] = None,
        identifier: Optional[str] = None,
        name: Optional[str] = None) -> ActionTarget
func GetActionTarget(ctx *Context, name string, id IDInput, state *ActionTargetState, opts ...ResourceOption) (*ActionTarget, error)
public static ActionTarget Get(string name, Input<string> id, ActionTargetState? state, CustomResourceOptions? opts = null)
public static ActionTarget get(String name, Output<String> id, ActionTargetState 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.
The following state arguments are supported:
Arn string

Amazon Resource Name (ARN) of the Security Hub custom action target.

Description string

The name of the custom action target.

Identifier string

The ID for the custom action target.

Name string

The description for the custom action target.

Arn string

Amazon Resource Name (ARN) of the Security Hub custom action target.

Description string

The name of the custom action target.

Identifier string

The ID for the custom action target.

Name string

The description for the custom action target.

arn String

Amazon Resource Name (ARN) of the Security Hub custom action target.

description String

The name of the custom action target.

identifier String

The ID for the custom action target.

name String

The description for the custom action target.

arn string

Amazon Resource Name (ARN) of the Security Hub custom action target.

description string

The name of the custom action target.

identifier string

The ID for the custom action target.

name string

The description for the custom action target.

arn str

Amazon Resource Name (ARN) of the Security Hub custom action target.

description str

The name of the custom action target.

identifier str

The ID for the custom action target.

name str

The description for the custom action target.

arn String

Amazon Resource Name (ARN) of the Security Hub custom action target.

description String

The name of the custom action target.

identifier String

The ID for the custom action target.

name String

The description for the custom action target.

Import

Security Hub custom action can be imported using the action target ARN e.g.,

 $ pulumi import aws:securityhub/actionTarget:ActionTarget example arn:aws:securityhub:eu-west-1:312940875350:action/custom/a

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.