Lista os Secrets em um namespace.
Experimente agora
Testar
Autorização RAM
|
Ação |
Nível de acesso |
Tipo de recurso |
Chave de condição |
Ação dependente |
|
sae:ListSecrets |
*All Resource
|
Nenhuma | Nenhuma |
Sintaxe da solicitação
GET /pop/v1/sam/secret/secrets HTTP/1.1
Parâmetros da solicitação
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
| NamespaceId |
string |
Sim |
O ID do namespace que contém o Secret. Para o namespace padrão, use o ID da região, como cn-beijing. |
cn-beijing:test |
Elementos de resposta
|
Elemento |
Tipo |
Descrição |
Exemplo |
|
object |
Os dados retornados. |
||
| RequestId |
string |
O ID da solicitação. |
91F93257-7A4A-4BD3-9A7E-2F6EAE6D**** |
| Message |
string |
A mensagem retornada.
|
success |
| TraceId |
string |
O ID de rastreamento. Você pode usar este ID para consultar os detalhes de uma chamada. |
0a98a02315955564772843261e**** |
| Data |
object |
O objeto de resposta. |
|
| Secrets |
array<object> |
Uma lista de instâncias de Secret. |
|
|
array<object> |
Os detalhes de uma instância de Secret. |
||
| NamespaceId |
string |
The namespace ID. |
cn-beijing:test |
| SecretId |
integer |
The Secret instance ID. |
16 |
| SecretName |
string |
The Secret instance name. |
registry-auth |
| SecretType |
string |
The type of the Secret instance. The only valid value is: kubernetes.io/dockerconfigjson: a Secret that stores credentials for a container image registry and is used to authenticate image pulls during deployment. |
kubernetes.io/dockerconfigjson |
| RelateApps |
array<object> |
The associated applications. |
|
|
object |
The details of an application. |
||
| AppName |
string |
The application name. |
test-app |
| AppId |
string |
The application ID. |
f16b4000-9058-4c22-a49d-49a28f0b**** |
| CreateTime |
integer |
The time when the Secret instance was created. |
1593760185111 |
| UpdateTime |
integer |
The time when the Secret instance was last updated. |
1593760185111 |
| ErrorCode |
string |
O código de erro.
|
|
| Code |
string |
O código de status HTTP. Valores válidos:
|
200 |
| Success |
boolean |
Indica se a solicitação foi bem-sucedida. Valores válidos:
|
true |
Exemplos
Resposta de sucesso
JSON formato
{
"RequestId": "91F93257-7A4A-4BD3-9A7E-2F6EAE6D****",
"Message": "success",
"TraceId": "0a98a02315955564772843261e****",
"Data": {
"Secrets": [
{
"NamespaceId": "cn-beijing:test",
"SecretId": 16,
"SecretName": "registry-auth",
"SecretType": "kubernetes.io/dockerconfigjson",
"RelateApps": [
{
"AppName": "test-app",
"AppId": "f16b4000-9058-4c22-a49d-49a28f0b****"
}
],
"CreateTime": 1593760185111,
"UpdateTime": 1593760185111
}
]
},
"ErrorCode": "",
"Code": "200",
"Success": true
}
Códigos de erro
|
Código de status HTTP |
Código de erro |
Mensagem de erro |
Descrição |
|---|---|---|---|
| 400 | InvalidParameter.NotEmpty | You must specify the parameter %s. | |
| 400 | InvalidParameter.Obviously | The specified parameter is invalid {%s}. | |
| 400 | InvalidParameter.WithMessage | The parameter is invalid {%s}: %s | |
| 404 | InvalidNamespaceId.NotFound | The specified NamespaceId does not exist. |
Consulte Códigos de Erro para uma lista completa.
Notas de versão
Consulte Notas de Versão para uma lista completa.