# StorageSchemaPut

## object

### spec
object
Required

The specification of the storage instance.

---

Discriminated by `type`. Select one variant:

### Microsoft.Storage
object  
[AzureStorageSpecCreate](https://docs.mediakind.com/api-reference/media-api/schemas/azurestoragespeccreate)

- **credential**  
  object  
  [AzureCredentialCreate](https://docs.mediakind.com/api-reference/media-api/schemas/azurecredentialcreate) Optional

The credential for the Azure Storage Account

- **sasToken**  
    string
    Required
    pattern: ^\\?(\\[a-z\\]+=\\[^&\\]+)(&\\[a-z\\]+=\\[^&\\]+)+$

SAS Token for Azure Storage Account, including leading ?
  
  - **description**  
    string or null
    Optional
    
    Description of the storage.
  
  - **privateLinkServiceConnection**  
    object or null  
    [PrivateLinkServiceConnectionNullable](https://docs.mediakind.com/api-reference/media-api/schemas/privatelinkserviceconnectionnullable) Optional

Optional settings for a Private Link. Set it to null to remove the Private Link.

---

- **requestMessage**  
  string
  Required
  0-140 characters

A message passed to the owner of the remote resource with this connection request.  
  This field cannot be modified, only set during creation.

- **resourceGroupName**  
  string
  Required
  1-90 characters

The name of the resource group containing the storage account  
  This field cannot be modified, only set during creation.

- **storageAccountName**  
  string
  Required
  3-24 characters

The name of the storage account. The full Azure ID would be '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{storageAccountName}'  
  This field cannot be modified, only set during creation.

- **subscriptionId**  
  string
  Required
  format: uuid

The ID of the Azure subscription containing the storage account  
  This field cannot be modified, only set during creation.

- **type**  
  enum
  Required

The type of storage.  
  This field cannot be modified, only set during creation.

Allowed values: Microsoft.Storage, AWS.S3, Google.Storage

- **url**  
  string
  Required

HTTP(S) URL required for access to the storage.  
  This field cannot be modified, only set during creation.

---

### AWS.S3
object  
[AWSStorageSpecCreate](https://docs.mediakind.com/api-reference/media-api/schemas/awsstoragespeccreate)

- **bucketName**  
  string
  Required
  pattern: ^(?!.*\.\.)[a-z0-9][-a-z0-9.]{1,61}[a-z0-9]$

The name of the AWS S3 bucket.  
  This field cannot be modified, only set during creation.

- **credential**  
  object  
  [AWSCredential](https://docs.mediakind.com/api-reference/media-api/schemas/awscredential) Optional

The credential for the AWS S3 bucket. Required at creation.

- **accessKeyId**  
    string
    Required
    pattern: ^A[K|S]IA[0-9A-Z]{16}$

The access key ID for the bucket.
  
  - **secretAccessKey**  
    string
    Required
    pattern: ^[A-Za-z0-9+/=]{40}$

The secret access key for the bucket.

- **description**  
  string or null
  Optional

Description of the storage.
  
- **type**  
  enum
  Required

The type of storage.  
  This field cannot be modified, only set during creation.

Allowed values: Microsoft.Storage, AWS.S3, Google.Storage

---

### Google.Storage
object  
[GoogleStorageSpecCreate](https://docs.mediakind.com/api-reference/media-api/schemas/googlestoragespeccreate)

- **bucketName**  
  string
  Required
  2-256 characters

The name of the Google Storage bucket.  
  This field cannot be modified, only set during creation.

- **credential**  
  object  
  [GoogleCredential](https://docs.mediakind.com/api-reference/media-api/schemas/googlecredential) Optional

The credential for the Google Storage bucket. Required at creation.

- **gac**  
    map from strings to string
    Required

Google Application Credentials in JSON format.

You can generate this from the command line with `gcloud iam service-accounts keys create key.json --iam-account=<service_account>@<project>.iam.gserviceaccount.com`

Or download it from the GCP console.

- **description**  
  string or null
  Optional

Description of the storage.
  
- **type**  
  enum
  Required

The type of storage.  
  This field cannot be modified, only set during creation.

Allowed values: Microsoft.Storage, AWS.S3, Google.Storage
