Class CfnInfrastructureConfiguration
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.CfnInfrastructureConfiguration
- 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-12-17T21:37:32.335Z")
@Stability(Stable)
public class CfnInfrastructureConfiguration
extends CfnResource
implements IInspectable, ITaggable
The infrastructure configuration allows you to specify the infrastructure within which to build and test your image.
In the infrastructure configuration, you can specify instance types, subnets, and security groups to associate with your instance. You can also associate an Amazon EC2 key pair with the instance used to build your image. This allows you to log on to your instance to troubleshoot if your build fails and you set terminateInstanceOnFailure to false.
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.*; CfnInfrastructureConfiguration cfnInfrastructureConfiguration = CfnInfrastructureConfiguration.Builder.create(this, "MyCfnInfrastructureConfiguration") .instanceProfileName("instanceProfileName") .name("name") // the properties below are optional .description("description") .instanceMetadataOptions(InstanceMetadataOptionsProperty.builder() .httpPutResponseHopLimit(123) .httpTokens("httpTokens") .build()) .instanceTypes(List.of("instanceTypes")) .keyPair("keyPair") .logging(LoggingProperty.builder() .s3Logs(S3LogsProperty.builder() .s3BucketName("s3BucketName") .s3KeyPrefix("s3KeyPrefix") .build()) .build()) .placement(PlacementProperty.builder() .availabilityZone("availabilityZone") .hostId("hostId") .hostResourceGroupArn("hostResourceGroupArn") .tenancy("tenancy") .build()) .resourceTags(Map.of( "resourceTagsKey", "resourceTags")) .securityGroupIds(List.of("securityGroupIds")) .snsTopicArn("snsTopicArn") .subnetId("subnetId") .tags(Map.of( "tagsKey", "tags")) .terminateInstanceOnFailure(false) .build();
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent builder forCfnInfrastructureConfiguration
.static interface
The instance metadata options that apply to the HTTP requests that pipeline builds use to launch EC2 build and test instances.static interface
Logging configuration defines where Image Builder uploads your logs.static interface
By default, EC2 instances run on shared tenancy hardware.static interface
Amazon S3 logging configuration.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
CfnInfrastructureConfiguration
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnInfrastructureConfiguration
(software.amazon.jsii.JsiiObjectRef objRef) CfnInfrastructureConfiguration
(software.constructs.Construct scope, String id, CfnInfrastructureConfigurationProps props) -
Method Summary
Modifier and TypeMethodDescriptionReturns the Amazon Resource Name (ARN) of the infrastructure configuration.The name of the infrastructure configuration.The description of the infrastructure configuration.The instance metadata option settings for the infrastructure configuration.The instance profile of the infrastructure configuration.The instance types of the infrastructure configuration.The Amazon EC2 key pair of the infrastructure configuration.The logging configuration defines where Image Builder uploads your logs.getName()
The name of the infrastructure configuration.The instance placement settings that define where the instances that are launched from your image will run.The tags attached to the resource created by Image Builder.The security group IDs of the infrastructure configuration.The Amazon Resource Name (ARN) of the SNS topic for the infrastructure configuration.The subnet ID of the infrastructure configuration.getTags()
Tag Manager which manages the tags for this resource.The tags of the infrastructure configuration.The terminate instance on failure configuration of the infrastructure configuration.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setDescription
(String value) The description of the infrastructure configuration.void
The instance metadata option settings for the infrastructure configuration.void
The instance metadata option settings for the infrastructure configuration.void
setInstanceProfileName
(String value) The instance profile of the infrastructure configuration.void
setInstanceTypes
(List<String> value) The instance types of the infrastructure configuration.void
setKeyPair
(String value) The Amazon EC2 key pair of the infrastructure configuration.void
setLogging
(IResolvable value) The logging configuration defines where Image Builder uploads your logs.void
The logging configuration defines where Image Builder uploads your logs.void
The name of the infrastructure configuration.void
setPlacement
(IResolvable value) The instance placement settings that define where the instances that are launched from your image will run.void
The instance placement settings that define where the instances that are launched from your image will run.void
setResourceTags
(Map<String, String> value) The tags attached to the resource created by Image Builder.void
setResourceTags
(IResolvable value) The tags attached to the resource created by Image Builder.void
setSecurityGroupIds
(List<String> value) The security group IDs of the infrastructure configuration.void
setSnsTopicArn
(String value) The Amazon Resource Name (ARN) of the SNS topic for the infrastructure configuration.void
setSubnetId
(String value) The subnet ID of the infrastructure configuration.void
setTagsRaw
(Map<String, String> value) The tags of the infrastructure configuration.void
The terminate instance on failure configuration of the infrastructure configuration.void
The terminate instance on failure configuration of the infrastructure configuration.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
-
CfnInfrastructureConfiguration
protected CfnInfrastructureConfiguration(software.amazon.jsii.JsiiObjectRef objRef) -
CfnInfrastructureConfiguration
protected CfnInfrastructureConfiguration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnInfrastructureConfiguration
@Stability(Stable) public CfnInfrastructureConfiguration(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnInfrastructureConfigurationProps 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 infrastructure configuration.The following pattern is applied:
^arn:aws[^:]*:imagebuilder:[^:]+:(?:\d{12}|aws):(?:image-recipe|infrastructure-configuration|distribution-configuration|component|image|image-pipeline)/[a-z0-9-_]+(?:/(?:(?:x|\d+)\.(?:x|\d+)\.(?:x|\d+))(?:/\d+)?)?$
. -
getAttrName
The name of the infrastructure configuration. -
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getInstanceProfileName
The instance profile of the infrastructure configuration. -
setInstanceProfileName
The instance profile of the infrastructure configuration. -
getName
The name of the infrastructure configuration. -
setName
The name of the infrastructure configuration. -
getDescription
The description of the infrastructure configuration. -
setDescription
The description of the infrastructure configuration. -
getInstanceMetadataOptions
The instance metadata option settings for the infrastructure configuration. -
setInstanceMetadataOptions
The instance metadata option settings for the infrastructure configuration. -
setInstanceMetadataOptions
@Stability(Stable) public void setInstanceMetadataOptions(@Nullable CfnInfrastructureConfiguration.InstanceMetadataOptionsProperty value) The instance metadata option settings for the infrastructure configuration. -
getInstanceTypes
The instance types of the infrastructure configuration. -
setInstanceTypes
The instance types of the infrastructure configuration. -
getKeyPair
The Amazon EC2 key pair of the infrastructure configuration. -
setKeyPair
The Amazon EC2 key pair of the infrastructure configuration. -
getLogging
The logging configuration defines where Image Builder uploads your logs. -
setLogging
The logging configuration defines where Image Builder uploads your logs. -
setLogging
@Stability(Stable) public void setLogging(@Nullable CfnInfrastructureConfiguration.LoggingProperty value) The logging configuration defines where Image Builder uploads your logs. -
getPlacement
The instance placement settings that define where the instances that are launched from your image will run. -
setPlacement
The instance placement settings that define where the instances that are launched from your image will run. -
setPlacement
@Stability(Stable) public void setPlacement(@Nullable CfnInfrastructureConfiguration.PlacementProperty value) The instance placement settings that define where the instances that are launched from your image will run. -
getResourceTags
The tags attached to the resource created by Image Builder. -
setResourceTags
The tags attached to the resource created by Image Builder. -
setResourceTags
The tags attached to the resource created by Image Builder. -
getSecurityGroupIds
The security group IDs of the infrastructure configuration. -
setSecurityGroupIds
The security group IDs of the infrastructure configuration. -
getSnsTopicArn
The Amazon Resource Name (ARN) of the SNS topic for the infrastructure configuration. -
setSnsTopicArn
The Amazon Resource Name (ARN) of the SNS topic for the infrastructure configuration. -
getSubnetId
The subnet ID of the infrastructure configuration. -
setSubnetId
The subnet ID of the infrastructure configuration. -
getTagsRaw
The tags of the infrastructure configuration. -
setTagsRaw
The tags of the infrastructure configuration. -
getTerminateInstanceOnFailure
The terminate instance on failure configuration of the infrastructure configuration. -
setTerminateInstanceOnFailure
The terminate instance on failure configuration of the infrastructure configuration. -
setTerminateInstanceOnFailure
The terminate instance on failure configuration of the infrastructure configuration.
-