tables
Creates, updates, deletes, gets or lists a tables
resource.
Overview
Name | tables |
Type | Resource |
Id | azure.storage.tables |
Fields
- vw_tables
- tables
Name | Datatype | Description |
---|---|---|
id | text | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name | text | The name of the resource |
accountName | text | field from the properties object |
resourceGroupName | text | field from the properties object |
signed_identifiers | text | field from the properties object |
subscriptionId | text | field from the properties object |
tableName | text | field from the properties object |
table_name | text | field from the properties object |
type | text | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
Name | Datatype | Description |
---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name | string | The name of the resource |
properties | object | |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | accountName, resourceGroupName, subscriptionId, tableName | Gets the table with the specified table name, under the specified account if it exists. |
list | SELECT | accountName, resourceGroupName, subscriptionId | Gets a list of all the tables under the specified storage account |
create | INSERT | accountName, resourceGroupName, subscriptionId, tableName | Creates a new table with the specified table name, under the specified account. |
delete | DELETE | accountName, resourceGroupName, subscriptionId, tableName | Deletes the table with the specified table name, under the specified account if it exists. |
update | UPDATE | accountName, resourceGroupName, subscriptionId, tableName | Creates a new table with the specified table name, under the specified account. |
SELECT
examples
Gets a list of all the tables under the specified storage account
- vw_tables
- tables
SELECT
id,
name,
accountName,
resourceGroupName,
signed_identifiers,
subscriptionId,
tableName,
table_name,
type
FROM azure.storage.vw_tables
WHERE accountName = '{{ accountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
id,
name,
properties,
type
FROM azure.storage.tables
WHERE accountName = '{{ accountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new tables
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.storage.tables (
accountName,
resourceGroupName,
subscriptionId,
tableName,
properties
)
SELECT
'{{ accountName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ tableName }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: tableName
value: string
- name: signedIdentifiers
value:
- - name: id
value: string
- name: accessPolicy
value:
- name: startTime
value: string
- name: expiryTime
value: string
- name: permission
value: string
- name: id
value: string
- name: name
value: string
- name: type
value: string
UPDATE
example
Updates a tables
resource.
/*+ update */
UPDATE azure.storage.tables
SET
properties = '{{ properties }}'
WHERE
accountName = '{{ accountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND tableName = '{{ tableName }}';
DELETE
example
Deletes the specified tables
resource.
/*+ delete */
DELETE FROM azure.storage.tables
WHERE accountName = '{{ accountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND tableName = '{{ tableName }}';