Create or Update Storage instance – Media API – MediaKind
Create or Update Storage instance
put https://app.mk.io/api/v1/projects/:project_name/media/storage/:storage_name
Create or update a Storage instance. Only the description, credentials and privateLinkServiceConnection details are updatable.
RBAC Capability Required: infra.storage.create or infra.storage.update
Authentication
Authorization Bearer
Bearer authentication of the form Bearer <token>, where token is your auth token.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| project_name | string | Yes | Name of the project. |
| storage_name | string | Yes | Name of the storage instance. |
Request
This endpoint expects an object.
spec | object | Required | The specification of the storage instance.
Variants:
- Microsoft.Storage
- Documentation: AzureStorageSpecCreate
- credential | object | AzureCredentialCreate Optional * sasToken | string | Required | SAS Token for Azure Storage Account, including leading ? * description | string or null | Optional | Description of the storage. * privateLinkServiceConnection | object or null | PrivateLinkServiceConnectionNullable Optional * requestMessage | string | Required | A message passed to the owner of the remote resource with this connection request. * resourceGroupName | string | Required | The name of the resource group containing the storage account. * storageAccountName | string | Required | The name of the storage account. * subscriptionId | string | Required | The ID of the Azure subscription containing the storage account. * type | enum | Required | The type of storage. Allowed values: Microsoft.Storage, AWS.S3, Google.Storage. * url | string | Required | HTTP(S) URL required for access to the storage.
- AWS.S3
- Documentation: AWSStorageSpecCreate
- bucketName | string | Required | The name of the AWS S3 bucket.
- credential | object | AWSCredential Optional
- accessKeyId | string | Required | The access key ID for the bucket.
- secretAccessKey | string | Required | The secret access key for the bucket.
- description | string or null | Optional | Description of the storage.
- type | enum | Required | The type of storage.
- url | string | Required | The URL of the S3 bucket.
- credential | object | AWSCredential Optional
- Google.Storage
- Documentation: GoogleStorageSpecCreate
- bucketName | string | Required | The name of the Google Storage bucket.
- credential | object | GoogleCredential Optional
- gac | map from strings to string | Required | Google Application Credentials in JSON format.
- description | string or null | Optional | Description of the storage.
- type | enum | Required | The type of storage.
- credential | object | GoogleCredential Optional
Response
200: Storage instance successfully updated- metadata | object | Required | Metadata about the storage instance.
- id | string | Required | The ID of the resource.
- created | string | Optional | The time when the resource was created.
- updated | string | Optional | The time when the resource was last updated.
- metadata | object | Required | Metadata about the storage instance.
201: Storage instance successfully created
Errors
400: Bad Request- error | object | Required | Pertinent information about the error.
- code | string | Required | The error code.
- detail | string | Required | The error message.
- error | object | Required | Pertinent information about the error.
401: Unauthorized403: Forbidden404: Not Found429: Too Many Requests500: Internal Server Error