Skip to content

create_vpc_ingress_connection async

create_vpc_ingress_connection(
    service_arn: AppRunnerResourceArn,
    vpc_ingress_connection_name: VpcIngressConnectionName,
    ingress_vpc_configuration: IngressVpcConfiguration,
    *,
    config_overrides: Optional[AsyncAppRunnerClientConfig] = None,
    tags: Optional[TagList] = None,
) -> CreateVpcIngressConnectionResponse

Create an App Runner VPC Ingress Connection resource. App Runner requires this resource when you want to associate your App Runner service with an Amazon VPC endpoint.

Parameters:

  • service_arn (AppRunnerResourceArn) –

    The Amazon Resource Name (ARN) for this App Runner service that is used to create the VPC Ingress Connection resource.

  • vpc_ingress_connection_name (VpcIngressConnectionName) –

    A name for the VPC Ingress Connection resource. It must be unique across all the active VPC Ingress Connections in your Amazon Web Services account in the Amazon Web Services Region.

  • ingress_vpc_configuration (IngressVpcConfiguration) –

    Specifications for the customer’s Amazon VPC and the related Amazon Web Services PrivateLink VPC endpoint that are used to create the VPC Ingress Connection resource.

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

    An optional list of metadata items that you can associate with the VPC Ingress Connection resource. A tag is a key-value pair.

Raises:

Source code in docs_src/capo_apprunner/_services/async_app_runner.py
async def create_vpc_ingress_connection(
    self,
    service_arn: "capo_apprunner.types.app_runner_resource_arn.AppRunnerResourceArn",
    vpc_ingress_connection_name: "capo_apprunner.types.vpc_ingress_connection_name.VpcIngressConnectionName",
    ingress_vpc_configuration: "capo_apprunner.types.ingress_vpc_configuration.IngressVpcConfiguration",
    *,
    config_overrides: Optional[AsyncAppRunnerClientConfig] = None,
    tags: Optional["capo_apprunner.types.tag_list.TagList"] = None,
) -> "capo_apprunner.types.create_vpc_ingress_connection_response.CreateVpcIngressConnectionResponse":
    """<p>Create an App Runner VPC Ingress Connection resource. App Runner requires this resource when you want to associate your App Runner service with an Amazon VPC endpoint.</p>

    Args:
        service_arn: <p>The Amazon Resource Name (ARN) for this App Runner service that is used to create the VPC Ingress Connection resource.</p>
        vpc_ingress_connection_name: <p>A name for the VPC Ingress Connection resource. It must be unique across all the active VPC Ingress Connections in your Amazon Web Services account in the Amazon Web Services Region. </p>
        ingress_vpc_configuration: <p>Specifications for the customer’s Amazon VPC and the related Amazon Web Services PrivateLink VPC endpoint that are used to create the VPC Ingress Connection resource.</p>
        tags: <p>An optional list of metadata items that you can associate with the VPC Ingress Connection resource. A tag is a key-value pair.</p>

    Raises:
        capo_apprunner.errors.internal_service_error_exception.InternalServiceErrorException: <p>An unexpected service exception occurred.</p>
        capo_apprunner.errors.invalid_request_exception.InvalidRequestException: <p>One or more input parameters aren't valid. Refer to the API action's document page, correct the input parameters, and try the action again.</p>
        capo_apprunner.errors.invalid_state_exception.InvalidStateException: <p>You can't perform this action when the resource is in its current state.</p>
        capo_apprunner.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>App Runner can't create this resource. You've reached your account quota for this resource type.</p> <p>For App Runner per-resource quotas, see <a href="https://docs.aws.amazon.com/general/latest/gr/apprunner.html">App Runner endpoints and quotas</a> in the <i>Amazon Web Services General Reference</i>.</p>
        capo_apprunner.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_apprunner.types.create_vpc_ingress_connection_request.CreateVpcIngressConnectionRequest]",
    ) -> AsyncOperationResponse[
        "capo_apprunner.types.create_vpc_ingress_connection_response.CreateVpcIngressConnectionResponse"
    ]:
        import capo_apprunner._operations.app_runner.create_vpc_ingress_connection

        (
            output,
            http_response,
        ) = await capo_apprunner._operations.app_runner.create_vpc_ingress_connection.async_create_vpc_ingress_connection(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateVpcIngressConnection")
    )
    input_: capo_apprunner.types.create_vpc_ingress_connection_request.CreateVpcIngressConnectionRequest = {
        "service_arn": service_arn,
        "vpc_ingress_connection_name": vpc_ingress_connection_name,
        "ingress_vpc_configuration": ingress_vpc_configuration,
    }
    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