Share via


Managed Clusters - Get Access Profile

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

HTTP
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential?api-version=2022-02-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

The ID of the target subscription.

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

HTTP
POST https://management.azure.com/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/accessProfiles/clusterUser/listCredential?api-version=2022-02-01

Sample response

JSON
{
  "id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/accessProfiles/clusterUser",
  "location": "location1",
  "name": "clusterUser",
  "properties": {
    "kubeConfig": "kubeConfig1"
  },
  "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.

Value Description
Application
Key
ManagedIdentity
User

ManagedClusterAccessProfile

Managed cluster Access Profile.

Name Type Description
id

string

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

location

string

Resource location

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.