@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:39.825Z") @Stability(value=Stable) 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.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnInfrastructureConfiguration(software.constructs.Construct scope,
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 |
|---|---|
String |
getAttrArn()
Returns the Amazon Resource Name (ARN) of the infrastructure configuration.
|
String |
getAttrName()
The name of the infrastructure configuration.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getDescription()
The description of the infrastructure configuration.
|
Object |
getInstanceMetadataOptions()
The instance metadata option settings for the infrastructure configuration.
|
String |
getInstanceProfileName()
The instance profile of the infrastructure configuration.
|
List<String> |
getInstanceTypes()
The instance types of the infrastructure configuration.
|
String |
getKeyPair()
The Amazon EC2 key pair of the infrastructure configuration.
|
Object |
getLogging()
The logging configuration defines where Image Builder uploads your logs.
|
String |
getName()
The name of the infrastructure configuration.
|
Object |
getResourceTags()
The tags attached to the resource created by Image Builder.
|
List<String> |
getSecurityGroupIds()
The security group IDs of the infrastructure configuration.
|
String |
getSnsTopicArn()
The Amazon Resource Name (ARN) of the SNS topic for the infrastructure configuration.
|
String |
getSubnetId()
The subnet ID of the infrastructure configuration.
|
TagManager |
getTags()
The tags of the infrastructure configuration.
|
Object |
getTerminateInstanceOnFailure()
The terminate instance on failure configuration of the infrastructure configuration.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setDescription(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(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(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(String value)
The name of the infrastructure configuration.
|
void |
setResourceTags(IResolvable value)
The tags attached to the resource created by Image Builder.
|
void |
setResourceTags(Map<String,String> 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 |
setTerminateInstanceOnFailure(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, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnInfrastructureConfiguration(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnInfrastructureConfiguration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnInfrastructureConfiguration(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
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.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public 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+)?)?$ .
@Stability(value=Stable) @NotNull public String getAttrName()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
@Stability(value=Stable) @NotNull public String getInstanceProfileName()
@Stability(value=Stable)
public void setInstanceProfileName(@NotNull
String value)
@Stability(value=Stable) @NotNull public String getName()
@Stability(value=Stable)
public void setName(@NotNull
String value)
@Stability(value=Stable) @Nullable public String getDescription()
@Stability(value=Stable)
public void setDescription(@Nullable
String value)
@Stability(value=Stable) @Nullable public Object getInstanceMetadataOptions()
@Stability(value=Stable)
public void setInstanceMetadataOptions(@Nullable
CfnInfrastructureConfiguration.InstanceMetadataOptionsProperty value)
@Stability(value=Stable)
public void setInstanceMetadataOptions(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public List<String> getInstanceTypes()
@Stability(value=Stable)
public void setInstanceTypes(@Nullable
List<String> value)
@Stability(value=Stable) @Nullable public String getKeyPair()
@Stability(value=Stable)
public void setKeyPair(@Nullable
String value)
@Stability(value=Stable) @Nullable public Object getLogging()
@Stability(value=Stable)
public void setLogging(@Nullable
CfnInfrastructureConfiguration.LoggingProperty value)
@Stability(value=Stable)
public void setLogging(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public Object getResourceTags()
@Stability(value=Stable)
public void setResourceTags(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setResourceTags(@Nullable
Map<String,String> value)
@Stability(value=Stable) @Nullable public List<String> getSecurityGroupIds()
@Stability(value=Stable)
public void setSecurityGroupIds(@Nullable
List<String> value)
@Stability(value=Stable) @Nullable public String getSnsTopicArn()
@Stability(value=Stable)
public void setSnsTopicArn(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getSubnetId()
@Stability(value=Stable)
public void setSubnetId(@Nullable
String value)
@Stability(value=Stable) @Nullable public Object getTerminateInstanceOnFailure()
@Stability(value=Stable)
public void setTerminateInstanceOnFailure(@Nullable
Boolean value)
@Stability(value=Stable)
public void setTerminateInstanceOnFailure(@Nullable
IResolvable value)
Copyright © 2022. All rights reserved.