NOTE: For Version 3 of the AWS SDK for PHP, please see the V3 User Guide and V3 API Reference.

# Class UploadBuilder

Easily create a multipart uploader used to quickly and reliably upload a large file or data stream to Amazon Glacier using multipart uploads

  Aws\Common\Model\MultipartUpload\AbstractUploadBuilder
  Aws\Glacier\Model\MultipartUpload\UploadBuilder

Namespace: Aws\Glacier\Model\MultipartUpload
Located at Aws/Glacier/Model/MultipartUpload/UploadBuilder.php

## Methods summary

- `public` `setAccountId ( string $accountId )`

  Set the account ID to upload the part to

- `public` `setVaultName ( string $vaultName )`

  Set the vault name to upload the part to

- `public` `setPartSize ( int $partSize )`

  Set the upload part size

- `public` `setArchiveDescription ( string $archiveDescription )`

  Set the archive description

- `public` `setConcurrency ( int $concurrency )`

  Set the concurrency level to use when uploading parts. This affects how many parts are uploaded in parallel. You must use a local file as your data source when using a concurrency greater than 1

- `public` `setPartGenerator ( Aws\Glacier\Model\MultipartUpload\UploadPartGenerator $partGenerator )`

  Sets the Glacier upload helper object that pre-calculates hashes and sizes for all upload parts

- `public` `build ( )`

  Build the appropriate uploader based on the builder options

- `protected` `initiateMultipartUpload ( )`

  Initiate the multipart upload

## Methods detail

# `public mixed`
`setAccountId( string $accountId )`

Set the account ID to upload the part to

#### Parameters

$accountId
  `string`
  $accountId ID of the account

#### Returns

`mixed`
$this
# `public mixed`
`setVaultName( string $vaultName )`

Set the vault name to upload the part to

#### Parameters

$vaultName
  `string`
  $vaultName Name of the vault

#### Returns

`mixed`
$this
# `public mixed`
`setPartSize( integer $partSize )`

Set the upload part size

#### Parameters

$partSize
  `integer`
  $partSize Upload part size

#### Returns

`mixed`
$this
# `public mixed`
`setArchiveDescription( string $archiveDescription )`

Set the archive description

#### Parameters

$archiveDescription
  `string`
  $archiveDescription Archive description

#### Returns

`mixed`
$this
# `public mixed`
`setConcurrency( integer $concurrency )`

Set the concurrency level to use when uploading parts. This affects how many parts are uploaded in parallel. You must use a local file as your data source when using a concurrency greater than 1

#### Parameters

$concurrency
  `integer`
  $concurrency Concurrency level

#### Returns

`mixed`
$this
# `public mixed`
`setPartGenerator( `Aws\Glacier\Model\MultipartUpload\UploadPartGenerator` $partGenerator )`

Sets the Glacier upload helper object that pre-calculates hashes and sizes for all upload parts

#### Parameters

$partGenerator
  ``Aws\Glacier\Model\MultipartUpload\UploadPartGenerator``
  $partGenerator Glacier upload helper object

#### Returns

`mixed`
$this
# `public TransferInterface`
`build( )`

Build the appropriate uploader based on the builder options

#### Returns

`TransferInterface`

#### Throws

``Aws\Common\Exception\InvalidArgumentException``
when attempting to resume a transfer using a non-seekable stream
``Aws\Common\Exception\InvalidArgumentException``
when missing required properties (bucket, key, client, source)
# `protected TransferStateInterface`
`initiateMultipartUpload( )`

Initiate the multipart upload

#### Returns

`TransferStateInterface`

### Methods inherited from Aws\Common\Model\MultipartUpload\AbstractUploadBuilder

`newInstance()`, `resumeFrom()`, `setClient()`, `setHeaders()`, `setSource()`

### Magic methods summary

## Properties summary

`protected string` | $accountId | # Account ID to upload to
`protected string` | $vaultName | # Name of the vault to upload to
`protected integer` | $concurrency | # Concurrency level to transfer the parts
`protected integer` | $partSize | # Size of upload parts
`protected string` | $archiveDescription | # Archive description
`protected `Aws\Glacier\Model\MultipartUpload\UploadPartGenerator`` | $partGenerator | # Glacier upload helper object

### Properties inherited from Aws\Common\Model\MultipartUpload\AbstractUploadBuilder

`$client`, `$headers`, `$source`, `$state`