services
Creates, updates, deletes, gets or lists a services
resource.
Overview
Name | services |
Type | Resource |
Id | azure.cosmos_db.services |
Fields
- vw_services
- services
Name | Datatype | Description |
---|---|---|
id | text | The unique resource identifier of the database account. |
name | text | The name of the database account. |
accountName | text | field from the properties object |
creation_time | text | field from the properties object |
instance_count | text | field from the properties object |
instance_size | text | field from the properties object |
resourceGroupName | text | field from the properties object |
serviceName | text | field from the properties object |
service_type | text | field from the properties object |
status | text | field from the properties object |
subscriptionId | text | field from the properties object |
type | text | The type of Azure resource. |
Name | Datatype | Description |
---|---|---|
id | string | The unique resource identifier of the database account. |
name | string | The name of the database account. |
properties | object | Services response resource. |
type | string | The type of Azure resource. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | accountName, resourceGroupName, serviceName, subscriptionId | Gets the status of service. |
list | SELECT | accountName, resourceGroupName, subscriptionId | Gets the status of service. |
create | INSERT | accountName, resourceGroupName, serviceName, subscriptionId | Creates a service. |
delete | DELETE | accountName, resourceGroupName, serviceName, subscriptionId | Deletes service with the given serviceName. |
SELECT
examples
Gets the status of service.
- vw_services
- services
SELECT
id,
name,
accountName,
creation_time,
instance_count,
instance_size,
resourceGroupName,
serviceName,
service_type,
status,
subscriptionId,
type
FROM azure.cosmos_db.vw_services
WHERE accountName = '{{ accountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
id,
name,
properties,
type
FROM azure.cosmos_db.services
WHERE accountName = '{{ accountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new services
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.cosmos_db.services (
accountName,
resourceGroupName,
serviceName,
subscriptionId,
properties
)
SELECT
'{{ accountName }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: instanceSize
value: []
- name: instanceCount
value: integer
- name: serviceType
value: []
DELETE
example
Deletes the specified services
resource.
/*+ delete */
DELETE FROM azure.cosmos_db.services
WHERE accountName = '{{ accountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';