Skip to content

create_appliance async

create_appliance(
    appliance_name: str,
    environment_type: ApplianceEnvironmentType,
    appliance_iam_role_arn: RoleArn,
    node_fault_tolerance: int,
    network_configuration: ApplianceNetworkConfigurationForCreate,
    *,
    config_overrides: Optional[AsyncBackupExternalClientConfig] = None,
    client_token: Optional[ClientToken] = None,
    tags: Optional[AwsTagMap] = None,
) -> CreateApplianceOutput

Creates an appliance with the specified network configuration and returns its activation information.

Parameters:

  • appliance_name (str) –

    The name of the appliance.

  • environment_type (ApplianceEnvironmentType) –

    The environment in which the appliance runs.

  • appliance_iam_role_arn (RoleArn) –

    The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role used by the appliance.

  • node_fault_tolerance (int) –

    The number of node failures that the appliance can tolerate.

  • network_configuration (ApplianceNetworkConfigurationForCreate) –

    The network configuration of the appliance.

  • client_token (Optional[ClientToken], default: None ) –

    A unique, case-sensitive identifier that you provide to ensure that the request is idempotent.

  • tags (Optional[AwsTagMap], default: None ) –

    The tags to associate with the appliance.

Raises:

Source code in docs_src/capo_backup_external/_services/async_backup_external.py
async def create_appliance(
    self,
    appliance_name: str,
    environment_type: "capo_backup_external.types.appliance_environment_type.ApplianceEnvironmentType",
    appliance_iam_role_arn: "capo_backup_external.types.role_arn.RoleArn",
    node_fault_tolerance: int,
    network_configuration: "capo_backup_external.types.appliance_network_configuration_for_create.ApplianceNetworkConfigurationForCreate",
    *,
    config_overrides: Optional[AsyncBackupExternalClientConfig] = None,
    client_token: Optional[
        "capo_backup_external.types.client_token.ClientToken"
    ] = None,
    tags: Optional["capo_backup_external.types.aws_tag_map.AwsTagMap"] = None,
) -> "capo_backup_external.types.create_appliance_output.CreateApplianceOutput":
    """Creates an appliance with the specified network configuration and returns its activation information.

    Args:
        appliance_name: The name of the appliance.
        environment_type: The environment in which the appliance runs.
        appliance_iam_role_arn: The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role used by the appliance.
        node_fault_tolerance: The number of node failures that the appliance can tolerate.
        network_configuration: The network configuration of the appliance.
        client_token: A unique, case-sensitive identifier that you provide to ensure that the request is idempotent.
        tags: The tags to associate with the appliance.

    Raises:
        capo_backup_external.errors.access_denied_exception.AccessDeniedException: The request was denied because you do not have permission to perform the requested operation.
        capo_backup_external.errors.conflict_exception.ConflictException: The request conflicts with the current state of the specified resource.
        capo_backup_external.errors.internal_server_exception.InternalServerException: The request failed because of an internal server error.
        capo_backup_external.errors.resource_not_found_exception.ResourceNotFoundException: The specified resource was not found.
        capo_backup_external.errors.throttling_exception.ThrottlingException: The request was denied because the request rate is too high.
        capo_backup_external.errors.validation_exception.ValidationException: The request contains invalid parameters.
        capo_backup_external.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: The request would exceed a service quota.
        capo_backup_external.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_backup_external.types.create_appliance_input.CreateApplianceInput]",
    ) -> AsyncOperationResponse[
        "capo_backup_external.types.create_appliance_output.CreateApplianceOutput"
    ]:
        import capo_backup_external._operations.backup_external.create_appliance

        (
            output,
            http_response,
        ) = await capo_backup_external._operations.backup_external.create_appliance.async_create_appliance(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_backup_external.types.create_appliance_output.CreateApplianceOutput",
    ) -> dict[str, Any]:
        import capo_backup_external.types.create_appliance_output

        return capo_backup_external.types.create_appliance_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("CreateAppliance", redact_output=_redact_output),
    )
    input_: capo_backup_external.types.create_appliance_input.CreateApplianceInput = {
        "appliance_name": appliance_name,
        "environment_type": environment_type,
        "appliance_iam_role_arn": appliance_iam_role_arn,
        "node_fault_tolerance": node_fault_tolerance,
        "network_configuration": network_configuration,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if tags is not None:
        input_["tags"] = tags

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