paws.security.identity (version 0.1.0)

inspector_create_assessment_template: Creates an assessment template for the assessment target that is specified by the ARN of the assessment target

Description

Creates an assessment template for the assessment target that is specified by the ARN of the assessment target. If the service-linked role isn't already registered, this action also creates and registers a service-linked role to grant Amazon Inspector access to AWS Services needed to perform security assessments.

Usage

inspector_create_assessment_template(assessmentTargetArn,
  assessmentTemplateName, durationInSeconds, rulesPackageArns,
  userAttributesForFindings)

Arguments

assessmentTargetArn

[required] The ARN that specifies the assessment target for which you want to create the assessment template.

assessmentTemplateName

[required] The user-defined name that identifies the assessment template that you want to create. You can create several assessment templates for an assessment target. The names of the assessment templates that correspond to a particular assessment target must be unique.

durationInSeconds

[required] The duration of the assessment run in seconds.

rulesPackageArns

[required] The ARNs that specify the rules packages that you want to attach to the assessment template.

userAttributesForFindings

The user-defined attributes that are assigned to every finding that is generated by the assessment run that uses this assessment template. An attribute is a key and value pair (an Attribute object). Within an assessment template, each key must be unique.

Request syntax

svc$create_assessment_template(
  assessmentTargetArn = "string",
  assessmentTemplateName = "string",
  durationInSeconds = 123,
  rulesPackageArns = list(
    "string"
  ),
  userAttributesForFindings = list(
    list(
      key = "string",
      value = "string"
    )
  )
)

Examples

Run this code
# NOT RUN {
# Creates an assessment template for the assessment target that is
# specified by the ARN of the assessment target.
# }
# NOT RUN {
svc$create_assessment_template(
  assessmentTargetArn = "arn:aws:inspector:us-west-2:123456789012:target/0-nvgVhaxX",
  assessmentTemplateName = "ExampleAssessmentTemplate",
  durationInSeconds = 180L,
  rulesPackageArns = list(
    "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-11B9DBXp"
  ),
  userAttributesForFindings = list(
    list(
      key = "Example",
      value = "example"
    )
  )
)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab