Skip to content

update_gateway_software_now

update_gateway_software_now(
    gateway_arn: GatewayArn,
    *,
    config_overrides: Optional[BackupGatewayClientConfig] = None,
) -> UpdateGatewaySoftwareNowOutput

Updates the gateway virtual machine (VM) software. The request immediately triggers the software update.

When you make this request, you get a 200 OK success response immediately. However, it might take some time for the update to complete.

Parameters:

  • gateway_arn (GatewayArn) –

    The Amazon Resource Name (ARN) of the gateway to be updated.

Raises:

Source code in docs_src/capo_backup_gateway/_services/backup_gateway.py
def update_gateway_software_now(
    self,
    gateway_arn: "capo_backup_gateway.types.gateway_arn.GatewayArn",
    *,
    config_overrides: Optional[BackupGatewayClientConfig] = None,
) -> "capo_backup_gateway.types.update_gateway_software_now_output.UpdateGatewaySoftwareNowOutput":
    """<p>Updates the gateway virtual machine (VM) software. The request immediately triggers the software update.</p> <note> <p>When you make this request, you get a <code>200 OK</code> success response immediately. However, it might take some time for the update to complete.</p> </note>

    Args:
        gateway_arn: <p>The Amazon Resource Name (ARN) of the gateway to be updated.</p>

    Raises:
        capo_backup_gateway.errors.internal_server_exception.InternalServerException: <p>The operation did not succeed because an internal error occurred. Try again later.</p>
        capo_backup_gateway.errors.throttling_exception.ThrottlingException: <p>TPS has been limited to protect against intentional or unintentional high request volumes.</p>
        capo_backup_gateway.errors.validation_exception.ValidationException: <p>The operation did not succeed because a validation error occurred.</p>
        capo_backup_gateway.errors.resource_not_found_exception.ResourceNotFoundException: <p>A resource that is required for the action wasn't found.</p>
        capo_backup_gateway.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_backup_gateway.types.update_gateway_software_now_input.UpdateGatewaySoftwareNowInput]",
    ) -> OperationResponse[
        "capo_backup_gateway.types.update_gateway_software_now_output.UpdateGatewaySoftwareNowOutput"
    ]:
        import capo_backup_gateway._operations.backup_on_premises_v20210101.update_gateway_software_now

        output, http_response = (
            capo_backup_gateway._operations.backup_on_premises_v20210101.update_gateway_software_now.update_gateway_software_now(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateGatewaySoftwareNow")
    )
    input_: capo_backup_gateway.types.update_gateway_software_now_input.UpdateGatewaySoftwareNowInput = {
        "gateway_arn": gateway_arn
    }

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