AWS Classic

Pulumi Official
Package maintained by Pulumi
v5.10.0 published on Monday, Jul 11, 2022 by Pulumi

AssessmentTemplate

Provides a Inspector assessment template

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.Inspector.AssessmentTemplate("example", new Aws.Inspector.AssessmentTemplateArgs
        {
            TargetArn = aws_inspector_assessment_target.Example.Arn,
            Duration = 3600,
            RulesPackageArns = 
            {
                "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-9hgA516p",
                "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-H5hpSawc",
                "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-JJOtZiqQ",
                "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-vg5GGHSD",
            },
        });
    }

}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := inspector.NewAssessmentTemplate(ctx, "example", &inspector.AssessmentTemplateArgs{
			TargetArn: pulumi.Any(aws_inspector_assessment_target.Example.Arn),
			Duration:  pulumi.Int(3600),
			RulesPackageArns: pulumi.StringArray{
				pulumi.String("arn:aws:inspector:us-west-2:758058086616:rulespackage/0-9hgA516p"),
				pulumi.String("arn:aws:inspector:us-west-2:758058086616:rulespackage/0-H5hpSawc"),
				pulumi.String("arn:aws:inspector:us-west-2:758058086616:rulespackage/0-JJOtZiqQ"),
				pulumi.String("arn:aws:inspector:us-west-2:758058086616:rulespackage/0-vg5GGHSD"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new AssessmentTemplate("example", AssessmentTemplateArgs.builder()        
            .targetArn(aws_inspector_assessment_target.example().arn())
            .duration(3600)
            .rulesPackageArns(            
                "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-9hgA516p",
                "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-H5hpSawc",
                "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-JJOtZiqQ",
                "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-vg5GGHSD")
            .build());

    }
}
import pulumi
import pulumi_aws as aws

example = aws.inspector.AssessmentTemplate("example",
    target_arn=aws_inspector_assessment_target["example"]["arn"],
    duration=3600,
    rules_package_arns=[
        "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-9hgA516p",
        "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-H5hpSawc",
        "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-JJOtZiqQ",
        "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-vg5GGHSD",
    ])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.inspector.AssessmentTemplate("example", {
    targetArn: aws_inspector_assessment_target.example.arn,
    duration: 3600,
    rulesPackageArns: [
        "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-9hgA516p",
        "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-H5hpSawc",
        "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-JJOtZiqQ",
        "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-vg5GGHSD",
    ],
});
resources:
  example:
    type: aws:inspector:AssessmentTemplate
    properties:
      targetArn: ${aws_inspector_assessment_target.example.arn}
      duration: 3600
      rulesPackageArns:
        - arn:aws:inspector:us-west-2:758058086616:rulespackage/0-9hgA516p
        - arn:aws:inspector:us-west-2:758058086616:rulespackage/0-H5hpSawc
        - arn:aws:inspector:us-west-2:758058086616:rulespackage/0-JJOtZiqQ
        - arn:aws:inspector:us-west-2:758058086616:rulespackage/0-vg5GGHSD

Create a AssessmentTemplate Resource

new AssessmentTemplate(name: string, args: AssessmentTemplateArgs, opts?: CustomResourceOptions);
@overload
def AssessmentTemplate(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       duration: Optional[int] = None,
                       name: Optional[str] = None,
                       rules_package_arns: Optional[Sequence[str]] = None,
                       tags: Optional[Mapping[str, str]] = None,
                       target_arn: Optional[str] = None)
@overload
def AssessmentTemplate(resource_name: str,
                       args: AssessmentTemplateArgs,
                       opts: Optional[ResourceOptions] = None)
func NewAssessmentTemplate(ctx *Context, name string, args AssessmentTemplateArgs, opts ...ResourceOption) (*AssessmentTemplate, error)
public AssessmentTemplate(string name, AssessmentTemplateArgs args, CustomResourceOptions? opts = null)
public AssessmentTemplate(String name, AssessmentTemplateArgs args)
public AssessmentTemplate(String name, AssessmentTemplateArgs args, CustomResourceOptions options)
type: aws:inspector:AssessmentTemplate
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

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

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

Duration int

The duration of the inspector run.

RulesPackageArns List<string>

The rules to be used during the run.

TargetArn string

The assessment target ARN to attach the template to.

Name string

The name of the assessment template.

Tags Dictionary<string, string>

Key-value map of tags for the Inspector assessment template. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Duration int

The duration of the inspector run.

RulesPackageArns []string

The rules to be used during the run.

TargetArn string

The assessment target ARN to attach the template to.

Name string

The name of the assessment template.

Tags map[string]string

Key-value map of tags for the Inspector assessment template. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

duration Integer

The duration of the inspector run.

rulesPackageArns List<String>

The rules to be used during the run.

targetArn String

The assessment target ARN to attach the template to.

name String

The name of the assessment template.

tags Map<String,String>

Key-value map of tags for the Inspector assessment template. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

duration number

The duration of the inspector run.

rulesPackageArns string[]

The rules to be used during the run.

targetArn string

The assessment target ARN to attach the template to.

name string

The name of the assessment template.

tags {[key: string]: string}

Key-value map of tags for the Inspector assessment template. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

duration int

The duration of the inspector run.

rules_package_arns Sequence[str]

The rules to be used during the run.

target_arn str

The assessment target ARN to attach the template to.

name str

The name of the assessment template.

tags Mapping[str, str]

Key-value map of tags for the Inspector assessment template. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

duration Number

The duration of the inspector run.

rulesPackageArns List<String>

The rules to be used during the run.

targetArn String

The assessment target ARN to attach the template to.

name String

The name of the assessment template.

tags Map<String>

Key-value map of tags for the Inspector assessment template. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Outputs

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

Arn string

The template assessment ARN.

Id string

The provider-assigned unique ID for this managed resource.

TagsAll Dictionary<string, string>

A map of tags assigned to the resource, including those inherited from the provider .

Arn string

The template assessment ARN.

Id string

The provider-assigned unique ID for this managed resource.

TagsAll map[string]string

A map of tags assigned to the resource, including those inherited from the provider .

arn String

The template assessment ARN.

id String

The provider-assigned unique ID for this managed resource.

tagsAll Map<String,String>

A map of tags assigned to the resource, including those inherited from the provider .

arn string

The template assessment ARN.

id string

The provider-assigned unique ID for this managed resource.

tagsAll {[key: string]: string}

A map of tags assigned to the resource, including those inherited from the provider .

arn str

The template assessment ARN.

id str

The provider-assigned unique ID for this managed resource.

tags_all Mapping[str, str]

A map of tags assigned to the resource, including those inherited from the provider .

arn String

The template assessment ARN.

id String

The provider-assigned unique ID for this managed resource.

tagsAll Map<String>

A map of tags assigned to the resource, including those inherited from the provider .

Look up an Existing AssessmentTemplate Resource

Get an existing AssessmentTemplate 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?: AssessmentTemplateState, opts?: CustomResourceOptions): AssessmentTemplate
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arn: Optional[str] = None,
        duration: Optional[int] = None,
        name: Optional[str] = None,
        rules_package_arns: Optional[Sequence[str]] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None,
        target_arn: Optional[str] = None) -> AssessmentTemplate
func GetAssessmentTemplate(ctx *Context, name string, id IDInput, state *AssessmentTemplateState, opts ...ResourceOption) (*AssessmentTemplate, error)
public static AssessmentTemplate Get(string name, Input<string> id, AssessmentTemplateState? state, CustomResourceOptions? opts = null)
public static AssessmentTemplate get(String name, Output<String> id, AssessmentTemplateState 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

The template assessment ARN.

Duration int

The duration of the inspector run.

Name string

The name of the assessment template.

RulesPackageArns List<string>

The rules to be used during the run.

Tags Dictionary<string, string>

Key-value map of tags for the Inspector assessment template. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

TagsAll Dictionary<string, string>

A map of tags assigned to the resource, including those inherited from the provider .

TargetArn string

The assessment target ARN to attach the template to.

Arn string

The template assessment ARN.

Duration int

The duration of the inspector run.

Name string

The name of the assessment template.

RulesPackageArns []string

The rules to be used during the run.

Tags map[string]string

Key-value map of tags for the Inspector assessment template. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

TagsAll map[string]string

A map of tags assigned to the resource, including those inherited from the provider .

TargetArn string

The assessment target ARN to attach the template to.

arn String

The template assessment ARN.

duration Integer

The duration of the inspector run.

name String

The name of the assessment template.

rulesPackageArns List<String>

The rules to be used during the run.

tags Map<String,String>

Key-value map of tags for the Inspector assessment template. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tagsAll Map<String,String>

A map of tags assigned to the resource, including those inherited from the provider .

targetArn String

The assessment target ARN to attach the template to.

arn string

The template assessment ARN.

duration number

The duration of the inspector run.

name string

The name of the assessment template.

rulesPackageArns string[]

The rules to be used during the run.

tags {[key: string]: string}

Key-value map of tags for the Inspector assessment template. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tagsAll {[key: string]: string}

A map of tags assigned to the resource, including those inherited from the provider .

targetArn string

The assessment target ARN to attach the template to.

arn str

The template assessment ARN.

duration int

The duration of the inspector run.

name str

The name of the assessment template.

rules_package_arns Sequence[str]

The rules to be used during the run.

tags Mapping[str, str]

Key-value map of tags for the Inspector assessment template. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tags_all Mapping[str, str]

A map of tags assigned to the resource, including those inherited from the provider .

target_arn str

The assessment target ARN to attach the template to.

arn String

The template assessment ARN.

duration Number

The duration of the inspector run.

name String

The name of the assessment template.

rulesPackageArns List<String>

The rules to be used during the run.

tags Map<String>

Key-value map of tags for the Inspector assessment template. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tagsAll Map<String>

A map of tags assigned to the resource, including those inherited from the provider .

targetArn String

The assessment target ARN to attach the template to.

Import

aws_inspector_assessment_template can be imported by using the template assessment ARN, e.g.,

 $ pulumi import aws:inspector/assessmentTemplate:AssessmentTemplate example arn:aws:inspector:us-west-2:123456789012:target/0-9IaAzhGR/template/0-WEcjR8CH

Package Details

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

This Pulumi package is based on the aws Terraform Provider.