Dela via


Open Shift Clusters - List Credentials

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

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

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 OpenShift cluster 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

OpenShiftClusterCredentials

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 credentials 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/listCredentials?api-version=2023-11-22

Sample response

{
  "kubeadminUsername": "kubeadmin",
  "kubeadminPassword": "password"
}

Definitions

Name Description
CloudError

CloudError represents a cloud error.

CloudErrorBody

CloudErrorBody represents the body of a cloud error.

OpenShiftClusterCredentials

OpenShiftClusterCredentials represents an OpenShift cluster's credentials.

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.

OpenShiftClusterCredentials

OpenShiftClusterCredentials represents an OpenShift cluster's credentials.

Name Type Description
kubeadminPassword

string

The password for the kubeadmin user.

kubeadminUsername

string

The username for the kubeadmin user.