files
Creates, updates, deletes, gets or lists a files
resource.
Overview
Name | files |
Type | Resource |
Id | azure.support.files |
Fields
- vw_files
- files
Name | Datatype | Description |
---|---|---|
chunk_size | text | field from the properties object |
created_on | text | field from the properties object |
fileName | text | field from the properties object |
fileWorkspaceName | text | field from the properties object |
file_size | text | field from the properties object |
number_of_chunks | text | field from the properties object |
subscriptionId | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | Describes the properties of a file. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | fileName, fileWorkspaceName, subscriptionId | Returns details of a specific file in a work space. |
list | SELECT | fileWorkspaceName, subscriptionId | Lists all the Files information under a workspace for an Azure subscription. |
create | INSERT | fileName, fileWorkspaceName, subscriptionId | Creates a new file under a workspace for the specified subscription. |
upload | EXEC | fileName, fileWorkspaceName, subscriptionId | This API allows you to upload content to a file |
SELECT
examples
Lists all the Files information under a workspace for an Azure subscription.
- vw_files
- files
SELECT
chunk_size,
created_on,
fileName,
fileWorkspaceName,
file_size,
number_of_chunks,
subscriptionId
FROM azure.support.vw_files
WHERE fileWorkspaceName = '{{ fileWorkspaceName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
properties
FROM azure.support.files
WHERE fileWorkspaceName = '{{ fileWorkspaceName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new files
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.support.files (
fileName,
fileWorkspaceName,
subscriptionId,
properties
)
SELECT
'{{ fileName }}',
'{{ fileWorkspaceName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: createdOn
value: string
- name: chunkSize
value: integer
- name: fileSize
value: integer
- name: numberOfChunks
value: integer