distribution_configurations
Creates, updates, deletes or gets a distribution_configuration
resource or lists distribution_configurations
in a region
Overview
Name | distribution_configurations |
Type | Resource |
Description | Resource schema for AWS::ImageBuilder::DistributionConfiguration |
Id | aws.imagebuilder.distribution_configurations |
Fields
Name | Datatype | Description |
---|---|---|
arn | string | The Amazon Resource Name (ARN) of the distribution configuration. |
name | string | The name of the distribution configuration. |
description | string | The description of the distribution configuration. |
distributions | array | The distributions of the distribution configuration. |
tags | object | The tags associated with the component. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, Distributions, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all distribution_configurations
in a region.
SELECT
region,
arn,
name,
description,
distributions,
tags
FROM aws.imagebuilder.distribution_configurations
WHERE region = 'us-east-1';
Gets all properties from an individual distribution_configuration
.
SELECT
region,
arn,
name,
description,
distributions,
tags
FROM aws.imagebuilder.distribution_configurations
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';
INSERT
example
Use the following StackQL query and manifest file to create a new distribution_configuration
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.imagebuilder.distribution_configurations (
Name,
Distributions,
region
)
SELECT
'{{ Name }}',
'{{ Distributions }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.imagebuilder.distribution_configurations (
Name,
Description,
Distributions,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ Description }}',
'{{ Distributions }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: distribution_configuration
props:
- name: Name
value: '{{ Name }}'
- name: Description
value: '{{ Description }}'
- name: Distributions
value:
- Region: '{{ Region }}'
AmiDistributionConfiguration:
Name: '{{ Name }}'
KmsKeyId: '{{ KmsKeyId }}'
Description: '{{ Description }}'
AmiTags: {}
TargetAccountIds:
- '{{ TargetAccountIds[0] }}'
LaunchPermissionConfiguration:
UserIds:
- '{{ UserIds[0] }}'
UserGroups:
- '{{ UserGroups[0] }}'
OrganizationArns:
- '{{ OrganizationArns[0] }}'
OrganizationalUnitArns:
- '{{ OrganizationalUnitArns[0] }}'
ContainerDistributionConfiguration:
Description: '{{ Description }}'
ContainerTags:
- '{{ ContainerTags[0] }}'
TargetRepository:
Service: '{{ Service }}'
RepositoryName: '{{ RepositoryName }}'
LicenseConfigurationArns:
- '{{ LicenseConfigurationArns[0] }}'
LaunchTemplateConfigurations:
- LaunchTemplateId: '{{ LaunchTemplateId }}'
AccountId: '{{ AccountId }}'
SetDefaultVersion: '{{ SetDefaultVersion }}'
FastLaunchConfigurations:
- AccountId: '{{ AccountId }}'
Enabled: '{{ Enabled }}'
LaunchTemplate:
LaunchTemplateId: '{{ LaunchTemplateId }}'
LaunchTemplateName: '{{ LaunchTemplateName }}'
LaunchTemplateVersion: '{{ LaunchTemplateVersion }}'
MaxParallelLaunches: '{{ MaxParallelLaunches }}'
SnapshotConfiguration:
TargetResourceCount: '{{ TargetResourceCount }}'
- name: Tags
value: {}
DELETE
example
/*+ delete */
DELETE FROM aws.imagebuilder.distribution_configurations
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';
Permissions
To operate on the distribution_configurations
resource, the following permissions are required:
Create
iam:GetRole,
iam:CreateServiceLinkedRole,
ec2:DescribeLaunchTemplates,
ec2:CreateLaunchTemplateVersion,
ec2:ModifyLaunchTemplate,
imagebuilder:TagResource,
imagebuilder:GetDistributionConfiguration,
imagebuilder:CreateDistributionConfiguration
Update
ec2:DescribeLaunchTemplates,
ec2:CreateLaunchTemplateVersion,
ec2:ModifyLaunchTemplate,
imagebuilder:GetDistributionConfiguration,
imagebuilder:UpdateDistributionConfiguration
Read
imagebuilder:GetDistributionConfiguration
Delete
imagebuilder:GetDistributionConfiguration,
imagebuilder:UnTagResource,
imagebuilder:DeleteDistributionConfiguration
List
imagebuilder:ListDistributionConfigurations