Skip to content

create_route_server_endpoint

create_route_server_endpoint(
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    route_server_id: Optional[RouteServerId] = None,
    subnet_id: Optional[SubnetId] = None,
    client_token: Optional[String] = None,
    dry_run: Optional[Boolean] = None,
    tag_specifications: Optional[TagSpecificationList] = None,
) -> CreateRouteServerEndpointResult

Creates a new endpoint for a route server in a specified subnet.

A route server endpoint is an Amazon Web Services-managed component inside a subnet that facilitates BGP (Border Gateway Protocol) connections between your route server and your BGP peers.

For more information see Dynamic routing in your VPC with VPC Route Server in the Amazon VPC User Guide.

Parameters:

  • route_server_id (Optional[RouteServerId], default: None ) –

    The ID of the route server for which to create an endpoint.

  • subnet_id (Optional[SubnetId], default: None ) –

    The ID of the subnet in which to create the route server endpoint.

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

    Unique, case-sensitive identifier to ensure idempotency of the request.

  • dry_run (Optional[Boolean], default: None ) –

    A check for whether you have the required permissions for the action without actually making the request and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

  • tag_specifications (Optional[TagSpecificationList], default: None ) –

    The tags to apply to the route server endpoint during creation.

Raises:

Source code in docs_src/capo_ec2/_services/ec2.py
def create_route_server_endpoint(
    self,
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    route_server_id: Optional[
        "capo_ec2.types.route_server_id.RouteServerId"
    ] = None,
    subnet_id: Optional["capo_ec2.types.subnet_id.SubnetId"] = None,
    client_token: Optional["capo_ec2.types.string.String"] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
    tag_specifications: Optional[
        "capo_ec2.types.tag_specification_list.TagSpecificationList"
    ] = None,
) -> "capo_ec2.types.create_route_server_endpoint_result.CreateRouteServerEndpointResult":
    """<p>Creates a new endpoint for a route server in a specified subnet.</p> <p>A route server endpoint is an Amazon Web Services-managed component inside a subnet that facilitates <a href="https://en.wikipedia.org/wiki/Border_Gateway_Protocol">BGP (Border Gateway Protocol)</a> connections between your route server and your BGP peers.</p> <p>For more information see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/dynamic-routing-route-server.html">Dynamic routing in your VPC with VPC Route Server</a> in the <i>Amazon VPC User Guide</i>.</p>

    Args:
        route_server_id: <p>The ID of the route server for which to create an endpoint.</p>
        subnet_id: <p>The ID of the subnet in which to create the route server endpoint.</p>
        client_token: <p>Unique, case-sensitive identifier to ensure idempotency of the request.</p>
        dry_run: <p>A check for whether you have the required permissions for the action without actually making the request and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
        tag_specifications: <p>The tags to apply to the route server endpoint during creation.</p>

    Raises:
        capo_ec2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ec2.types.create_route_server_endpoint_request.CreateRouteServerEndpointRequest]",
    ) -> OperationResponse[
        "capo_ec2.types.create_route_server_endpoint_result.CreateRouteServerEndpointResult"
    ]:
        import capo_ec2._operations.amazon_ec2.create_route_server_endpoint

        output, http_response = (
            capo_ec2._operations.amazon_ec2.create_route_server_endpoint.create_route_server_endpoint(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateRouteServerEndpoint")
    )
    input_: capo_ec2.types.create_route_server_endpoint_request.CreateRouteServerEndpointRequest = {}
    if route_server_id is not None:
        input_["route_server_id"] = route_server_id
    if subnet_id is not None:
        input_["subnet_id"] = subnet_id
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if tag_specifications is not None:
        input_["tag_specifications"] = tag_specifications

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