Skip to content

create_proxy async

create_proxy(
    proxy_name: ResourceName,
    nat_gateway_id: NatGatewayId,
    tls_intercept_properties: TlsInterceptPropertiesRequest,
    *,
    config_overrides: Optional[AsyncNetworkFirewallClientConfig] = None,
    proxy_configuration_name: Optional[ResourceName] = None,
    proxy_configuration_arn: Optional[ResourceArn] = None,
    listener_properties: Optional[ListenerPropertiesRequest] = None,
    tags: Optional[TagList] = None,
) -> CreateProxyResponse

Creates an Network Firewall Proxy

Attaches a Proxy configuration to a NAT Gateway.

To manage a proxy's tags, use the standard Amazon Web Services resource tagging operations, ListTagsForResource, TagResource, and UntagResource.

To retrieve information about proxies, use ListProxies and DescribeProxy.

Parameters:

  • proxy_name (ResourceName) –

    The descriptive name of the proxy. You can't change the name of a proxy after you create it.

  • nat_gateway_id (NatGatewayId) –

    A unique identifier for the NAT gateway to use with proxy resources.

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

    The descriptive name of the proxy configuration. You can't change the name of a proxy configuration after you create it.

    You must specify the ARN or the name, and you can specify both.

  • proxy_configuration_arn (Optional[ResourceArn], default: None ) –

    The Amazon Resource Name (ARN) of a proxy configuration.

    You must specify the ARN or the name, and you can specify both.

  • listener_properties (Optional[ListenerPropertiesRequest], default: None ) –

    Listener properties for HTTP and HTTPS traffic.

  • tls_intercept_properties (TlsInterceptPropertiesRequest) –

    TLS decryption on traffic to filter on attributes in the HTTP header.

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

    The key:value pairs to associate with the resource.

Raises:

  • InternalServerError –

    Your request is valid, but Network Firewall couldn't perform the operation because of a system problem. Retry your request.

  • InvalidRequestException –

    The operation failed because of a problem with your request. Examples include:

    • You specified an unsupported parameter name or value.

    • You tried to update a property with a value that isn't among the available types.

    • Your request references an ARN that is malformed, or corresponds to a resource that isn't valid in the context of the request.

  • LimitExceededException –

    Unable to perform the operation because doing so would violate a limit setting.

  • ResourceNotFoundException –

    Unable to locate a resource using the parameters that you provided.

  • ThrottlingException –

    Unable to process the request due to throttling limitations.

  • UnsupportedOperationException –

    The operation you requested isn't supported by Network Firewall.

  • UnknownServiceError –

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

Source code in docs_src/capo_network_firewall/_services/async_network_firewall.py
async def create_proxy(
    self,
    proxy_name: "capo_network_firewall.types.resource_name.ResourceName",
    nat_gateway_id: "capo_network_firewall.types.nat_gateway_id.NatGatewayId",
    tls_intercept_properties: "capo_network_firewall.types.tls_intercept_properties_request.TlsInterceptPropertiesRequest",
    *,
    config_overrides: Optional[AsyncNetworkFirewallClientConfig] = None,
    proxy_configuration_name: Optional[
        "capo_network_firewall.types.resource_name.ResourceName"
    ] = None,
    proxy_configuration_arn: Optional[
        "capo_network_firewall.types.resource_arn.ResourceArn"
    ] = None,
    listener_properties: Optional[
        "capo_network_firewall.types.listener_properties_request.ListenerPropertiesRequest"
    ] = None,
    tags: Optional["capo_network_firewall.types.tag_list.TagList"] = None,
) -> "capo_network_firewall.types.create_proxy_response.CreateProxyResponse":
    """<p>Creates an Network Firewall <a>Proxy</a> </p> <p>Attaches a Proxy configuration to a NAT Gateway. </p> <p>To manage a proxy's tags, use the standard Amazon Web Services resource tagging operations, <a>ListTagsForResource</a>, <a>TagResource</a>, and <a>UntagResource</a>.</p> <p>To retrieve information about proxies, use <a>ListProxies</a> and <a>DescribeProxy</a>.</p>

    Args:
        proxy_name: <p>The descriptive name of the proxy. You can't change the name of a proxy after you create it.</p>
        nat_gateway_id: <p>A unique identifier for the NAT gateway to use with proxy resources.</p>
        proxy_configuration_name: <p>The descriptive name of the proxy configuration. You can't change the name of a proxy configuration after you create it.</p> <p>You must specify the ARN or the name, and you can specify both. </p>
        proxy_configuration_arn: <p>The Amazon Resource Name (ARN) of a proxy configuration.</p> <p>You must specify the ARN or the name, and you can specify both. </p>
        listener_properties: <p>Listener properties for HTTP and HTTPS traffic.</p>
        tls_intercept_properties: <p>TLS decryption on traffic to filter on attributes in the HTTP header. </p>
        tags: <p>The key:value pairs to associate with the resource.</p>

    Raises:
        capo_network_firewall.errors.internal_server_error.InternalServerError: <p>Your request is valid, but Network Firewall couldn't perform the operation because of a system problem. Retry your request. </p>
        capo_network_firewall.errors.invalid_request_exception.InvalidRequestException: <p>The operation failed because of a problem with your request. Examples include: </p> <ul> <li> <p>You specified an unsupported parameter name or value.</p> </li> <li> <p>You tried to update a property with a value that isn't among the available types.</p> </li> <li> <p>Your request references an ARN that is malformed, or corresponds to a resource that isn't valid in the context of the request.</p> </li> </ul>
        capo_network_firewall.errors.limit_exceeded_exception.LimitExceededException: <p>Unable to perform the operation because doing so would violate a limit setting. </p>
        capo_network_firewall.errors.resource_not_found_exception.ResourceNotFoundException: <p>Unable to locate a resource using the parameters that you provided.</p>
        capo_network_firewall.errors.throttling_exception.ThrottlingException: <p>Unable to process the request due to throttling limitations.</p>
        capo_network_firewall.errors.unsupported_operation_exception.UnsupportedOperationException: <p>The operation you requested isn't supported by Network Firewall. </p>
        capo_network_firewall.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_network_firewall.types.create_proxy_request.CreateProxyRequest]",
    ) -> AsyncOperationResponse[
        "capo_network_firewall.types.create_proxy_response.CreateProxyResponse"
    ]:
        import capo_network_firewall._operations.network_firewall_20201112.create_proxy

        (
            output,
            http_response,
        ) = await capo_network_firewall._operations.network_firewall_20201112.create_proxy.async_create_proxy(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateProxy")
    )
    input_: capo_network_firewall.types.create_proxy_request.CreateProxyRequest = {
        "proxy_name": proxy_name,
        "nat_gateway_id": nat_gateway_id,
        "tls_intercept_properties": tls_intercept_properties,
    }
    if proxy_configuration_name is not None:
        input_["proxy_configuration_name"] = proxy_configuration_name
    if proxy_configuration_arn is not None:
        input_["proxy_configuration_arn"] = proxy_configuration_arn
    if listener_properties is not None:
        input_["listener_properties"] = listener_properties
    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