1- // Copyright 2019 Google LLC.
1+ // Copyright 2022 Google LLC
22//
33// Licensed under the Apache License, Version 2.0 (the "License");
44// you may not use this file except in compliance with the License.
1111// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212// See the License for the specific language governing permissions and
1313// limitations under the License.
14- //
1514
1615syntax = "proto3" ;
1716
1817package google.iam.v1 ;
1918
20- import "google/iam/v1/options.proto" ;
21- import "google/iam/v1/policy.proto" ;
2219import "google/api/annotations.proto" ;
2320import "google/api/client.proto" ;
2421import "google/api/field_behavior.proto" ;
2522import "google/api/resource.proto" ;
23+ import "google/iam/v1/options.proto" ;
24+ import "google/iam/v1/policy.proto" ;
25+ import "google/protobuf/field_mask.proto" ;
2626
2727option cc_enable_arenas = true ;
2828option csharp_namespace = "Google.Cloud.Iam.V1" ;
@@ -32,7 +32,8 @@ option java_outer_classname = "IamPolicyProto";
3232option java_package = "com.google.iam.v1" ;
3333option php_namespace = "Google\\Cloud\\Iam\\V1" ;
3434
35- // ## API Overview
35+ // API Overview
36+ //
3637//
3738// Manages Identity and Access Management (IAM) policies.
3839//
@@ -62,6 +63,8 @@ service IAMPolicy {
6263
6364 // Sets the access control policy on the specified resource. Replaces any
6465 // existing policy.
66+ //
67+ // Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
6568 rpc SetIamPolicy (SetIamPolicyRequest ) returns (Policy ) {
6669 option (google.api.http ) = {
6770 post : "/v1/{resource=**}:setIamPolicy"
@@ -81,7 +84,7 @@ service IAMPolicy {
8184
8285 // Returns permissions that a caller has on the specified resource.
8386 // If the resource does not exist, this will return an empty set of
84- // permissions, not a NOT_FOUND error.
87+ // permissions, not a ` NOT_FOUND` error.
8588 //
8689 // Note: This operation is designed to be used for building permission-aware
8790 // UIs and command-line tools, not for authorization checking. This operation
@@ -107,6 +110,13 @@ message SetIamPolicyRequest {
107110 // valid policy but certain Cloud Platform services (such as Projects)
108111 // might reject them.
109112 Policy policy = 2 [(google.api.field_behavior ) = REQUIRED ];
113+
114+ // OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
115+ // the fields in the mask will be modified. If no mask is provided, the
116+ // following default mask is used:
117+ //
118+ // `paths: "bindings, etag"`
119+ google.protobuf.FieldMask update_mask = 3 ;
110120}
111121
112122// Request message for `GetIamPolicy` method.
@@ -118,7 +128,7 @@ message GetIamPolicyRequest {
118128 (google.api.resource_reference ).type = "*" ];
119129
120130 // OPTIONAL: A `GetPolicyOptions` object for specifying options to
121- // `GetIamPolicy`. This field is only used by Cloud IAM.
131+ // `GetIamPolicy`.
122132 GetPolicyOptions options = 2 ;
123133}
124134
0 commit comments