infrastructure_configurations
Creates, updates, deletes, gets or lists an infrastructure_configurations resource.
Overview
| Name | infrastructure_configurations |
| Type | Resource |
| Id | aws.imagebuilder.infrastructure_configurations |
Fields
The following fields are returned by SELECT queries:
- get_infrastructure_configuration
- list_infrastructure_configurations
| Name | Datatype | Description |
|---|---|---|
infrastructure_configuration | object | The infrastructure configuration object. |
request_id | string | The request ID that uniquely identifies this request. |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the infrastructure configuration. (pattern: <code>^[-_A-Za-z-0-9][-_A-Za-z0-9 ]{1,126}[-_A-Za-z-0-9]$</code>) |
arn | string | The Amazon Resource Name (ARN) of the infrastructure configuration. (pattern: <code>^arn:aws[^:]*:imagebuilder:[^:]+:(?:[0-9]{12}|aws(?:-[a-z-]+)?):(?:image-recipe|container-recipe|infrastructure-configuration|distribution-configuration|component|image|image-pipeline|lifecycle-policy|workflow/(?:build|test|distribution))/[a-z0-9-_]+(?:/(?:(?:x|[0-9]+).(?:x|[0-9]+).(?:x|[0-9]+))(?:/[0-9]+)?)?$</code>) |
date_created | string | The date on which the infrastructure configuration was created. |
date_updated | string | The date on which the infrastructure configuration was last updated. |
description | string | The description of the infrastructure configuration. |
instance_profile_name | string | The instance profile of the infrastructure configuration. (pattern: <code>^[\w+=,.@-]+$</code>) |
instance_types | array | The instance types of the infrastructure configuration. |
placement | object | By default, EC2 instances run on shared tenancy hardware. This means that multiple Amazon Web Services accounts might share the same physical hardware. When you use dedicated hardware, the physical server that hosts your instances is dedicated to your Amazon Web Services account. Instance placement settings contain the details for the physical hardware where instances that Image Builder launches during image creation will run. |
resource_tags | object | The tags attached to the image created by Image Builder. |
tags | object | The tags of the infrastructure configuration. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_infrastructure_configuration | select | infrastructureConfigurationArn, region | Gets an infrastructure configuration. | |
list_infrastructure_configurations | select | region | Returns a list of infrastructure configurations. | |
create_infrastructure_configuration | insert | region, name, instanceProfileName, clientToken | Creates a new infrastructure configuration. An infrastructure configuration defines the environment in which your image will be built and tested. | |
update_infrastructure_configuration | update | region, infrastructureConfigurationArn, instanceProfileName, clientToken | Updates a new infrastructure configuration. An infrastructure configuration defines the environment in which your image will be built and tested. | |
delete_infrastructure_configuration | delete | infrastructureConfigurationArn, region | Deletes an infrastructure configuration. | |
import_disk_image | exec | region, name, semanticVersion, platform, osVersion, infrastructureConfigurationArn, uri, clientToken | Import a Windows operating system image from a verified Microsoft ISO disk file. The following disk images are supported: Windows 11 Enterprise |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
infrastructureConfigurationArn | string | The Amazon Resource Name (ARN) of the infrastructure configuration to delete. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_infrastructure_configuration
- list_infrastructure_configurations
Gets an infrastructure configuration.
SELECT
infrastructure_configuration,
request_id
FROM aws.imagebuilder.infrastructure_configurations
WHERE infrastructureConfigurationArn = '{{ infrastructureConfigurationArn }}' -- required
AND region = '{{ region }}' -- required
;
Returns a list of infrastructure configurations.
SELECT
name,
arn,
date_created,
date_updated,
description,
instance_profile_name,
instance_types,
placement,
resource_tags,
tags
FROM aws.imagebuilder.infrastructure_configurations
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_infrastructure_configuration
- Manifest
Creates a new infrastructure configuration. An infrastructure configuration defines the environment in which your image will be built and tested.
INSERT INTO aws.imagebuilder.infrastructure_configurations (
name,
description,
instanceTypes,
instanceProfileName,
securityGroupIds,
subnetId,
logging,
keyPair,
terminateInstanceOnFailure,
snsTopicArn,
resourceTags,
instanceMetadataOptions,
tags,
placement,
clientToken,
region
)
SELECT
'{{ name }}' /* required */,
'{{ description }}',
'{{ instanceTypes }}',
'{{ instanceProfileName }}' /* required */,
'{{ securityGroupIds }}',
'{{ subnetId }}',
'{{ logging }}',
'{{ keyPair }}',
{{ terminateInstanceOnFailure }},
'{{ snsTopicArn }}',
'{{ resourceTags }}',
'{{ instanceMetadataOptions }}',
'{{ tags }}',
'{{ placement }}',
'{{ clientToken }}' /* required */,
'{{ region }}'
RETURNING
client_token,
infrastructure_configuration_arn,
request_id
;
# Description fields are for documentation purposes
- name: infrastructure_configurations
props:
- name: region
value: "{{ region }}"
description: Required parameter for the infrastructure_configurations resource.
- name: name
value: "{{ name }}"
- name: description
value: "{{ description }}"
- name: instanceTypes
value:
- "{{ instanceTypes }}"
- name: instanceProfileName
value: "{{ instanceProfileName }}"
- name: securityGroupIds
value:
- "{{ securityGroupIds }}"
- name: subnetId
value: "{{ subnetId }}"
- name: logging
description: |
Logging configuration defines where Image Builder uploads your logs.
value:
s3Logs:
s3BucketName: "{{ s3BucketName }}"
s3KeyPrefix: "{{ s3KeyPrefix }}"
- name: keyPair
value: "{{ keyPair }}"
- name: terminateInstanceOnFailure
value: {{ terminateInstanceOnFailure }}
- name: snsTopicArn
value: "{{ snsTopicArn }}"
- name: resourceTags
value: "{{ resourceTags }}"
- name: instanceMetadataOptions
description: |
The 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.
value:
httpTokens: "{{ httpTokens }}"
httpPutResponseHopLimit: {{ httpPutResponseHopLimit }}
- name: tags
value: "{{ tags }}"
- name: placement
description: |
By default, EC2 instances run on shared tenancy hardware. This means that multiple Amazon Web Services accounts might share the same physical hardware. When you use dedicated hardware, the physical server that hosts your instances is dedicated to your Amazon Web Services account. Instance placement settings contain the details for the physical hardware where instances that Image Builder launches during image creation will run.
value:
availabilityZone: "{{ availabilityZone }}"
tenancy: "{{ tenancy }}"
hostId: "{{ hostId }}"
hostResourceGroupArn: "{{ hostResourceGroupArn }}"
- name: clientToken
value: "{{ clientToken }}"
UPDATE examples
- update_infrastructure_configuration
Updates a new infrastructure configuration. An infrastructure configuration defines the environment in which your image will be built and tested.
UPDATE aws.imagebuilder.infrastructure_configurations
SET
infrastructureConfigurationArn = '{{ infrastructureConfigurationArn }}',
description = '{{ description }}',
instanceTypes = '{{ instanceTypes }}',
instanceProfileName = '{{ instanceProfileName }}',
securityGroupIds = '{{ securityGroupIds }}',
subnetId = '{{ subnetId }}',
logging = '{{ logging }}',
keyPair = '{{ keyPair }}',
terminateInstanceOnFailure = {{ terminateInstanceOnFailure }},
snsTopicArn = '{{ snsTopicArn }}',
resourceTags = '{{ resourceTags }}',
instanceMetadataOptions = '{{ instanceMetadataOptions }}',
placement = '{{ placement }}',
clientToken = '{{ clientToken }}'
WHERE
region = '{{ region }}' --required
AND infrastructureConfigurationArn = '{{ infrastructureConfigurationArn }}' --required
AND instanceProfileName = '{{ instanceProfileName }}' --required
AND clientToken = '{{ clientToken }}' --required
RETURNING
client_token,
infrastructure_configuration_arn,
request_id;
DELETE examples
- delete_infrastructure_configuration
Deletes an infrastructure configuration.
DELETE FROM aws.imagebuilder.infrastructure_configurations
WHERE infrastructureConfigurationArn = '{{ infrastructureConfigurationArn }}' --required
AND region = '{{ region }}' --required
;
Lifecycle Methods
- import_disk_image
Import a Windows operating system image from a verified Microsoft ISO disk file. The following disk images are supported: Windows 11 Enterprise
EXEC aws.imagebuilder.infrastructure_configurations.import_disk_image
@region='{{ region }}' --required
@@json=
'{
"name": "{{ name }}",
"semanticVersion": "{{ semanticVersion }}",
"description": "{{ description }}",
"platform": "{{ platform }}",
"osVersion": "{{ osVersion }}",
"executionRole": "{{ executionRole }}",
"infrastructureConfigurationArn": "{{ infrastructureConfigurationArn }}",
"uri": "{{ uri }}",
"loggingConfiguration": "{{ loggingConfiguration }}",
"tags": "{{ tags }}",
"registerImageOptions": "{{ registerImageOptions }}",
"windowsConfiguration": "{{ windowsConfiguration }}",
"clientToken": "{{ clientToken }}"
}'
;