Skip to content

disable_vgw_route_propagation async

disable_vgw_route_propagation(
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    gateway_id: Optional[VpnGatewayId] = None,
    route_table_id: Optional[RouteTableId] = None,
    dry_run: Optional[Boolean] = None,
) -> None

Disables a virtual private gateway (VGW) from propagating routes to a specified route table of a VPC.

Parameters:

  • gateway_id (Optional[VpnGatewayId], default: None ) –

    The ID of the virtual private gateway.

  • route_table_id (Optional[RouteTableId], default: None ) –

    The ID of the route table.

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

Raises:

Examples:

To disable route propagation This example disables the specified virtual private gateway from propagating static routes to the specified route table.

>>> await client.disable_vgw_route_propagation(route_table_id='rtb-22574640', gateway_id='vgw-9a4cacf3')
Source code in docs_src/capo_ec2/_services/async_ec2.py
async def disable_vgw_route_propagation(
    self,
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    gateway_id: Optional["capo_ec2.types.vpn_gateway_id.VpnGatewayId"] = None,
    route_table_id: Optional["capo_ec2.types.route_table_id.RouteTableId"] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
) -> None:
    """<p>Disables a virtual private gateway (VGW) from propagating routes to a specified route table of a VPC.</p>

    Args:
        gateway_id: <p>The ID of the virtual private gateway.</p>
        route_table_id: <p>The ID of the route table.</p>
        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>

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

    Examples:
        To disable route propagation
        This example disables the specified virtual private gateway from propagating static routes to the specified route table.

        >>> await client.disable_vgw_route_propagation(route_table_id='rtb-22574640', gateway_id='vgw-9a4cacf3')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ec2.types.disable_vgw_route_propagation_request.DisableVgwRoutePropagationRequest]",
    ) -> AsyncOperationResponse[None]:
        import capo_ec2._operations.amazon_ec2.disable_vgw_route_propagation

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DisableVgwRoutePropagation")
    )
    input_: capo_ec2.types.disable_vgw_route_propagation_request.DisableVgwRoutePropagationRequest = {}
    if gateway_id is not None:
        input_["gateway_id"] = gateway_id
    if route_table_id is not None:
        input_["route_table_id"] = route_table_id
    if dry_run is not None:
        input_["dry_run"] = dry_run

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