# Credential List Schema

## Properties
### @odata.nextLink
- string (Optional): URL if the page length and number of items match.

### supplemental
- object (Required): [ListResponseSupplementalSchema](https://docs.mediakind.com/api-reference/media-api/schemas/listresponsesupplementalschema)  
  - count (integer Required): Number of items returned  
  - kind (string Required): Type of items in the list  
  - operation (string Required): Operation type. Should always say 'list'  
  - pagination (object Required): [PaginationInfoSchema](https://docs.mediakind.com/api-reference/media-api/schemas/paginationinfoschem)
    - end (integer Required): Position of the last item in the list  
    - records (integer Required): Total number of items returned in the list  
    - start (integer Required): Position of the first item in the list  
    - total (integer Required): Total number of items in the project

### subscription
- object (Optional): [ProjectInfoSchema](https://docs.mediakind.com/api-reference/media-api/schemas/projectinfoschema)  
  - id (string Required): Project ID  
  - name (string Required): Project name

### value
- list of objects (Required): [CredentialSchemaGet](https://docs.mediakind.com/api-reference/media-api/schemas/credentialschemaget)

### metadata
- object (Required): [SasTokenMetadataSchema](https://docs.mediakind.com/api-reference/media-api/schemas/sastokenmetadataschema)  
  - created (string Optional, format: date-time): The time when the resource was created  
  - createdBy (string Optional, format: uuid): ID of the user who created the resource  
  - createdByEmail (string Optional): Email of the user who created the resource  
  - id (string Required, format: uuid): The ID of the resource  
  - updated (string Optional, format: date-time): The time when the resource was last updated  
  - updatedBy (string Optional, format: uuid): ID of the user who last updated the resource  
  - updatedByEmail (string Optional): Email of the user who last updated the resource

### spec
- object (Required): The specification of the credential.
  - **Discriminated by `type`. Select one variant:**  
    - Microsoft.Storage  
      - object [AzureCredentialSpecRead](https://docs.mediakind.com/api-reference/media-api/schemas/azurecredentialspecread)
      - credential object [AzureCredentialRead](https://docs.mediakind.com/api-reference/media-api/schemas/azurecredentialread)  
        - sasToken (string Required, pattern: ^\?([a-z]+=[^&]+)(&[a-z]+=[^&]+)+$): SAS Token for Azure Storage Account, including leading ?  
        - signedExpiry (string Required, format: date-time): The expiry time of the token.  
        - signedStart (string or null Required, format: date-time): The start time of the token.  
        - type (enum or null Required): The type of the credential. Allowed values: Microsoft.Storage, AWS.S3, Google.Storage  
    - AWS.S3  
      - object [AWSCredentialSpec](https://docs.mediakind.com/api-reference/media-api/schemas/awscredentialspec)  
      - credential object [AWSCredential](https://docs.mediakind.com/api-reference/media-api/schemas/awscredential)  
        - accessKeyId (string Required, pattern: ^A[KS]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.  
        - type (enum or null Required): The type of the credential. Allowed values: Microsoft.Storage, AWS.S3, Google.Storage  
    - Google.Storage  
      - object [GoogleCredentialSpec](https://docs.mediakind.com/api-reference/media-api/schemas/googlecredentialspec)  
      - credential object [GoogleCredential](https://docs.mediakind.com/api-reference/media-api/schemas/googlecredential)  
        - gac (map from strings to string Required): Google Application Credentials in JSON format.

### Generation
- 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.

### Type
- enum or null Required: The type of the credential. Allowed values: Microsoft.Storage, AWS.S3, Google.Storage.
