Skip to content

update_virtual_interface_attributes

update_virtual_interface_attributes(
    virtual_interface_id: VirtualInterfaceId,
    *,
    config_overrides: Optional[DirectConnectClientConfig] = None,
    mtu: Optional[MTU] = None,
    enable_site_link: Optional[EnableSiteLink] = None,
    virtual_interface_name: Optional[VirtualInterfaceName] = None,
    prefix_pool_allocated_count_ipv4: Optional[PrefixPoolAllocatedCount] = None,
    prefix_pool_allocated_count_ipv6: Optional[PrefixPoolAllocatedCount] = None,
    rate_limit: Optional[RateLimit] = None,
) -> VirtualInterface

Updates the specified attributes of the specified virtual private interface.

Setting the MTU of a virtual interface to 8500 (jumbo frames) can cause an update to the underlying physical connection if it wasn't updated to support jumbo frames. Updating the connection disrupts network connectivity for all virtual interfaces associated with the connection for up to 30 seconds. To check whether your connection supports jumbo frames, call DescribeConnections. To check whether your virtual interface supports jumbo frames, call DescribeVirtualInterfaces.

Parameters:

  • virtual_interface_id (VirtualInterfaceId) –

    The ID of the virtual private interface.

  • mtu (Optional[MTU], default: None ) –

    The maximum transmission unit (MTU), in bytes. The supported values are 1500 and 8500. The default value is 1500.

  • enable_site_link (Optional[EnableSiteLink], default: None ) –

    Indicates whether to enable or disable SiteLink.

  • virtual_interface_name (Optional[VirtualInterfaceName], default: None ) –

    The name of the virtual private interface.

  • prefix_pool_allocated_count_ipv4 (Optional[PrefixPoolAllocatedCount], default: None ) –

    The number of inbound IPv4 route prefixes to allocate to the virtual interface. Not applicable to public virtual interfaces.

  • prefix_pool_allocated_count_ipv6 (Optional[PrefixPoolAllocatedCount], default: None ) –

    The number of inbound IPv6 route prefixes to allocate to the virtual interface. Not applicable to public virtual interfaces.

  • rate_limit (Optional[RateLimit], default: None ) –

    The rate limit (bandwidth allocation) to apply to the virtual interface. Use this to update the bandwidth allocation on an existing virtual interface.

Raises:

Source code in docs_src/capo_direct_connect/_services/direct_connect.py
def update_virtual_interface_attributes(
    self,
    virtual_interface_id: "capo_direct_connect.types.virtual_interface_id.VirtualInterfaceId",
    *,
    config_overrides: Optional[DirectConnectClientConfig] = None,
    mtu: Optional["capo_direct_connect.types.mtu.MTU"] = None,
    enable_site_link: Optional[
        "capo_direct_connect.types.enable_site_link.EnableSiteLink"
    ] = None,
    virtual_interface_name: Optional[
        "capo_direct_connect.types.virtual_interface_name.VirtualInterfaceName"
    ] = None,
    prefix_pool_allocated_count_ipv4: Optional[
        "capo_direct_connect.types.prefix_pool_allocated_count.PrefixPoolAllocatedCount"
    ] = None,
    prefix_pool_allocated_count_ipv6: Optional[
        "capo_direct_connect.types.prefix_pool_allocated_count.PrefixPoolAllocatedCount"
    ] = None,
    rate_limit: Optional["capo_direct_connect.types.rate_limit.RateLimit"] = None,
) -> "capo_direct_connect.types.virtual_interface.VirtualInterface":
    """<p>Updates the specified attributes of the specified virtual private interface.</p> <p>Setting the MTU of a virtual interface to 8500 (jumbo frames) can cause an update to the underlying physical connection if it wasn't updated to support jumbo frames. Updating the connection disrupts network connectivity for all virtual interfaces associated with the connection for up to 30 seconds. To check whether your connection supports jumbo frames, call <a>DescribeConnections</a>. To check whether your virtual interface supports jumbo frames, call <a>DescribeVirtualInterfaces</a>.</p>

    Args:
        virtual_interface_id: <p>The ID of the virtual private interface.</p>
        mtu: <p>The maximum transmission unit (MTU), in bytes. The supported values are 1500 and 8500. The default value is 1500.</p>
        enable_site_link: <p>Indicates whether to enable or disable SiteLink.</p>
        virtual_interface_name: <p>The name of the virtual private interface.</p>
        prefix_pool_allocated_count_ipv4: <p>The number of inbound IPv4 route prefixes to allocate to the virtual interface. Not applicable to public virtual interfaces.</p>
        prefix_pool_allocated_count_ipv6: <p>The number of inbound IPv6 route prefixes to allocate to the virtual interface. Not applicable to public virtual interfaces.</p>
        rate_limit: <p>The rate limit (bandwidth allocation) to apply to the virtual interface. Use this to update the bandwidth allocation on an existing virtual interface.</p>

    Raises:
        capo_direct_connect.errors.direct_connect_client_exception.DirectConnectClientException: <p>One or more parameters are not valid.</p>
        capo_direct_connect.errors.direct_connect_server_exception.DirectConnectServerException: <p>A server-side error occurred.</p>
        capo_direct_connect.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_direct_connect.types.update_virtual_interface_attributes_request.UpdateVirtualInterfaceAttributesRequest]",
    ) -> OperationResponse[
        "capo_direct_connect.types.virtual_interface.VirtualInterface"
    ]:
        import capo_direct_connect._operations.overture_service.update_virtual_interface_attributes

        output, http_response = (
            capo_direct_connect._operations.overture_service.update_virtual_interface_attributes.update_virtual_interface_attributes(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateVirtualInterfaceAttributes")
    )
    input_: capo_direct_connect.types.update_virtual_interface_attributes_request.UpdateVirtualInterfaceAttributesRequest = {
        "virtual_interface_id": virtual_interface_id
    }
    if mtu is not None:
        input_["mtu"] = mtu
    if enable_site_link is not None:
        input_["enable_site_link"] = enable_site_link
    if virtual_interface_name is not None:
        input_["virtual_interface_name"] = virtual_interface_name
    if prefix_pool_allocated_count_ipv4 is not None:
        input_["prefix_pool_allocated_count_ipv4"] = (
            prefix_pool_allocated_count_ipv4
        )
    if prefix_pool_allocated_count_ipv6 is not None:
        input_["prefix_pool_allocated_count_ipv6"] = (
            prefix_pool_allocated_count_ipv6
        )
    if rate_limit is not None:
        input_["rate_limit"] = rate_limit

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output