Queries Kubernetes Secrets.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
edas:ReadCluster |
get |
*All Resource
|
None | None |
Request syntax
GET /pop/v5/k8s/acs/k8s_secret HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClusterId |
string |
No |
The ID of the cluster. |
7a953f9a-2946-4c7a-9d82-9939db****** |
| Namespace |
string |
No |
The namespace of the Kubernetes cluster. |
default |
| RegionId |
string |
No |
The ID of the region. |
cn-hangzhou |
| PageNo |
integer |
No |
The number of the page to return. Pages start from Page 0. |
0 |
| PageSize |
integer |
No |
The number of entries to return on each page. The value 0 indicates that all entries are returned on one page. |
10 |
| Condition |
string |
No |
The filter conditions. Set this parameter to a JSON string in the format of {"field":"Name", "pattern":"configmap-"}. |
{\"field\":\"Name\",\"pattern\":\"product\"} |
| ShowRelatedApps |
boolean |
No |
Specifies whether to return a list of applications that use a Secret. |
true |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
integer |
The HTTP status code that is returned. |
200 |
| Message |
string |
The additional information that is returned. |
success |
| RequestId |
string |
The ID of the request. |
b197-40ab-9155-**** |
| Result |
object |
The returned query results of Kubernetes Secrets. |
|
| Total |
integer |
The total number of entries that are returned. |
6 |
| Secrets |
array<object> |
The information about Kubernetes Secrets. |
|
|
array<object> |
|||
| Type |
string |
The type of the Secret. Valid values:
|
Opaque |
| CreationTime |
string |
The time when the Secret was created. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC. |
2022-05-26T02:57:02Z |
| ClusterName |
string |
The name of the cluster. |
test-cluster |
| Namespace |
string |
The namespace of the Kubernetes cluster. |
default |
| Base64Encoded |
boolean |
Indicates whether the data is Base64-encoded. Valid values:
|
false |
| CertRegionId |
string |
The region in which the certificate is stored. |
cn-hangzhou |
| CertId |
string |
The ID of the certificate provided by Alibaba Cloud Certificate Management Service. |
123456 |
| Name |
string |
The name of the Secret. The name must start with a letter, and can contain digits, letters, and hyphens (-). It can be up to 63 characters in length. |
my-secret |
| ClusterId |
string |
The ID of the cluster in Enterprise Distributed Application Service (EDAS). |
4472a6d3-f01d-4087-85a7-3dc52******** |
| RelatedIngressRules |
array<object> |
Rules in the Ingress that is associated with the Secret. |
|
|
array<object> |
|||
| Name |
string |
The name of the rule in the Ingress. |
testrulename |
| Namespace |
string |
The namespaces of the Kubernetes cluster. |
default |
| RelatedApps |
array<object> |
Aplications that are associated with the Ingress. |
|
|
object |
|||
| AppName |
string |
The name of the EDAS application. |
app-test |
| AppId |
string |
The ID of the application. |
6dc74432-5a35-4e68-8aaa-3700******** |
| Data |
array<object> |
The data of the Kubernetes Secret. |
|
|
object |
|||
| Key |
string |
The user-defined key of the Kubernetes Secret. |
name |
| Value |
string |
The user-defined value of the Kubernetes Secret. |
william |
| RelatedApps |
array<object> |
Applications that use the Secret. |
|
|
object |
|||
| AppName |
string |
The name of the application. |
my-app |
| AppId |
string |
The ID of the application. |
b08eeb18-8946-410c-a1ea-dbbc******** |
| CertDetail |
object |
The details of the Secure Sockets Layer (SSL) certificate. |
|
| EndTime |
string |
The time when the SSL certificate expired. |
2022-02-22T02:32:41Z |
| Status |
string |
The state of the SSL certificate. Valid values:
|
normal |
| StartTime |
string |
The time when the SSL certificate started to take effect. |
2022-01-02T22:40:00Z |
| Issuer |
string |
The certificate authority (CA) that issued the SSL certificate. |
CN=GlobalSign Root CA, OU=Root CA, O=GlobalSign nv-sa, C=BE |
| DomainNames |
array |
Domain names that are associated with the SSL certificate. |
|
|
string |
The domain name. |
example.com |
Examples
Success response
JSON format
{
"Code": 200,
"Message": "success",
"RequestId": "b197-40ab-9155-****",
"Result": {
"Total": 6,
"Secrets": [
{
"Type": "Opaque",
"CreationTime": "2022-05-26T02:57:02Z",
"ClusterName": "test-cluster",
"Namespace": "default",
"Base64Encoded": false,
"CertRegionId": "cn-hangzhou",
"CertId": "123456",
"Name": "my-secret",
"ClusterId": "4472a6d3-f01d-4087-85a7-3dc52********",
"RelatedIngressRules": [
{
"Name": "testrulename",
"Namespace": "default",
"RelatedApps": [
{
"AppName": "app-test",
"AppId": "6dc74432-5a35-4e68-8aaa-3700********"
}
]
}
],
"Data": [
{
"Key": "name",
"Value": "william"
}
],
"RelatedApps": [
{
"AppName": "my-app",
"AppId": "b08eeb18-8946-410c-a1ea-dbbc********"
}
],
"CertDetail": {
"EndTime": "2022-02-22T02:32:41Z",
"Status": "normal",
"StartTime": "2022-01-02T22:40:00Z",
"Issuer": "CN=GlobalSign Root CA, OU=Root CA, O=GlobalSign nv-sa, C=BE",
"DomainNames": [
"example.com"
]
}
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 500 | Edas.errorcode.PermissionDenied.message | You are not authorized to perform the operation. | No permissions |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.