Admiral

Serviceaccounts

Rename a service account

POST
/v1/serviceAccounts/{serviceAccount}/rename
  • ALREADY_EXISTS when another service account has the new name.
    • ABORTED when etag is set and the service account changed since it was read.

Scope: serviceaccount:write

Authorization

bearerAuth
AuthorizationBearer <token>

An API key, or an access token minted from one. Pass it in the Authorization header: Bearer admp_...

In: header

Path Parameters

serviceAccount*string

The serviceAccount id.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/v1/serviceAccounts/string/rename" \  -H "Content-Type: application/json" \  -d '{    "new_name": "string"  }'
{  "service_account": {    "id": "string",    "name": "string",    "display_name": "string",    "avatar_url": "string",    "resource_name": "string",    "subject": "string",    "issuer_id": "string",    "enrolled_at": "2023-01-15T01:30:15.01Z",    "status": "STATUS_UNSPECIFIED",    "status_reason": "string",    "etag": "string",    "created_by": {      "id": "string",      "display_name": "string",      "email": "string"    },    "created_at": "2023-01-15T01:30:15.01Z",    "updated_at": "2023-01-15T01:30:15.01Z"  }}