distribution_tenants
Creates, updates, deletes or gets a distribution_tenant resource or lists distribution_tenants in a region
Overview
| Name | distribution_tenants |
| Type | Resource |
| Description | The distribution tenant. |
| Id | awscc.cloudfront.distribution_tenants |
Fields
| Name | Datatype | Description |
|---|---|---|
id | string | |
distribution_id | string | The ID of the multi-tenant distribution. |
name | string | The name of the distribution tenant. |
arn | string | |
domain_results | array | |
tags | array | A complex type that contains zero or more ``Tag`` elements. |
customizations | object | Customizations for the distribution tenant. For each distribution tenant, you can specify the geographic restrictions, and the Amazon Resource Names (ARNs) for the ACM certificate and WAF web ACL. These are specific values that you can override or disable from the multi-tenant distribution that was used to create the distribution tenant. |
parameters | array | A list of parameter values to add to the resource. A parameter is specified as a key-value pair. A valid parameter value must exist for any parameter that is marked as required in the multi-tenant distribution. |
connection_group_id | string | The ID of the connection group for the distribution tenant. If you don't specify a connection group, CloudFront uses the default connection group. |
created_time | string | |
last_modified_time | string | |
enabled | boolean | Indicates whether the distribution tenant is in an enabled state. If disabled, the distribution tenant won't serve traffic. |
status | string | |
e_tag | string | |
domains | array | The domains associated with the distribution tenant. |
managed_certificate_request | object | An object that represents the request for the Amazon CloudFront managed ACM certificate. |
region | string | AWS region. |
For more information, see AWS::CloudFront::DistributionTenant.
Methods
| Name | Accessible by | Required Params |
|---|---|---|
create_resource | INSERT | DistributionId, Name, Domains, 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 properties from an individual distribution_tenant.
SELECT
region,
id,
distribution_id,
name,
arn,
domain_results,
tags,
customizations,
parameters,
connection_group_id,
created_time,
last_modified_time,
enabled,
status,
e_tag,
domains,
managed_certificate_request
FROM awscc.cloudfront.distribution_tenants
WHERE data__Identifier = '<Id>';
INSERT example
Use the following StackQL query and manifest file to create a new distribution_tenant resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.cloudfront.distribution_tenants (
DistributionId,
Name,
Domains,
region
)
SELECT
'{{ DistributionId }}',
'{{ Name }}',
'{{ Domains }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.cloudfront.distribution_tenants (
DistributionId,
Name,
Tags,
Customizations,
Parameters,
ConnectionGroupId,
Enabled,
Domains,
ManagedCertificateRequest,
region
)
SELECT
'{{ DistributionId }}',
'{{ Name }}',
'{{ Tags }}',
'{{ Customizations }}',
'{{ Parameters }}',
'{{ ConnectionGroupId }}',
'{{ Enabled }}',
'{{ Domains }}',
'{{ ManagedCertificateRequest }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: distribution_tenant
props:
- name: DistributionId
value: '{{ DistributionId }}'
- name: Name
value: '{{ Name }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: Customizations
value:
WebAcl:
Action: '{{ Action }}'
Arn: '{{ Arn }}'
Certificate:
Arn: '{{ Arn }}'
GeoRestrictions:
RestrictionType: '{{ RestrictionType }}'
Locations:
- '{{ Locations[0] }}'
- name: Parameters
value:
- Name: '{{ Name }}'
Value: '{{ Value }}'
- name: ConnectionGroupId
value: '{{ ConnectionGroupId }}'
- name: Enabled
value: '{{ Enabled }}'
- name: Domains
value:
- '{{ Domains[0] }}'
- name: ManagedCertificateRequest
value:
ValidationTokenHost: '{{ ValidationTokenHost }}'
PrimaryDomainName: '{{ PrimaryDomainName }}'
CertificateTransparencyLoggingPreference: '{{ CertificateTransparencyLoggingPreference }}'
DELETE example
/*+ delete */
DELETE FROM awscc.cloudfront.distribution_tenants
WHERE data__Identifier = '<Id>'
AND region = 'us-east-1';
Permissions
To operate on the distribution_tenants resource, the following permissions are required:
Create
acm:DescribeCertificate,
acm:RequestCertificate,
cloudfront:CreateDistributionTenant,
cloudfront:GetDistributionTenant,
cloudfront:GetManagedCertificateDetails,
cloudfront:TagResource,
cloudfront:VerifyDnsConfiguration,
wafv2:GetWebACL
Delete
cloudfront:DeleteDistributionTenant,
cloudfront:UpdateDistributionTenant,
cloudfront:GetDistributionTenant,
wafv2:GetWebACL
List
cloudfront:ListDistributionTenants,
cloudfront:ListTagsForResource
Read
cloudfront:GetDistributionTenant,
cloudfront:ListTagsForResource
Update
acm:DescribeCertificate,
acm:RequestCertificate,
cloudfront:GetDistributionTenant,
cloudfront:GetManagedCertificateDetails,
cloudfront:UpdateDistributionTenant,
cloudfront:ListTagsForResource,
cloudfront:TagResource,
cloudfront:UntagResource,
cloudfront:VerifyDnsConfiguration,
wafv2:GetWebACL