Create or Update a Virtual Account
Creates a new virtual account or updates an existing one based on the provided manifest.
curl --request PUT \
--url https://{controlPlaneURL}/api/svc/v1/virtual-accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"manifest": {
"name": "<string>",
"type": "virtual-account",
"expiration_date": "<string>",
"permissions": [
{
"resource_fqn": "<string>",
"resource_type": "<string>",
"role_id": "<string>"
}
]
},
"dryRun": true
}'
{
"data": {
"id": "<string>",
"name": "<string>",
"type": "<string>",
"tenantName": "<string>",
"manifest": {
"name": "<string>",
"type": "virtual-account",
"expiration_date": "<string>",
"permissions": [
{
"resource_fqn": "<string>",
"resource_type": "<string>",
"role_id": "<string>"
}
]
},
"createdBySubject": {
"subjectId": "<string>",
"subjectType": "user",
"subjectSlug": "<string>",
"subjectDisplayName": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>"
},
"token": "<string>"
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
Virtual account manifest
+label=Name +sort=1 +message=3 to 25 lower case characters long alphanumeric word, may contain - in between, cannot start with a number +usage=Virtual Account Name
+value=virtual-account
virtual-account
+label=Permissions +sort=3 +uiType=ServiceAccountPermissions
+label= Resource FQN +usage=The fully qualified name of the resource
+label=Resource Type +usage=The type of the resource (cluster, workspace, etc.)
+label=Role ID +usage=The role id of the role to be assigned to the service account for that resource
+label=Expiration Date (UTC) +sort=2 +message=Expiration date of the virtual account +usage=Expiration Date of the Virtual Account (should be in the format yyyy-mm-dd) +uiType=DatePicker
Dry run
Response
Virtual Account
+label=Name +sort=1 +message=3 to 25 lower case characters long alphanumeric word, may contain - in between, cannot start with a number +usage=Virtual Account Name
+value=virtual-account
virtual-account
+label=Permissions +sort=3 +uiType=ServiceAccountPermissions
+label= Resource FQN +usage=The fully qualified name of the resource
+label=Resource Type +usage=The type of the resource (cluster, workspace, etc.)
+label=Role ID +usage=The role id of the role to be assigned to the service account for that resource
+label=Expiration Date (UTC) +sort=2 +message=Expiration date of the virtual account +usage=Expiration Date of the Virtual Account (should be in the format yyyy-mm-dd) +uiType=DatePicker
Virtual Account token (present only when creating a virtual account)
curl --request PUT \
--url https://{controlPlaneURL}/api/svc/v1/virtual-accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"manifest": {
"name": "<string>",
"type": "virtual-account",
"expiration_date": "<string>",
"permissions": [
{
"resource_fqn": "<string>",
"resource_type": "<string>",
"role_id": "<string>"
}
]
},
"dryRun": true
}'
{
"data": {
"id": "<string>",
"name": "<string>",
"type": "<string>",
"tenantName": "<string>",
"manifest": {
"name": "<string>",
"type": "virtual-account",
"expiration_date": "<string>",
"permissions": [
{
"resource_fqn": "<string>",
"resource_type": "<string>",
"role_id": "<string>"
}
]
},
"createdBySubject": {
"subjectId": "<string>",
"subjectType": "user",
"subjectSlug": "<string>",
"subjectDisplayName": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>"
},
"token": "<string>"
}