Skip to main content

managed_namespaces

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

Overview

Namemanaged_namespaces
TypeResource
Idazure.container_service.managed_namespaces

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
adoptionPolicystringAction if Kubernetes namespace with same name already exists. Known values are: "Never", "IfIdentical", and "Always". (Never, IfIdentical, Always)
annotationsobjectThe annotations of managed namespace.
defaultNetworkPolicyobjectThe default network policy enforced upon the namespace. Customers can have other Kubernetes network policy objects under the namespace. Network policies are additive; if a policy or policies apply to a given pod for a given direction, the connections allowed in that direction for the pod is the union of what all applicable policies allow.
defaultResourceQuotaobjectThe default resource quota enforced upon the namespace. Customers can have other Kubernetes resource quota objects under the namespace. Resource quotas are additive; if multiple resource quotas are applied to a given namespace, then the effective limit will be one such that all quotas on the namespace can be satisfied.
deletePolicystringDelete options of a namespace. Known values are: "Keep" and "Delete". (Keep, Delete)
eTagstringIf eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
labelsobjectThe labels of managed namespace.
locationstringThe geo-location where the resource lives. Required.
portalFqdnstringThe special FQDN used by the Azure Portal to access the Managed Cluster. This FQDN is for use only by the Azure Portal and should not be used by other clients. The Azure Portal requires certain Cross-Origin Resource Sharing (CORS) headers to be sent in some responses, which Kubernetes APIServer doesn't handle by default. This special FQDN supports CORS, allowing the Azure Portal to function properly.
provisioningStatestringThe current provisioning state of the namespace. Known values are: "Updating", "Deleting", "Creating", "Succeeded", "Failed", and "Canceled". (Updating, Deleting, Creating, Succeeded, Failed, Canceled)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, resource_name, managed_namespace_name, subscription_idGets the specified namespace of a managed cluster.
list_by_managed_clusterselectresource_group_name, resource_name, subscription_idGets a list of managed namespaces in the specified managed cluster.
create_or_updateinsertresource_group_name, resource_name, managed_namespace_name, subscription_id, locationCreates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details.
updateupdateresource_group_name, resource_name, managed_namespace_name, subscription_idUpdates tags on a managed namespace.
create_or_updatereplaceresource_group_name, resource_name, managed_namespace_name, subscription_id, locationCreates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details.
deletedeleteresource_group_name, resource_name, managed_namespace_name, subscription_idDeletes a namespace.
list_credentialexecresource_group_name, resource_name, managed_namespace_name, subscription_idLists the credentials of a namespace.

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
managed_namespace_namestringThe name of the managed namespace. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
resource_namestringThe name of the managed cluster resource. Required.
subscription_idstring

SELECT examples

Gets the specified namespace of a managed cluster.

SELECT
id,
name,
adoptionPolicy,
annotations,
defaultNetworkPolicy,
defaultResourceQuota,
deletePolicy,
eTag,
labels,
location,
portalFqdn,
provisioningState,
systemData,
tags,
type
FROM azure.container_service.managed_namespaces
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND resource_name = '{{ resource_name }}' -- required
AND managed_namespace_name = '{{ managed_namespace_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details.

INSERT INTO azure.container_service.managed_namespaces (
tags,
location,
properties,
resource_group_name,
resource_name,
managed_namespace_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ resource_group_name }}',
'{{ resource_name }}',
'{{ managed_namespace_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
eTag,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Updates tags on a managed namespace.

UPDATE azure.container_service.managed_namespaces
SET
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND managed_namespace_name = '{{ managed_namespace_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
eTag,
location,
properties,
systemData,
tags,
type;

REPLACE examples

Creates or updates a namespace managed by ARM for the specified managed cluster. Users can configure aspects like resource quotas, network ingress/egress policies, and more. See aka.ms/aks/managed-namespaces for more details.

REPLACE azure.container_service.managed_namespaces
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND managed_namespace_name = '{{ managed_namespace_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
RETURNING
id,
name,
eTag,
location,
properties,
systemData,
tags,
type;

DELETE examples

Deletes a namespace.

DELETE FROM azure.container_service.managed_namespaces
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND managed_namespace_name = '{{ managed_namespace_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Lists the credentials of a namespace.

EXEC azure.container_service.managed_namespaces.list_credential 
@resource_group_name='{{ resource_group_name }}' --required,
@resource_name='{{ resource_name }}' --required,
@managed_namespace_name='{{ managed_namespace_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;