Skip to content

create_core_network_endpoint async

create_core_network_endpoint(
    core_network_arn: ResourceArn,
    global_resolver_id: ResourceId,
    ip_addresses: CoreNetworkEndpointDnsIpInputItems,
    *,
    config_overrides: Optional[AsyncRoute53GlobalResolverClientConfig] = None,
    client_token: Optional[ClientToken] = None,
    name: Optional[ResourceName] = None,
    tags: Optional[Tags] = None,
) -> CreateCoreNetworkEndpointOutput

Creates a core network endpoint, which enables DNS resolution for Amazon Web Services Cloud WAN core network segments. The endpoint connects a Route 53 Global Resolver to an Amazon Web Services Cloud WAN core network so that resources attached to the core network can send DNS queries to the resolver.

Route 53 Global Resolver is a global service that supports resolvers in multiple Amazon Web Services Regions, but you must specify the US East (Ohio) Region to create, update, or otherwise work with Route 53 Global Resolver resources. That is, for example, specify --region us-east-2 on Amazon Web Services CLI commands.

Parameters:

  • client_token (Optional[ClientToken], default: None ) –

    A unique, case-sensitive identifier that ensures the request is idempotent. Making the same request multiple times with the same clientToken produces the same result every time.

  • core_network_arn (ResourceArn) –

    The Amazon Resource Name (ARN) of the Amazon Web Services Cloud WAN core network to connect to this endpoint.

  • global_resolver_id (ResourceId) –

    The ID of the Route 53 Global Resolver to associate with this core network endpoint.

  • ip_addresses (CoreNetworkEndpointDnsIpInputItems) –

    The IP addresses that the core network endpoint uses to resolve DNS queries within the Amazon Web Services Cloud WAN core network.

  • name (Optional[ResourceName], default: None ) –

    A descriptive name for the core network endpoint.

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

    An array of user-defined keys and optional values that you can use to categorize and organize the core network endpoint.

Raises:

  • AccessDeniedException –

    You don't have permission to perform this operation. Check your IAM permissions and try again.

  • ConflictException –

    The request conflicts with the current state of the resource. This can occur when trying to modify a resource that is not in a valid state for the requested operation.

  • InternalServerException –

    An internal server error occurred. Try again later.

  • ResourceNotFoundException –

    The specified resource was not found. Verify the resource ID and try again.

  • ServiceQuotaExceededException –

    The request would exceed one or more service quotas. Check your current usage and quotas, then try again.

  • ThrottlingException –

    The request was throttled due to too many requests. Wait a moment and try again.

  • ValidationException –

    The input parameters are invalid. Check the parameter values and try again.

  • UnknownServiceError –

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

Source code in docs_src/capo_route53globalresolver/_services/async_route53_global_resolver.py
async def create_core_network_endpoint(
    self,
    core_network_arn: "capo_route53globalresolver.types.resource_arn.ResourceArn",
    global_resolver_id: "capo_route53globalresolver.types.resource_id.ResourceId",
    ip_addresses: "capo_route53globalresolver.types.core_network_endpoint_dns_ip_input_items.CoreNetworkEndpointDnsIpInputItems",
    *,
    config_overrides: Optional[AsyncRoute53GlobalResolverClientConfig] = None,
    client_token: Optional[
        "capo_route53globalresolver.types.client_token.ClientToken"
    ] = None,
    name: Optional[
        "capo_route53globalresolver.types.resource_name.ResourceName"
    ] = None,
    tags: Optional["capo_route53globalresolver.types.tags.Tags"] = None,
) -> "capo_route53globalresolver.types.create_core_network_endpoint_output.CreateCoreNetworkEndpointOutput":
    """<p>Creates a core network endpoint, which enables DNS resolution for Amazon Web Services Cloud WAN core network segments. The endpoint connects a Route 53 Global Resolver to an Amazon Web Services Cloud WAN core network so that resources attached to the core network can send DNS queries to the resolver.</p> <important> <p>Route 53 Global Resolver is a global service that supports resolvers in multiple Amazon Web Services Regions, but you must specify the US East (Ohio) Region to create, update, or otherwise work with Route 53 Global Resolver resources. That is, for example, specify <code>--region us-east-2</code> on Amazon Web Services CLI commands.</p> </important>

    Args:
        client_token: <p>A unique, case-sensitive identifier that ensures the request is idempotent. Making the same request multiple times with the same <code>clientToken</code> produces the same result every time.</p>
        core_network_arn: <p>The Amazon Resource Name (ARN) of the Amazon Web Services Cloud WAN core network to connect to this endpoint.</p>
        global_resolver_id: <p>The ID of the Route 53 Global Resolver to associate with this core network endpoint.</p>
        ip_addresses: <p>The IP addresses that the core network endpoint uses to resolve DNS queries within the Amazon Web Services Cloud WAN core network.</p>
        name: <p>A descriptive name for the core network endpoint.</p>
        tags: <p>An array of user-defined keys and optional values that you can use to categorize and organize the core network endpoint.</p>

    Raises:
        capo_route53globalresolver.errors.access_denied_exception.AccessDeniedException: <p>You don't have permission to perform this operation. Check your IAM permissions and try again.</p>
        capo_route53globalresolver.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource. This can occur when trying to modify a resource that is not in a valid state for the requested operation.</p>
        capo_route53globalresolver.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
        capo_route53globalresolver.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource ID and try again.</p>
        capo_route53globalresolver.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed one or more service quotas. Check your current usage and quotas, then try again.</p>
        capo_route53globalresolver.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Wait a moment and try again.</p>
        capo_route53globalresolver.errors.validation_exception.ValidationException: <p>The input parameters are invalid. Check the parameter values and try again.</p>
        capo_route53globalresolver.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_route53globalresolver.types.create_core_network_endpoint_input.CreateCoreNetworkEndpointInput]",
    ) -> AsyncOperationResponse[
        "capo_route53globalresolver.types.create_core_network_endpoint_output.CreateCoreNetworkEndpointOutput"
    ]:
        import capo_route53globalresolver._operations.ec2_dns_global_resolver_customer_api.create_core_network_endpoint

        (
            output,
            http_response,
        ) = await capo_route53globalresolver._operations.ec2_dns_global_resolver_customer_api.create_core_network_endpoint.async_create_core_network_endpoint(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateCoreNetworkEndpoint")
    )
    input_: capo_route53globalresolver.types.create_core_network_endpoint_input.CreateCoreNetworkEndpointInput = {
        "core_network_arn": core_network_arn,
        "global_resolver_id": global_resolver_id,
        "ip_addresses": ip_addresses,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if name is not None:
        input_["name"] = name
    if tags is not None:
        input_["tags"] = tags

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