AssessmentTarget

Provides a Inspector assessment target

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var bar = new Aws.Inspector.ResourceGroup("bar", new Aws.Inspector.ResourceGroupArgs
        {
            Tags = 
            {
                { "Env", "bar" },
                { "Name", "foo" },
            },
        });
        var foo = new Aws.Inspector.AssessmentTarget("foo", new Aws.Inspector.AssessmentTargetArgs
        {
            ResourceGroupArn = bar.Arn,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/inspector"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        bar, err := inspector.NewResourceGroup(ctx, "bar", &inspector.ResourceGroupArgs{
            Tags: pulumi.StringMap{
                "Env":  pulumi.String("bar"),
                "Name": pulumi.String("foo"),
            },
        })
        if err != nil {
            return err
        }
        _, err = inspector.NewAssessmentTarget(ctx, "foo", &inspector.AssessmentTargetArgs{
            ResourceGroupArn: bar.Arn,
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

bar = aws.inspector.ResourceGroup("bar", tags={
    "Env": "bar",
    "Name": "foo",
})
foo = aws.inspector.AssessmentTarget("foo", resource_group_arn=bar.arn)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const bar = new aws.inspector.ResourceGroup("bar", {
    tags: {
        Env: "bar",
        Name: "foo",
    },
});
const foo = new aws.inspector.AssessmentTarget("foo", {
    resourceGroupArn: bar.arn,
});

Create a AssessmentTarget Resource

def AssessmentTarget(resource_name, opts=None, name=None, resource_group_arn=None, __props__=None);
public AssessmentTarget(string name, AssessmentTargetArgs? args = null, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args AssessmentTargetArgs
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 AssessmentTargetArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AssessmentTargetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

AssessmentTarget Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The AssessmentTarget resource accepts the following input properties:

Name string

The name of the assessment target.

ResourceGroupArn string

Inspector Resource Group Amazon Resource Name (ARN) stating tags for instance matching. If not specified, all EC2 instances in the current AWS account and region are included in the assessment target.

Name string

The name of the assessment target.

ResourceGroupArn string

Inspector Resource Group Amazon Resource Name (ARN) stating tags for instance matching. If not specified, all EC2 instances in the current AWS account and region are included in the assessment target.

name string

The name of the assessment target.

resourceGroupArn string

Inspector Resource Group Amazon Resource Name (ARN) stating tags for instance matching. If not specified, all EC2 instances in the current AWS account and region are included in the assessment target.

name str

The name of the assessment target.

resource_group_arn str

Inspector Resource Group Amazon Resource Name (ARN) stating tags for instance matching. If not specified, all EC2 instances in the current AWS account and region are included in the assessment target.

Outputs

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

Arn string

The target assessment ARN.

Id string
The provider-assigned unique ID for this managed resource.
Arn string

The target assessment ARN.

Id string
The provider-assigned unique ID for this managed resource.
arn string

The target assessment ARN.

id string
The provider-assigned unique ID for this managed resource.
arn str

The target assessment ARN.

id str
The provider-assigned unique ID for this managed resource.

Look up an Existing AssessmentTarget Resource

Get an existing AssessmentTarget 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?: AssessmentTargetState, opts?: CustomResourceOptions): AssessmentTarget
static get(resource_name, id, opts=None, arn=None, name=None, resource_group_arn=None, __props__=None);
func GetAssessmentTarget(ctx *Context, name string, id IDInput, state *AssessmentTargetState, opts ...ResourceOption) (*AssessmentTarget, error)
public static AssessmentTarget Get(string name, Input<string> id, AssessmentTargetState? 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 target assessment ARN.

Name string

The name of the assessment target.

ResourceGroupArn string

Inspector Resource Group Amazon Resource Name (ARN) stating tags for instance matching. If not specified, all EC2 instances in the current AWS account and region are included in the assessment target.

Arn string

The target assessment ARN.

Name string

The name of the assessment target.

ResourceGroupArn string

Inspector Resource Group Amazon Resource Name (ARN) stating tags for instance matching. If not specified, all EC2 instances in the current AWS account and region are included in the assessment target.

arn string

The target assessment ARN.

name string

The name of the assessment target.

resourceGroupArn string

Inspector Resource Group Amazon Resource Name (ARN) stating tags for instance matching. If not specified, all EC2 instances in the current AWS account and region are included in the assessment target.

arn str

The target assessment ARN.

name str

The name of the assessment target.

resource_group_arn str

Inspector Resource Group Amazon Resource Name (ARN) stating tags for instance matching. If not specified, all EC2 instances in the current AWS account and region are included in the assessment target.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.