Skip to content

create_responder_gateway async

create_responder_gateway(
    vpc_id: VpcId,
    subnet_ids: SubnetIdList,
    security_group_ids: SecurityGroupIdList,
    port: int,
    protocol: Protocol,
    client_token: str,
    *,
    config_overrides: Optional[AsyncRTBFabricClientConfig] = None,
    domain_name: Optional[DomainName] = None,
    listener_config: Optional[ListenerConfig] = None,
    trust_store_configuration: Optional[TrustStoreConfiguration] = None,
    managed_endpoint_configuration: Optional[ManagedEndpointConfiguration] = None,
    description: Optional[str] = None,
    tags: Optional[TagsMap] = None,
    gateway_type: Optional[GatewayType] = None,
    client_routing_policy: Optional[ClientRoutingPolicy] = None,
) -> CreateResponderGatewayResponse

Creates a responder gateway.

A domain name or managed endpoint is required.

Parameters:

  • vpc_id (VpcId) –

    The unique identifier of the Virtual Private Cloud (VPC).

  • subnet_ids (SubnetIdList) –

    Unique identifiers of the subnets. A service quota for your account sets the number of Availability Zones that your subnets can span. By default, this quota is one Availability Zone. To span more Availability Zones, request a quota increase.

  • security_group_ids (SecurityGroupIdList) –

    The unique identifiers of the security groups.

  • domain_name (Optional[DomainName], default: None ) –

    The domain name for the responder gateway.

  • port (int) –

    The networking port to use.

  • protocol (Protocol) –

    The networking protocol to use.

  • trust_store_configuration (Optional[TrustStoreConfiguration], default: None ) –

    The configuration of the trust store.

  • managed_endpoint_configuration (Optional[ManagedEndpointConfiguration], default: None ) –

    The configuration for the managed endpoint.

  • client_token (str) –

    Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value.

    If you don't provide this value, then Amazon Web Services generates a random one for you.

    If you retry the operation with the same clientToken, but with different parameters, the retry fails with an IdempotentParameterMismatch error.

  • description (Optional[str], default: None ) –

    An optional description for the responder gateway.

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

    A map of the key-value pairs of the tag or tags to assign to the resource.

  • gateway_type (Optional[GatewayType], default: None ) –

    The type of gateway. Valid values are EXTERNAL or INTERNAL.

  • client_routing_policy (Optional[ClientRoutingPolicy], default: None ) –

    The client routing policy of the gateway. This policy controls which Availability Zones RTB Fabric uses to reach the gateway for the requester gateways that send traffic to it. Valid values are the following:

    • AVAILABILITY_ZONE_AFFINITY: RTB Fabric routes each requester's traffic to gateway capacity in the requester's own Availability Zone when the gateway has capacity available there. Otherwise, RTB Fabric routes the traffic to gateway capacity in the other Availability Zones of the gateway.

    • ANY_AVAILABILITY_ZONE: RTB Fabric routes each requester's traffic to gateway capacity in every Availability Zone that the subnets of the gateway span. The Availability Zone that the requester is in does not change this.

    If you don't specify a value, RTB Fabric uses AVAILABILITY_ZONE_AFFINITY. To get the behavior of ANY_AVAILABILITY_ZONE, create the gateway with subnets in more than one Availability Zone. RTB Fabric does not support partial Availability Zone affinity, so PARTIAL_AVAILABILITY_ZONE_AFFINITY is not a valid value. For more information, see Configuring Availability Zone affinity in the Amazon Web Services RTB Fabric User Guide.

Raises:

Examples:

Create a responder gateway Create responder gateway

>>> await client.create_responder_gateway(description='My responder gateway', vpc_id='vpc-12345678', subnet_ids=['subnet-12345678', 'subnet-87654321'], security_group_ids=['sg-12345678'], port=443, protocol='HTTPS', client_token='12345678-1234-1234-1234-123456789012')
Source code in docs_src/capo_rtbfabric/_services/async_rtb_fabric.py
async def create_responder_gateway(
    self,
    vpc_id: "capo_rtbfabric.types.vpc_id.VpcId",
    subnet_ids: "capo_rtbfabric.types.subnet_id_list.SubnetIdList",
    security_group_ids: "capo_rtbfabric.types.security_group_id_list.SecurityGroupIdList",
    port: int,
    protocol: "capo_rtbfabric.types.protocol.Protocol",
    client_token: str,
    *,
    config_overrides: Optional[AsyncRTBFabricClientConfig] = None,
    domain_name: Optional["capo_rtbfabric.types.domain_name.DomainName"] = None,
    listener_config: Optional[
        "capo_rtbfabric.types.listener_config.ListenerConfig"
    ] = None,
    trust_store_configuration: Optional[
        "capo_rtbfabric.types.trust_store_configuration.TrustStoreConfiguration"
    ] = None,
    managed_endpoint_configuration: Optional[
        "capo_rtbfabric.types.managed_endpoint_configuration.ManagedEndpointConfiguration"
    ] = None,
    description: Optional[str] = None,
    tags: Optional["capo_rtbfabric.types.tags_map.TagsMap"] = None,
    gateway_type: Optional["capo_rtbfabric.types.gateway_type.GatewayType"] = None,
    client_routing_policy: Optional[
        "capo_rtbfabric.types.client_routing_policy.ClientRoutingPolicy"
    ] = None,
) -> "capo_rtbfabric.types.create_responder_gateway_response.CreateResponderGatewayResponse":
    """<p>Creates a responder gateway.</p> <important> <p>A domain name or managed endpoint is required.</p> </important>

    Args:
        vpc_id: <p>The unique identifier of the Virtual Private Cloud (VPC).</p>
        subnet_ids: <p>Unique identifiers of the subnets. A service quota for your account sets the number of Availability Zones that your subnets can span. By default, this quota is one Availability Zone. To span more Availability Zones, request a quota increase.</p>
        security_group_ids: <p>The unique identifiers of the security groups.</p>
        domain_name: <p>The domain name for the responder gateway.</p>
        port: <p>The networking port to use.</p>
        protocol: <p>The networking protocol to use.</p>
        trust_store_configuration: <p>The configuration of the trust store.</p>
        managed_endpoint_configuration: <p>The configuration for the managed endpoint.</p>
        client_token: <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value</a>.</p> <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p> <p>If you retry the operation with the same <code>clientToken</code>, but with different parameters, the retry fails with an <code>IdempotentParameterMismatch</code> error.</p>
        description: <p>An optional description for the responder gateway.</p>
        tags: <p>A map of the key-value pairs of the tag or tags to assign to the resource.</p>
        gateway_type: <p>The type of gateway. Valid values are <code>EXTERNAL</code> or <code>INTERNAL</code>.</p>
        client_routing_policy: <p>The client routing policy of the gateway. This policy controls which Availability Zones RTB Fabric uses to reach the gateway for the requester gateways that send traffic to it. Valid values are the following:</p> <ul> <li> <p> <code>AVAILABILITY_ZONE_AFFINITY</code>: RTB Fabric routes each requester's traffic to gateway capacity in the requester's own Availability Zone when the gateway has capacity available there. Otherwise, RTB Fabric routes the traffic to gateway capacity in the other Availability Zones of the gateway.</p> </li> <li> <p> <code>ANY_AVAILABILITY_ZONE</code>: RTB Fabric routes each requester's traffic to gateway capacity in every Availability Zone that the subnets of the gateway span. The Availability Zone that the requester is in does not change this.</p> </li> </ul> <p>If you don't specify a value, RTB Fabric uses <code>AVAILABILITY_ZONE_AFFINITY</code>. To get the behavior of <code>ANY_AVAILABILITY_ZONE</code>, create the gateway with subnets in more than one Availability Zone. RTB Fabric does not support partial Availability Zone affinity, so <code>PARTIAL_AVAILABILITY_ZONE_AFFINITY</code> is not a valid value. For more information, see <a href="https://docs.aws.amazon.com/rtb-fabric/latest/userguide/working-with-responder-gateways.html#configuring-availability-zone-affinity">Configuring Availability Zone affinity</a> in the <i>Amazon Web Services RTB Fabric User Guide</i>.</p>

    Raises:
        capo_rtbfabric.errors.access_denied_exception.AccessDeniedException: <p>The request could not be completed because you do not have sufficient access to perform this action.</p>
        capo_rtbfabric.errors.internal_server_exception.InternalServerException: <p>The request could not be completed because of an internal server error. Try your call again.</p>
        capo_rtbfabric.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request could not be completed because the resource does not exist.</p>
        capo_rtbfabric.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request could not be completed because you exceeded a service quota.</p>
        capo_rtbfabric.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_rtbfabric.errors.validation_exception.ValidationException: <p>The request could not be completed because it fails satisfy the constraints specified by the service.</p>
        capo_rtbfabric.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Create a responder gateway
        Create responder gateway

        >>> await client.create_responder_gateway(description='My responder gateway', vpc_id='vpc-12345678', subnet_ids=['subnet-12345678', 'subnet-87654321'], security_group_ids=['sg-12345678'], port=443, protocol='HTTPS', client_token='12345678-1234-1234-1234-123456789012')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_rtbfabric.types.create_responder_gateway_request.CreateResponderGatewayRequest]",
    ) -> AsyncOperationResponse[
        "capo_rtbfabric.types.create_responder_gateway_response.CreateResponderGatewayResponse"
    ]:
        import capo_rtbfabric._operations.rtb_fabric.create_responder_gateway

        (
            output,
            http_response,
        ) = await capo_rtbfabric._operations.rtb_fabric.create_responder_gateway.async_create_responder_gateway(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_rtbfabric.types.create_responder_gateway_request.CreateResponderGatewayRequest",
    ) -> dict[str, Any]:
        import capo_rtbfabric.types.create_responder_gateway_request

        return (
            capo_rtbfabric.types.create_responder_gateway_request.redact_sensitive(
                input_
            )
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("CreateResponderGateway", redact_input=_redact_input),
    )
    input_: capo_rtbfabric.types.create_responder_gateway_request.CreateResponderGatewayRequest = {
        "vpc_id": vpc_id,
        "subnet_ids": subnet_ids,
        "security_group_ids": security_group_ids,
        "port": port,
        "protocol": protocol,
        "client_token": client_token,
    }
    if domain_name is not None:
        input_["domain_name"] = domain_name
    if listener_config is not None:
        input_["listener_config"] = listener_config
    if trust_store_configuration is not None:
        input_["trust_store_configuration"] = trust_store_configuration
    if managed_endpoint_configuration is not None:
        input_["managed_endpoint_configuration"] = managed_endpoint_configuration
    if description is not None:
        input_["description"] = description
    if tags is not None:
        input_["tags"] = tags
    if gateway_type is not None:
        input_["gateway_type"] = gateway_type
    if client_routing_policy is not None:
        input_["client_routing_policy"] = client_routing_policy

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