Skip to main content

distribution_tenants

Creates, updates, deletes or gets a distribution_tenant resource or lists distribution_tenants in a region

Overview

Namedistribution_tenants
TypeResource
DescriptionThe distribution tenant.
Idawscc.cloudfront.distribution_tenants

Fields

NameDatatypeDescription
idstring
distribution_idstringThe ID of the multi-tenant distribution.
namestringThe name of the distribution tenant.
arnstring
domain_resultsarray
tagsarrayA complex type that contains zero or more Tag elements.
customizationsobjectCustomizations 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.
parametersarrayA 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_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_timestring
last_modified_timestring
enabledbooleanIndicates whether the distribution tenant is in an enabled state. If disabled, the distribution tenant won't serve traffic.
statusstring
e_tagstring
domainsarrayThe domains associated with the distribution tenant.
managed_certificate_requestobjectAn object that represents the request for the Amazon CloudFront managed ACM certificate.
regionstringAWS region.

For more information, see AWS::CloudFront::DistributionTenant.

Methods

NameResourceAccessible byRequired Params
create_resourcedistribution_tenantsINSERTDistributionId, Name, Domains, region
delete_resourcedistribution_tenantsDELETEIdentifier, region
update_resourcedistribution_tenantsUPDATEIdentifier, PatchDocument, region
list_resourcesdistribution_tenants_list_onlySELECTregion
get_resourcedistribution_tenantsSELECTIdentifier, 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
region = 'us-east-1' AND
Identifier = '{{ id }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.cloudfront.distribution_tenants (
DistributionId,
Name,
Domains,
region
)
SELECT
'{{ distribution_id }}',
'{{ name }}',
'{{ domains }}',
'{{ 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 distribution_tenant resource, using stack-deploy.

/*+ update */
UPDATE awscc.cloudfront.distribution_tenants
SET PatchDocument = string('{{ {
"DistributionId": distribution_id,
"Tags": tags,
"Customizations": customizations,
"Parameters": parameters,
"ConnectionGroupId": connection_group_id,
"Enabled": enabled,
"Domains": domains,
"ManagedCertificateRequest": managed_certificate_request
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.cloudfront.distribution_tenants
WHERE
Identifier = '{{ id }}' AND
region = 'us-east-1'
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 distribution_tenants resource, the following permissions are required:

acm:DescribeCertificate,
acm:RequestCertificate,
cloudfront:CreateDistributionTenant,
cloudfront:GetDistributionTenant,
cloudfront:GetManagedCertificateDetails,
cloudfront:TagResource,
cloudfront:VerifyDnsConfiguration,
wafv2:GetWebACL