com.amazonaws.services.glacier.transfer

## クラス ArchiveTransferManager

- java.lang.Object
- - com.amazonaws.services.glacier.transfer.ArchiveTransferManager

-     public class ArchiveTransferManager
      extends java.lang.Object

  Utilities for uploading and downloading data to and from AWS Glacier.

- - ### コンストラクタの概要

    コンストラクタ
    コンストラクタと説明
    `ArchiveTransferManager(AmazonGlacierClient glacier, AmazonSQSClient sqs, AmazonSNSClient sns)` Constructs a new ArchiveTransferManager, using the specified Amazon Glacier client, and the specified Amazon SQS and Amazon SNS clients for polling download job status.
    `ArchiveTransferManager(AmazonGlacierClient glacier, AWSCredentials credentials)` Constructs a new ArchiveTransferManager, using the specified Amazon Glacier client and AWS credentials.
    `ArchiveTransferManager(AmazonGlacierClient glacier, AWSCredentialsProvider credentialsProvider)` Constructs a new ArchiveTransferManager, using the specified Amazon Glacier client and AWS credentials provider.
    `ArchiveTransferManager(AmazonGlacierClient glacier, AWSCredentialsProvider credentialsProvider, ClientConfiguration clientConfiguration)` Constructs a new ArchiveTransferManager, using the specified Amazon Glacier client, AWS credentials provider and client configuration.
    `ArchiveTransferManager(AWSCredentials credentials)` Constructs a new ArchiveTransferManager, using the specified AWS credentials to authenticate requests.
    `ArchiveTransferManager(AWSCredentialsProvider credentialsProvider, ClientConfiguration clientConfiguration)` Constructs a new ArchiveTransferManager, using the specified AWS credentials provider and client configuration.

  - ### メソッドの概要

    メソッド
    修飾子とタイプ | メソッドと説明
    --- | ---
    `void` | `download(java.lang.String vaultName, java.lang.String archiveId, java.io.File file)` Downloads an archive from Amazon Glacier in the specified vault for the current user's account, and saves it to the specified file.
    `void` | `download(java.lang.String accountId, java.lang.String vaultName, java.lang.String archiveId, java.io.File file)` Downloads an archive from Amazon Glacier in the specified vault in the specified user's account, and saves it to the specified file.
    `void` | `downloadJobOutput(java.lang.String accountId, java.lang.String vaultName, java.lang.String jobId, java.io.File file)` Downloads the job output for the specified job (which must be ready to download already), into the specified file.
    `UploadResult` | `upload(java.lang.String vaultName, java.lang.String archiveDescription, java.io.File file)` Uploads the specified file to Amazon Glacier for archival storage in the specified vault for the user's current account.
    `UploadResult` | `upload(java.lang.String accountId, java.lang.String vaultName, java.lang.String archiveDescription, java.io.File file)` Uploads the specified file to Amazon Glacier for archival storage in the specified vault in the specified user's account.

    - ### クラスから継承されたメソッド java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### コンストラクタの詳細

    - #### ArchiveTransferManager

          public ArchiveTransferManager(AWSCredentials credentials)

      Constructs a new ArchiveTransferManager, using the specified AWS credentials to authenticate requests.
      パラメータ:
        `credentials` - The AWS credentials used to authenticate requests.

    - #### ArchiveTransferManager

          public ArchiveTransferManager(AWSCredentialsProvider credentialsProvider,
                                ClientConfiguration clientConfiguration)

      Constructs a new ArchiveTransferManager, using the specified AWS credentials provider and client configuration.
      パラメータ:
        `credentialsProvider` - The AWS credentials provider used to authenticate requests.
        `clientConfiguration` - Client specific options, such as proxy settings, retries, and timeouts.

    - #### ArchiveTransferManager

          public ArchiveTransferManager(AmazonGlacierClient glacier,
                                AWSCredentialsProvider credentialsProvider)

      Constructs a new ArchiveTransferManager, using the specified Amazon Glacier client and AWS credentials provider.
      パラメータ:
        `glacier` - The client for working with Amazon Glacier.
        `credentialsProvider` - The AWS credentials provider used to authenticate requests.

    - #### ArchiveTransferManager

          public ArchiveTransferManager(AmazonGlacierClient glacier,
                                AWSCredentials credentials)

      Constructs a new ArchiveTransferManager, using the specified Amazon Glacier client and AWS credentials.
      パラメータ:
        `glacier` - The client for working with Amazon Glacier.
        `credentials` - The AWS credentials used to authenticate requests.

    - #### ArchiveTransferManager

          public ArchiveTransferManager(AmazonGlacierClient glacier,
                                AWSCredentialsProvider credentialsProvider,
                                ClientConfiguration clientConfiguration)

      Constructs a new ArchiveTransferManager, using the specified Amazon Glacier client, AWS credentials provider and client configuration.
      パラメータ:
        `glacier` - The client for working with Amazon Glacier.
        `credentialsProvider` - The AWS credentials provider used to authenticate requests.
        `clientConfiguration` - Client specific options, such as proxy settings, retries, and timeouts.

    - #### ArchiveTransferManager

          public ArchiveTransferManager(AmazonGlacierClient glacier,
                                AmazonSQSClient sqs,
                                AmazonSNSClient sns)

      Constructs a new ArchiveTransferManager, using the specified Amazon Glacier client, and the specified Amazon SQS and Amazon SNS clients for polling download job status.

      This constructor form can be used to work with ArchiveTransferManager in any AWS region where Amazon Glacier is supported. Just make sure to set the correct endpoint on each individual client object so that they all operate in the same region.

      パラメータ:
        `glacier` - The client for working with Amazon Glacier.
        `sqs` - The client for working with Amazon SQS when polling archive retrieval job status.
        `sns` - The client for working with Amazon SNS when polling archive retrieval job status.

  - ### メソッドの詳細

    - #### upload

          public UploadResult upload(java.lang.String vaultName,
                            java.lang.String archiveDescription,
                            java.io.File file)
                              throws AmazonServiceException,
                                     AmazonClientException,
                                     java.io.FileNotFoundException

      Uploads the specified file to Amazon Glacier for archival storage in the specified vault for the user's current account. For small archives, this method will upload the archive directly to Glacier. For larger archives, this method will use Glacier's multipart upload API to split the upload into multiple parts for better error recovery if any errors are encountered while streaming the data to Amazon Glacier.
      パラメータ:
        `vaultName` - The name of the vault to upload to.
        `archiveDescription` - The description of the new archive being uploaded.
        `file` - The file to upload to Amazon Glacier.
      戻り値:
        The result of the upload, including the archive ID needed to access the upload later.
      例外:
        `AmazonServiceException` - If any problems were encountered while communicating with AWS.
        `AmazonClientException` - If any problems were encountered inside the AWS SDK for Java client code in making requests or processing responses from AWS.
        `java.io.FileNotFoundException` - If the specified file to upload doesn't exist.

    - #### upload

          public UploadResult upload(java.lang.String accountId,
                            java.lang.String vaultName,
                            java.lang.String archiveDescription,
                            java.io.File file)
                              throws AmazonServiceException,
                                     AmazonClientException,
                                     java.io.FileNotFoundException

      Uploads the specified file to Amazon Glacier for archival storage in the specified vault in the specified user's account. For small archives, this method will upload the archive directly to Glacier. For larger archives, this method will use Glacier's multipart upload API to split the upload into multiple parts for better error recovery if any errors are encountered while streaming the data to Amazon Glacier.
      パラメータ:
        `accountId` - The ID for the account which owns the Glacier vault being uploaded to. To use the same account the developer is using to make requests to AWS, the value `"-"` can be used instead of the full account ID.
        `vaultName` - The name of the vault to upload to.
        `archiveDescription` - The description of the new archive being uploaded.
        `file` - The file to upload to Amazon Glacier.
      戻り値:
        The result of the upload, including the archive ID needed to access the upload later.
      例外:
        `AmazonServiceException` - If any problems were encountered while communicating with AWS.
        `AmazonClientException` - If any problems were encountered inside the AWS SDK for Java client code in making requests or processing responses from AWS.
        `java.io.FileNotFoundException` - If the specified file to upload doesn't exist.

    - #### download

          public void download(java.lang.String vaultName,
                      java.lang.String archiveId,
                      java.io.File file)
                        throws AmazonServiceException,
                               AmazonClientException

      Downloads an archive from Amazon Glacier in the specified vault for the current user's account, and saves it to the specified file. Amazon Glacier is optimized for long term storage of data that isn't needed quickly. This method will first make a request to Amazon Glacier to prepare the archive to be downloaded. Once Glacier has finished preparing the archive to be downloaded, this method will start downloading the data and storing it in the specified file. Also, this method will download the archive in multiple chunks using range retrieval for better error recovery if any errors are encountered while streaming the data from Amazon Glacier.
      パラメータ:
        `vaultName` - The name of the vault to download the archive from.
        `archiveId` - The unique ID of the archive to download.
        `file` - The file save the archive to.
      例外:
        `AmazonServiceException` - If any problems were encountered while communicating with AWS.
        `AmazonClientException` - If any problems were encountered inside the AWS SDK for Java client code in making requests or processing responses from AWS.

    - #### download

          public void download(java.lang.String accountId,
                      java.lang.String vaultName,
                      java.lang.String archiveId,
                      java.io.File file)
                        throws AmazonServiceException,
                               AmazonClientException

      Downloads an archive from Amazon Glacier in the specified vault in the specified user's account, and saves it to the specified file. Amazon Glacier is optimized for long term storage of data that isn't needed quickly. This method will first make a request to Amazon Glacier to prepare the archive to be downloaded. Once Glacier has finished preparing the archive to be downloaded, this method will start downloading the data and storing it in the specified file.
      パラメータ:
        `accountId` - The ID for the account which owns the Glacier vault where the archive is being downloaded from. To use the same account the developer is using to make requests to AWS, the value `"-"` can be used instead of the full account ID.
        `vaultName` - The name of the vault to download the archive from.
        `archiveId` - The unique ID of the archive to download.
        `file` - The file save the archive to.
      例外:
        `AmazonServiceException` - If any problems were encountered while communicating with AWS.
        `AmazonClientException` - If any problems were encountered inside the AWS SDK for Java client code in making requests or processing responses from AWS.

    - #### downloadJobOutput

          public void downloadJobOutput(java.lang.String accountId,
                               java.lang.String vaultName,
                               java.lang.String jobId,
                               java.io.File file)

      Downloads the job output for the specified job (which must be ready to download already), into the specified file. This method will request individual chunks of the data, one at a time, in order to handle any transient errors along the way.
      パラメータ:
        `accountId` - The account ID containing the job output to download (or null if the current account shoudl be used).
        `vaultName` - The name of the vault from where the job was initiated.
        `jobId` - The ID of the job whose output is to be downloaded.
        `file` - The file to download the job output into.