이 기사가 도움이 되었습니까?
이 기사를 더욱 유용하게 만들 수 있는 방법은 무엇입니까?
Deleting a service account permanently prevents you from using the secret and access key to authenticate.
The Delete operation removes the existing service account from the database.
DELETE /service-accounts/{serviceAccountId}
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| serviceAccountId | path | string | true | Numeric ID of the service account to delete. |
package main
import (
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{
"text/plain",
},
"Authorization": []string{
"Bearer {access-token}",
},
}
req, err := http.NewRequest("DELETE", "https://api.lyvecloud.seagate.com/v2/service-accounts/{ServiceAccountId}", nil)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ... }
URL obj = new URL("https://api.lyvecloud.seagate.com/v2/service-accounts/{ServiceAccountId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) { response.append(inputLine); }
in.close();
System.out.println(response.toString());
const headers = {
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
};
fetch('https://api.lyvecloud.seagate.com/v2/service-accounts/{ServiceAccountId}', {
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) { console.log(body); });
import requests
headers = {
'Accept': 'text/plain',
'Authorization': 'Bearer {access-token}'
}
r = requests.delete('https://api.lyvecloud.seagate.com/v2/service-accounts/{ServiceAccountId}', headers = headers)
print(r.json())
require 'rest-client'
require 'json'
headers = {
'Accept' => 'text/plain', 'Authorization' => 'Bearer {access-token}'
}
result = RestClient.delete 'https://api.lyvecloud.seagate.com/v2/service-accounts/{ServiceAccountId}', params: {}, headers: headers
p JSON.parse(result)
| Status Code | Description | Return JSON Payload | ||||||
|---|---|---|---|---|---|---|---|---|
| 200 | The delete operation is successful. | Service account deleted successfully. | ||||||
| 400 | Bad request The token is invalid or expired. |
{
"code": "string",
"message": "string"
}
|
||||||
| 403 | Forbidden The account has no services enabled. |
{
"code": "string",
"message": "string"
}
|
||||||
| 404 | The service account to be deleted was not found. |
{
"code": "string",
"message": "string"
}
|
||||||
| 409 | The service account is not ready to be deleted and is still being processed by some regions. |
{
"code": "string",
"message": "string"
}
|
||||||
| 500 | The server encountered an internal error. |
{
"code": "string",
"message": "string"
}
|
||||||
| 503 | Service Unavailable |
{
"code": "string",
"message": "string"
}
|