CloudFront / Client / update_distribution_tenant

update_distribution_tenant

CloudFront.Client.update_distribution_tenant(**kwargs)

Updates a distribution tenant.

See also: AWS API Documentation

Request Syntax

response = client.update_distribution_tenant(
    Id='string',
    DistributionId='string',
    Domains=[
        {
            'Domain': 'string'
        },
    ],
    Customizations={
        'WebAcl': {
            'Action': 'override'|'disable',
            'Arn': 'string'
        },
        'Certificate': {
            'Arn': 'string'
        },
        'GeoRestrictions': {
            'RestrictionType': 'blacklist'|'whitelist'|'none',
            'Locations': [
                'string',
            ]
        }
    },
    Parameters=[
        {
            'Name': 'string',
            'Value': 'string'
        },
    ],
    ConnectionGroupId='string',
    IfMatch='string',
    ManagedCertificateRequest={
        'ValidationTokenHost': 'cloudfront'|'self-hosted',
        'PrimaryDomainName': 'string',
        'CertificateTransparencyLoggingPreference': 'enabled'|'disabled'
    },
    Enabled=True|False
)
Parameters:
  • Id (string) –

    [REQUIRED]

    The ID of the distribution tenant.

  • DistributionId (string) – The ID for the multi-tenant distribution.

  • Domains (list) –

    The domains to update for the distribution tenant. A domain object can contain only a domain property. You must specify at least one domain. Each distribution tenant can have up to 5 domains.

    • (dict) –

      The domain for the specified distribution tenant.

      • Domain (string) – [REQUIRED]

        The domain name.

  • Customizations (dict) –

    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.

    • WebAcl (dict) –

      The WAF web ACL.

      • Action (string) – [REQUIRED]

        The action for the WAF web ACL customization. You can specify override to specify a separate WAF web ACL for the distribution tenant. If you specify disable, the distribution tenant won’t have WAF web ACL protections and won’t inherit from the multi-tenant distribution.

      • Arn (string) –

        The Amazon Resource Name (ARN) of the WAF web ACL.

    • Certificate (dict) –

      The Certificate Manager (ACM) certificate.

      • Arn (string) – [REQUIRED]

        The Amazon Resource Name (ARN) of the ACM certificate.

    • GeoRestrictions (dict) –

      The geographic restrictions.

      • RestrictionType (string) – [REQUIRED]

        The method that you want to use to restrict distribution of your content by country:

        • none: No geographic restriction is enabled, meaning access to content is not restricted by client geo location.

        • blacklist: The Location elements specify the countries in which you don’t want CloudFront to distribute your content.

        • whitelist: The Location elements specify the countries in which you want CloudFront to distribute your content.

      • Locations (list) –

        The locations for geographic restrictions.

        • (string) –

  • Parameters (list) –

    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.

    • (dict) –

      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.

      • Name (string) – [REQUIRED]

        The parameter name.

      • Value (string) – [REQUIRED]

        The parameter value.

  • ConnectionGroupId (string) – The ID of the target connection group.

  • IfMatch (string) –

    [REQUIRED]

    The value of the ETag header that you received when retrieving the distribution tenant to update. This value is returned in the response of the GetDistributionTenant API operation.

  • ManagedCertificateRequest (dict) –

    An object that contains the CloudFront managed ACM certificate request.

    • ValidationTokenHost (string) – [REQUIRED]

      Specify how the HTTP validation token will be served when requesting the CloudFront managed ACM certificate.

      • For cloudfront, CloudFront will automatically serve the validation token. Choose this mode if you can point the domain’s DNS to CloudFront immediately.

      • For self-hosted, you serve the validation token from your existing infrastructure. Choose this mode when you need to maintain current traffic flow while your certificate is being issued. You can place the validation token at the well-known path on your existing web server, wait for ACM to validate and issue the certificate, and then update your DNS to point to CloudFront.

    • PrimaryDomainName (string) –

      The primary domain name associated with the CloudFront managed ACM certificate.

    • CertificateTransparencyLoggingPreference (string) –

      You can opt out of certificate transparency logging by specifying the disabled option. Opt in by specifying enabled. For more information, see Certificate Transparency Logging in the Certificate Manager User Guide.

  • Enabled (boolean) – Indicates whether the distribution tenant should be updated to an enabled state. If you update the distribution tenant and it’s not enabled, the distribution tenant won’t serve traffic.

Return type:

dict

Returns:

Response Syntax

{
    'DistributionTenant': {
        'Id': 'string',
        'DistributionId': 'string',
        'Name': 'string',
        'Arn': 'string',
        'Domains': [
            {
                'Domain': 'string',
                'Status': 'active'|'inactive'
            },
        ],
        'Tags': {
            'Items': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
        'Customizations': {
            'WebAcl': {
                'Action': 'override'|'disable',
                'Arn': 'string'
            },
            'Certificate': {
                'Arn': 'string'
            },
            'GeoRestrictions': {
                'RestrictionType': 'blacklist'|'whitelist'|'none',
                'Locations': [
                    'string',
                ]
            }
        },
        'Parameters': [
            {
                'Name': 'string',
                'Value': 'string'
            },
        ],
        'ConnectionGroupId': 'string',
        'CreatedTime': datetime(2015, 1, 1),
        'LastModifiedTime': datetime(2015, 1, 1),
        'Enabled': True|False,
        'Status': 'string'
    },
    'ETag': 'string'
}

Response Structure

  • (dict) –

    • DistributionTenant (dict) –

      The distribution tenant that you’re updating.

      • Id (string) –

        The ID of the distribution tenant.

      • DistributionId (string) –

        The ID of the multi-tenant distribution.

      • Name (string) –

        The name of the distribution tenant.

      • Arn (string) –

        The Amazon Resource Name (ARN) of the distribution tenant.

      • Domains (list) –

        The domains associated with the distribution tenant.

        • (dict) –

          The details about the domain result.

          • Domain (string) –

            The specified domain.

          • Status (string) –

            Whether the domain is active or inactive.

      • Tags (dict) –

        A complex type that contains zero or more Tag elements.

        • Items (list) –

          A complex type that contains Tag elements.

          • (dict) –

            A complex type that contains Tag key and Tag value.

            • Key (string) –

              A string that contains Tag key.

              The string length should be between 1 and 128 characters. Valid characters include a-z, A-Z, 0-9, space, and the special characters _ - . : / = + @.

            • Value (string) –

              A string that contains an optional Tag value.

              The string length should be between 0 and 256 characters. Valid characters include a-z, A-Z, 0-9, space, and the special characters _ - . : / = + @.

      • Customizations (dict) –

        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.

        • WebAcl (dict) –

          The WAF web ACL.

          • Action (string) –

            The action for the WAF web ACL customization. You can specify override to specify a separate WAF web ACL for the distribution tenant. If you specify disable, the distribution tenant won’t have WAF web ACL protections and won’t inherit from the multi-tenant distribution.

          • Arn (string) –

            The Amazon Resource Name (ARN) of the WAF web ACL.

        • Certificate (dict) –

          The Certificate Manager (ACM) certificate.

          • Arn (string) –

            The Amazon Resource Name (ARN) of the ACM certificate.

        • GeoRestrictions (dict) –

          The geographic restrictions.

          • RestrictionType (string) –

            The method that you want to use to restrict distribution of your content by country:

            • none: No geographic restriction is enabled, meaning access to content is not restricted by client geo location.

            • blacklist: The Location elements specify the countries in which you don’t want CloudFront to distribute your content.

            • whitelist: The Location elements specify the countries in which you want CloudFront to distribute your content.

          • Locations (list) –

            The locations for geographic restrictions.

            • (string) –

      • Parameters (list) –

        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.

        • (dict) –

          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.

          • Name (string) –

            The parameter name.

          • Value (string) –

            The parameter value.

      • ConnectionGroupId (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.

      • CreatedTime (datetime) –

        The date and time when the distribution tenant was created.

      • LastModifiedTime (datetime) –

        The date and time when the distribution tenant was updated.

      • Enabled (boolean) –

        Indicates whether the distribution tenant is in an enabled state. If disabled, the distribution tenant won’t serve traffic.

      • Status (string) –

        The status of the distribution tenant.

    • ETag (string) –

      The current version of the distribution tenant.

Exceptions