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

The following fields are returned by SELECT queries:

NameDatatypeDescription
identityobjectManaged identities for the Managed Environment to interact with other Azure services without maintaining any secrets or credentials in code.
kindstringKind of the Environment.
locationstringThe geo-location where the resource lives
propertiesobjectManaged environment resource specific properties
tagsobjectResource tags.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, environmentNameGet the properties of a Managed Environment used to host container apps.
list_by_resource_groupselectsubscriptionId, resourceGroupNameGet all the Managed Environments in a resource group.
list_by_subscriptionselectsubscriptionIdGet all Managed Environments for a subscription.
create_or_updateinsertsubscriptionId, resourceGroupName, environmentNameCreates or updates a Managed Environment used to host container apps.
updateupdatesubscriptionId, resourceGroupName, environmentNamePatches a Managed Environment using JSON Merge Patch
deletedeletesubscriptionId, resourceGroupName, environmentNameDelete a Managed Environment if it does not have any container apps.

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
environmentNamestringName of the Environment.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
subscriptionIdstring (uuid)The ID of the target subscription. The value must be an UUID.

SELECT examples

Get the properties of a Managed Environment used to host container apps.

SELECT
identity,
kind,
location,
properties,
tags
FROM azure.container_apps.managed_environments
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND environmentName = '{{ environmentName }}' -- required
;

INSERT examples

Creates or updates a Managed Environment used to host container apps.

INSERT INTO azure.container_apps.managed_environments (
data__tags,
data__location,
data__kind,
data__identity,
data__properties,
subscriptionId,
resourceGroupName,
environmentName
)
SELECT
'{{ tags }}',
'{{ location }}',
'{{ kind }}',
'{{ identity }}',
'{{ properties }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ environmentName }}'
RETURNING
identity,
kind,
location,
properties,
tags
;

UPDATE examples

Patches a Managed Environment using JSON Merge Patch

UPDATE azure.container_apps.managed_environments
SET
data__tags = '{{ tags }}',
data__location = '{{ location }}',
data__kind = '{{ kind }}',
data__identity = '{{ identity }}',
data__properties = '{{ properties }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND environmentName = '{{ environmentName }}' --required
RETURNING
identity,
kind,
location,
properties,
tags;

DELETE examples

Delete a Managed Environment if it does not have any container apps.

DELETE FROM azure.container_apps.managed_environments
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND environmentName = '{{ environmentName }}' --required
;