Class CfnImage
- All Implemented Interfaces:
IInspectable,IEnvironmentAware,IImageRef,ITaggable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
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")
.containerRecipeArn("containerRecipeArn")
.deletionSettings(DeletionSettingsProperty.builder()
.executionRole("executionRole")
.build())
.distributionConfigurationArn("distributionConfigurationArn")
.enhancedImageMetadataEnabled(false)
.executionRole("executionRole")
.imagePipelineExecutionSettings(ImagePipelineExecutionSettingsProperty.builder()
.deploymentId("deploymentId")
.onUpdate(false)
.build())
.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())
.infrastructureConfigurationArn("infrastructureConfigurationArn")
.loggingConfiguration(ImageLoggingConfigurationProperty.builder()
.logGroupName("logGroupName")
.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();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnImage.static interfaceThe deletion settings of the image, indicating whether to delete the underlying resources in addition to the image.static interfaceSettings that Image Builder uses to configure the ECR repository and the output container images that Amazon Inspector scans.static interfaceThe logging configuration that's defined for the image.static interfaceThe settings for starting an image pipeline execution.static interfaceContains settings for Image Builder image resource and container image scans.static interfaceWhen 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 interfaceThe latest version references of the image.static interfaceContains control settings and configurable inputs for a workflow resource.static interfaceContains a key/value pair that sets the named workflow parameter.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.imagebuilder.IImageRef
IImageRef.Jsii$Default, IImageRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnImage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnImage(software.amazon.jsii.JsiiObjectRef objRef) Create a newAWS::ImageBuilder::Image.CfnImage(software.constructs.Construct scope, String id, CfnImageProps props) Create a newAWS::ImageBuilder::Image. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarnForImage(IImageRef resource) Returns 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.The latest version references of the image.The Amazon Resource Name (ARN) of the image.The latest version ARN of the created image, with the same major version.The latest version ARN of the created image, with the same minor version.The latest version ARN of the created image, with the same patch version.Returns the name of the image.The Amazon Resource Name (ARN) of the container recipe that defines how images are configured and tested.The deletion settings of the image, indicating whether to delete the underlying resources in addition to the image.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 settings for starting an image pipeline execution.The Amazon Resource Name (ARN) of the image recipe that defines how images are configured, tested, and assessed.A reference to a Image resource.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.The logging configuration that's defined for the image.getTags()Tag Manager which manages the tags for this resource.The tags of the image.Contains an array of workflow configuration objects.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanisCfnImage(Object x) Checks whether the given object is a CfnImage.renderProperties(Map<String, Object> props) voidsetContainerRecipeArn(String value) The Amazon Resource Name (ARN) of the container recipe that defines how images are configured and tested.voidsetDeletionSettings(IResolvable value) The deletion settings of the image, indicating whether to delete the underlying resources in addition to the image.voidThe deletion settings of the image, indicating whether to delete the underlying resources in addition to the image.voidThe Amazon Resource Name (ARN) of the distribution configuration that defines and configures the outputs of your pipeline.voidCollects additional information about the image being created, including the operating system (OS) version and package list.voidCollects additional information about the image being created, including the operating system (OS) version and package list.voidsetExecutionRole(String value) The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to perform workflow actions.voidThe settings for starting an image pipeline execution.voidThe settings for starting an image pipeline execution.voidsetImageRecipeArn(String value) The Amazon Resource Name (ARN) of the image recipe that defines how images are configured, tested, and assessed.voidContains settings for vulnerability scans.voidContains settings for vulnerability scans.voidThe image tests configuration of the image.voidThe image tests configuration of the image.voidThe Amazon Resource Name (ARN) of the infrastructure configuration that defines the environment in which your image will be built and tested.voidThe logging configuration that's defined for the image.voidThe logging configuration that's defined for the image.voidsetTagsRaw(Map<String, String> value) The tags of the image.voidsetWorkflows(List<Object> value) Contains an array of workflow configuration objects.voidsetWorkflows(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, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods 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, @Nullable CfnImageProps props) Create a newAWS::ImageBuilder::Image.- 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.
-
CfnImage
@Stability(Stable) public CfnImage(@NotNull software.constructs.Construct scope, @NotNull String id) Create a newAWS::ImageBuilder::Image.- 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.
-
-
Method Details
-
arnForImage
- Parameters:
resource- This parameter is required.
-
isCfnImage
Checks whether the given object is a CfnImage.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin 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:
renderPropertiesin 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.
-
getAttrLatestVersion
The latest version references of the image. -
getAttrLatestVersionArn
The Amazon Resource Name (ARN) of the image.Semantic versioning is included in each object's Amazon Resource Name (ARN), at the level that applies to that object as follows:
- Versionless ARNs and Name ARNs do not include specific values in any of the nodes. The nodes are either left off entirely, or they are specified as wildcards, for example: x.x.x.
- Version ARNs have only the first three nodes:
. . - Build version ARNs have all four nodes, and point to a specific build for a specific version of an object.
-
getAttrLatestVersionMajor
The latest version ARN of the created image, with the same major version. -
getAttrLatestVersionMinor
The latest version ARN of the created image, with the same minor version. -
getAttrLatestVersionPatch
The latest version ARN of the created image, with the same patch version. -
getAttrName
Returns the name of the image. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getImageRef
A reference to a Image resource.- Specified by:
getImageRefin interfaceIImageRef
-
getTags
Tag Manager which manages the tags for this resource. -
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. -
getDeletionSettings
The deletion settings of the image, indicating whether to delete the underlying resources in addition to the image.Returns union: either
IResolvableorCfnImage.DeletionSettingsProperty -
setDeletionSettings
The deletion settings of the image, indicating whether to delete the underlying resources in addition to the image. -
setDeletionSettings
@Stability(Stable) public void setDeletionSettings(@Nullable CfnImage.DeletionSettingsProperty value) The deletion settings of the image, indicating whether to delete the underlying resources in addition to the image. -
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.Returns union: either
BooleanorIResolvable -
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. -
getImagePipelineExecutionSettings
The settings for starting an image pipeline execution.Returns union: either
IResolvableorCfnImage.ImagePipelineExecutionSettingsProperty -
setImagePipelineExecutionSettings
The settings for starting an image pipeline execution. -
setImagePipelineExecutionSettings
@Stability(Stable) public void setImagePipelineExecutionSettings(@Nullable CfnImage.ImagePipelineExecutionSettingsProperty value) The settings for starting an image pipeline execution. -
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.Returns union: either
IResolvableorCfnImage.ImageScanningConfigurationProperty -
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.Returns union: either
IResolvableorCfnImage.ImageTestsConfigurationProperty -
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. -
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. -
getLoggingConfiguration
The logging configuration that's defined for the image.Returns union: either
IResolvableorCfnImage.ImageLoggingConfigurationProperty -
setLoggingConfiguration
The logging configuration that's defined for the image. -
setLoggingConfiguration
@Stability(Stable) public void setLoggingConfiguration(@Nullable CfnImage.ImageLoggingConfigurationProperty value) The logging configuration that's defined for the image. -
getTagsRaw
The tags of the image. -
setTagsRaw
The tags of the image. -
getWorkflows
Contains an array of workflow configuration objects.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnImage.WorkflowConfigurationProperty> -
setWorkflows
Contains an array of workflow configuration objects. -
setWorkflows
Contains an array of workflow configuration objects.
-