Skip to content

update_hypervisor

update_hypervisor(
    hypervisor_arn: ServerArn,
    *,
    config_overrides: Optional[BackupGatewayClientConfig] = None,
    host: Optional[Host] = None,
    username: Optional[Username] = None,
    password: Optional[Password] = None,
    name: Optional[Name] = None,
    log_group_arn: Optional[LogGroupArn] = None,
) -> UpdateHypervisorOutput

Updates a hypervisor metadata, including its host, username, and password. Specify which hypervisor to update using the Amazon Resource Name (ARN) of the hypervisor in your request.

Parameters:

  • hypervisor_arn (ServerArn) –

    The Amazon Resource Name (ARN) of the hypervisor to update.

  • host (Optional[Host], default: None ) –

    The updated host of the hypervisor. This can be either an IP address or a fully-qualified domain name (FQDN).

  • username (Optional[Username], default: None ) –

    The updated username for the hypervisor.

  • password (Optional[Password], default: None ) –

    The updated password for the hypervisor.

  • name (Optional[Name], default: None ) –

    The updated name for the hypervisor

  • log_group_arn (Optional[LogGroupArn], default: None ) –

    The Amazon Resource Name (ARN) of the group of gateways within the requested log.

Raises:

Source code in docs_src/capo_backup_gateway/_services/backup_gateway.py
def update_hypervisor(
    self,
    hypervisor_arn: "capo_backup_gateway.types.server_arn.ServerArn",
    *,
    config_overrides: Optional[BackupGatewayClientConfig] = None,
    host: Optional["capo_backup_gateway.types.host.Host"] = None,
    username: Optional["capo_backup_gateway.types.username.Username"] = None,
    password: Optional["capo_backup_gateway.types.password.Password"] = None,
    name: Optional["capo_backup_gateway.types.name.Name"] = None,
    log_group_arn: Optional[
        "capo_backup_gateway.types.log_group_arn.LogGroupArn"
    ] = None,
) -> "capo_backup_gateway.types.update_hypervisor_output.UpdateHypervisorOutput":
    """<p>Updates a hypervisor metadata, including its host, username, and password. Specify which hypervisor to update using the Amazon Resource Name (ARN) of the hypervisor in your request.</p>

    Args:
        hypervisor_arn: <p>The Amazon Resource Name (ARN) of the hypervisor to update.</p>
        host: <p>The updated host of the hypervisor. This can be either an IP address or a fully-qualified domain name (FQDN).</p>
        username: <p>The updated username for the hypervisor.</p>
        password: <p>The updated password for the hypervisor.</p>
        name: <p>The updated name for the hypervisor</p>
        log_group_arn: <p>The Amazon Resource Name (ARN) of the group of gateways within the requested log.</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.access_denied_exception.AccessDeniedException: <p>The operation cannot proceed because you have insufficient permissions.</p>
        capo_backup_gateway.errors.conflict_exception.ConflictException: <p>The operation cannot proceed because it is not supported.</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_hypervisor_input.UpdateHypervisorInput]",
    ) -> OperationResponse[
        "capo_backup_gateway.types.update_hypervisor_output.UpdateHypervisorOutput"
    ]:
        import capo_backup_gateway._operations.backup_on_premises_v20210101.update_hypervisor

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

    def _redact_input(
        input_: "capo_backup_gateway.types.update_hypervisor_input.UpdateHypervisorInput",
    ) -> dict[str, Any]:
        import capo_backup_gateway.types.update_hypervisor_input

        return capo_backup_gateway.types.update_hypervisor_input.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UpdateHypervisor", redact_input=_redact_input),
    )
    input_: capo_backup_gateway.types.update_hypervisor_input.UpdateHypervisorInput = {
        "hypervisor_arn": hypervisor_arn
    }
    if host is not None:
        input_["host"] = host
    if username is not None:
        input_["username"] = username
    if password is not None:
        input_["password"] = password
    if name is not None:
        input_["name"] = name
    if log_group_arn is not None:
        input_["log_group_arn"] = log_group_arn

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