Mengkueri semua rahasia di wilayah saat ini.
Deskripsi operasi
-
To call this operation, the RAM user or RAM role must be granted the required policy. For more information, see Resource Access Management.
-
This operation returns only secret metadata, not the secret values.
This example shows how to query secrets created by the current user in the current region. PageNumber is set to 1 and PageSize is set to 2, returning metadata for two secrets.
Coba sekarang
Test
RAM authorization
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| FetchTags |
string |
No |
Apakah akan mengembalikan tag Sumber daya untuk setiap rahasia. Nilai valid:
|
false |
| PageNumber |
integer |
No |
Nomor halaman. |
1 |
| PageSize |
integer |
No |
Ukuran halaman. |
2 |
| Filters |
string |
No |
Memfilter rahasia berdasarkan kondisi yang ditentukan. Nilainya adalah daftar hingga 10 pasangan kunci-nilai. Saat Anda memfilter berdasarkan tag, kueri mengembalikan maksimum 4.000 Sumber daya. Jika lebih dari 4.000 Sumber daya cocok dengan filter, panggil operasi ListResourceTags.
Nilai valid untuk Key:
Jika Anda menentukan beberapa nilai untuk sebuah kunci, filter menerapkan logika OR. Misalnya, jika Anda memasukkan |
[{"Key":"SecretName", "Values":["Val1","Val2"]}] |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| PageNumber |
integer |
The page number. |
1 |
| PageSize |
integer |
The number of entries per page. |
2 |
| RequestId |
string |
The unique identifier generated by Alibaba Cloud for the request. Use it to locate and troubleshoot issues. |
6a6287a0-ff34-4780-a790-fdfca900557f |
| TotalCount |
integer |
The number of secrets. |
55 |
| SecretList |
object |
||
| Secret |
array<object> |
The list of secrets. |
|
|
array<object> |
|||
| SecretName |
string |
The name of the secret. |
secret001 |
| UpdateTime |
string |
The time when the secret was last updated. |
2024-07-17T07:59:05Z |
| SecretType |
string |
The type of the secret. Valid values:
|
Generic |
| PlannedDeleteTime |
string |
The scheduled deletion time. |
2024-08-17T07:59:05Z |
| CreateTime |
string |
The time when the secret was created. |
2024-07-17T07:59:05Z |
| Tags |
object |
||
| Tag |
array<object> |
The resource tags of the secret. This parameter is not returned if FetchTags is set to false or is not specified. |
|
|
object |
The resource tags of the secret. This parameter is not returned if FetchTags is set to false or is not specified. |
||
| TagValue |
string |
The tag value. |
val1 |
| TagKey |
string |
The tag key. |
key1 |
| OwingService |
string |
alb |
Contoh
Respons sukses
JSONformat
{
"PageNumber": 1,
"PageSize": 2,
"RequestId": "6a6287a0-ff34-4780-a790-fdfca900557f",
"TotalCount": 55,
"SecretList": {
"Secret": [
{
"SecretName": "secret001",
"UpdateTime": "2024-07-17T07:59:05Z",
"SecretType": "Generic",
"PlannedDeleteTime": "2024-08-17T07:59:05Z",
"CreateTime": "2024-07-17T07:59:05Z",
"Tags": {
"Tag": [
{
"TagValue": "val1",
"TagKey": "key1"
}
]
},
"OwingService": "alb"
}
]
}
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter | some of the specified parameters "\" is not valid | |
| 500 | InternalFailure | Internal Failure | |
| 403 | Forbidden.NoPermission | This operation is forbidden by permission system | |
| 404 | Forbidden.ResourceNotFound | Resource not found | |
| 404 | InvalidAccessKeyId.NotFound | The Access Key ID provided does not exist in our records. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.