Skip to content

update_lag

update_lag(
    lag_id: LagId,
    *,
    config_overrides: Optional[DirectConnectClientConfig] = None,
    lag_name: Optional[LagName] = None,
    minimum_links: Optional[Count] = None,
    encryption_mode: Optional[EncryptionMode] = None,
) -> Lag

Updates the attributes of the specified link aggregation group (LAG).

You can update the following LAG attributes:

  • The name of the LAG.

  • The value for the minimum number of connections that must be operational for the LAG itself to be operational.

  • The LAG's MACsec encryption mode.

    Amazon Web Services assigns this value to each connection which is part of the LAG.

  • The tags

If you adjust the threshold value for the minimum number of operational connections, ensure that the new value does not cause the LAG to fall below the threshold and become non-operational.

Parameters:

  • lag_id (LagId) –

    The ID of the LAG.

  • lag_name (Optional[LagName], default: None ) –

    The name of the LAG.

  • minimum_links (Optional[Count], default: None ) –

    The minimum number of physical connections that must be operational for the LAG itself to be operational.

  • encryption_mode (Optional[EncryptionMode], default: None ) –

    The LAG MAC Security (MACsec) encryption mode.

    Amazon Web Services applies the value to all connections which are part of the LAG.

Raises:

Source code in docs_src/capo_direct_connect/_services/direct_connect.py
def update_lag(
    self,
    lag_id: "capo_direct_connect.types.lag_id.LagId",
    *,
    config_overrides: Optional[DirectConnectClientConfig] = None,
    lag_name: Optional["capo_direct_connect.types.lag_name.LagName"] = None,
    minimum_links: Optional["capo_direct_connect.types.count.Count"] = None,
    encryption_mode: Optional[
        "capo_direct_connect.types.encryption_mode.EncryptionMode"
    ] = None,
) -> "capo_direct_connect.types.lag.Lag":
    """<p>Updates the attributes of the specified link aggregation group (LAG).</p> <p>You can update the following LAG attributes:</p> <ul> <li> <p>The name of the LAG.</p> </li> <li> <p>The value for the minimum number of connections that must be operational for the LAG itself to be operational. </p> </li> <li> <p>The LAG's MACsec encryption mode.</p> <p>Amazon Web Services assigns this value to each connection which is part of the LAG.</p> </li> <li> <p>The tags</p> </li> </ul> <note> <p>If you adjust the threshold value for the minimum number of operational connections, ensure that the new value does not cause the LAG to fall below the threshold and become non-operational.</p> </note>

    Args:
        lag_id: <p>The ID of the LAG.</p>
        lag_name: <p>The name of the LAG.</p>
        minimum_links: <p>The minimum number of physical connections that must be operational for the LAG itself to be operational.</p>
        encryption_mode: <p>The LAG MAC Security (MACsec) encryption mode.</p> <p>Amazon Web Services applies the value to all connections which are part of the LAG.</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_lag_request.UpdateLagRequest]",
    ) -> OperationResponse["capo_direct_connect.types.lag.Lag"]:
        import capo_direct_connect._operations.overture_service.update_lag

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateLag")
    )
    input_: capo_direct_connect.types.update_lag_request.UpdateLagRequest = {
        "lag_id": lag_id
    }
    if lag_name is not None:
        input_["lag_name"] = lag_name
    if minimum_links is not None:
        input_["minimum_links"] = minimum_links
    if encryption_mode is not None:
        input_["encryption_mode"] = encryption_mode

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