Skip to content

update_distribution_tenant async

update_distribution_tenant(
    id: string,
    if_match: string,
    *,
    config_overrides: Optional[AsyncCloudFrontClientConfig] = None,
    distribution_id: Optional[string] = None,
    domains: Optional[DomainList] = None,
    customizations: Optional[Customizations] = None,
    parameters: Optional[Parameters] = None,
    connection_group_id: Optional[string] = None,
    managed_certificate_request: Optional[ManagedCertificateRequest] = None,
    enabled: Optional[boolean] = None,
) -> UpdateDistributionTenantResult

Updates a distribution tenant.

Parameters:

  • id (string) –

    The ID of the distribution tenant.

  • distribution_id (Optional[string], default: None ) –

    The ID for the multi-tenant distribution.

  • domains (Optional[DomainList], default: None ) –

    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.

  • customizations (Optional[Customizations], default: None ) –

    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 (Optional[Parameters], default: None ) –

    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 (Optional[string], default: None ) –

    The ID of the target connection group.

  • if_match (string) –

    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.

  • managed_certificate_request (Optional[ManagedCertificateRequest], default: None ) –

    An object that contains the CloudFront managed ACM certificate request.

  • enabled (Optional[boolean], default: None ) –

    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.

Raises:

Source code in docs_src/capo_cloudfront/_services/async_cloud_front.py
async def update_distribution_tenant(
    self,
    id: "capo_cloudfront.types.string.string",
    if_match: "capo_cloudfront.types.string.string",
    *,
    config_overrides: Optional[AsyncCloudFrontClientConfig] = None,
    distribution_id: Optional["capo_cloudfront.types.string.string"] = None,
    domains: Optional["capo_cloudfront.types.domain_list.DomainList"] = None,
    customizations: Optional[
        "capo_cloudfront.types.customizations.Customizations"
    ] = None,
    parameters: Optional["capo_cloudfront.types.parameters.Parameters"] = None,
    connection_group_id: Optional["capo_cloudfront.types.string.string"] = None,
    managed_certificate_request: Optional[
        "capo_cloudfront.types.managed_certificate_request.ManagedCertificateRequest"
    ] = None,
    enabled: Optional["capo_cloudfront.types.boolean.boolean"] = None,
) -> "capo_cloudfront.types.update_distribution_tenant_result.UpdateDistributionTenantResult":
    """<p>Updates a distribution tenant.</p>

    Args:
        id: <p>The ID of the distribution tenant.</p>
        distribution_id: <p>The ID for the multi-tenant distribution.</p>
        domains: <p>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.</p>
        customizations: <p>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.</p>
        parameters: <p>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.</p>
        connection_group_id: <p>The ID of the target connection group.</p>
        if_match: <p>The value of the <code>ETag</code> header that you received when retrieving the distribution tenant to update. This value is returned in the response of the <code>GetDistributionTenant</code> API operation.</p>
        managed_certificate_request: <p>An object that contains the CloudFront managed ACM certificate request.</p>
        enabled: <p>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.</p>

    Raises:
        capo_cloudfront.errors.access_denied.AccessDenied: <p>Access denied.</p>
        capo_cloudfront.errors.cname_already_exists.CNAMEAlreadyExists: <p>The CNAME specified is already defined for CloudFront.</p>
        capo_cloudfront.errors.entity_already_exists.EntityAlreadyExists: <p>The entity already exists. You must provide a unique entity.</p>
        capo_cloudfront.errors.entity_limit_exceeded.EntityLimitExceeded: <p>The entity limit has been exceeded.</p>
        capo_cloudfront.errors.entity_not_found.EntityNotFound: <p>The entity was not found.</p>
        capo_cloudfront.errors.invalid_argument.InvalidArgument: <p>An argument is invalid.</p>
        capo_cloudfront.errors.invalid_association.InvalidAssociation: <p>The specified CloudFront resource can't be associated.</p>
        capo_cloudfront.errors.invalid_if_match_version.InvalidIfMatchVersion: <p>The <code>If-Match</code> version is missing or not valid.</p>
        capo_cloudfront.errors.precondition_failed.PreconditionFailed: <p>The precondition in one or more of the request fields evaluated to <code>false</code>.</p>
        capo_cloudfront.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cloudfront.types.update_distribution_tenant_request.UpdateDistributionTenantRequest]",
    ) -> AsyncOperationResponse[
        "capo_cloudfront.types.update_distribution_tenant_result.UpdateDistributionTenantResult"
    ]:
        import capo_cloudfront._operations.cloudfront2020_05_31.update_distribution_tenant

        (
            output,
            http_response,
        ) = await capo_cloudfront._operations.cloudfront2020_05_31.update_distribution_tenant.async_update_distribution_tenant(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateDistributionTenant")
    )
    input_: capo_cloudfront.types.update_distribution_tenant_request.UpdateDistributionTenantRequest = {
        "id": id,
        "if_match": if_match,
    }
    if distribution_id is not None:
        input_["distribution_id"] = distribution_id
    if domains is not None:
        input_["domains"] = domains
    if customizations is not None:
        input_["customizations"] = customizations
    if parameters is not None:
        input_["parameters"] = parameters
    if connection_group_id is not None:
        input_["connection_group_id"] = connection_group_id
    if managed_certificate_request is not None:
        input_["managed_certificate_request"] = managed_certificate_request
    if enabled is not None:
        input_["enabled"] = enabled

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output