Class CfnImage
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.imagebuilder.CfnImage
- All Implemented Interfaces:
IInspectable
,ITaggable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-27T16:50:58.745Z")
@Stability(Stable)
public class CfnImage
extends CfnResource
implements IInspectable, ITaggable
Creates a new image.
This request will create a new image along with all of the configured output resources defined in the distribution configuration. You must specify exactly one recipe for your image, using either a ContainerRecipeArn or an ImageRecipeArn.
Example:
// 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.*; CfnImage cfnImage = CfnImage.Builder.create(this, "MyCfnImage") .infrastructureConfigurationArn("infrastructureConfigurationArn") // the properties below are optional .containerRecipeArn("containerRecipeArn") .distributionConfigurationArn("distributionConfigurationArn") .enhancedImageMetadataEnabled(false) .executionRole("executionRole") .imageRecipeArn("imageRecipeArn") .imageScanningConfiguration(ImageScanningConfigurationProperty.builder() .ecrConfiguration(EcrConfigurationProperty.builder() .containerTags(List.of("containerTags")) .repositoryName("repositoryName") .build()) .imageScanningEnabled(false) .build()) .imageTestsConfiguration(ImageTestsConfigurationProperty.builder() .imageTestsEnabled(false) .timeoutMinutes(123) .build()) .tags(Map.of( "tagsKey", "tags")) .workflows(List.of(WorkflowConfigurationProperty.builder() .onFailure("onFailure") .parallelGroup("parallelGroup") .parameters(List.of(WorkflowParameterProperty.builder() .name("name") .value(List.of("value")) .build())) .workflowArn("workflowArn") .build())) .build();
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent builder forCfnImage
.static interface
Settings that Image Builder uses to configure the ECR repository and the output container images that Amazon Inspector scans.static interface
Contains settings for Image Builder image resource and container image scans.static interface
When you create an image or container recipe with Image Builder , you can add the build or test components that are used to create the final image.static interface
Contains control settings and configurable inputs for a workflow resource.static interface
Contains a key/value pair that sets the named workflow parameter.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnImage
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnImage
(software.amazon.jsii.JsiiObjectRef objRef) CfnImage
(software.constructs.Construct scope, String id, CfnImageProps props) -
Method Summary
Modifier and TypeMethodDescriptionReturns the Amazon Resource Name (ARN) of the image.Returns the AMI ID of the Amazon EC2 AMI in the Region in which you are using Image Builder.Returns the URI for a container image created in the context Region.Returns the name of the image.The Amazon Resource Name (ARN) of the container recipe that defines how images are configured and tested.The Amazon Resource Name (ARN) of the distribution configuration that defines and configures the outputs of your pipeline.Collects additional information about the image being created, including the operating system (OS) version and package list.The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to perform workflow actions.The Amazon Resource Name (ARN) of the image recipe that defines how images are configured, tested, and assessed.Contains settings for vulnerability scans.The image tests configuration of the image.The Amazon Resource Name (ARN) of the infrastructure configuration that defines the environment in which your image will be built and tested.getTags()
Tag Manager which manages the tags for this resource.The tags of the image.Contains an array of workflow configuration objects.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setContainerRecipeArn
(String value) The Amazon Resource Name (ARN) of the container recipe that defines how images are configured and tested.void
The Amazon Resource Name (ARN) of the distribution configuration that defines and configures the outputs of your pipeline.void
Collects additional information about the image being created, including the operating system (OS) version and package list.void
Collects additional information about the image being created, including the operating system (OS) version and package list.void
setExecutionRole
(String value) The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to perform workflow actions.void
setImageRecipeArn
(String value) The Amazon Resource Name (ARN) of the image recipe that defines how images are configured, tested, and assessed.void
Contains settings for vulnerability scans.void
Contains settings for vulnerability scans.void
The image tests configuration of the image.void
The image tests configuration of the image.void
The Amazon Resource Name (ARN) of the infrastructure configuration that defines the environment in which your image will be built and tested.void
setTagsRaw
(Map<String, String> value) The tags of the image.void
setWorkflows
(List<Object> value) Contains an array of workflow configuration objects.void
setWorkflows
(IResolvable value) Contains an array of workflow configuration objects.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnImage
protected CfnImage(software.amazon.jsii.JsiiObjectRef objRef) -
CfnImage
protected CfnImage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnImage
@Stability(Stable) public CfnImage(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnImageProps props) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.props
- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrArn
Returns the Amazon Resource Name (ARN) of the image.For example,
arn:aws:imagebuilder:us-west-2:123456789012:image/mybasicrecipe/2019.12.03/1
. -
getAttrImageId
Returns the AMI ID of the Amazon EC2 AMI in the Region in which you are using Image Builder.Values are returned only for AMIs, and not for container images.
-
getAttrImageUri
Returns the URI for a container image created in the context Region.Values are returned only for container images, and not for AMIs.
-
getAttrName
Returns the name of the image. -
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getInfrastructureConfigurationArn
The Amazon Resource Name (ARN) of the infrastructure configuration that defines the environment in which your image will be built and tested. -
setInfrastructureConfigurationArn
The Amazon Resource Name (ARN) of the infrastructure configuration that defines the environment in which your image will be built and tested. -
getContainerRecipeArn
The Amazon Resource Name (ARN) of the container recipe that defines how images are configured and tested. -
setContainerRecipeArn
The Amazon Resource Name (ARN) of the container recipe that defines how images are configured and tested. -
getDistributionConfigurationArn
The Amazon Resource Name (ARN) of the distribution configuration that defines and configures the outputs of your pipeline. -
setDistributionConfigurationArn
The Amazon Resource Name (ARN) of the distribution configuration that defines and configures the outputs of your pipeline. -
getEnhancedImageMetadataEnabled
Collects additional information about the image being created, including the operating system (OS) version and package list. -
setEnhancedImageMetadataEnabled
Collects additional information about the image being created, including the operating system (OS) version and package list. -
setEnhancedImageMetadataEnabled
Collects additional information about the image being created, including the operating system (OS) version and package list. -
getExecutionRole
The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to perform workflow actions. -
setExecutionRole
The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to perform workflow actions. -
getImageRecipeArn
The Amazon Resource Name (ARN) of the image recipe that defines how images are configured, tested, and assessed. -
setImageRecipeArn
The Amazon Resource Name (ARN) of the image recipe that defines how images are configured, tested, and assessed. -
getImageScanningConfiguration
Contains settings for vulnerability scans. -
setImageScanningConfiguration
Contains settings for vulnerability scans. -
setImageScanningConfiguration
@Stability(Stable) public void setImageScanningConfiguration(@Nullable CfnImage.ImageScanningConfigurationProperty value) Contains settings for vulnerability scans. -
getImageTestsConfiguration
The image tests configuration of the image. -
setImageTestsConfiguration
The image tests configuration of the image. -
setImageTestsConfiguration
@Stability(Stable) public void setImageTestsConfiguration(@Nullable CfnImage.ImageTestsConfigurationProperty value) The image tests configuration of the image. -
getTagsRaw
The tags of the image. -
setTagsRaw
The tags of the image. -
getWorkflows
Contains an array of workflow configuration objects. -
setWorkflows
Contains an array of workflow configuration objects. -
setWorkflows
Contains an array of workflow configuration objects.
-