Skip to content

create_vpc_endpoint_service_configuration async

create_vpc_endpoint_service_configuration(
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional[Boolean] = None,
    acceptance_required: Optional[Boolean] = None,
    private_dns_name: Optional[String] = None,
    network_load_balancer_arns: Optional[ValueStringList] = None,
    gateway_load_balancer_arns: Optional[ValueStringList] = None,
    supported_ip_address_types: Optional[ValueStringList] = None,
    supported_regions: Optional[ValueStringList] = None,
    client_token: Optional[String] = None,
    tag_specifications: Optional[TagSpecificationList] = None,
) -> CreateVpcEndpointServiceConfigurationResult

Creates a VPC endpoint service to which service consumers (Amazon Web Services accounts, users, and IAM roles) can connect.

Before you create an endpoint service, you must create one of the following for your service:

If you set the private DNS name, you must prove that you own the private DNS domain name.

For more information, see the Amazon Web Services PrivateLink Guide.

Parameters:

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

    Checks 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.

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

    Indicates whether requests from service consumers to create an endpoint to your service must be accepted manually.

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

    (Interface endpoint configuration) The private DNS name to assign to the VPC endpoint service.

  • network_load_balancer_arns (Optional[ValueStringList], default: None ) –

    The Amazon Resource Names (ARNs) of the Network Load Balancers.

  • gateway_load_balancer_arns (Optional[ValueStringList], default: None ) –

    The Amazon Resource Names (ARNs) of the Gateway Load Balancers.

  • supported_ip_address_types (Optional[ValueStringList], default: None ) –

    The supported IP address types. The possible values are ipv4 and ipv6.

  • supported_regions (Optional[ValueStringList], default: None ) –

    The Regions from which service consumers can access the service.

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

    Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency.

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

    The tags to associate with the service.

Raises:

Source code in docs_src/capo_ec2/_services/async_ec2.py
async def create_vpc_endpoint_service_configuration(
    self,
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
    acceptance_required: Optional["capo_ec2.types.boolean.Boolean"] = None,
    private_dns_name: Optional["capo_ec2.types.string.String"] = None,
    network_load_balancer_arns: Optional[
        "capo_ec2.types.value_string_list.ValueStringList"
    ] = None,
    gateway_load_balancer_arns: Optional[
        "capo_ec2.types.value_string_list.ValueStringList"
    ] = None,
    supported_ip_address_types: Optional[
        "capo_ec2.types.value_string_list.ValueStringList"
    ] = None,
    supported_regions: Optional[
        "capo_ec2.types.value_string_list.ValueStringList"
    ] = None,
    client_token: Optional["capo_ec2.types.string.String"] = None,
    tag_specifications: Optional[
        "capo_ec2.types.tag_specification_list.TagSpecificationList"
    ] = None,
) -> "capo_ec2.types.create_vpc_endpoint_service_configuration_result.CreateVpcEndpointServiceConfigurationResult":
    """<p>Creates a VPC endpoint service to which service consumers (Amazon Web Services accounts, users, and IAM roles) can connect.</p> <p>Before you create an endpoint service, you must create one of the following for your service:</p> <ul> <li> <p>A <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/network/">Network Load Balancer</a>. Service consumers connect to your service using an interface endpoint.</p> </li> <li> <p>A <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/gateway/">Gateway Load Balancer</a>. Service consumers connect to your service using a Gateway Load Balancer endpoint.</p> </li> </ul> <p>If you set the private DNS name, you must prove that you own the private DNS domain name.</p> <p>For more information, see the <a href="https://docs.aws.amazon.com/vpc/latest/privatelink/">Amazon Web Services PrivateLink Guide</a>.</p>

    Args:
        dry_run: <p>Checks 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>
        acceptance_required: <p>Indicates whether requests from service consumers to create an endpoint to your service must be accepted manually.</p>
        private_dns_name: <p>(Interface endpoint configuration) The private DNS name to assign to the VPC endpoint service.</p>
        network_load_balancer_arns: <p>The Amazon Resource Names (ARNs) of the Network Load Balancers.</p>
        gateway_load_balancer_arns: <p>The Amazon Resource Names (ARNs) of the Gateway Load Balancers.</p>
        supported_ip_address_types: <p>The supported IP address types. The possible values are <code>ipv4</code> and <code>ipv6</code>.</p>
        supported_regions: <p>The Regions from which service consumers can access the service.</p>
        client_token: <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html">How to ensure idempotency</a>.</p>
        tag_specifications: <p>The tags to associate with the service.</p>

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

    async def _handler(
        req: "AsyncOperationRequest[capo_ec2.types.create_vpc_endpoint_service_configuration_request.CreateVpcEndpointServiceConfigurationRequest]",
    ) -> AsyncOperationResponse[
        "capo_ec2.types.create_vpc_endpoint_service_configuration_result.CreateVpcEndpointServiceConfigurationResult"
    ]:
        import capo_ec2._operations.amazon_ec2.create_vpc_endpoint_service_configuration

        (
            output,
            http_response,
        ) = await capo_ec2._operations.amazon_ec2.create_vpc_endpoint_service_configuration.async_create_vpc_endpoint_service_configuration(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateVpcEndpointServiceConfiguration")
    )
    input_: capo_ec2.types.create_vpc_endpoint_service_configuration_request.CreateVpcEndpointServiceConfigurationRequest = {}
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if acceptance_required is not None:
        input_["acceptance_required"] = acceptance_required
    if private_dns_name is not None:
        input_["private_dns_name"] = private_dns_name
    if network_load_balancer_arns is not None:
        input_["network_load_balancer_arns"] = network_load_balancer_arns
    if gateway_load_balancer_arns is not None:
        input_["gateway_load_balancer_arns"] = gateway_load_balancer_arns
    if supported_ip_address_types is not None:
        input_["supported_ip_address_types"] = supported_ip_address_types
    if supported_regions is not None:
        input_["supported_regions"] = supported_regions
    if client_token is not None:
        input_["client_token"] = client_token
    if tag_specifications is not None:
        input_["tag_specifications"] = tag_specifications

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