Managed Clusters - Get Access Profile

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

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential?api-version=2024-08-01

URI Parameters

Name In Required Type Description
resourceGroupName
path True

string

The name of the resource group. The name is case insensitive.

resourceName
path True

string

The name of the managed cluster resource.

Regex pattern: ^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$

roleName
path True

string

The name of the role for managed cluster accessProfile resource.

subscriptionId
path True

string

uuid

The ID of the target subscription. The value must be an UUID.

api-version
query True

string

The API version to use for this operation.

Responses

Name Type Description
200 OK

ManagedClusterAccessProfile

OK

Other Status Codes

CloudError

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

Get Managed Cluster

Sample request

POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/accessProfiles/clusterUser/listCredential?api-version=2024-08-01

Sample response

{
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/accessProfiles/clusterUser",
  "location": "location1",
  "name": "clusterUser",
  "properties": {
    "kubeConfig": "a3ViZUNvbmZpZzE="
  },
  "type": "Microsoft.ContainerService/ManagedClusters/AccessProfiles"
}

Definitions

Name Description
CloudError

An error response from the Container service.

CloudErrorBody

An error response from the Container service.

createdByType

The type of identity that created the resource.

ManagedClusterAccessProfile

Managed cluster Access Profile.

systemData

Metadata pertaining to creation and last modification of the resource.

CloudError

An error response from the Container service.

Name Type Description
error

CloudErrorBody

Details about the error.

CloudErrorBody

An error response from the Container service.

Name Type Description
code

string

An identifier for the error. Codes are invariant and are intended to be consumed programmatically.

details

CloudErrorBody[]

A list of additional details about the error.

message

string

A message describing the error, intended to be suitable for display in a user interface.

target

string

The target of the particular error. For example, the name of the property in error.

createdByType

The type of identity that created the resource.

Name Type Description
Application

string

Key

string

ManagedIdentity

string

User

string

ManagedClusterAccessProfile

Managed cluster Access Profile.

Name Type Description
id

string

Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

location

string

The geo-location where the resource lives

name

string

The name of the resource

properties.kubeConfig

string

Base64-encoded Kubernetes configuration file.

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

tags

object

Resource tags.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.