---
title: "POST /v1/{+parent}/roles:add"
method: POST
path: "/v1/{+parent}/roles:add"
tags: ["services"]
---

# POST /v1/{+parent}/roles:add

`POST /v1/{+parent}/roles:add`

Service producers can use this method to add roles in the shared VPC host project. Each role is bound to the provided member. Each role must be selected from within an allowlisted set of roles. Each role is applied at only the granularity specified in the allowlist.

## Path parameters

- `parent` string, required

## Request body

- AddRolesRequest — Request for AddRoles to allow Service Producers to add roles in the shared VPC host project for them to use.
  - `policyBinding` PolicyBinding[] — Required. List of policy bindings to add to shared VPC host project.
    - `role` string — Required. Role to apply. Only allowlisted roles can be used at the specified granularity. The role must be one of the following: - 'roles/container.hostServiceAgentUser' applied on the shared VPC host project - 'roles/compute.securityAdmin' applied on the shared VPC host project - 'roles/compute.networkAdmin' applied on the shared VPC host project - 'roles/tpu.xpnAgent' applied on the shared VPC host project - 'roles/dns.admin' applied on the shared VPC host project - 'roles/logging.admin' applied on the shared VPC host project - 'roles/monitoring.viewer' applied on the shared VPC host project - 'roles/servicemanagement.quotaViewer' applied on the shared VPC host project
    - `member` string — Required. Member to bind the role with. See /iam/docs/reference/rest/v1/Policy#Binding for how to format each member. Eg. - user:myuser@mydomain.com - serviceAccount:my-service-account@app.gserviceaccount.com
  - `consumerNetwork` string — Required. The network that the consumer is using to connect with services. Must be in the form of projects/{project}/global/networks/{network} {project} is a project number, as in '12345' {network} is a network name.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/servicenetworking.md) · [All operations](https://skmtc.net/google/apis/servicenetworking/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/servicenetworking/revisions/a9b814c6426b/schema)
