1. Packages
  2. AWS Classic
  3. API Docs
  4. securityhub
  5. ActionTarget

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.30.0 published on Thursday, Apr 11, 2024 by Pulumi

aws.securityhub.ActionTarget

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.30.0 published on Thursday, Apr 11, 2024 by Pulumi

    Creates Security Hub custom action.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.securityhub.Account("example", {});
    const exampleActionTarget = new aws.securityhub.ActionTarget("example", {
        name: "Send notification to chat",
        identifier: "SendToChat",
        description: "This is custom action sends selected findings to chat",
    }, {
        dependsOn: [example],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.securityhub.Account("example")
    example_action_target = aws.securityhub.ActionTarget("example",
        name="Send notification to chat",
        identifier="SendToChat",
        description="This is custom action sends selected findings to chat",
        opts=pulumi.ResourceOptions(depends_on=[example]))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/securityhub"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := securityhub.NewAccount(ctx, "example", nil)
    		if err != nil {
    			return err
    		}
    		_, err = securityhub.NewActionTarget(ctx, "example", &securityhub.ActionTargetArgs{
    			Name:        pulumi.String("Send notification to chat"),
    			Identifier:  pulumi.String("SendToChat"),
    			Description: pulumi.String("This is custom action sends selected findings to chat"),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			example,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.SecurityHub.Account("example");
    
        var exampleActionTarget = new Aws.SecurityHub.ActionTarget("example", new()
        {
            Name = "Send notification to chat",
            Identifier = "SendToChat",
            Description = "This is custom action sends selected findings to chat",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                example, 
            },
        });
    
    });
    
    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 example = new Account("example");
    
            var exampleActionTarget = new ActionTarget("exampleActionTarget", ActionTargetArgs.builder()        
                .name("Send notification to chat")
                .identifier("SendToChat")
                .description("This is custom action sends selected findings to chat")
                .build(), CustomResourceOptions.builder()
                    .dependsOn(example)
                    .build());
    
        }
    }
    
    resources:
      example:
        type: aws:securityhub:Account
      exampleActionTarget:
        type: aws:securityhub:ActionTarget
        name: example
        properties:
          name: Send notification to chat
          identifier: SendToChat
          description: This is custom action sends selected findings to chat
        options:
          dependson:
            - ${example}
    

    Create ActionTarget Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ActionTarget(name: string, args: ActionTargetArgs, opts?: CustomResourceOptions);
    @overload
    def ActionTarget(resource_name: str,
                     args: ActionTargetArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def ActionTarget(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     description: Optional[str] = None,
                     identifier: Optional[str] = None,
                     name: Optional[str] = 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.
    
    

    Parameters

    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.

    Example

    The following reference example uses placeholder values for all input properties.

    var actionTargetResource = new Aws.SecurityHub.ActionTarget("actionTargetResource", new()
    {
        Description = "string",
        Identifier = "string",
        Name = "string",
    });
    
    example, err := securityhub.NewActionTarget(ctx, "actionTargetResource", &securityhub.ActionTargetArgs{
    	Description: pulumi.String("string"),
    	Identifier:  pulumi.String("string"),
    	Name:        pulumi.String("string"),
    })
    
    var actionTargetResource = new ActionTarget("actionTargetResource", ActionTargetArgs.builder()        
        .description("string")
        .identifier("string")
        .name("string")
        .build());
    
    action_target_resource = aws.securityhub.ActionTarget("actionTargetResource",
        description="string",
        identifier="string",
        name="string")
    
    const actionTargetResource = new aws.securityhub.ActionTarget("actionTargetResource", {
        description: "string",
        identifier: "string",
        name: "string",
    });
    
    type: aws:securityhub:ActionTarget
    properties:
        description: string
        identifier: string
        name: string
    

    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 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

    Using pulumi import, import Security Hub custom action using the action target ARN. For example:

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

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.30.0 published on Thursday, Apr 11, 2024 by Pulumi