Skip to content

test_hypervisor_configuration async

test_hypervisor_configuration(
    gateway_arn: GatewayArn,
    host: Host,
    *,
    config_overrides: Optional[AsyncBackupGatewayClientConfig] = None,
    username: Optional[Username] = None,
    password: Optional[Password] = None,
) -> TestHypervisorConfigurationOutput

Tests your hypervisor configuration to validate that backup gateway can connect with the hypervisor and its resources.

Parameters:

  • gateway_arn (GatewayArn) –

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

  • host (Host) –

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

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

    The username for the hypervisor.

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

    The password for the hypervisor.

Raises:

Source code in docs_src/capo_backup_gateway/_services/async_backup_gateway.py
async def test_hypervisor_configuration(
    self,
    gateway_arn: "capo_backup_gateway.types.gateway_arn.GatewayArn",
    host: "capo_backup_gateway.types.host.Host",
    *,
    config_overrides: Optional[AsyncBackupGatewayClientConfig] = None,
    username: Optional["capo_backup_gateway.types.username.Username"] = None,
    password: Optional["capo_backup_gateway.types.password.Password"] = None,
) -> "capo_backup_gateway.types.test_hypervisor_configuration_output.TestHypervisorConfigurationOutput":
    """<p>Tests your hypervisor configuration to validate that backup gateway can connect with the hypervisor and its resources.</p>

    Args:
        gateway_arn: <p>The Amazon Resource Name (ARN) of the gateway to the hypervisor to test.</p>
        host: <p>The server host of the hypervisor. This can be either an IP address or a fully-qualified domain name (FQDN).</p>
        username: <p>The username for the hypervisor.</p>
        password: <p>The password for the hypervisor.</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.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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_backup_gateway.types.test_hypervisor_configuration_input.TestHypervisorConfigurationInput]",
    ) -> AsyncOperationResponse[
        "capo_backup_gateway.types.test_hypervisor_configuration_output.TestHypervisorConfigurationOutput"
    ]:
        import capo_backup_gateway._operations.backup_on_premises_v20210101.test_hypervisor_configuration

        (
            output,
            http_response,
        ) = await capo_backup_gateway._operations.backup_on_premises_v20210101.test_hypervisor_configuration.async_test_hypervisor_configuration(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

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

        return capo_backup_gateway.types.test_hypervisor_configuration_input.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("TestHypervisorConfiguration", redact_input=_redact_input),
    )
    input_: capo_backup_gateway.types.test_hypervisor_configuration_input.TestHypervisorConfigurationInput = {
        "gateway_arn": gateway_arn,
        "host": host,
    }
    if username is not None:
        input_["username"] = username
    if password is not None:
        input_["password"] = password

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