environments
Creates, updates, deletes, gets or lists an environments resource.
Overview
| Name | environments |
| Type | Resource |
| Id | azure.api_center.environments |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". |
name | string | The name of the resource. |
customProperties | object | The custom metadata defined for API catalog entities. |
description | string | The environment description. |
kind | string | Environment kind. Required. Known values are: "development", "testing", "staging", and "production". |
onboarding | object | Environment onboarding information. |
server | object | Server information of the environment. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
title | string | Environment title. Required. |
type | string | 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. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". |
name | string | The name of the resource. |
customProperties | object | The custom metadata defined for API catalog entities. |
description | string | The environment description. |
kind | string | Environment kind. Required. Known values are: "development", "testing", "staging", and "production". |
onboarding | object | Environment onboarding information. |
server | object | Server information of the environment. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
title | string | Environment title. Required. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, service_name, workspace_name, environment_name, subscription_id | Returns details of the environment. | |
list | select | resource_group_name, service_name, workspace_name, subscription_id | $filter | Returns a collection of environments. |
create_or_update | insert | resource_group_name, service_name, workspace_name, environment_name, subscription_id | Creates new or updates existing environment. | |
create_or_update | replace | resource_group_name, service_name, workspace_name, environment_name, subscription_id | Creates new or updates existing environment. | |
delete | delete | resource_group_name, service_name, workspace_name, environment_name, subscription_id | Deletes the environment. | |
head | exec | resource_group_name, service_name, workspace_name, environment_name, subscription_id | Checks if specified environment exists. |
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 |
|---|---|---|
environment_name | string | The name of the environment. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
service_name | string | The name of Azure API Center service. Required. |
subscription_id | string | |
workspace_name | string | The name of the workspace. Required. |
$filter | string | OData filter parameter. Default value is None. |
SELECT examples
- get
- list
Returns details of the environment.
SELECT
id,
name,
customProperties,
description,
kind,
onboarding,
server,
systemData,
title,
type
FROM azure.api_center.environments
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND workspace_name = '{{ workspace_name }}' -- required
AND environment_name = '{{ environment_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Returns a collection of environments.
SELECT
id,
name,
customProperties,
description,
kind,
onboarding,
server,
systemData,
title,
type
FROM azure.api_center.environments
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND workspace_name = '{{ workspace_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $filter = '{{ $filter }}'
;
INSERT examples
- create_or_update
- Manifest
Creates new or updates existing environment.
INSERT INTO azure.api_center.environments (
properties,
resource_group_name,
service_name,
workspace_name,
environment_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ service_name }}',
'{{ workspace_name }}',
'{{ environment_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: environments
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the environments resource.
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the environments resource.
- name: workspace_name
value: "{{ workspace_name }}"
description: Required parameter for the environments resource.
- name: environment_name
value: "{{ environment_name }}"
description: Required parameter for the environments resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the environments resource.
- name: properties
description: |
The resource-specific properties for this resource.
value:
title: "{{ title }}"
description: "{{ description }}"
kind: "{{ kind }}"
server:
type: "{{ type }}"
managementPortalUri:
- "{{ managementPortalUri }}"
onboarding:
instructions: "{{ instructions }}"
developerPortalUri:
- "{{ developerPortalUri }}"
customProperties: "{{ customProperties }}"
REPLACE examples
- create_or_update
Creates new or updates existing environment.
REPLACE azure.api_center.environments
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND workspace_name = '{{ workspace_name }}' --required
AND environment_name = '{{ environment_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;
DELETE examples
- delete
Deletes the environment.
DELETE FROM azure.api_center.environments
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND workspace_name = '{{ workspace_name }}' --required
AND environment_name = '{{ environment_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- head
Checks if specified environment exists.
EXEC azure.api_center.environments.head
@resource_group_name='{{ resource_group_name }}' --required,
@service_name='{{ service_name }}' --required,
@workspace_name='{{ workspace_name }}' --required,
@environment_name='{{ environment_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;