All resources in Rancher are owned or created by an account.
Field | Type | Create | Update | Default | Notes |
---|---|---|---|---|---|
description | string | Optional | Yes | - | |
externalId | string | Optional | Yes | - | |
externalIdType | string | Optional | Yes | - | |
name | string | Optional | Yes | - |
Field | Type | Notes |
---|---|---|
data | map[json] | |
id | int | The unique identifier for the account |
identity | identity | |
version | string |
Please read more about the common resource fields. These fields are read only and applicable to almost every resource. We have segregated them from the list above.
CreatePOST: /v2-beta/projects/${PROJECT_ID}/accounts
curl -u "${RANCHER_ACCESS_KEY}:${RANCHER_SECRET_KEY}" \
-X POST \
-H 'Content-Type: application/json' \
-d '{
"description": "string",
"externalId": "string",
"externalIdType": "string",
"kind": "user",
"name": "string",
"uuid": "string"
}' 'http://${RANCHER_URL}:8080/v2-beta/projects/${PROJECT_ID}/accounts'
DeleteDELETE: /v2-beta/projects/${PROJECT_ID}/accounts/${ID}
curl -u "${RANCHER_ACCESS_KEY}:${RANCHER_SECRET_KEY}" \
-X DELETE \
'http://${RANCHER_URL}:8080/v2-beta/projects/${PROJECT_ID}/accounts/${ID}'
UpdatePUT: /v2-beta/projects/${PROJECT_ID}/accounts/${ID}
curl -u "${RANCHER_ACCESS_KEY}:${RANCHER_SECRET_KEY}" \
-X PUT \
-H 'Content-Type: application/json' \
-d '{
"description": "string",
"externalId": "string",
"externalIdType": "string",
"kind": "user",
"name": "string"
}' 'http://${RANCHER_URL}:8080/v2-beta/projects/${PROJECT_ID}/accounts/${ID}'
activate
POST: /v2-beta/projects/${PROJECT_ID}/accounts/${ID}?action=activate
Input:This action has no inputs
curl -u "${RANCHER_ACCESS_KEY}:${RANCHER_SECRET_KEY}" \
-X POST \
'http://${RANCHER_URL}:8080/v2-beta/projects/${PROJECT_ID}/accounts/${ID}?action=activate'
Output: An updated copy of the account resource
deactivate
POST: /v2-beta/projects/${PROJECT_ID}/accounts/${ID}?action=deactivate
Input:This action has no inputs
curl -u "${RANCHER_ACCESS_KEY}:${RANCHER_SECRET_KEY}" \
-X POST \
'http://${RANCHER_URL}:8080/v2-beta/projects/${PROJECT_ID}/accounts/${ID}?action=deactivate'
Output: An updated copy of the account resource