Method: projects.roles.delete

Soft deletes a role. The role is suspended and cannot be used to create new IAM Policy Bindings. The Role will not be included in roles.list() unless showDeleted is set in the ListRolesRequest. The Role contains the deleted boolean set. Existing Bindings remains, but are inactive. The Role can be undeleted within 7 days. After 7 days the Role is deleted and all Bindings associated with the role are removed.

HTTP request

DELETE https://iam.googleapis.com/v1/{name=projects/*/roles/*}

The URL uses Google API HTTP annotation syntax.

Path parameters

Parameters
name

string

The resource name of the role in one of the following formats: organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME} projects/{PROJECT_ID}/roles/{ROLE_NAME}

Authorization requires the following Google IAM permission on the specified resource name:

  • iam.roles.delete

Query parameters

Parameters
etag

string (bytes format)

Used to perform a consistent read-modify-write.

A base64-encoded string.

Request body

The request body must be empty.

Response body

If successful, the response body contains an instance of Role.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/iam
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

Try it!

このページは役立ちましたか?評価をお願いいたします。

フィードバックを送信...

Cloud Identity and Access Management