Class: AWSCDK::Inspector::CfnAssessmentTemplateProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
inspector/cfn_assessment_template_props.rb

Overview

Properties for defining a CfnAssessmentTemplate.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(assessment_target_arn:, duration_in_seconds:, rules_package_arns:, assessment_template_name: nil, user_attributes_for_findings: nil) ⇒ CfnAssessmentTemplateProps

Returns a new instance of CfnAssessmentTemplateProps.

Parameters:

  • assessment_target_arn (String, AWSCDK::Interfaces::AWSInspector::IAssessmentTargetRef)

    The ARN of the assessment target to be included in the assessment template.

  • duration_in_seconds (Numeric)

    The duration of the assessment run in seconds.

  • rules_package_arns (Array<String>)

    The ARNs of the rules packages that you want to use in the assessment template.

  • assessment_template_name (String, nil) (defaults to: nil)

    The user-defined name that identifies the assessment template that you want to create.

  • user_attributes_for_findings (AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::CfnTag>, nil) (defaults to: nil)

    The user-defined attributes that are assigned to every finding that is generated by the assessment run that uses this assessment template.



14
15
16
17
18
19
20
21
22
23
24
25
# File 'inspector/cfn_assessment_template_props.rb', line 14

def initialize(assessment_target_arn:, duration_in_seconds:, rules_package_arns:, assessment_template_name: nil, user_attributes_for_findings: nil)
  @assessment_target_arn = assessment_target_arn
  Jsii::Type.check_type(@assessment_target_arn, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19pbnNwZWN0b3IuSUFzc2Vzc21lbnRUYXJnZXRSZWYifV19fQ==")), "assessmentTargetArn")
  @duration_in_seconds = duration_in_seconds
  Jsii::Type.check_type(@duration_in_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "durationInSeconds")
  @rules_package_arns = rules_package_arns
  Jsii::Type.check_type(@rules_package_arns, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "rulesPackageArns")
  @assessment_template_name = assessment_template_name
  Jsii::Type.check_type(@assessment_template_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "assessmentTemplateName") unless @assessment_template_name.nil?
  @user_attributes_for_findings = user_attributes_for_findings
  Jsii::Type.check_type(@user_attributes_for_findings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5UYWcifV19fSwia2luZCI6ImFycmF5In19XX19")), "userAttributesForFindings") unless @user_attributes_for_findings.nil?
end

Instance Attribute Details

#assessment_target_arnString, AWSCDK::Interfaces::AWSInspector::IAssessmentTargetRef (readonly)

The ARN of the assessment target to be included in the assessment template.



31
32
33
# File 'inspector/cfn_assessment_template_props.rb', line 31

def assessment_target_arn
  @assessment_target_arn
end

#assessment_template_nameString? (readonly)

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.



48
49
50
# File 'inspector/cfn_assessment_template_props.rb', line 48

def assessment_template_name
  @assessment_template_name
end

#duration_in_secondsNumeric (readonly)

The duration of the assessment run in seconds.



36
37
38
# File 'inspector/cfn_assessment_template_props.rb', line 36

def duration_in_seconds
  @duration_in_seconds
end

#rules_package_arnsArray<String> (readonly)

The ARNs of the rules packages that you want to use in the assessment template.



41
42
43
# File 'inspector/cfn_assessment_template_props.rb', line 41

def rules_package_arns
  @rules_package_arns
end

#user_attributes_for_findingsAWSCDK::IResolvable, ... (readonly)

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.



55
56
57
# File 'inspector/cfn_assessment_template_props.rb', line 55

def user_attributes_for_findings
  @user_attributes_for_findings
end

Class Method Details

.jsii_propertiesObject



57
58
59
60
61
62
63
64
65
# File 'inspector/cfn_assessment_template_props.rb', line 57

def self.jsii_properties
  {
    :assessment_target_arn => "assessmentTargetArn",
    :duration_in_seconds => "durationInSeconds",
    :rules_package_arns => "rulesPackageArns",
    :assessment_template_name => "assessmentTemplateName",
    :user_attributes_for_findings => "userAttributesForFindings",
  }
end

Instance Method Details

#to_jsiiObject



67
68
69
70
71
72
73
74
75
76
77
# File 'inspector/cfn_assessment_template_props.rb', line 67

def to_jsii
  result = {}
  result.merge!({
    "assessmentTargetArn" => @assessment_target_arn,
    "durationInSeconds" => @duration_in_seconds,
    "rulesPackageArns" => @rules_package_arns,
    "assessmentTemplateName" => @assessment_template_name,
    "userAttributesForFindings" => @user_attributes_for_findings,
  })
  result.compact
end