1
- // Copyright 2019 Google LLC.
1
+ // Copyright 2022 Google LLC
2
2
//
3
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
4
// you may not use this file except in compliance with the License.
11
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
- //
15
14
16
15
syntax = "proto3" ;
17
16
18
17
package google.iam.v1 ;
19
18
20
- import "google/iam/v1/options.proto" ;
21
- import "google/iam/v1/policy.proto" ;
22
19
import "google/api/annotations.proto" ;
23
20
import "google/api/client.proto" ;
24
21
import "google/api/field_behavior.proto" ;
25
22
import "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" ;
26
26
27
27
option cc_enable_arenas = true ;
28
28
option csharp_namespace = "Google.Cloud.Iam.V1" ;
@@ -32,7 +32,8 @@ option java_outer_classname = "IamPolicyProto";
32
32
option java_package = "com.google.iam.v1" ;
33
33
option php_namespace = "Google\\Cloud\\Iam\\V1" ;
34
34
35
- // ## API Overview
35
+ // API Overview
36
+ //
36
37
//
37
38
// Manages Identity and Access Management (IAM) policies.
38
39
//
@@ -62,6 +63,8 @@ service IAMPolicy {
62
63
63
64
// Sets the access control policy on the specified resource. Replaces any
64
65
// existing policy.
66
+ //
67
+ // Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
65
68
rpc SetIamPolicy (SetIamPolicyRequest ) returns (Policy ) {
66
69
option (google.api.http ) = {
67
70
post : "/v1/{resource=**}:setIamPolicy"
@@ -81,7 +84,7 @@ service IAMPolicy {
81
84
82
85
// Returns permissions that a caller has on the specified resource.
83
86
// 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.
85
88
//
86
89
// Note: This operation is designed to be used for building permission-aware
87
90
// UIs and command-line tools, not for authorization checking. This operation
@@ -107,6 +110,13 @@ message SetIamPolicyRequest {
107
110
// valid policy but certain Cloud Platform services (such as Projects)
108
111
// might reject them.
109
112
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 ;
110
120
}
111
121
112
122
// Request message for `GetIamPolicy` method.
@@ -118,7 +128,7 @@ message GetIamPolicyRequest {
118
128
(google.api.resource_reference ).type = "*" ];
119
129
120
130
// OPTIONAL: A `GetPolicyOptions` object for specifying options to
121
- // `GetIamPolicy`. This field is only used by Cloud IAM.
131
+ // `GetIamPolicy`.
122
132
GetPolicyOptions options = 2 ;
123
133
}
124
134
0 commit comments