Skip to main content

managed_environments

Creates, updates, deletes, gets or lists a managed_environments resource.

Overview

Namemanaged_environments
TypeResource
Idazure.container_apps.managed_environments

Fields

NameDatatypeDescription
identityobjectManaged service identity (system assigned and/or user assigned identities)
kindstringKind of the Environment.
locationstringThe geo-location where the resource lives
propertiesobjectManaged environment resource specific properties
tagsobjectResource tags.

Methods

NameAccessible byRequired ParamsDescription
getSELECTenvironmentName, resourceGroupName, subscriptionIdGet the properties of a Managed Environment used to host container apps.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdGet all the Managed Environments in a resource group.
list_by_subscriptionSELECTsubscriptionIdGet all Managed Environments for a subscription.
create_or_updateINSERTenvironmentName, resourceGroupName, subscriptionIdCreates or updates a Managed Environment used to host container apps.
deleteDELETEenvironmentName, resourceGroupName, subscriptionIdDelete a Managed Environment if it does not have any container apps.
updateUPDATEenvironmentName, resourceGroupName, subscriptionIdPatches a Managed Environment using JSON Merge Patch

SELECT examples

Get all Managed Environments for a subscription.

SELECT
identity,
kind,
location,
properties,
tags
FROM azure.container_apps.managed_environments
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new managed_environments resource.

/*+ create */
INSERT INTO azure.container_apps.managed_environments (
environmentName,
resourceGroupName,
subscriptionId,
tags,
location,
kind,
identity,
properties
)
SELECT
'{{ environmentName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ tags }}',
'{{ location }}',
'{{ kind }}',
'{{ identity }}',
'{{ properties }}'
;

UPDATE example

Updates a managed_environments resource.

/*+ update */
UPDATE azure.container_apps.managed_environments
SET
tags = '{{ tags }}',
location = '{{ location }}',
kind = '{{ kind }}',
identity = '{{ identity }}',
properties = '{{ properties }}'
WHERE
environmentName = '{{ environmentName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified managed_environments resource.

/*+ delete */
DELETE FROM azure.container_apps.managed_environments
WHERE environmentName = '{{ environmentName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';