Class CfnAssessmentTemplate

java.lang.Object
software.amazon.jsii.JsiiObject
All Implemented Interfaces:
IConstruct, IDependable, IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:29:57.466Z") @Stability(Stable) public class CfnAssessmentTemplate extends CfnResource implements IInspectable
A CloudFormation AWS::Inspector::AssessmentTemplate.

The AWS::Inspector::AssessmentTemplate resource creates an Amazon Inspector assessment template, which specifies the Inspector assessment targets that will be evaluated by an assessment run and its related configurations.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.inspector.*;
 CfnAssessmentTemplate cfnAssessmentTemplate = CfnAssessmentTemplate.Builder.create(this, "MyCfnAssessmentTemplate")
         .assessmentTargetArn("assessmentTargetArn")
         .durationInSeconds(123)
         .rulesPackageArns(List.of("rulesPackageArns"))
         // the properties below are optional
         .assessmentTemplateName("assessmentTemplateName")
         .userAttributesForFindings(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnAssessmentTemplate

      protected CfnAssessmentTemplate(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnAssessmentTemplate

      protected CfnAssessmentTemplate(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnAssessmentTemplate

      @Stability(Stable) public CfnAssessmentTemplate(@NotNull Construct scope, @NotNull String id, @NotNull CfnAssessmentTemplateProps props)
      Create a new AWS::Inspector::AssessmentTemplate.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      props -
      • resource properties.
      This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector -
      • tree inspector to collect and process attributes.
      This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The Amazon Resource Name (ARN) that specifies the assessment template that is created.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getAssessmentTargetArn

      @Stability(Stable) @NotNull public String getAssessmentTargetArn()
      The ARN of the assessment target to be included in the assessment template.
    • setAssessmentTargetArn

      @Stability(Stable) public void setAssessmentTargetArn(@NotNull String value)
      The ARN of the assessment target to be included in the assessment template.
    • getDurationInSeconds

      @Stability(Stable) @NotNull public Number getDurationInSeconds()
      The duration of the assessment run in seconds.
    • setDurationInSeconds

      @Stability(Stable) public void setDurationInSeconds(@NotNull Number value)
      The duration of the assessment run in seconds.
    • getRulesPackageArns

      @Stability(Stable) @NotNull public List<String> getRulesPackageArns()
      The ARNs of the rules packages that you want to use in the assessment template.
    • setRulesPackageArns

      @Stability(Stable) public void setRulesPackageArns(@NotNull List<String> value)
      The ARNs of the rules packages that you want to use in the assessment template.
    • getAssessmentTemplateName

      @Stability(Stable) @Nullable public String getAssessmentTemplateName()
      The user-defined name that identifies the assessment template that you want to create.

      You can create several assessment templates for the same assessment target. The names of the assessment templates that correspond to a particular assessment target must be unique.

    • setAssessmentTemplateName

      @Stability(Stable) public void setAssessmentTemplateName(@Nullable String value)
      The user-defined name that identifies the assessment template that you want to create.

      You can create several assessment templates for the same assessment target. The names of the assessment templates that correspond to a particular assessment target must be unique.

    • getUserAttributesForFindings

      @Stability(Stable) @Nullable public Object getUserAttributesForFindings()
      The user-defined attributes that are assigned to every finding that is generated by the assessment run that uses this assessment template.

      Within an assessment template, each key must be unique.

    • setUserAttributesForFindings

      @Stability(Stable) public void setUserAttributesForFindings(@Nullable IResolvable value)
      The user-defined attributes that are assigned to every finding that is generated by the assessment run that uses this assessment template.

      Within an assessment template, each key must be unique.

    • setUserAttributesForFindings

      @Stability(Stable) public void setUserAttributesForFindings(@Nullable List<Object> value)
      The user-defined attributes that are assigned to every finding that is generated by the assessment run that uses this assessment template.

      Within an assessment template, each key must be unique.