@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)", date="2023-01-31T18:36:46.985Z") public class CfnInfrastructureConfiguration extends CfnResource implements IInspectable
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()) .resourceTags(Map.of( "resourceTagsKey", "resourceTags")) .securityGroupIds(List.of("securityGroupIds")) .snsTopicArn("snsTopicArn") .subnetId("subnetId") .tags(Map.of( "tagsKey", "tags")) .terminateInstanceOnFailure(false) .build();
Modifier and Type | Class and Description |
---|---|
static class |
CfnInfrastructureConfiguration.Builder
A fluent builder for
CfnInfrastructureConfiguration . |
static interface |
CfnInfrastructureConfiguration.InstanceMetadataOptionsProperty
The instance metadata options that apply to the HTTP requests that pipeline builds use to launch EC2 build and test instances.
|
static interface |
CfnInfrastructureConfiguration.LoggingProperty
Logging configuration defines where Image Builder uploads your logs.
|
static interface |
CfnInfrastructureConfiguration.S3LogsProperty
Amazon S3 logging configuration.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnInfrastructureConfiguration(Construct scope,
java.lang.String id,
CfnInfrastructureConfigurationProps props)
Create a new `AWS::ImageBuilder::InfrastructureConfiguration`.
|
protected |
CfnInfrastructureConfiguration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnInfrastructureConfiguration(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttrArn()
Returns the Amazon Resource Name (ARN) of the infrastructure configuration.
|
java.lang.String |
getAttrName()
The name of the infrastructure configuration.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getDescription()
The description of the infrastructure configuration.
|
java.lang.Object |
getInstanceMetadataOptions()
The instance metadata option settings for the infrastructure configuration.
|
java.lang.String |
getInstanceProfileName()
The instance profile of the infrastructure configuration.
|
java.util.List<java.lang.String> |
getInstanceTypes()
The instance types of the infrastructure configuration.
|
java.lang.String |
getKeyPair()
The Amazon EC2 key pair of the infrastructure configuration.
|
java.lang.Object |
getLogging()
The logging configuration defines where Image Builder uploads your logs.
|
java.lang.String |
getName()
The name of the infrastructure configuration.
|
java.lang.Object |
getResourceTags()
The tags attached to the resource created by Image Builder.
|
java.util.List<java.lang.String> |
getSecurityGroupIds()
The security group IDs of the infrastructure configuration.
|
java.lang.String |
getSnsTopicArn()
The Amazon Resource Name (ARN) of the SNS topic for the infrastructure configuration.
|
java.lang.String |
getSubnetId()
The subnet ID of the infrastructure configuration.
|
TagManager |
getTags()
The tags of the infrastructure configuration.
|
java.lang.Object |
getTerminateInstanceOnFailure()
The terminate instance on failure configuration of the infrastructure configuration.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setDescription(java.lang.String value)
The description of the infrastructure configuration.
|
void |
setInstanceMetadataOptions(CfnInfrastructureConfiguration.InstanceMetadataOptionsProperty value)
The instance metadata option settings for the infrastructure configuration.
|
void |
setInstanceMetadataOptions(IResolvable value)
The instance metadata option settings for the infrastructure configuration.
|
void |
setInstanceProfileName(java.lang.String value)
The instance profile of the infrastructure configuration.
|
void |
setInstanceTypes(java.util.List<java.lang.String> value)
The instance types of the infrastructure configuration.
|
void |
setKeyPair(java.lang.String value)
The Amazon EC2 key pair of the infrastructure configuration.
|
void |
setLogging(CfnInfrastructureConfiguration.LoggingProperty value)
The logging configuration defines where Image Builder uploads your logs.
|
void |
setLogging(IResolvable value)
The logging configuration defines where Image Builder uploads your logs.
|
void |
setName(java.lang.String value)
The name of the infrastructure configuration.
|
void |
setResourceTags(IResolvable value)
The tags attached to the resource created by Image Builder.
|
void |
setResourceTags(java.util.Map<java.lang.String,java.lang.String> value)
The tags attached to the resource created by Image Builder.
|
void |
setSecurityGroupIds(java.util.List<java.lang.String> value)
The security group IDs of the infrastructure configuration.
|
void |
setSnsTopicArn(java.lang.String value)
The Amazon Resource Name (ARN) of the SNS topic for the infrastructure configuration.
|
void |
setSubnetId(java.lang.String value)
The subnet ID of the infrastructure configuration.
|
void |
setTerminateInstanceOnFailure(java.lang.Boolean value)
The terminate instance on failure configuration of the infrastructure configuration.
|
void |
setTerminateInstanceOnFailure(IResolvable value)
The terminate instance on failure configuration of the infrastructure configuration.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnInfrastructureConfiguration(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnInfrastructureConfiguration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnInfrastructureConfiguration(Construct scope, java.lang.String id, CfnInfrastructureConfigurationProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrArn()
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+)?)?$
.
public java.lang.String getAttrName()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
public java.lang.String getInstanceProfileName()
public void setInstanceProfileName(java.lang.String value)
public java.lang.String getName()
public void setName(java.lang.String value)
public java.lang.String getDescription()
public void setDescription(java.lang.String value)
public java.lang.Object getInstanceMetadataOptions()
public void setInstanceMetadataOptions(IResolvable value)
public void setInstanceMetadataOptions(CfnInfrastructureConfiguration.InstanceMetadataOptionsProperty value)
public java.util.List<java.lang.String> getInstanceTypes()
public void setInstanceTypes(java.util.List<java.lang.String> value)
public java.lang.String getKeyPair()
public void setKeyPair(java.lang.String value)
public java.lang.Object getLogging()
public void setLogging(IResolvable value)
public void setLogging(CfnInfrastructureConfiguration.LoggingProperty value)
public java.lang.Object getResourceTags()
public void setResourceTags(IResolvable value)
public void setResourceTags(java.util.Map<java.lang.String,java.lang.String> value)
public java.util.List<java.lang.String> getSecurityGroupIds()
public void setSecurityGroupIds(java.util.List<java.lang.String> value)
public java.lang.String getSnsTopicArn()
public void setSnsTopicArn(java.lang.String value)
public java.lang.String getSubnetId()
public void setSubnetId(java.lang.String value)
public java.lang.Object getTerminateInstanceOnFailure()
public void setTerminateInstanceOnFailure(java.lang.Boolean value)
public void setTerminateInstanceOnFailure(IResolvable value)