service
Creates, updates, deletes, gets or lists a service resource.
Overview
| Name | service |
| Type | Resource |
| Id | azure.data_tables.service |
Fields
The following fields are returned by SELECT queries:
- get_properties
| Name | Datatype | Description |
|---|---|---|
cors | array | The CORS properties. |
hourMetrics | object | The hour metrics properties. |
logging | object | The logging properties. |
minuteMetrics | object | The minute metrics properties. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_properties | select | account | timeout | Gets the properties of an account's Table service, including properties for Analytics and CORS (Cross-Origin Resource Sharing) rules. |
set_properties | exec | account | timeout | Sets properties for an account's Table service endpoint, including properties for Analytics and CORS (Cross-Origin Resource Sharing) rules. |
get_statistics | exec | account | timeout | Retrieves statistics related to replication for the Table service. It is only available on the secondary location endpoint when read-access geo-redundant replication is enabled for the account. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
account | string | Cosmos DB Table API account name. (default: ) |
timeout | integer | The timeout parameter is expressed in seconds. Default value is None. |
SELECT examples
- get_properties
Gets the properties of an account's Table service, including properties for Analytics and CORS (Cross-Origin Resource Sharing) rules.
SELECT
cors,
hourMetrics,
logging,
minuteMetrics
FROM azure.data_tables.service
WHERE account = '{{ account }}' -- required
AND timeout = '{{ timeout }}'
;
Lifecycle Methods
- set_properties
- get_statistics
Sets properties for an account's Table service endpoint, including properties for Analytics and CORS (Cross-Origin Resource Sharing) rules.
EXEC azure.data_tables.service.set_properties
@account='{{ account }}' --required,
@timeout='{{ timeout }}'
@@json=
'{
"logging": "{{ logging }}",
"hourMetrics": "{{ hourMetrics }}",
"minuteMetrics": "{{ minuteMetrics }}",
"cors": "{{ cors }}"
}'
;
Retrieves statistics related to replication for the Table service. It is only available on the secondary location endpoint when read-access geo-redundant replication is enabled for the account.
EXEC azure.data_tables.service.get_statistics
@account='{{ account }}' --required,
@timeout='{{ timeout }}'
;