Skip to main content

environments

Creates, updates, deletes, gets or lists an environments resource.

Overview

Nameenvironments
TypeResource
Idazure.api_center.environments

Fields

The following fields are returned by SELECT queries:

Azure operation completed successfully.

NameDatatypeDescription
propertiesobjectThe resource-specific properties for this resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, serviceName, workspaceName, environmentNameReturns details of the environment.
listselectsubscriptionId, resourceGroupName, serviceName, workspaceName$filterReturns a collection of environments.
create_or_updateinsertsubscriptionId, resourceGroupName, serviceName, workspaceName, environmentNameCreates new or updates existing environment.
deletedeletesubscriptionId, resourceGroupName, serviceName, workspaceName, environmentNameDeletes the environment.

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.

NameDatatypeDescription
environmentNamestringThe name of the environment.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
serviceNamestringThe name of Azure API Center service.
subscriptionIdstring (uuid)The ID of the target subscription. The value must be an UUID.
workspaceNamestringThe name of the workspace.
$filterstringOData filter parameter.

SELECT examples

Returns details of the environment.

SELECT
properties
FROM azure.api_center.environments
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND serviceName = '{{ serviceName }}' -- required
AND workspaceName = '{{ workspaceName }}' -- required
AND environmentName = '{{ environmentName }}' -- required
;

INSERT examples

Creates new or updates existing environment.

INSERT INTO azure.api_center.environments (
data__properties,
subscriptionId,
resourceGroupName,
serviceName,
workspaceName,
environmentName
)
SELECT
'{{ properties }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ workspaceName }}',
'{{ environmentName }}'
RETURNING
properties
;

DELETE examples

Deletes the environment.

DELETE FROM azure.api_center.environments
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND serviceName = '{{ serviceName }}' --required
AND workspaceName = '{{ workspaceName }}' --required
AND environmentName = '{{ environmentName }}' --required
;