Class: AWSCDK::CodeBuild::ReportGroupProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
code_build/report_group_props.rb

Overview

Construction properties for ReportGroup.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(delete_reports: nil, export_bucket: nil, removal_policy: nil, report_group_name: nil, type: nil, zip_export: nil) ⇒ ReportGroupProps

Returns a new instance of ReportGroupProps.

Parameters:

  • delete_reports (Boolean, nil) (defaults to: nil)

    If true, deleting the report group force deletes the contents of the report group.

  • export_bucket (AWSCDK::S3::IBucket, nil) (defaults to: nil)

    An optional S3 bucket to export the reports to.

  • removal_policy (AWSCDK::RemovalPolicy, nil) (defaults to: nil)

    What to do when this resource is deleted from a stack.

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

    The physical name of the report group.

  • type (AWSCDK::CodeBuild::ReportGroupType, nil) (defaults to: nil)

    The type of report group. This can be one of the following values:.

  • zip_export (Boolean, nil) (defaults to: nil)

    Whether to output the report files into the export bucket as-is, or create a ZIP from them before doing the export.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'code_build/report_group_props.rb', line 13

def initialize(delete_reports: nil, export_bucket: nil, removal_policy: nil, report_group_name: nil, type: nil, zip_export: nil)
  @delete_reports = delete_reports
  Jsii::Type.check_type(@delete_reports, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "deleteReports") unless @delete_reports.nil?
  @export_bucket = export_bucket
  Jsii::Type.check_type(@export_bucket, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuSUJ1Y2tldCJ9")), "exportBucket") unless @export_bucket.nil?
  @removal_policy = removal_policy
  Jsii::Type.check_type(@removal_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "removalPolicy") unless @removal_policy.nil?
  @report_group_name = report_group_name
  Jsii::Type.check_type(@report_group_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "reportGroupName") unless @report_group_name.nil?
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZWJ1aWxkLlJlcG9ydEdyb3VwVHlwZSJ9")), "type") unless @type.nil?
  @zip_export = zip_export
  Jsii::Type.check_type(@zip_export, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "zipExport") unless @zip_export.nil?
end

Instance Attribute Details

#delete_reportsBoolean? (readonly)

Note:

Default: false

If true, deleting the report group force deletes the contents of the report group.

If false, the report group must be empty before attempting to delete it.

Returns:

  • (Boolean, nil)


34
35
36
# File 'code_build/report_group_props.rb', line 34

def delete_reports
  @delete_reports
end

#export_bucketAWSCDK::S3::IBucket? (readonly)

Note:

Default: - the reports will not be exported

An optional S3 bucket to export the reports to.

Returns:



39
40
41
# File 'code_build/report_group_props.rb', line 39

def export_bucket
  @export_bucket
end

#removal_policyAWSCDK::RemovalPolicy? (readonly)

Note:

Default: RemovalPolicy.RETAIN

What to do when this resource is deleted from a stack.

As CodeBuild does not allow deleting a ResourceGroup that has reports inside of it, this is set to retain the resource by default.

Returns:



47
48
49
# File 'code_build/report_group_props.rb', line 47

def removal_policy
  @removal_policy
end

#report_group_nameString? (readonly)

Note:

Default: - CloudFormation-generated name

The physical name of the report group.

Returns:

  • (String, nil)


52
53
54
# File 'code_build/report_group_props.rb', line 52

def report_group_name
  @report_group_name
end

#typeAWSCDK::CodeBuild::ReportGroupType? (readonly)

Note:

Default: TEST

The type of report group. This can be one of the following values:.

  • TEST - The report group contains test reports.
  • CODE_COVERAGE - The report group contains code coverage reports.


60
61
62
# File 'code_build/report_group_props.rb', line 60

def type
  @type
end

#zip_exportBoolean? (readonly)

Note:

Default: - false (the files will not be ZIPped)

Whether to output the report files into the export bucket as-is, or create a ZIP from them before doing the export.

Ignored if export_bucket has not been provided.

Returns:

  • (Boolean, nil)


67
68
69
# File 'code_build/report_group_props.rb', line 67

def zip_export
  @zip_export
end

Class Method Details

.jsii_propertiesObject



69
70
71
72
73
74
75
76
77
78
# File 'code_build/report_group_props.rb', line 69

def self.jsii_properties
  {
    :delete_reports => "deleteReports",
    :export_bucket => "exportBucket",
    :removal_policy => "removalPolicy",
    :report_group_name => "reportGroupName",
    :type => "type",
    :zip_export => "zipExport",
  }
end

Instance Method Details

#to_jsiiObject



80
81
82
83
84
85
86
87
88
89
90
91
# File 'code_build/report_group_props.rb', line 80

def to_jsii
  result = {}
  result.merge!({
    "deleteReports" => @delete_reports,
    "exportBucket" => @export_bucket,
    "removalPolicy" => @removal_policy,
    "reportGroupName" => @report_group_name,
    "type" => @type,
    "zipExport" => @zip_export,
  })
  result.compact
end