imagebuilder.Client.
create_infrastructure_configuration
(**kwargs)¶Creates a new infrastructure configuration. An infrastructure configuration defines the environment in which your image will be built and tested.
See also: AWS API Documentation
Request Syntax
response = client.create_infrastructure_configuration(
name='string',
description='string',
instanceTypes=[
'string',
],
instanceProfileName='string',
securityGroupIds=[
'string',
],
subnetId='string',
logging={
's3Logs': {
's3BucketName': 'string',
's3KeyPrefix': 'string'
}
},
keyPair='string',
terminateInstanceOnFailure=True|False,
snsTopicArn='string',
resourceTags={
'string': 'string'
},
instanceMetadataOptions={
'httpTokens': 'string',
'httpPutResponseHopLimit': 123
},
tags={
'string': 'string'
},
clientToken='string'
)
[REQUIRED]
The name of the infrastructure configuration.
The instance types of the infrastructure configuration. 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.
[REQUIRED]
The instance profile to associate with the instance used to customize your Amazon EC2 AMI.
The security group IDs to associate with the instance used to customize your Amazon EC2 AMI.
The logging configuration of the infrastructure configuration.
The Amazon S3 logging configuration.
The S3 bucket in which to store the logs.
The Amazon S3 path to the bucket where the logs are stored.
The Amazon Resource Name (ARN) for the SNS topic to which we send image build event notifications.
Note
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.
The tags attached to the resource created by Image Builder.
The instance metadata options that you can set for the HTTP requests that pipeline builds use to launch EC2 build and test instances.
Indicates whether a signed token header is required for instance metadata retrieval requests. The values affect the response as follows:
The default setting is optional .
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.
The tags of the infrastructure configuration.
[REQUIRED]
The idempotency token used to make this request idempotent.
This field is autopopulated if not provided.
dict
Response Syntax
{
'requestId': 'string',
'clientToken': 'string',
'infrastructureConfigurationArn': 'string'
}
Response Structure
(dict) --
requestId (string) --
The request ID that uniquely identifies this request.
clientToken (string) --
The idempotency token used to make this request idempotent.
infrastructureConfigurationArn (string) --
The Amazon Resource Name (ARN) of the infrastructure configuration that was created by this request.
Exceptions
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.IdempotentParameterMismatchException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
imagebuilder.Client.exceptions.ResourceInUseException
imagebuilder.Client.exceptions.ResourceAlreadyExistsException
imagebuilder.Client.exceptions.ServiceQuotaExceededException