Method: projects.roles.create

Creates a new Role.

HTTP request

POST https://iam.googleapis.com/v1/{parent=projects/*}/roles

The URL uses Google API HTTP annotation syntax.

Path parameters

Parameters
parent

string

The resource name of the parent resource in one of the following formats:

  • organizations/{ORGANIZATION_ID}
  • projects/{PROJECT_ID}

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

  • iam.roles.create

Request body

The request body contains data with the following structure:

JSON representation
{
  "roleId": string,
  "role": {
    object(Role)
  },
}
Fields
roleId

string

The role id to use for this role.

role

object(Role)

The Role resource to create.

Response body

If successful, the response body contains a newly created instance of Role.

Authorization

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 Auth Guide.

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

Cloud Identity and Access Management