CfnInfrastructureConfigurationProps Struct
Properties for defining a CfnInfrastructureConfiguration.
| Source | |
|---|---|
| Type last changed |
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_imagebuilder as imagebuilder } from 'aws-cdk-lib';
const cfnInfrastructureConfigurationProps: imagebuilder.CfnInfrastructureConfigurationProps = {
instanceProfileName: 'instanceProfileName',
name: 'name',
// the properties below are optional
description: 'description',
instanceMetadataOptions: {
httpPutResponseHopLimit: 123,
httpTokens: 'httpTokens',
},
instanceTypes: ['instanceTypes'],
keyPair: 'keyPair',
logging: {
s3Logs: {
s3BucketName: 's3BucketName',
s3KeyPrefix: 's3KeyPrefix',
},
},
parentInstance: {
autoScalingGroup: {
name: 'name',
// the properties below are optional
capacityWaitTimeoutSeconds: 123,
},
},
placement: {
availabilityZone: 'availabilityZone',
hostId: 'hostId',
hostResourceGroupArn: 'hostResourceGroupArn',
tenancy: 'tenancy',
},
resourceTags: {
resourceTagsKey: 'resourceTags',
},
securityGroupIds: ['securityGroupIds'],
snsTopicArn: 'snsTopicArn',
subnetId: 'subnetId',
tags: {
tagsKey: 'tags',
},
terminateInstanceOnCompletion: false,
terminateInstanceOnFailure: false,
};
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_imagebuilder as imagebuilder
cfn_infrastructure_configuration_props = imagebuilder.CfnInfrastructureConfigurationProps(
instance_profile_name="instanceProfileName",
name="name",
# the properties below are optional
description="description",
instance_metadata_options=imagebuilder.CfnInfrastructureConfiguration.InstanceMetadataOptionsProperty(
http_put_response_hop_limit=123,
http_tokens="httpTokens"
),
instance_types=["instanceTypes"],
key_pair="keyPair",
logging=imagebuilder.CfnInfrastructureConfiguration.LoggingProperty(
s3_logs=imagebuilder.CfnInfrastructureConfiguration.S3LogsProperty(
s3_bucket_name="s3BucketName",
s3_key_prefix="s3KeyPrefix"
)
),
parent_instance=imagebuilder.CfnInfrastructureConfiguration.ParentInstanceProperty(
auto_scaling_group=imagebuilder.CfnInfrastructureConfiguration.AutoScalingGroupProperty(
name="name",
# the properties below are optional
capacity_wait_timeout_seconds=123
)
),
placement=imagebuilder.CfnInfrastructureConfiguration.PlacementProperty(
availability_zone="availabilityZone",
host_id="hostId",
host_resource_group_arn="hostResourceGroupArn",
tenancy="tenancy"
),
resource_tags={
"resource_tags_key": "resourceTags"
},
security_group_ids=["securityGroupIds"],
sns_topic_arn="snsTopicArn",
subnet_id="subnetId",
tags={
"tags_key": "tags"
},
terminate_instance_on_completion=False,
terminate_instance_on_failure=False
)
// 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.*;
CfnInfrastructureConfigurationProps cfnInfrastructureConfigurationProps = CfnInfrastructureConfigurationProps.builder()
.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())
.parentInstance(ParentInstanceProperty.builder()
.autoScalingGroup(AutoScalingGroupProperty.builder()
.name("name")
// the properties below are optional
.capacityWaitTimeoutSeconds(123)
.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"))
.terminateInstanceOnCompletion(false)
.terminateInstanceOnFailure(false)
.build();
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ImageBuilder;
var cfnInfrastructureConfigurationProps = new CfnInfrastructureConfigurationProps {
InstanceProfileName = "instanceProfileName",
Name = "name",
// the properties below are optional
Description = "description",
InstanceMetadataOptions = new InstanceMetadataOptionsProperty {
HttpPutResponseHopLimit = 123,
HttpTokens = "httpTokens"
},
InstanceTypes = new [] { "instanceTypes" },
KeyPair = "keyPair",
Logging = new LoggingProperty {
S3Logs = new S3LogsProperty {
S3BucketName = "s3BucketName",
S3KeyPrefix = "s3KeyPrefix"
}
},
ParentInstance = new ParentInstanceProperty {
AutoScalingGroup = new AutoScalingGroupProperty {
Name = "name",
// the properties below are optional
CapacityWaitTimeoutSeconds = 123
}
},
Placement = new PlacementProperty {
AvailabilityZone = "availabilityZone",
HostId = "hostId",
HostResourceGroupArn = "hostResourceGroupArn",
Tenancy = "tenancy"
},
ResourceTags = new Dictionary<string, string> {
{ "resourceTagsKey", "resourceTags" }
},
SecurityGroupIds = new [] { "securityGroupIds" },
SnsTopicArn = "snsTopicArn",
SubnetId = "subnetId",
Tags = new Dictionary<string, string> {
{ "tagsKey", "tags" }
},
TerminateInstanceOnCompletion = false,
TerminateInstanceOnFailure = false
};
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cfnInfrastructureConfigurationProps := &CfnInfrastructureConfigurationProps{
InstanceProfileName: jsii.String("instanceProfileName"),
Name: jsii.String("name"),
// the properties below are optional
Description: jsii.String("description"),
InstanceMetadataOptions: &InstanceMetadataOptionsProperty{
HttpPutResponseHopLimit: jsii.Number(123),
HttpTokens: jsii.String("httpTokens"),
},
InstanceTypes: []*string{
jsii.String("instanceTypes"),
},
KeyPair: jsii.String("keyPair"),
Logging: &LoggingProperty{
S3Logs: &S3LogsProperty{
S3BucketName: jsii.String("s3BucketName"),
S3KeyPrefix: jsii.String("s3KeyPrefix"),
},
},
ParentInstance: &ParentInstanceProperty{
AutoScalingGroup: &AutoScalingGroupProperty{
Name: jsii.String("name"),
// the properties below are optional
CapacityWaitTimeoutSeconds: jsii.Number(123),
},
},
Placement: &PlacementProperty{
AvailabilityZone: jsii.String("availabilityZone"),
HostId: jsii.String("hostId"),
HostResourceGroupArn: jsii.String("hostResourceGroupArn"),
Tenancy: jsii.String("tenancy"),
},
ResourceTags: map[string]*string{
"resourceTagsKey": jsii.String("resourceTags"),
},
SecurityGroupIds: []*string{
jsii.String("securityGroupIds"),
},
SnsTopicArn: jsii.String("snsTopicArn"),
SubnetId: jsii.String("subnetId"),
Tags: map[string]*string{
"tagsKey": jsii.String("tags"),
},
TerminateInstanceOnCompletion: jsii.Boolean(false),
TerminateInstanceOnFailure: jsii.Boolean(false),
}
Properties
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #instanceMetadataOptionsoptionalIResolvable | CfnInfrastructureConfiguration.instance_metadata_optionsoptionaltyping.Union[IResolvable, InstanceMetadataOptionsProperty]instanceMetadataOptionsoptionalIResolvableInstanceMetadataOptionsoptionalIResolvableInstanceMetadataOptionsoptionalinterface{} #instanceProfileNamestring | IInstanceProfileRefinstance_profile_nametyping.Union[str, IInstanceProfileRef]instanceProfileNameStringInstanceProfileNamestringInstanceProfileNameinterface{} required #instanceTypesoptionalstring[]instance_typesoptionaltyping.List[str]instanceTypesoptionalList<String>InstanceTypesoptionalstring[]InstanceTypesoptional*[]*string #You can specify one or more instance types to use for this build. The service will pick one of these instance types based on availability.
keyPairoptionalstringkey_pairoptionalstrkeyPairoptionalStringKeyPairoptionalstringKeyPairoptional*string #You can use this to log on to and debug the instance used to create your image.
loggingoptionalIResolvable | CfnInfrastructureConfiguration.loggingoptionaltyping.Union[IResolvable, LoggingProperty]loggingoptionalIResolvableLoggingoptionalIResolvableLoggingoptionalinterface{} #parentInstanceoptionalIResolvable | CfnInfrastructureConfiguration.parent_instanceoptionaltyping.Union[IResolvable, ParentInstanceProperty]parentInstanceoptionalIResolvableParentInstanceoptionalIResolvableParentInstanceoptionalinterface{} #placementoptionalIResolvable | CfnInfrastructureConfiguration.placementoptionaltyping.Union[IResolvable, PlacementProperty]placementoptionalIResolvablePlacementoptionalIResolvablePlacementoptionalinterface{} #resourceTagsoptionalIResolvable | { [key: string]: string }resource_tagsoptionaltyping.Union[IResolvable, typing.Mapping[str, str]]resourceTagsoptionalIResolvableResourceTagsoptionalIResolvableResourceTagsoptionalinterface{} #Tags are formatted as key value pairs.
securityGroupIdsoptionalstring[]security_group_idsoptionaltyping.List[str]securityGroupIdsoptionalList<String>SecurityGroupIdsoptionalstring[]SecurityGroupIdsoptional*[]*string #snsTopicArnoptionalstring | ITopicRefsns_topic_arnoptionaltyping.Union[str, ITopicRef]snsTopicArnoptionalStringSnsTopicArnoptionalstringSnsTopicArnoptionalinterface{} #EC2 Image Builder is unable to send notifications to SNS topics that are encrypted using keys from other accounts. The key that is used to encrypt the SNS topic must reside in the account that the Image Builder service runs under.
subnetIdoptionalstringsubnet_idoptionalstrsubnetIdoptionalStringSubnetIdoptionalstringSubnetIdoptional*string #tagsoptional{ [key: string]: string }tagsoptionaltyping.Mapping[str, str]tagsoptionalMap<String, String>TagsoptionalIDictionary<string, string>Tagsoptional*map[string]*string #Tags are formatted as key value pairs.
terminateInstanceOnCompletionoptionalboolean | IResolvableterminate_instance_on_completionoptionaltyping.Union[bool, IResolvable]terminateInstanceOnCompletionoptionalBooleanTerminateInstanceOnCompletionoptionalboolTerminateInstanceOnCompletionoptionalinterface{} #A TerminateInstance step in a workflow runs even when this is false.
terminateInstanceOnFailureoptionalboolean | IResolvableterminate_instance_on_failureoptionaltyping.Union[bool, IResolvable]terminateInstanceOnFailureoptionalBooleanTerminateInstanceOnFailureoptionalboolTerminateInstanceOnFailureoptionalinterface{} #Set to false if you want Image Builder to retain the instance used to configure your AMI if the build or test phase of your workflow fails.