Skip to content

create_domain_name_access_association

create_domain_name_access_association(
    domain_name_arn: String,
    access_association_source_type: AccessAssociationSourceType,
    access_association_source: String,
    *,
    config_overrides: Optional[APIGatewayClientConfig] = None,
    tags: Optional[MapOfStringToString] = None,
) -> DomainNameAccessAssociation

Creates a domain name access association resource between an access association source and a private custom domain name.

Parameters:

  • domain_name_arn (String) –

    The ARN of the domain name.

  • access_association_source_type (AccessAssociationSourceType) –

    The type of the domain name access association source.

  • access_association_source (String) –

    The identifier of the domain name access association source. For a VPCE, the value is the VPC endpoint ID.

  • tags (Optional[MapOfStringToString], default: None ) –

    The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with aws:. The tag value can be up to 256 characters.

Raises:

  • BadRequestException –

    The submitted request is not valid, for example, the input is incomplete or incorrect. See the accompanying error message for details.

  • ConflictException –

    The request configuration has conflicts. For details, see the accompanying error message.

  • LimitExceededException –

    The request exceeded the rate limit. Retry after the specified time period.

  • TooManyRequestsException –

    The request has reached its throttling limit. Retry after the specified time period.

  • UnauthorizedException –

    The request is denied because the caller has insufficient permissions.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_api_gateway/_services/api_gateway.py
def create_domain_name_access_association(
    self,
    domain_name_arn: "capo_api_gateway.types.string.String",
    access_association_source_type: "capo_api_gateway.types.access_association_source_type.AccessAssociationSourceType",
    access_association_source: "capo_api_gateway.types.string.String",
    *,
    config_overrides: Optional[APIGatewayClientConfig] = None,
    tags: Optional[
        "capo_api_gateway.types.map_of_string_to_string.MapOfStringToString"
    ] = None,
) -> "capo_api_gateway.types.domain_name_access_association.DomainNameAccessAssociation":
    """<p> Creates a domain name access association resource between an access association source and a private custom domain name.</p>

    Args:
        domain_name_arn: <p> The ARN of the domain name. </p>
        access_association_source_type: <p> The type of the domain name access association source. </p>
        access_association_source: <p> The identifier of the domain name access association source. For a VPCE, the value is the VPC endpoint ID. </p>
        tags: <p>The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with <code>aws:</code>. The tag value can be up to 256 characters.</p>

    Raises:
        capo_api_gateway.errors.bad_request_exception.BadRequestException: <p>The submitted request is not valid, for example, the input is incomplete or incorrect. See the accompanying error message for details.</p>
        capo_api_gateway.errors.conflict_exception.ConflictException: <p>The request configuration has conflicts. For details, see the accompanying error message.</p>
        capo_api_gateway.errors.limit_exceeded_exception.LimitExceededException: <p>The request exceeded the rate limit. Retry after the specified time period.</p>
        capo_api_gateway.errors.too_many_requests_exception.TooManyRequestsException: <p>The request has reached its throttling limit. Retry after the specified time period.</p>
        capo_api_gateway.errors.unauthorized_exception.UnauthorizedException: <p>The request is denied because the caller has insufficient permissions.</p>
        capo_api_gateway.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_api_gateway.types.create_domain_name_access_association_request.CreateDomainNameAccessAssociationRequest]",
    ) -> OperationResponse[
        "capo_api_gateway.types.domain_name_access_association.DomainNameAccessAssociation"
    ]:
        import capo_api_gateway._operations.backplane_control_service.create_domain_name_access_association

        output, http_response = (
            capo_api_gateway._operations.backplane_control_service.create_domain_name_access_association.create_domain_name_access_association(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateDomainNameAccessAssociation")
    )
    input_: capo_api_gateway.types.create_domain_name_access_association_request.CreateDomainNameAccessAssociationRequest = {
        "domain_name_arn": domain_name_arn,
        "access_association_source_type": access_association_source_type,
        "access_association_source": access_association_source,
    }
    if tags is not None:
        input_["tags"] = tags

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output