Skip to content

associate_disk

associate_disk(
    appliance_arn: ApplianceArn,
    node_arn: NodeArn,
    disk_identifier: str,
    disk_type: DiskType,
    *,
    config_overrides: Optional[BackupExternalClientConfig] = None,
) -> AssociateDiskOutput

Associates a disk with the specified appliance node for data or metadata storage.

Parameters:

  • appliance_arn (ApplianceArn) –

    The Amazon Resource Name (ARN) of the appliance.

  • node_arn (NodeArn) –

    The Amazon Resource Name (ARN) of the appliance node.

  • disk_identifier (str) –

    The identifier of the disk attached to the appliance node.

  • disk_type (DiskType) –

    The type of storage provided by the disk.

Raises:

Source code in docs_src/capo_backup_external/_services/backup_external.py
def associate_disk(
    self,
    appliance_arn: "capo_backup_external.types.appliance_arn.ApplianceArn",
    node_arn: "capo_backup_external.types.node_arn.NodeArn",
    disk_identifier: str,
    disk_type: "capo_backup_external.types.disk_type.DiskType",
    *,
    config_overrides: Optional[BackupExternalClientConfig] = None,
) -> "capo_backup_external.types.associate_disk_output.AssociateDiskOutput":
    """Associates a disk with the specified appliance node for data or metadata storage.

    Args:
        appliance_arn: The Amazon Resource Name (ARN) of the appliance.
        node_arn: The Amazon Resource Name (ARN) of the appliance node.
        disk_identifier: The identifier of the disk attached to the appliance node.
        disk_type: The type of storage provided by the disk.

    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.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_backup_external.types.associate_disk_input.AssociateDiskInput]",
    ) -> OperationResponse[
        "capo_backup_external.types.associate_disk_output.AssociateDiskOutput"
    ]:
        import capo_backup_external._operations.backup_external.associate_disk

        output, http_response = (
            capo_backup_external._operations.backup_external.associate_disk.associate_disk(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("AssociateDisk")
    )
    input_: capo_backup_external.types.associate_disk_input.AssociateDiskInput = {
        "appliance_arn": appliance_arn,
        "node_arn": node_arn,
        "disk_identifier": disk_identifier,
        "disk_type": disk_type,
    }

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