services
Creates, updates, deletes, gets or lists a services
resource.
Overview
Name | services |
Type | Resource |
Id | azure.api_center.services |
Fields
- vw_services
- services
Name | Datatype | Description |
---|---|---|
identity | text | Managed service identity (system assigned and/or user assigned identities) |
location | text | The geo-location where the resource lives |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
restore | text | field from the properties object |
serviceName | text | field from the properties object |
subscriptionId | text | field from the properties object |
tags | text | Resource tags. |
Name | Datatype | Description |
---|---|---|
identity | object | Managed service identity (system assigned and/or user assigned identities) |
location | string | The geo-location where the resource lives |
properties | object | The properties of the service. |
tags | object | Resource tags. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | resourceGroupName, serviceName, subscriptionId | Returns details of the service. |
list_by_resource_group | SELECT | resourceGroupName, subscriptionId | Returns a collection of services within the resource group. |
list_by_subscription | SELECT | subscriptionId | Lists services within an Azure subscription. |
create_or_update | INSERT | resourceGroupName, serviceName, subscriptionId | Creates new or updates existing API. |
delete | DELETE | resourceGroupName, serviceName, subscriptionId | Deletes specified service. |
update | UPDATE | resourceGroupName, serviceName, subscriptionId | Updates existing service. |
export_metadata_schema | EXEC | resourceGroupName, serviceName, subscriptionId | Exports the effective metadata schema. |
SELECT
examples
Lists services within an Azure subscription.
- vw_services
- services
SELECT
identity,
location,
provisioning_state,
resourceGroupName,
restore,
serviceName,
subscriptionId,
tags
FROM azure.api_center.vw_services
WHERE subscriptionId = '{{ subscriptionId }}';
SELECT
identity,
location,
properties,
tags
FROM azure.api_center.services
WHERE 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.api_center.services (
resourceGroupName,
serviceName,
subscriptionId,
properties,
identity,
tags,
location
)
SELECT
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ properties }}',
'{{ identity }}',
'{{ tags }}',
'{{ location }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: provisioningState
value: []
- name: restore
value: boolean
- name: identity
value:
- name: principalId
value: string
- name: tenantId
value: string
- name: type
value: []
- name: userAssignedIdentities
value: []
- name: tags
value: object
- name: location
value: string
UPDATE
example
Updates a services
resource.
/*+ update */
UPDATE azure.api_center.services
SET
identity = '{{ identity }}',
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';
DELETE
example
Deletes the specified services
resource.
/*+ delete */
DELETE FROM azure.api_center.services
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';