Skip to main content

distribution_tenants

Creates, updates, deletes, gets or lists a distribution_tenants resource.

Overview

Namedistribution_tenants
TypeResource
Idaws.cloudfront.distribution_tenants

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe Amazon Resource Name (ARN) of the distribution tenant.
connection_group_idstringThe ID of the connection group for the distribution tenant. If you don't specify a connection group, CloudFront uses the default connection group.
created_timestringThe date and time when the distribution tenant was created.
customizationsstringCustomizations 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_idstringThe ID of the multi-tenant distribution.
domainsstringThe domains associated with the distribution tenant.
enabledbooleanIndicates whether the distribution tenant is in an enabled state. If disabled, the distribution tenant won't serve traffic.
idstringThe ID of the distribution tenant.
last_modified_timestringThe date and time when the distribution tenant was updated.
namestringThe name of the distribution tenant.
parametersstringA 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.
statusstringThe status of the distribution tenant.
tagsstringA complex type that contains zero or more Tag elements.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_distribution_tenantselectidentifier, regionGets information about a distribution tenant.
list_distribution_tenantsselectregionLists the distribution tenants in your Amazon Web Services account.
create_distribution_tenantinsertregion, DistributionIdCreates a distribution tenant.
associate_distribution_tenant_web_aclupdateid, region, WebACLArnIf-MatchAssociates the WAF web ACL with a distribution tenant.
update_distribution_tenantupdateid, If-Match, regionUpdates a distribution tenant.
disassociate_distribution_tenant_web_aclupdateid, regionIf-MatchDisassociates a distribution tenant from the WAF web ACL.
delete_distribution_tenantdeleteid, If-Match, regionDeletes 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.

NameDatatypeDescription
If-MatchstringThe 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.
idstringThe ID of the distribution tenant to delete.
identifierstringThe identifier of the distribution tenant. You can specify the ARN, ID, or name of the distribution tenant.
regionstringAWS region (default: us-east-1)
If-MatchstringThe 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

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
;

INSERT examples

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
;

UPDATE examples

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;

DELETE examples

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
;