Skip to main content

infrastructure_configurations

Creates, updates, deletes or gets an infrastructure_configuration resource or lists infrastructure_configurations in a region

Overview

Nameinfrastructure_configurations
TypeResource
DescriptionResource schema for AWS::ImageBuilder::InfrastructureConfiguration
Idawscc.imagebuilder.infrastructure_configurations

Fields

NameDatatypeDescription
arnstringThe Amazon Resource Name (ARN) of the infrastructure configuration.
namestringThe name of the infrastructure configuration.
descriptionstringThe description of the infrastructure configuration.
instance_typesarrayThe instance types of the infrastructure configuration.
security_group_idsarrayThe security group IDs of the infrastructure configuration.
loggingobjectThe logging configuration of the infrastructure configuration.
subnet_idstringThe subnet ID of the infrastructure configuration.
key_pairstringThe EC2 key pair of the infrastructure configuration..
terminate_instance_on_failurebooleanThe terminate instance on failure configuration of the infrastructure configuration.
instance_profile_namestringThe instance profile of the infrastructure configuration.
instance_metadata_optionsobjectThe instance metadata option settings for the infrastructure configuration.
sns_topic_arnstringThe SNS Topic Amazon Resource Name (ARN) of the infrastructure configuration.
resource_tagsobjectThe tags attached to the resource created by Image Builder.
tagsobjectThe tags associated with the component.
placementobjectThe placement option settings for the infrastructure configuration.
regionstringAWS region.

For more information, see AWS::ImageBuilder::InfrastructureConfiguration.

Methods

NameResourceAccessible byRequired Params
create_resourceinfrastructure_configurationsINSERTName, InstanceProfileName, region
delete_resourceinfrastructure_configurationsDELETEIdentifier, region
update_resourceinfrastructure_configurationsUPDATEIdentifier, PatchDocument, region
list_resourcesinfrastructure_configurations_list_onlySELECTregion
get_resourceinfrastructure_configurationsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual infrastructure_configuration.

SELECT
region,
arn,
name,
description,
instance_types,
security_group_ids,
logging,
subnet_id,
key_pair,
terminate_instance_on_failure,
instance_profile_name,
instance_metadata_options,
sns_topic_arn,
resource_tags,
tags,
placement
FROM awscc.imagebuilder.infrastructure_configurations
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new infrastructure_configuration resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.imagebuilder.infrastructure_configurations (
Name,
InstanceProfileName,
region
)
SELECT
'{{ name }}',
'{{ instance_profile_name }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

Use the following StackQL query and manifest file to update a infrastructure_configuration resource, using stack-deploy.

/*+ update */
UPDATE awscc.imagebuilder.infrastructure_configurations
SET PatchDocument = string('{{ {
"Description": description,
"InstanceTypes": instance_types,
"SecurityGroupIds": security_group_ids,
"Logging": logging,
"SubnetId": subnet_id,
"KeyPair": key_pair,
"TerminateInstanceOnFailure": terminate_instance_on_failure,
"InstanceProfileName": instance_profile_name,
"InstanceMetadataOptions": instance_metadata_options,
"SnsTopicArn": sns_topic_arn,
"ResourceTags": resource_tags,
"Tags": tags,
"Placement": placement
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.imagebuilder.infrastructure_configurations
WHERE
Identifier = '{{ arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the infrastructure_configurations resource, the following permissions are required:

iam:PassRole,
iam:GetRole,
iam:GetInstanceProfile,
iam:CreateServiceLinkedRole,
sns:Publish,
imagebuilder:TagResource,
imagebuilder:GetInfrastructureConfiguration,
imagebuilder:CreateInfrastructureConfiguration