Skip to content

create_endpoint

create_endpoint(
    outpost_id: OutpostId,
    subnet_id: SubnetId,
    security_group_id: SecurityGroupId,
    *,
    config_overrides: Optional[S3OutpostsClientConfig] = None,
    access_type: Optional[EndpointAccessType] = None,
    customer_owned_ipv4_pool: Optional[CustomerOwnedIpv4Pool] = None,
) -> CreateEndpointResult

Creates an endpoint and associates it with the specified Outpost.

It can take up to 5 minutes for this action to finish.

Related actions include:

Parameters:

  • outpost_id (OutpostId) –

    The ID of the Outposts.

  • subnet_id (SubnetId) –

    The ID of the subnet in the selected VPC. The endpoint subnet must belong to the Outpost that has Amazon S3 on Outposts provisioned.

  • security_group_id (SecurityGroupId) –

    The ID of the security group to use with the endpoint.

  • access_type (Optional[EndpointAccessType], default: None ) –

    The type of access for the network connectivity for the Amazon S3 on Outposts endpoint. To use the Amazon Web Services VPC, choose Private. To use the endpoint with an on-premises network, choose CustomerOwnedIp. If you choose CustomerOwnedIp, you must also provide the customer-owned IP address pool (CoIP pool).

    Private is the default access type value.

  • customer_owned_ipv4_pool (Optional[CustomerOwnedIpv4Pool], default: None ) –

    The ID of the customer-owned IPv4 address pool (CoIP pool) for the endpoint. IP addresses are allocated from this pool for the endpoint.

Raises:

Source code in docs_src/capo_s3outposts/_services/s3_outposts.py
def create_endpoint(
    self,
    outpost_id: "capo_s3outposts.types.outpost_id.OutpostId",
    subnet_id: "capo_s3outposts.types.subnet_id.SubnetId",
    security_group_id: "capo_s3outposts.types.security_group_id.SecurityGroupId",
    *,
    config_overrides: Optional[S3OutpostsClientConfig] = None,
    access_type: Optional[
        "capo_s3outposts.types.endpoint_access_type.EndpointAccessType"
    ] = None,
    customer_owned_ipv4_pool: Optional[
        "capo_s3outposts.types.customer_owned_ipv4_pool.CustomerOwnedIpv4Pool"
    ] = None,
) -> "capo_s3outposts.types.create_endpoint_result.CreateEndpointResult":
    """<p>Creates an endpoint and associates it with the specified Outpost.</p> <note> <p>It can take up to 5 minutes for this action to finish.</p> </note> <p></p> <p>Related actions include:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_s3outposts_DeleteEndpoint.html">DeleteEndpoint</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_s3outposts_ListEndpoints.html">ListEndpoints</a> </p> </li> </ul>

    Args:
        outpost_id: <p>The ID of the Outposts. </p>
        subnet_id: <p>The ID of the subnet in the selected VPC. The endpoint subnet must belong to the Outpost that has Amazon S3 on Outposts provisioned.</p>
        security_group_id: <p>The ID of the security group to use with the endpoint.</p>
        access_type: <p>The type of access for the network connectivity for the Amazon S3 on Outposts endpoint. To use the Amazon Web Services VPC, choose <code>Private</code>. To use the endpoint with an on-premises network, choose <code>CustomerOwnedIp</code>. If you choose <code>CustomerOwnedIp</code>, you must also provide the customer-owned IP address pool (CoIP pool).</p> <note> <p> <code>Private</code> is the default access type value.</p> </note>
        customer_owned_ipv4_pool: <p>The ID of the customer-owned IPv4 address pool (CoIP pool) for the endpoint. IP addresses are allocated from this pool for the endpoint.</p>

    Raises:
        capo_s3outposts.errors.access_denied_exception.AccessDeniedException: <p>Access was denied for this action.</p>
        capo_s3outposts.errors.conflict_exception.ConflictException: <p>There was a conflict with this action, and it could not be completed.</p>
        capo_s3outposts.errors.internal_server_exception.InternalServerException: <p>There was an exception with the internal server.</p>
        capo_s3outposts.errors.outpost_offline_exception.OutpostOfflineException: <p>The service link connection to your Outposts home Region is down. Check your connection and try again.</p>
        capo_s3outposts.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource was not found.</p>
        capo_s3outposts.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_s3outposts.errors.validation_exception.ValidationException: <p>There was an exception validating this data.</p>
        capo_s3outposts.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_s3outposts.types.create_endpoint_request.CreateEndpointRequest]",
    ) -> OperationResponse[
        "capo_s3outposts.types.create_endpoint_result.CreateEndpointResult"
    ]:
        import capo_s3outposts._operations.s3_outposts.create_endpoint

        output, http_response = (
            capo_s3outposts._operations.s3_outposts.create_endpoint.create_endpoint(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateEndpoint")
    )
    input_: capo_s3outposts.types.create_endpoint_request.CreateEndpointRequest = {
        "outpost_id": outpost_id,
        "subnet_id": subnet_id,
        "security_group_id": security_group_id,
    }
    if access_type is not None:
        input_["access_type"] = access_type
    if customer_owned_ipv4_pool is not None:
        input_["customer_owned_ipv4_pool"] = customer_owned_ipv4_pool

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