Menghapus rahasia.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
sae:DeleteSecret |
*全部资源
|
None | None |
Sintaks permintaan
DELETE /pop/v1/sam/secret/secret HTTP/1.1
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| NamespaceId |
string |
Yes |
ID namespace. Jika rahasia berada di namespace default, Anda hanya perlu menentukan ID region, misalnya, |
cn-beijing:test |
| SecretId |
integer |
Yes |
ID rahasia yang akan dihapus. Anda dapat memperoleh ID dengan memanggil operasi ListSecrets. |
16 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Data yang dikembalikan. |
||
| RequestId |
string |
ID permintaan. |
91F93257-7A4A-4BD3-9A7E-2F6EAE6D**** |
| Message |
string |
Pesan respons.
|
success |
| TraceId |
string |
ID yang digunakan untuk melacak permintaan. |
0a98a02315955564772843261e**** |
| Data |
object |
Data yang dikembalikan. |
|
| SecretId |
integer |
ID rahasia yang telah dihapus. |
16 |
| ErrorCode |
string |
Kode kesalahan.
|
|
| Code |
string |
Kode status HTTP. Nilai yang valid:
|
200 |
| Success |
boolean |
Menunjukkan apakah rahasia berhasil dihapus. Nilai yang valid:
|
true |
Contoh
Respons sukses
JSONformat
{
"RequestId": "91F93257-7A4A-4BD3-9A7E-2F6EAE6D****",
"Message": "success",
"TraceId": "0a98a02315955564772843261e****",
"Data": {
"SecretId": 16
},
"ErrorCode": "Null\n",
"Code": "200",
"Success": true
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 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 | |
| 400 | InvalidSecretId.NotFound | The specified SecretId [%s] does not exist in our records. | |
| 400 | DependencyViolation.Job | The specified resource of secret is dependent on job [%s], so the operation cannot be completed. | |
| 400 | DependencyViolation.Application | The specified resource of secret is dependent on application [%s], so the operation cannot be completed. | |
| 500 | OperationFailed.RPCError | Internal RPC request processing error. | |
| 404 | InvalidNamespaceId.NotFound | The specified NamespaceId does not exist. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.