# Method: projects.locations.namespaces.services.patch

- [HTTP request](https://docs.cloud.google.com/service-directory/docs/reference/rest/v1/projects.locations.namespaces.services/patch#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/service-directory/docs/reference/rest/v1/projects.locations.namespaces.services/patch#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/service-directory/docs/reference/rest/v1/projects.locations.namespaces.services/patch#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/service-directory/docs/reference/rest/v1/projects.locations.namespaces.services/patch#body.request_body)
- [Response body](https://docs.cloud.google.com/service-directory/docs/reference/rest/v1/projects.locations.namespaces.services/patch#body.response_body)
- [Authorization Scopes](https://docs.cloud.google.com/service-directory/docs/reference/rest/v1/projects.locations.namespaces.services/patch#body.aspect)
- [Try it!](https://docs.cloud.google.com/service-directory/docs/reference/rest/v1/projects.locations.namespaces.services/patch#try-it)

Updates a service.

### HTTP request

`PATCH https://servicedirectory.googleapis.com/v1/{service.name=projects/*/locations/*/namespaces/*/services/*}`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `service.name` | `string` Immutable. The resource name for the service in the format `projects/*/locations/*/namespaces/*/services/*`. |

### Query parameters

| Parameters ||
|---|---|
| `updateMask` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask` format)`` Required. List of fields to be updated in this request. This is a comma-separated list of fully qualified names of fields. Example: `"user.displayName,photo"`. |

### Request body

The request body contains an instance of `https://docs.cloud.google.com/service-directory/docs/reference/rest/v1/projects.locations.namespaces.services#Service`.

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/service-directory/docs/reference/rest/v1/projects.locations.namespaces.services#Service`.

### Authorization Scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/).