Skip to main content

managed_clusters

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

Overview

Namemanaged_clusters
TypeResource
Idazure.container_service.managed_clusters

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.
kubeConfigstring (byte)Base64-encoded Kubernetes configuration file.
locationstringThe geo-location where the resource lives. Required.
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
get_access_profileselectresource_group_name, resource_name, role_name, subscription_idGets an access profile of a managed cluster. WARNING: This API will be deprecated. Instead use ListClusterUserCredentials _ or ListClusterAdminCredentials _ .
get_command_resultselectresource_group_name, resource_name, command_id, subscription_idGets the results of a command which has been run on the Managed Cluster.
get_mesh_upgrade_profileselectresource_group_name, resource_name, mode, subscription_idGets available upgrades for a service mesh in a cluster.
getselectresource_group_name, resource_name, subscription_idGets a managed cluster.
get_guardrails_versionsselectlocation, version, subscription_idGets supported Guardrails version in the specified subscription and location. Contains Guardrails version along with its support info and whether it is a default version.
get_mesh_revision_profileselectlocation, mode, subscription_idGets a mesh revision profile for a specified mesh in the specified location. Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades.
list_by_resource_groupselectresource_group_name, subscription_idLists managed clusters in the specified subscription and resource group.
list_guardrails_versionsselectlocation, subscription_idGets a list of supported Guardrails versions in the specified subscription and location. Contains list of Guardrails version along with its support info and whether it is a default version.
listselectsubscription_idGets a list of managed clusters in the specified subscription.
create_or_updateinsertresource_group_name, resource_name, subscription_id, locationCreates or updates a managed cluster.
update_tagsupdateresource_group_name, resource_name, subscription_idUpdates tags on a managed cluster.
create_or_updatereplaceresource_group_name, resource_name, subscription_id, locationCreates or updates a managed cluster.
deletedeleteresource_group_name, resource_name, subscription_idignore-pod-disruption-budgetDeletes a managed cluster.
list_cluster_admin_credentialsexecresource_group_name, resource_name, subscription_idserver-fqdnLists the admin credentials of a managed cluster.
list_cluster_user_credentialsexecresource_group_name, resource_name, subscription_idserver-fqdn, formatLists the user credentials of a managed cluster.
list_cluster_monitoring_user_credentialsexecresource_group_name, resource_name, subscription_idserver-fqdnLists the cluster monitoring user credentials of a managed cluster.
list_outbound_network_dependencies_endpointsexecresource_group_name, resource_name, subscription_idGets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint.
list_safeguards_versionsexeclocation, subscription_idGets a list of supported Safeguards versions in the specified subscription and location. Contains list of Safeguards version along with its support info and whether it is a default version.
list_mesh_revision_profilesexeclocation, subscription_idLists mesh revision profiles for all meshes in the specified location. Contains extra metadata on each revision, including supported revisions, cluster compatibility and available upgrades.
list_mesh_upgrade_profilesexecresource_group_name, resource_name, subscription_idLists available upgrades for all service meshes in a specific cluster.
list_kubernetes_versionsexeclocation, subscription_idGets a list of supported Kubernetes versions in the specified subscription. Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and details on preview status of the version.
get_upgrade_profileexecresource_group_name, resource_name, subscription_idGets the upgrade profile of a managed cluster.
get_safeguards_versionsexeclocation, version, subscription_idGets supported Safeguards version in the specified subscription and location. Contains Safeguards version along with its support info and whether it is a default version.
reset_service_principal_profileexecresource_group_name, resource_name, subscription_id, clientIdReset the Service Principal Profile of a managed cluster. This action cannot be performed on a cluster that is not using a service principal.
reset_aad_profileexecresource_group_name, resource_name, subscription_idReset the AAD Profile of a managed cluster. WARNING: This API will be deprecated. Please see AKS-managed Azure Active Directory integration _ to update your cluster with AKS-managed Azure AD.
rotate_cluster_certificatesexecresource_group_name, resource_name, subscription_idRotates the certificates of a managed cluster. See Certificate rotation _ for more details about rotating managed cluster certificates.
abort_latest_operationexecresource_group_name, resource_name, subscription_idAborts last operation running on managed cluster. Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned.
rotate_service_account_signing_keysexecresource_group_name, resource_name, subscription_idRotates the service account signing keys of a managed cluster.
stopexecresource_group_name, resource_name, subscription_idStops a Managed Cluster. This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See stopping a cluster _ for more details about stopping a cluster.
startexecresource_group_name, resource_name, subscription_idStarts a previously stopped Managed Cluster. See starting a cluster _ for more details about starting a cluster.
run_commandexecresource_group_name, resource_name, subscription_id, commandSubmits a command to run against the Managed Cluster. AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see AKS Run Command _.
rebalance_load_balancersexecresource_group_name, resource_name, subscription_idRebalance nodes across specific load balancers.

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
command_idstringId of the command. Required.
locationstringThe name of the Azure region. Required.
modestringThe mode of the mesh. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
resource_namestringThe name of the managed cluster resource. Required.
role_namestringThe name of the role for managed cluster accessProfile resource. Required.
subscription_idstring
versionstringSafeguards version. Required.
formatstringOnly apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary in the path. Known values are: "azure" and "exec". Default value is None.
ignore-pod-disruption-budgetbooleanignore-pod-disruption-budget=true to delete those pods on a node without considering Pod Disruption Budget. Default value is None.
server-fqdnstringserver fqdn type for credentials to be returned. Default value is None.

SELECT examples

Gets an access profile of a managed cluster. WARNING: This API will be deprecated. Instead use ListClusterUserCredentials _ or ListClusterAdminCredentials _ .

SELECT
id,
name,
kubeConfig,
location,
systemData,
tags,
type
FROM azure.container_service.managed_clusters
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND resource_name = '{{ resource_name }}' -- required
AND role_name = '{{ role_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates or updates a managed cluster.

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

UPDATE examples

Updates tags on a managed cluster.

UPDATE azure.container_service.managed_clusters
SET
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
eTag,
extendedLocation,
identity,
kind,
location,
properties,
sku,
systemData,
tags,
type;

REPLACE examples

Creates or updates a managed cluster.

REPLACE azure.container_service.managed_clusters
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}',
sku = '{{ sku }}',
extendedLocation = '{{ extendedLocation }}',
identity = '{{ identity }}',
kind = '{{ kind }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
RETURNING
id,
name,
eTag,
extendedLocation,
identity,
kind,
location,
properties,
sku,
systemData,
tags,
type;

DELETE examples

Deletes a managed cluster.

DELETE FROM azure.container_service.managed_clusters
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND ignore-pod-disruption-budget = '{{ ignore-pod-disruption-budget }}'
;

Lifecycle Methods

Lists the admin credentials of a managed cluster.

EXEC azure.container_service.managed_clusters.list_cluster_admin_credentials 
@resource_group_name='{{ resource_group_name }}' --required,
@resource_name='{{ resource_name }}' --required,
@subscription_id='{{ subscription_id }}' --required,
@server-fqdn='{{ server-fqdn }}'
;