v5

latestOpenAPI 3.1.02026-07-31151195455.5 KB
resources

Gives a non-human identity access to this resource.

post/resources/{resource_id}/non-human-identities/{non_human_identity_id}

Path parameters

resource_idstring uuid required

The ID of the resource.

non_human_identity_idstring uuid required

The resource ID of the non-human identity to add.

Request body

duration_minutesinteger required

The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite.

access_level_remote_idstring

The remote ID of the access level to grant. If omitted, the default access level remote ID value (empty string) is used.

Example request

{
  "duration_minutes": 60,
  "access_level_remote_id": "roles/cloudsql.instanceUser"
}

Response

Details about the access that the non-human identity was granted to the resource.

resource_idstring uuid required

The ID of the resource.

non_human_identity_idstring uuid required

The resource ID of the non-human identity.

expiration_datestring date-time nullable

The day and time the non-human identity's access will expire.

Example response

{
  "non_human_identity_id": "29827fb8-f2dd-4e80-9576-28e31e9934ac",
  "resource_id": "1b978423-db0a-4037-a4cf-f79c60cb67b3",
  "expiration_date": "2022-01-23T04:56:07Z"
}