Interface ImageScanningConfiguration.Builder
- All Superinterfaces:
Buildable,CopyableBuilder<ImageScanningConfiguration.Builder,,ImageScanningConfiguration> SdkBuilder<ImageScanningConfiguration.Builder,,ImageScanningConfiguration> SdkPojo
- Enclosing class:
ImageScanningConfiguration
-
Method Summary
Modifier and TypeMethodDescriptionecrConfiguration(Consumer<EcrConfiguration.Builder> ecrConfiguration) Contains Amazon ECR settings for vulnerability scans.ecrConfiguration(EcrConfiguration ecrConfiguration) Contains Amazon ECR settings for vulnerability scans.imageScanningEnabled(Boolean imageScanningEnabled) Specifies whether Amazon Inspector scans for vulnerabilities when you create a new image.imageScanningTypes(Collection<ImageScanningType> imageScanningTypes) The type of vulnerability scan that Image Builder runs for AMI output whenimageScanningEnabledistrue.imageScanningTypes(ImageScanningType... imageScanningTypes) The type of vulnerability scan that Image Builder runs for AMI output whenimageScanningEnabledistrue.imageScanningTypesWithStrings(String... imageScanningTypes) The type of vulnerability scan that Image Builder runs for AMI output whenimageScanningEnabledistrue.imageScanningTypesWithStrings(Collection<String> imageScanningTypes) The type of vulnerability scan that Image Builder runs for AMI output whenimageScanningEnabledistrue.scanResultCondition(Consumer<ScanResultCondition.Builder> scanResultCondition) The condition that the output AMI's scan results must meet for the image to pass.scanResultCondition(ScanResultCondition scanResultCondition) The condition that the output AMI's scan results must meet for the image to pass.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
imageScanningEnabled
Specifies whether Amazon Inspector scans for vulnerabilities when you create a new image. You must also enable image tests. For AMI output,
imageScanningTypessets whether Amazon Inspector scans the test instance or the output AMI. For container output, Amazon Inspector scans the container image that Image Builder pushes to the Amazon ECR repository from yourecrConfigurationsettings.To use container image scans, you must activate Amazon Inspector for Amazon ECR scanning in your account. The Image Builder
ListImageScanFindingsoperation returns the findings of these scans.- Parameters:
imageScanningEnabled- Specifies whether Amazon Inspector scans for vulnerabilities when you create a new image. You must also enable image tests. For AMI output,imageScanningTypessets whether Amazon Inspector scans the test instance or the output AMI. For container output, Amazon Inspector scans the container image that Image Builder pushes to the Amazon ECR repository from yourecrConfigurationsettings.To use container image scans, you must activate Amazon Inspector for Amazon ECR scanning in your account. The Image Builder
ListImageScanFindingsoperation returns the findings of these scans.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
ecrConfiguration
Contains Amazon ECR settings for vulnerability scans.
- Parameters:
ecrConfiguration- Contains Amazon ECR settings for vulnerability scans.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
ecrConfiguration
default ImageScanningConfiguration.Builder ecrConfiguration(Consumer<EcrConfiguration.Builder> ecrConfiguration) Contains Amazon ECR settings for vulnerability scans.
This is a convenience method that creates an instance of theEcrConfiguration.Builderavoiding the need to create one manually viaEcrConfiguration.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toecrConfiguration(EcrConfiguration).- Parameters:
ecrConfiguration- a consumer that will call methods onEcrConfiguration.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
imageScanningTypesWithStrings
ImageScanningConfiguration.Builder imageScanningTypesWithStrings(Collection<String> imageScanningTypes) The type of vulnerability scan that Image Builder runs for AMI output when
imageScanningEnabledistrue. Specify a single value. If you omitimageScanningTypes, Image Builder usesTEST_INSTANCE_CVE. The scan types work as follows:-
With
TEST_INSTANCE_CVE, Amazon Inspector scans the test instance during image tests. To use this scan, you must activate Amazon Inspector for Amazon EC2 scanning in your account. The Image BuilderListImageScanFindingsoperation returns the findings. -
With
ON_DEMAND_AMI_CVE, Amazon Inspector starts an on-demand scan of the output AMI during image tests. To use this scan, you must build from an image recipe, but you do not need to activate Amazon Inspector in your account. The Amazon EC2 GetImageFindings operation returns the findings.
- Parameters:
imageScanningTypes- The type of vulnerability scan that Image Builder runs for AMI output whenimageScanningEnabledistrue. Specify a single value. If you omitimageScanningTypes, Image Builder usesTEST_INSTANCE_CVE. The scan types work as follows:-
With
TEST_INSTANCE_CVE, Amazon Inspector scans the test instance during image tests. To use this scan, you must activate Amazon Inspector for Amazon EC2 scanning in your account. The Image BuilderListImageScanFindingsoperation returns the findings. -
With
ON_DEMAND_AMI_CVE, Amazon Inspector starts an on-demand scan of the output AMI during image tests. To use this scan, you must build from an image recipe, but you do not need to activate Amazon Inspector in your account. The Amazon EC2 GetImageFindings operation returns the findings.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
imageScanningTypesWithStrings
The type of vulnerability scan that Image Builder runs for AMI output when
imageScanningEnabledistrue. Specify a single value. If you omitimageScanningTypes, Image Builder usesTEST_INSTANCE_CVE. The scan types work as follows:-
With
TEST_INSTANCE_CVE, Amazon Inspector scans the test instance during image tests. To use this scan, you must activate Amazon Inspector for Amazon EC2 scanning in your account. The Image BuilderListImageScanFindingsoperation returns the findings. -
With
ON_DEMAND_AMI_CVE, Amazon Inspector starts an on-demand scan of the output AMI during image tests. To use this scan, you must build from an image recipe, but you do not need to activate Amazon Inspector in your account. The Amazon EC2 GetImageFindings operation returns the findings.
- Parameters:
imageScanningTypes- The type of vulnerability scan that Image Builder runs for AMI output whenimageScanningEnabledistrue. Specify a single value. If you omitimageScanningTypes, Image Builder usesTEST_INSTANCE_CVE. The scan types work as follows:-
With
TEST_INSTANCE_CVE, Amazon Inspector scans the test instance during image tests. To use this scan, you must activate Amazon Inspector for Amazon EC2 scanning in your account. The Image BuilderListImageScanFindingsoperation returns the findings. -
With
ON_DEMAND_AMI_CVE, Amazon Inspector starts an on-demand scan of the output AMI during image tests. To use this scan, you must build from an image recipe, but you do not need to activate Amazon Inspector in your account. The Amazon EC2 GetImageFindings operation returns the findings.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
imageScanningTypes
ImageScanningConfiguration.Builder imageScanningTypes(Collection<ImageScanningType> imageScanningTypes) The type of vulnerability scan that Image Builder runs for AMI output when
imageScanningEnabledistrue. Specify a single value. If you omitimageScanningTypes, Image Builder usesTEST_INSTANCE_CVE. The scan types work as follows:-
With
TEST_INSTANCE_CVE, Amazon Inspector scans the test instance during image tests. To use this scan, you must activate Amazon Inspector for Amazon EC2 scanning in your account. The Image BuilderListImageScanFindingsoperation returns the findings. -
With
ON_DEMAND_AMI_CVE, Amazon Inspector starts an on-demand scan of the output AMI during image tests. To use this scan, you must build from an image recipe, but you do not need to activate Amazon Inspector in your account. The Amazon EC2 GetImageFindings operation returns the findings.
- Parameters:
imageScanningTypes- The type of vulnerability scan that Image Builder runs for AMI output whenimageScanningEnabledistrue. Specify a single value. If you omitimageScanningTypes, Image Builder usesTEST_INSTANCE_CVE. The scan types work as follows:-
With
TEST_INSTANCE_CVE, Amazon Inspector scans the test instance during image tests. To use this scan, you must activate Amazon Inspector for Amazon EC2 scanning in your account. The Image BuilderListImageScanFindingsoperation returns the findings. -
With
ON_DEMAND_AMI_CVE, Amazon Inspector starts an on-demand scan of the output AMI during image tests. To use this scan, you must build from an image recipe, but you do not need to activate Amazon Inspector in your account. The Amazon EC2 GetImageFindings operation returns the findings.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
imageScanningTypes
The type of vulnerability scan that Image Builder runs for AMI output when
imageScanningEnabledistrue. Specify a single value. If you omitimageScanningTypes, Image Builder usesTEST_INSTANCE_CVE. The scan types work as follows:-
With
TEST_INSTANCE_CVE, Amazon Inspector scans the test instance during image tests. To use this scan, you must activate Amazon Inspector for Amazon EC2 scanning in your account. The Image BuilderListImageScanFindingsoperation returns the findings. -
With
ON_DEMAND_AMI_CVE, Amazon Inspector starts an on-demand scan of the output AMI during image tests. To use this scan, you must build from an image recipe, but you do not need to activate Amazon Inspector in your account. The Amazon EC2 GetImageFindings operation returns the findings.
- Parameters:
imageScanningTypes- The type of vulnerability scan that Image Builder runs for AMI output whenimageScanningEnabledistrue. Specify a single value. If you omitimageScanningTypes, Image Builder usesTEST_INSTANCE_CVE. The scan types work as follows:-
With
TEST_INSTANCE_CVE, Amazon Inspector scans the test instance during image tests. To use this scan, you must activate Amazon Inspector for Amazon EC2 scanning in your account. The Image BuilderListImageScanFindingsoperation returns the findings. -
With
ON_DEMAND_AMI_CVE, Amazon Inspector starts an on-demand scan of the output AMI during image tests. To use this scan, you must build from an image recipe, but you do not need to activate Amazon Inspector in your account. The Amazon EC2 GetImageFindings operation returns the findings.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
scanResultCondition
The condition that the output AMI's scan results must meet for the image to pass. You can set
scanResultConditiononly whenimageScanningTypesisON_DEMAND_AMI_CVE. If you omit it, Image Builder starts the scan but does not wait for it or use its results to pass or fail the image.When you set
scanResultCondition, the test phase waits for the scan to finish. Then Image Builder checks the findings against the condition. By default, Image Builder counts only findings that have a fix available. To count every finding, setfixAvailabletofalse. If a counted finding exceedsmaximumSeverityLabel, Image Builder fails the image in the test phase and does not distribute the AMI.- Parameters:
scanResultCondition- The condition that the output AMI's scan results must meet for the image to pass. You can setscanResultConditiononly whenimageScanningTypesisON_DEMAND_AMI_CVE. If you omit it, Image Builder starts the scan but does not wait for it or use its results to pass or fail the image.When you set
scanResultCondition, the test phase waits for the scan to finish. Then Image Builder checks the findings against the condition. By default, Image Builder counts only findings that have a fix available. To count every finding, setfixAvailabletofalse. If a counted finding exceedsmaximumSeverityLabel, Image Builder fails the image in the test phase and does not distribute the AMI.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
scanResultCondition
default ImageScanningConfiguration.Builder scanResultCondition(Consumer<ScanResultCondition.Builder> scanResultCondition) The condition that the output AMI's scan results must meet for the image to pass. You can set
scanResultConditiononly whenimageScanningTypesisON_DEMAND_AMI_CVE. If you omit it, Image Builder starts the scan but does not wait for it or use its results to pass or fail the image.When you set
This is a convenience method that creates an instance of thescanResultCondition, the test phase waits for the scan to finish. Then Image Builder checks the findings against the condition. By default, Image Builder counts only findings that have a fix available. To count every finding, setfixAvailabletofalse. If a counted finding exceedsmaximumSeverityLabel, Image Builder fails the image in the test phase and does not distribute the AMI.ScanResultCondition.Builderavoiding the need to create one manually viaScanResultCondition.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toscanResultCondition(ScanResultCondition).- Parameters:
scanResultCondition- a consumer that will call methods onScanResultCondition.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-