Share via


Open Shift Clusters - List Admin Credentials

Lists admin kubeconfig of an OpenShift cluster with the specified subscription, resource group and resource name.
The operation returns the admin kubeconfig.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RedHatOpenShift/openShiftClusters/{resourceName}/listAdminCredentials?api-version=2023-11-22

URI Parameters

Name In Required Type Description
resourceGroupName
path True

string

minLength: 1
maxLength: 90

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

resourceName
path True

string

The name of the OpenShift cluster resource.

subscriptionId
path True

string

minLength: 1

The ID of the target subscription.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Responses

Name Type Description
200 OK

OpenShiftClusterAdminKubeconfig

OK

Other Status Codes

CloudError

Error response describing why the operation failed. If the resource doesn't exist, 404 (Not Found) is returned. If any of the input parameters is wrong, 400 (Bad Request) is returned.

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

Lists admin kubeconfig of an OpenShift cluster with the specified subscription, resource group and resource name.

Sample request

POST https://management.azure.com/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.RedHatOpenShift/openShiftClusters/resourceName/listAdminCredentials?api-version=2023-11-22

Sample response

{
  "kubeconfig": "e30="
}

Definitions

Name Description
CloudError

CloudError represents a cloud error.

CloudErrorBody

CloudErrorBody represents the body of a cloud error.

OpenShiftClusterAdminKubeconfig

OpenShiftClusterAdminKubeconfig represents an OpenShift cluster's admin kubeconfig.

CloudError

CloudError represents a cloud error.

Name Type Description
error

CloudErrorBody

An error response from the service.

CloudErrorBody

CloudErrorBody represents the body of a cloud error.

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.

OpenShiftClusterAdminKubeconfig

OpenShiftClusterAdminKubeconfig represents an OpenShift cluster's admin kubeconfig.

Name Type Description
kubeconfig

string

The base64-encoded kubeconfig file.