Skip to content
v2.277.0

ScanResultConditionProperty Struct ​

The condition that the output AMI's scan results must meet for the image to pass.

When you set it, the test phase waits for the scan to finish, and Image Builder fails the image if a counted finding exceeds MaximumSeverityLabel.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_imagebuilder as imagebuilder } from 'aws-cdk-lib';
const scanResultConditionProperty: imagebuilder.CfnImage.ScanResultConditionProperty = {
  maximumSeverityLabel: 'maximumSeverityLabel',

  // the properties below are optional
  fixAvailable: false,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_imagebuilder as imagebuilder

scan_result_condition_property = imagebuilder.CfnImage.ScanResultConditionProperty(
    maximum_severity_label="maximumSeverityLabel",

    # the properties below are optional
    fix_available=False
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.imagebuilder.*;

ScanResultConditionProperty scanResultConditionProperty = ScanResultConditionProperty.builder()
        .maximumSeverityLabel("maximumSeverityLabel")

        // the properties below are optional
        .fixAvailable(false)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ImageBuilder;

var scanResultConditionProperty = new ScanResultConditionProperty {
    MaximumSeverityLabel = "maximumSeverityLabel",

    // the properties below are optional
    FixAvailable = false
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

scanResultConditionProperty := &ScanResultConditionProperty{
	MaximumSeverityLabel: jsii.String("maximumSeverityLabel"),

	// the properties below are optional
	FixAvailable: jsii.Boolean(false),
}

Properties ​

fixAvailableoptionalboolean | IResolvablefix_availableoptionaltyping.Union[bool, IResolvable]fixAvailableoptionalBooleanFixAvailableoptionalboolFixAvailableoptionalinterface{}#
Specifies whether only findings that have a fix available count toward MaximumSeverityLabel.

When false, Image Builder counts every finding. The default is true.

maximumSeverityLabelstringmaximum_severity_labelstrmaximumSeverityLabelStringMaximumSeverityLabelstringMaximumSeverityLabel*stringrequired#
The maximum severity allowed for findings on the output AMI.

A finding above this severity fails the image, unless FixAvailable excludes it.