Querying the Access Information of a Specified Cluster

Function

This API is used to query the access information of a specified cluster.

Note

The URL for cluster management is in the format of https://Endpoint/uri. In the URL, uri indicates the resource path, that is, the path for API access.

URI

GET /api/v3/projects/{project_id}/clusters/{cluster_id}/openapi

Table 1 describes the parameters of the API.

Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

cluster_id

Yes

String

Cluster ID.

Request

N/A

Response

Response parameters:

Table 2 describes the response parameters.

Table 2 Response parameters

Parameter

Type

Description

metadata

json

Metadata.

spec

Table 3

-

status

Table 7

Cluster endpoint.

Table 3 Data structure of the spec field

Parameter

Type

Description

spec

Table 4

Information about the elastic IP address.

Table 4 Data structure of the spec-spec field

Parameter

Type

Description

id

String

ID of the elastic IP address.

eip

Table 5

Information about the elastic IP address.

IsDynamic

Boolean

Whether the elastic IP address is dynamic.

Table 5 Data structure of the eip field

Parameter

Type

Description

bandwidth

Table 6

Specifies the bandwidth of the elastic IP address.

Table 6 Data structure of the bandwidth field

Parameter

Type

Description

size

Integer

Specifies the bandwidth (Mbit/s).

sharetype

String

Specifies the bandwidth sharing type.

Enumerated values: PER (indicates exclusive bandwidth) and WHOLE (indicates sharing).

Table 7 Data structure of the status field

Parameter

Type

Description

privateEndpoint

String

Address for access within the VPC.

publicEndpoint

String

Address for access outside the VPC.

Example response:

{
    "metadata": {},
    "spec": {
        "spec": {
            "id": "0ead681e-9f94-4599-8a21-e2a1950da121",
            "eip": {
                "bandwidth": {
                    "size": 5,
                    "sharetype": "PER"
                }
            },
            "IsDynamic": false
        }
    },
    "status": {
        "privateEndpoint": "https://192.168.0.189:5443",
        "publicEndpoint": "https://10.154.50.197:5443"
    }
}

Status Code

Table 8 describes the status code of the API.

Table 8 Status code

Status Code

Description

200

The progress of the specified job is successfully obtained.

For details about error status codes, see Status Code.