Interface CreateImageRequest.Builder
- All Superinterfaces:
AwsRequest.Builder,Buildable,CopyableBuilder<CreateImageRequest.Builder,,CreateImageRequest> ImagebuilderRequest.Builder,SdkBuilder<CreateImageRequest.Builder,,CreateImageRequest> SdkPojo,SdkRequest.Builder
- Enclosing class:
CreateImageRequest
-
Method Summary
Modifier and TypeMethodDescriptionclientToken(String clientToken) A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time.containerRecipeArn(String containerRecipeArn) The Amazon Resource Name (ARN) of the container recipe that defines how images are configured and tested.distributionConfigurationArn(String distributionConfigurationArn) The Amazon Resource Name (ARN) of the distribution configuration that defines and configures the outputs of the image build.enhancedImageMetadataEnabled(Boolean enhancedImageMetadataEnabled) Specifies whether to collect additional information about the image being created, including the operating system (OS) version and package list.executionRole(String executionRole) The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to perform workflow actions.imageRecipeArn(String imageRecipeArn) The Amazon Resource Name (ARN) of the image recipe that defines how images are configured, tested, and assessed.default CreateImageRequest.BuilderimageScanningConfiguration(Consumer<ImageScanningConfiguration.Builder> imageScanningConfiguration) Settings for vulnerability scans that Amazon Inspector runs during image creation.imageScanningConfiguration(ImageScanningConfiguration imageScanningConfiguration) Settings for vulnerability scans that Amazon Inspector runs during image creation.default CreateImageRequest.BuilderimageTestsConfiguration(Consumer<ImageTestsConfiguration.Builder> imageTestsConfiguration) Settings that determine whether Image Builder runs tests on the image after building it.imageTestsConfiguration(ImageTestsConfiguration imageTestsConfiguration) Settings that determine whether Image Builder runs tests on the image after building it.infrastructureConfigurationArn(String infrastructureConfigurationArn) The Amazon Resource Name (ARN) of the infrastructure configuration that defines the environment in which your image will be built and tested.default CreateImageRequest.BuilderloggingConfiguration(Consumer<ImageLoggingConfiguration.Builder> loggingConfiguration) The CloudWatch Logs log group where Image Builder sends the image build logs.loggingConfiguration(ImageLoggingConfiguration loggingConfiguration) The CloudWatch Logs log group where Image Builder sends the image build logs.overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Add an optional request override configuration.overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Add an optional request override configuration.The tags of the image.workflows(Collection<WorkflowConfiguration> workflows) The array of workflow configuration objects for the build.workflows(Consumer<WorkflowConfiguration.Builder>... workflows) The array of workflow configuration objects for the build.workflows(WorkflowConfiguration... workflows) The array of workflow configuration objects for the build.Methods inherited from interface software.amazon.awssdk.awscore.AwsRequest.Builder
overrideConfigurationMethods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.services.imagebuilder.model.ImagebuilderRequest.Builder
buildMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
imageRecipeArn
The Amazon Resource Name (ARN) of the image recipe that defines how images are configured, tested, and assessed. You must specify either this property or
containerRecipeArn, but not both.- Parameters:
imageRecipeArn- The Amazon Resource Name (ARN) of the image recipe that defines how images are configured, tested, and assessed. You must specify either this property orcontainerRecipeArn, but not both.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
containerRecipeArn
The Amazon Resource Name (ARN) of the container recipe that defines how images are configured and tested. You must specify either this property or
imageRecipeArn, but not both.- Parameters:
containerRecipeArn- The Amazon Resource Name (ARN) of the container recipe that defines how images are configured and tested. You must specify either this property orimageRecipeArn, but not both.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
distributionConfigurationArn
The Amazon Resource Name (ARN) of the distribution configuration that defines and configures the outputs of the image build. If you don't specify a distribution configuration, Image Builder creates the output image only in the account and Amazon Web Services Region where the build runs.
- Parameters:
distributionConfigurationArn- The Amazon Resource Name (ARN) of the distribution configuration that defines and configures the outputs of the image build. If you don't specify a distribution configuration, Image Builder creates the output image only in the account and Amazon Web Services Region where the build runs.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
infrastructureConfigurationArn
The Amazon Resource Name (ARN) of the infrastructure configuration that defines the environment in which your image will be built and tested.
- Parameters:
infrastructureConfigurationArn- The Amazon Resource Name (ARN) of the infrastructure configuration that defines the environment in which your image will be built and tested.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
imageTestsConfiguration
Settings that determine whether Image Builder runs tests on the image after building it. Image tests are enabled by default.
- Parameters:
imageTestsConfiguration- Settings that determine whether Image Builder runs tests on the image after building it. Image tests are enabled by default.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
imageTestsConfiguration
default CreateImageRequest.Builder imageTestsConfiguration(Consumer<ImageTestsConfiguration.Builder> imageTestsConfiguration) Settings that determine whether Image Builder runs tests on the image after building it. Image tests are enabled by default.
This is a convenience method that creates an instance of theImageTestsConfiguration.Builderavoiding the need to create one manually viaImageTestsConfiguration.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toimageTestsConfiguration(ImageTestsConfiguration).- Parameters:
imageTestsConfiguration- a consumer that will call methods onImageTestsConfiguration.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
enhancedImageMetadataEnabled
Specifies whether to collect additional information about the image being created, including the operating system (OS) version and package list. Defaults to
true.- Parameters:
enhancedImageMetadataEnabled- Specifies whether to collect additional information about the image being created, including the operating system (OS) version and package list. Defaults totrue.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tags
The tags of the image.
- Parameters:
tags- The tags of the image.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
clientToken
A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time. If you retry a request with the same client token, Image Builder returns the original response without running the operation again. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.
- Parameters:
clientToken- A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time. If you retry a request with the same client token, Image Builder returns the original response without running the operation again. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
imageScanningConfiguration
CreateImageRequest.Builder imageScanningConfiguration(ImageScanningConfiguration imageScanningConfiguration) Settings for vulnerability scans that Amazon Inspector runs during image creation. For AMI output, Amazon Inspector scans the test instance. For container output, Amazon Inspector scans the container image that Image Builder pushes to the Amazon ECR repository specified in
ecrConfiguration.- Parameters:
imageScanningConfiguration- Settings for vulnerability scans that Amazon Inspector runs during image creation. For AMI output, Amazon Inspector scans the test instance. For container output, Amazon Inspector scans the container image that Image Builder pushes to the Amazon ECR repository specified inecrConfiguration.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
imageScanningConfiguration
default CreateImageRequest.Builder imageScanningConfiguration(Consumer<ImageScanningConfiguration.Builder> imageScanningConfiguration) Settings for vulnerability scans that Amazon Inspector runs during image creation. For AMI output, Amazon Inspector scans the test instance. For container output, Amazon Inspector scans the container image that Image Builder pushes to the Amazon ECR repository specified in
This is a convenience method that creates an instance of theecrConfiguration.ImageScanningConfiguration.Builderavoiding the need to create one manually viaImageScanningConfiguration.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toimageScanningConfiguration(ImageScanningConfiguration).- Parameters:
imageScanningConfiguration- a consumer that will call methods onImageScanningConfiguration.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
workflows
The array of workflow configuration objects for the build. If you specify workflows, they replace the default workflows that Image Builder otherwise runs for the build, and you must also provide an
executionRole.- Parameters:
workflows- The array of workflow configuration objects for the build. If you specify workflows, they replace the default workflows that Image Builder otherwise runs for the build, and you must also provide anexecutionRole.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
workflows
The array of workflow configuration objects for the build. If you specify workflows, they replace the default workflows that Image Builder otherwise runs for the build, and you must also provide an
executionRole.- Parameters:
workflows- The array of workflow configuration objects for the build. If you specify workflows, they replace the default workflows that Image Builder otherwise runs for the build, and you must also provide anexecutionRole.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
workflows
The array of workflow configuration objects for the build. If you specify workflows, they replace the default workflows that Image Builder otherwise runs for the build, and you must also provide an
This is a convenience method that creates an instance of theexecutionRole.WorkflowConfiguration.Builderavoiding the need to create one manually viaWorkflowConfiguration.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toworkflows(List<WorkflowConfiguration>).- Parameters:
workflows- a consumer that will call methods onWorkflowConfiguration.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
executionRole
The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to perform workflow actions. This property is required if you specify
workflows. If you don't provide a role, Image Builder uses the Image Builder service-linked role in your account, and creates it if it doesn't exist.- Parameters:
executionRole- The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to perform workflow actions. This property is required if you specifyworkflows. If you don't provide a role, Image Builder uses the Image Builder service-linked role in your account, and creates it if it doesn't exist.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
loggingConfiguration
The CloudWatch Logs log group where Image Builder sends the image build logs. If you specify a log group name outside of the
/aws/imagebuilder/namespace, you must also provide anexecutionRolethat has permission to write to that log group.- Parameters:
loggingConfiguration- The CloudWatch Logs log group where Image Builder sends the image build logs. If you specify a log group name outside of the/aws/imagebuilder/namespace, you must also provide anexecutionRolethat has permission to write to that log group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
loggingConfiguration
default CreateImageRequest.Builder loggingConfiguration(Consumer<ImageLoggingConfiguration.Builder> loggingConfiguration) The CloudWatch Logs log group where Image Builder sends the image build logs. If you specify a log group name outside of the
This is a convenience method that creates an instance of the/aws/imagebuilder/namespace, you must also provide anexecutionRolethat has permission to write to that log group.ImageLoggingConfiguration.Builderavoiding the need to create one manually viaImageLoggingConfiguration.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tologgingConfiguration(ImageLoggingConfiguration).- Parameters:
loggingConfiguration- a consumer that will call methods onImageLoggingConfiguration.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
overrideConfiguration
CreateImageRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Description copied from interface:AwsRequest.BuilderAdd an optional request override configuration.- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder- Parameters:
overrideConfiguration- The override configuration.- Returns:
- This object for method chaining.
-
overrideConfiguration
CreateImageRequest.Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Description copied from interface:AwsRequest.BuilderAdd an optional request override configuration.- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder- Parameters:
builderConsumer- AConsumerto which an emptyAwsRequestOverrideConfiguration.Builderwill be given.- Returns:
- This object for method chaining.
-