Skip to content

create_custom_domain_association async

create_custom_domain_association(
    *,
    config_overrides: Optional[AsyncRedshiftClientConfig] = None,
    custom_domain_name: Optional[CustomDomainNameString] = None,
    custom_domain_certificate_arn: Optional[CustomDomainCertificateArnString] = None,
    cluster_identifier: Optional[String] = None,
) -> CreateCustomDomainAssociationResult

Used to create a custom domain name for a cluster. Properties include the custom domain name, the cluster the custom domain is associated with, and the certificate Amazon Resource Name (ARN).

Parameters:

  • custom_domain_name (Optional[CustomDomainNameString], default: None ) –

    The custom domain name for a custom domain association.

  • custom_domain_certificate_arn (Optional[CustomDomainCertificateArnString], default: None ) –

    The certificate Amazon Resource Name (ARN) for the custom domain name association.

  • cluster_identifier (Optional[String], default: None ) –

    The cluster identifier that the custom domain is associated with.

Raises:

Source code in docs_src/capo_redshift/_services/async_redshift.py
async def create_custom_domain_association(
    self,
    *,
    config_overrides: Optional[AsyncRedshiftClientConfig] = None,
    custom_domain_name: Optional[
        "capo_redshift.types.custom_domain_name_string.CustomDomainNameString"
    ] = None,
    custom_domain_certificate_arn: Optional[
        "capo_redshift.types.custom_domain_certificate_arn_string.CustomDomainCertificateArnString"
    ] = None,
    cluster_identifier: Optional["capo_redshift.types.string.String"] = None,
) -> "capo_redshift.types.create_custom_domain_association_result.CreateCustomDomainAssociationResult":
    """<p>Used to create a custom domain name for a cluster. Properties include the custom domain name, the cluster the custom domain is associated with, and the certificate Amazon Resource Name (ARN).</p>

    Args:
        custom_domain_name: <p>The custom domain name for a custom domain association.</p>
        custom_domain_certificate_arn: <p>The certificate Amazon Resource Name (ARN) for the custom domain name association.</p>
        cluster_identifier: <p>The cluster identifier that the custom domain is associated with.</p>

    Raises:
        capo_redshift.errors.cluster_not_found_fault.ClusterNotFoundFault: <p>The <code>ClusterIdentifier</code> parameter does not refer to an existing cluster. </p>
        capo_redshift.errors.custom_cname_association_fault.CustomCnameAssociationFault: <p>An error occurred when an attempt was made to change the custom domain association.</p>
        capo_redshift.errors.unsupported_operation_fault.UnsupportedOperationFault: <p>The requested operation isn't supported.</p>
        capo_redshift.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_redshift.types.create_custom_domain_association_message.CreateCustomDomainAssociationMessage]",
    ) -> AsyncOperationResponse[
        "capo_redshift.types.create_custom_domain_association_result.CreateCustomDomainAssociationResult"
    ]:
        import capo_redshift._operations.redshift_service_version20121201.create_custom_domain_association

        (
            output,
            http_response,
        ) = await capo_redshift._operations.redshift_service_version20121201.create_custom_domain_association.async_create_custom_domain_association(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateCustomDomainAssociation")
    )
    input_: capo_redshift.types.create_custom_domain_association_message.CreateCustomDomainAssociationMessage = {}
    if custom_domain_name is not None:
        input_["custom_domain_name"] = custom_domain_name
    if custom_domain_certificate_arn is not None:
        input_["custom_domain_certificate_arn"] = custom_domain_certificate_arn
    if cluster_identifier is not None:
        input_["cluster_identifier"] = cluster_identifier

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