distribution_tenants
Creates, updates, deletes, gets or lists a distribution_tenants resource.
Overview
| Name | distribution_tenants |
| Type | Resource |
| Id | aws.cloudfront.distribution_tenants |
Fields
The following fields are returned by SELECT queries:
- get_distribution_tenant
- list_distribution_tenants
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the distribution tenant. |
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 | The date and time when the distribution tenant was created. |
customizations | string | 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. |
distribution_id | string | The ID of the multi-tenant distribution. |
domains | string | The domains associated with the distribution tenant. |
enabled | boolean | Indicates whether the distribution tenant is in an enabled state. If disabled, the distribution tenant won't serve traffic. |
id | string | The ID of the distribution tenant. |
last_modified_time | string | The date and time when the distribution tenant was updated. |
name | string | The name of the distribution tenant. |
parameters | string | 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. |
status | string | The status of the distribution tenant. |
tags | string | A complex type that contains zero or more Tag elements. |
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the distribution tenant. |
connection_group_id | string | The ID of the connection group ID for the distribution tenant. If you don't specify a connection group, CloudFront uses the default connection group. |
created_time | string | The date and time when the distribution tenant was created. |
customizations | string | 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. |
distribution_id | string | The identifier for the multi-tenant distribution. For example: EDFDVBD632BHDS5. |
domains | string | The domains associated with the distribution tenant. |
e_tag | string | The current version of the distribution tenant. |
enabled | boolean | Indicates whether the distribution tenants are in an enabled state. If disabled, the distribution tenant won't service traffic. |
id | string | The ID of the distribution tenant. |
last_modified_time | string | The date and time when the distribution tenant was updated. |
name | string | The name of the distribution tenant. |
status | string | The status of the distribution tenant. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_distribution_tenant | select | identifier, region | Gets information about a distribution tenant. | |
list_distribution_tenants | select | region | Lists the distribution tenants in your Amazon Web Services account. | |
create_distribution_tenant | insert | region, DistributionId | Creates a distribution tenant. | |
associate_distribution_tenant_web_acl | update | id, region, WebACLArn | If-Match | Associates the WAF web ACL with a distribution tenant. |
update_distribution_tenant | update | id, If-Match, region | Updates a distribution tenant. | |
disassociate_distribution_tenant_web_acl | update | id, region | If-Match | Disassociates a distribution tenant from the WAF web ACL. |
delete_distribution_tenant | delete | id, If-Match, region | Deletes a distribution tenant. If you use this API operation to delete a distribution tenant that is currently enabled, the request will fail. To delete a distribution tenant, you must first disable the distribution tenant by using the UpdateDistributionTenant API operation. |
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 |
|---|---|---|
If-Match | string | The value of the ETag header that you received when retrieving the distribution tenant. This value is returned in the response of the GetDistributionTenant API operation. |
id | string | The ID of the distribution tenant to delete. |
identifier | string | The identifier of the distribution tenant. You can specify the ARN, ID, or name of the distribution tenant. |
region | string | AWS region (default: us-east-1) |
If-Match | string | The current version of the distribution tenant that you're disassociating from the WAF web ACL. This is the ETag value returned in the response to the GetDistributionTenant API operation. |
SELECT examples
- get_distribution_tenant
- list_distribution_tenants
Gets information about a distribution tenant.
SELECT
arn,
connection_group_id,
created_time,
customizations,
distribution_id,
domains,
enabled,
id,
last_modified_time,
name,
parameters,
status,
tags
FROM aws.cloudfront.distribution_tenants
WHERE identifier = '{{ identifier }}' -- required
AND region = '{{ region }}' -- required
;
Lists the distribution tenants in your Amazon Web Services account.
SELECT
arn,
connection_group_id,
created_time,
customizations,
distribution_id,
domains,
e_tag,
enabled,
id,
last_modified_time,
name,
status
FROM aws.cloudfront.distribution_tenants
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_distribution_tenant
- Manifest
Creates a distribution tenant.
INSERT INTO aws.cloudfront.distribution_tenants (
DistributionId,
Name,
Domains,
Tags,
Customizations,
Parameters,
ConnectionGroupId,
ManagedCertificateRequest,
Enabled,
region
)
SELECT
'{{ DistributionId }}' /* required */,
'{{ Name }}',
'{{ Domains }}',
'{{ Tags }}',
'{{ Customizations }}',
'{{ Parameters }}',
'{{ ConnectionGroupId }}',
'{{ ManagedCertificateRequest }}',
{{ Enabled }},
'{{ region }}'
RETURNING
arn,
connection_group_id,
created_time,
customizations,
distribution_id,
domains,
enabled,
id,
last_modified_time,
name,
parameters,
status,
tags
;
# Description fields are for documentation purposes
- name: distribution_tenants
props:
- name: region
value: "{{ region }}"
description: Required parameter for the distribution_tenants resource.
- name: DistributionId
value: "{{ DistributionId }}"
- name: Name
value: "{{ Name }}"
- name: Domains
value:
- Domain: "{{ Domain }}"
- name: Tags
description: |
A complex type that contains zero or more Tag elements.
value:
Items:
- Key: "{{ Key }}"
Value: "{{ Value }}"
- name: Customizations
description: |
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.
value:
WebAcl:
Action: "{{ Action }}"
Arn: "{{ Arn }}"
Certificate:
Arn: "{{ Arn }}"
GeoRestrictions:
RestrictionType: "{{ RestrictionType }}"
Locations:
- "{{ Locations }}"
- name: Parameters
value:
- Name: "{{ Name }}"
Value: "{{ Value }}"
- name: ConnectionGroupId
value: "{{ ConnectionGroupId }}"
- name: ManagedCertificateRequest
description: |
An object that represents the request for the Amazon CloudFront managed ACM certificate.
value:
ValidationTokenHost: "{{ ValidationTokenHost }}"
PrimaryDomainName: "{{ PrimaryDomainName }}"
CertificateTransparencyLoggingPreference: "{{ CertificateTransparencyLoggingPreference }}"
- name: Enabled
value: {{ Enabled }}
UPDATE examples
- associate_distribution_tenant_web_acl
- update_distribution_tenant
- disassociate_distribution_tenant_web_acl
Associates the WAF web ACL with a distribution tenant.
UPDATE aws.cloudfront.distribution_tenants
SET
WebACLArn = '{{ WebACLArn }}'
WHERE
id = '{{ id }}' --required
AND region = '{{ region }}' --required
AND WebACLArn = '{{ WebACLArn }}' --required
AND `If-Match` = '{{ If-Match}}'
RETURNING
e_tag,
id,
web_acl_arn;
Updates a distribution tenant.
UPDATE aws.cloudfront.distribution_tenants
SET
DistributionId = '{{ DistributionId }}',
Domains = '{{ Domains }}',
Customizations = '{{ Customizations }}',
Parameters = '{{ Parameters }}',
ConnectionGroupId = '{{ ConnectionGroupId }}',
ManagedCertificateRequest = '{{ ManagedCertificateRequest }}',
Enabled = {{ Enabled }}
WHERE
id = '{{ id }}' --required
AND `If-Match` = '{{ If-Match }}' --required
AND region = '{{ region }}' --required
RETURNING
arn,
connection_group_id,
created_time,
customizations,
distribution_id,
domains,
enabled,
id,
last_modified_time,
name,
parameters,
status,
tags;
Disassociates a distribution tenant from the WAF web ACL.
UPDATE aws.cloudfront.distribution_tenants
SET
-- No updatable properties
WHERE
id = '{{ id }}' --required
AND region = '{{ region }}' --required
AND `If-Match` = '{{ If-Match}}'
RETURNING
e_tag,
id;
DELETE examples
- delete_distribution_tenant
Deletes a distribution tenant. If you use this API operation to delete a distribution tenant that is currently enabled, the request will fail. To delete a distribution tenant, you must first disable the distribution tenant by using the UpdateDistributionTenant API operation.
DELETE FROM aws.cloudfront.distribution_tenants
WHERE id = '{{ id }}' --required
AND `If-Match` = '{{ If-Match }}' --required
AND region = '{{ region }}' --required
;