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
{
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",
},
TargetArn = aws_inspector_assessment_target.Example.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 {
_, err := inspector.NewAssessmentTemplate(ctx, "example", &inspector.AssessmentTemplateArgs{
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"),
},
TargetArn: pulumi.String(aws_inspector_assessment_target.Example.Arn),
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
example = aws.inspector.AssessmentTemplate("example",
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",
],
target_arn=aws_inspector_assessment_target["example"]["arn"])import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.inspector.AssessmentTemplate("example", {
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",
],
targetArn: aws_inspector_assessment_target_example.arn,
});Create a AssessmentTemplate Resource
new AssessmentTemplate(name: string, args: AssessmentTemplateArgs, opts?: CustomResourceOptions);def AssessmentTemplate(resource_name, opts=None, duration=None, name=None, rules_package_arns=None, tags=None, target_arn=None, __props__=None);func NewAssessmentTemplate(ctx *Context, name string, args AssessmentTemplateArgs, opts ...ResourceOption) (*AssessmentTemplate, error)public AssessmentTemplate(string name, AssessmentTemplateArgs args, CustomResourceOptions? opts = null)- 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.
- 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 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.
AssessmentTemplate Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The AssessmentTemplate resource accepts the following input properties:
- Duration int
The duration of the inspector run.
- Rules
Package List<string>Arns The rules to be used during the run.
- Target
Arn string The assessment target ARN to attach the template to.
- Name string
The name of the assessment template.
- Dictionary<string, string>
Key-value map of tags for the Inspector assessment template.
- Duration int
The duration of the inspector run.
- Rules
Package []stringArns The rules to be used during the run.
- Target
Arn string The assessment target ARN to attach the template to.
- Name string
The name of the assessment template.
- map[string]string
Key-value map of tags for the Inspector assessment template.
- duration number
The duration of the inspector run.
- rules
Package string[]Arns The rules to be used during the run.
- target
Arn string The assessment target ARN to attach the template to.
- name string
The name of the assessment template.
- {[key: string]: string}
Key-value map of tags for the Inspector assessment template.
- duration float
The duration of the inspector run.
- rules_
package_ List[str]arns 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.
- Dict[str, str]
Key-value map of tags for the Inspector assessment template.
Outputs
All input properties are implicitly available as output properties. Additionally, the AssessmentTemplate resource produces the following output properties:
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): AssessmentTemplatestatic get(resource_name, id, opts=None, arn=None, duration=None, name=None, rules_package_arns=None, tags=None, target_arn=None, __props__=None);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)- 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 template assessment ARN.
- Duration int
The duration of the inspector run.
- Name string
The name of the assessment template.
- Rules
Package List<string>Arns The rules to be used during the run.
- Dictionary<string, string>
Key-value map of tags for the Inspector assessment template.
- Target
Arn 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.
- Rules
Package []stringArns The rules to be used during the run.
- map[string]string
Key-value map of tags for the Inspector assessment template.
- Target
Arn 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.
- rules
Package string[]Arns The rules to be used during the run.
- {[key: string]: string}
Key-value map of tags for the Inspector assessment template.
- target
Arn string The assessment target ARN to attach the template to.
- arn str
The template assessment ARN.
- duration float
The duration of the inspector run.
- name str
The name of the assessment template.
- rules_
package_ List[str]arns The rules to be used during the run.
- Dict[str, str]
Key-value map of tags for the Inspector assessment template.
- target_
arn str The assessment target ARN to attach the template to.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.