CfnInfrastructureConfigurationPropsMixin
- class aws_cdk.mixins_preview.aws_imagebuilder.mixins.CfnInfrastructureConfigurationPropsMixin(props, *, strategy=None)
Bases:
MixinCreates a new infrastructure configuration.
An infrastructure configuration defines the environment in which your image will be built and tested.
- See:
- CloudformationResource:
AWS::ImageBuilder::InfrastructureConfiguration
- Mixin:
true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview import mixins from aws_cdk.mixins_preview.aws_imagebuilder import mixins as imagebuilder_mixins cfn_infrastructure_configuration_props_mixin = imagebuilder_mixins.CfnInfrastructureConfigurationPropsMixin(imagebuilder_mixins.CfnInfrastructureConfigurationMixinProps( description="description", instance_metadata_options=imagebuilder_mixins.CfnInfrastructureConfigurationPropsMixin.InstanceMetadataOptionsProperty( http_put_response_hop_limit=123, http_tokens="httpTokens" ), instance_profile_name="instanceProfileName", instance_types=["instanceTypes"], key_pair="keyPair", logging=imagebuilder_mixins.CfnInfrastructureConfigurationPropsMixin.LoggingProperty( s3_logs=imagebuilder_mixins.CfnInfrastructureConfigurationPropsMixin.S3LogsProperty( s3_bucket_name="s3BucketName", s3_key_prefix="s3KeyPrefix" ) ), name="name", placement=imagebuilder_mixins.CfnInfrastructureConfigurationPropsMixin.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_failure=False ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::ImageBuilder::InfrastructureConfiguration.- Parameters:
props (
Union[CfnInfrastructureConfigurationMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['description', 'instanceMetadataOptions', 'instanceProfileName', 'instanceTypes', 'keyPair', 'logging', 'name', 'placement', 'resourceTags', 'securityGroupIds', 'snsTopicArn', 'subnetId', 'tags', 'terminateInstanceOnFailure']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
InstanceMetadataOptionsProperty
- class CfnInfrastructureConfigurationPropsMixin.InstanceMetadataOptionsProperty(*, http_put_response_hop_limit=None, http_tokens=None)
Bases:
objectThe instance metadata options that apply to the HTTP requests that pipeline builds use to launch EC2 build and test instances.
For more information about instance metadata options, see Configure the instance metadata options in the Amazon EC2 User Guide for Linux instances, or Configure the instance metadata options in the Amazon EC2 Windows Guide for Windows instances.
- Parameters:
http_put_response_hop_limit (
Union[int,float,None]) – Limit the number of hops that an instance metadata request can traverse to reach its destination. The default is one hop. However, if HTTP tokens are required, container image builds need a minimum of two hops.http_tokens (
Optional[str]) – Indicates whether a signed token header is required for instance metadata retrieval requests. The values affect the response as follows: - required – When you retrieve the IAM role credentials, version 2.0 credentials are returned in all cases. - optional – You can include a signed token header in your request to retrieve instance metadata, or you can leave it out. If you include it, version 2.0 credentials are returned for the IAM role. Otherwise, version 1.0 credentials are returned. The default setting is optional .
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_imagebuilder import mixins as imagebuilder_mixins instance_metadata_options_property = imagebuilder_mixins.CfnInfrastructureConfigurationPropsMixin.InstanceMetadataOptionsProperty( http_put_response_hop_limit=123, http_tokens="httpTokens" )
Attributes
- http_put_response_hop_limit
Limit the number of hops that an instance metadata request can traverse to reach its destination.
The default is one hop. However, if HTTP tokens are required, container image builds need a minimum of two hops.
- http_tokens
Indicates whether a signed token header is required for instance metadata retrieval requests.
The values affect the response as follows:
required – When you retrieve the IAM role credentials, version 2.0 credentials are returned in all cases.
optional – You can include a signed token header in your request to retrieve instance metadata, or you can leave it out. If you include it, version 2.0 credentials are returned for the IAM role. Otherwise, version 1.0 credentials are returned.
The default setting is optional .
LoggingProperty
- class CfnInfrastructureConfigurationPropsMixin.LoggingProperty(*, s3_logs=None)
Bases:
objectLogging configuration defines where Image Builder uploads your logs.
- Parameters:
s3_logs (
Union[IResolvable,S3LogsProperty,Dict[str,Any],None]) – The Amazon S3 logging configuration.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_imagebuilder import mixins as imagebuilder_mixins logging_property = imagebuilder_mixins.CfnInfrastructureConfigurationPropsMixin.LoggingProperty( s3_logs=imagebuilder_mixins.CfnInfrastructureConfigurationPropsMixin.S3LogsProperty( s3_bucket_name="s3BucketName", s3_key_prefix="s3KeyPrefix" ) )
Attributes
- s3_logs
The Amazon S3 logging configuration.
PlacementProperty
- class CfnInfrastructureConfigurationPropsMixin.PlacementProperty(*, availability_zone=None, host_id=None, host_resource_group_arn=None, tenancy=None)
Bases:
objectBy default, EC2 instances run on shared tenancy hardware.
This means that multiple AWS accounts might share the same physical hardware. When you use dedicated hardware, the physical server that hosts your instances is dedicated to your AWS account . Instance placement settings contain the details for the physical hardware where instances that Image Builder launches during image creation will run.
- Parameters:
availability_zone (
Optional[str]) – The Availability Zone where your build and test instances will launch.host_id (
Optional[str]) – The ID of the Dedicated Host on which build and test instances run. This only applies iftenancyishost. If you specify the host ID, you must not specify the resource group ARN. If you specify both, Image Builder returns an error.host_resource_group_arn (
Optional[str]) – The Amazon Resource Name (ARN) of the host resource group in which to launch build and test instances. This only applies iftenancyishost. If you specify the resource group ARN, you must not specify the host ID. If you specify both, Image Builder returns an error.tenancy (
Optional[str]) – The tenancy of the instance. An instance with a tenancy ofdedicatedruns on single-tenant hardware. An instance with a tenancy ofhostruns on a Dedicated Host. If tenancy is set tohost, then you can optionally specify one target for placement – either host ID or host resource group ARN. If automatic placement is enabled for your host, and you don’t specify any placement target, Amazon EC2 will try to find an available host for your build and test instances.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_imagebuilder import mixins as imagebuilder_mixins placement_property = imagebuilder_mixins.CfnInfrastructureConfigurationPropsMixin.PlacementProperty( availability_zone="availabilityZone", host_id="hostId", host_resource_group_arn="hostResourceGroupArn", tenancy="tenancy" )
Attributes
- availability_zone
The Availability Zone where your build and test instances will launch.
- host_id
The ID of the Dedicated Host on which build and test instances run.
This only applies if
tenancyishost. If you specify the host ID, you must not specify the resource group ARN. If you specify both, Image Builder returns an error.
- host_resource_group_arn
The Amazon Resource Name (ARN) of the host resource group in which to launch build and test instances.
This only applies if
tenancyishost. If you specify the resource group ARN, you must not specify the host ID. If you specify both, Image Builder returns an error.
- tenancy
The tenancy of the instance.
An instance with a tenancy of
dedicatedruns on single-tenant hardware. An instance with a tenancy ofhostruns on a Dedicated Host.If tenancy is set to
host, then you can optionally specify one target for placement – either host ID or host resource group ARN. If automatic placement is enabled for your host, and you don’t specify any placement target, Amazon EC2 will try to find an available host for your build and test instances.
S3LogsProperty
- class CfnInfrastructureConfigurationPropsMixin.S3LogsProperty(*, s3_bucket_name=None, s3_key_prefix=None)
Bases:
objectAmazon S3 logging configuration.
- Parameters:
s3_bucket_name (
Optional[str]) – The S3 bucket in which to store the logs.s3_key_prefix (
Optional[str]) – The Amazon S3 path to the bucket where the logs are stored.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_imagebuilder import mixins as imagebuilder_mixins s3_logs_property = imagebuilder_mixins.CfnInfrastructureConfigurationPropsMixin.S3LogsProperty( s3_bucket_name="s3BucketName", s3_key_prefix="s3KeyPrefix" )
Attributes
- s3_bucket_name
The S3 bucket in which to store the logs.
- s3_key_prefix
The Amazon S3 path to the bucket where the logs are stored.