Skip to content

Commit 5d5b1bc

Browse files
gcf-owl-bot[bot]alexander-fensterBenjamin E. Coe
authored
feat: remove unused ListApplicablePolicies (#3370)
feat: remove unused ListApplicablePolicies PiperOrigin-RevId: 475955031 Source-Link: googleapis/googleapis@65376f4 Source-Link: googleapis/googleapis-gen@c8504e9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWlhbS8uT3dsQm90LnlhbWwiLCJoIjoiYzg1MDRlOTc4OTFlZDllNjY0Y2Y2ODI3MGQ3ZTYxYmVjMTYwZmU1NyJ9 chore: override API mixins when needed PiperOrigin-RevId: 477248447 Source-Link: googleapis/googleapis@4689c73 Source-Link: googleapis/googleapis-gen@c405978 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWlhbS8uT3dsQm90LnlhbWwiLCJoIjoiYzQwNTk3ODZhNWNkODA1YTAxNTFkOTViNDc3ZmJjNDg2YmNiY2VkYyJ9 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Alexander Fenster <[email protected]> Co-authored-by: Benjamin E. Coe <[email protected]>
1 parent 626b1fb commit 5d5b1bc

12 files changed

Lines changed: 53 additions & 1689 deletions

packages/google-iam/protos/google/iam/v2/policy.proto

Lines changed: 22 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ option php_namespace = "Google\\Cloud\\Iam\\V2";
3333
// An interface for managing Identity and Access Management (IAM) policies.
3434
service Policies {
3535
option (google.api.default_host) = "iam.googleapis.com";
36-
option (google.api.oauth_scopes) =
37-
"https://www.googleapis.com/auth/cloud-platform";
36+
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
3837

3938
// Retrieves the policies of the specified kind that are attached to a
4039
// resource.
@@ -75,8 +74,7 @@ service Policies {
7574
//
7675
// To update a policy, you should use a read-modify-write loop:
7776
//
78-
// 1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current
79-
// version of the policy.
77+
// 1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the policy.
8078
// 2. Modify the policy as needed.
8179
// 3. Use `UpdatePolicy` to write the updated policy.
8280
//
@@ -103,24 +101,6 @@ service Policies {
103101
metadata_type: "PolicyOperationMetadata"
104102
};
105103
}
106-
107-
// Retrieves all the policies that are attached to the specified resource,
108-
// or anywhere in the ancestry of the resource. For example, for a project
109-
// this endpoint would return all the `denyPolicy` kind policies attached to
110-
// the project, its parent folder (if any), and its parent organization (if
111-
// any).
112-
// The endpoint requires the same permissions that it would take to call
113-
// `ListPolicies` or `GetPolicy`.
114-
//
115-
// The main reason to use this endpoint is as a policy admin to debug access
116-
// issues for a resource.
117-
rpc ListApplicablePolicies(ListApplicablePoliciesRequest)
118-
returns (ListApplicablePoliciesResponse) {
119-
option (google.api.http) = {
120-
get: "/v2/{attachment_point=*}:listApplicablePolicies"
121-
};
122-
option (google.api.method_signature) = "attachment_point";
123-
}
124104
}
125105

126106
// Data for an IAM policy.
@@ -139,12 +119,11 @@ message Policy {
139119
// Responses always contain the numeric ID.
140120
string name = 1 [(google.api.field_behavior) = IMMUTABLE];
141121

142-
// Immutable. The globally unique ID of the `Policy`. Assigned automatically
143-
// when the `Policy` is created.
122+
// Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
123+
// `Policy` is created.
144124
string uid = 2 [(google.api.field_behavior) = IMMUTABLE];
145125

146-
// Output only. The kind of the `Policy`. Always contains the value
147-
// `DenyPolicy`.
126+
// Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
148127
string kind = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
149128

150129
// A user-specified description of the `Policy`. This value can be up to 63
@@ -164,24 +143,20 @@ message Policy {
164143
string etag = 6;
165144

166145
// Output only. The time when the `Policy` was created.
167-
google.protobuf.Timestamp create_time = 7
168-
[(google.api.field_behavior) = OUTPUT_ONLY];
146+
google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
169147

170148
// Output only. The time when the `Policy` was last updated.
171-
google.protobuf.Timestamp update_time = 8
172-
[(google.api.field_behavior) = OUTPUT_ONLY];
149+
google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
173150

174-
// Output only. The time when the `Policy` was deleted. Empty if the policy is
175-
// not deleted.
176-
google.protobuf.Timestamp delete_time = 9
177-
[(google.api.field_behavior) = OUTPUT_ONLY];
151+
// Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
152+
google.protobuf.Timestamp delete_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
178153

179154
// A list of rules that specify the behavior of the `Policy`. All of the rules
180155
// should be of the `kind` specified in the `Policy`.
181156
repeated PolicyRule rules = 10;
182157

183-
// Immutable. Specifies that this policy is managed by an authority and can
184-
// only be modified by that authority. Usage is restricted.
158+
// Immutable. Specifies that this policy is managed by an authority and can only be
159+
// modified by that authority. Usage is restricted.
185160
string managing_authority = 11 [(google.api.field_behavior) = IMMUTABLE];
186161
}
187162

@@ -199,8 +174,9 @@ message PolicyRule {
199174

200175
// Request message for `ListPolicies`.
201176
message ListPoliciesRequest {
202-
// Required. The resource that the policy is attached to, along with the kind
203-
// of policy to list. Format: `policies/{attachment_point}/denypolicies`
177+
// Required. The resource that the policy is attached to, along with the kind of policy
178+
// to list. Format:
179+
// `policies/{attachment_point}/denypolicies`
204180
//
205181
//
206182
// The attachment point is identified by its URL-encoded full resource name,
@@ -216,9 +192,8 @@ message ListPoliciesRequest {
216192
// the value 1000.
217193
int32 page_size = 2;
218194

219-
// A page token received in a
220-
// [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this
221-
// token to retrieve the next page.
195+
// A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to
196+
// retrieve the next page.
222197
string page_token = 3;
223198
}
224199

@@ -227,8 +202,7 @@ message ListPoliciesResponse {
227202
// Metadata for the policies that are attached to the resource.
228203
repeated Policy policies = 1;
229204

230-
// A page token that you can use in a
231-
// [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
205+
// A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
232206
// next page. If this field is omitted, there are no additional pages.
233207
string next_page_token = 2;
234208
}
@@ -250,8 +224,8 @@ message GetPolicyRequest {
250224

251225
// Request message for `CreatePolicy`.
252226
message CreatePolicyRequest {
253-
// Required. The resource that the policy is attached to, along with the kind
254-
// of policy to create. Format: `policies/{attachment_point}/denypolicies`
227+
// Required. The resource that the policy is attached to, along with the kind of policy
228+
// to create. Format: `policies/{attachment_point}/denypolicies`
255229
//
256230
//
257231
// The attachment point is identified by its URL-encoded full resource name,
@@ -297,78 +271,15 @@ message DeletePolicyRequest {
297271
// name. For projects, you can use the alphanumeric or the numeric ID.
298272
string name = 1 [(google.api.field_behavior) = REQUIRED];
299273

300-
// Optional. The expected `etag` of the policy to delete. If the value does
301-
// not match the value that is stored in IAM, the request fails with a `409`
302-
// error code and `ABORTED` status.
274+
// Optional. The expected `etag` of the policy to delete. If the value does not match
275+
// the value that is stored in IAM, the request fails with a `409` error code
276+
// and `ABORTED` status.
303277
//
304278
// If you omit this field, the policy is deleted regardless of its current
305279
// `etag`.
306280
string etag = 2 [(google.api.field_behavior) = OPTIONAL];
307281
}
308282

309-
// `ListApplicablePoliciesRequest` represents the Request message for the
310-
// `ListApplicablePolicies` method. It provides the input for a filterable query
311-
// of Policies that apply to a certain GCP Resource, specified by the field
312-
// `attachment_point`, found on this message.
313-
// Example:
314-
// ```
315-
// {
316-
// attachment_point:
317-
// 'cloudresourcemanager.googleapis.com%2Forganizations%2F212345678901'
318-
// filter: 'kind:denyPolicies'
319-
// }
320-
// ```
321-
message ListApplicablePoliciesRequest {
322-
// Required. The Cloud resource at which the applicable policies are to be
323-
// retrieved. Format: `{attachment-point}` Use the URL-encoded full resource
324-
// name, which means that the forward-slash character, `/`, must be written as
325-
// `%2F`. For example,
326-
// `cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project`.
327-
string attachment_point = 1 [(google.api.field_behavior) = REQUIRED];
328-
329-
// Filtering currently only supports the kind of policies to return, and
330-
// must be in the format “kind:[policyKind1] OR kind:[policyKind2]”. New
331-
// policy kinds may be added in the future without notice.
332-
//
333-
// Example value: “kind:denyPolicies”
334-
string filter = 2;
335-
336-
// If present, then retrieve the batch of results following the results from
337-
// the preceding call to this method. `page_token` must be the value of
338-
// `next_page_token`
339-
// [ListApplicablePoliciesResponse.next_page_token][google.iam.v2.ListApplicablePoliciesResponse.next_page_token]
340-
// from the previous response. The values of other method parameters should
341-
// be identical to those in the previous call.
342-
string page_token = 3;
343-
344-
// Limit on the number of policies to include in the response.
345-
// Further policies can subsequently be obtained by including the
346-
// [ListApplicablePoliciesResponse.next_page_token][google.iam.admin.v1.ListApplicablePoliciesResponse.next_page_token]
347-
// in a subsequent request.
348-
// The minimum is 25, and the maximum is 100.
349-
int32 page_size = 4;
350-
}
351-
352-
// Response message for [ListApplicablePolicies][] method.
353-
message ListApplicablePoliciesResponse {
354-
// Ordered list starting from the resource on which this API was called
355-
// then proceeding up the hierarchy. Policies for the same attachment point
356-
// will be grouped, but no further ordering is guaranteed.
357-
repeated Policy policies = 1;
358-
359-
// A list of resources that the caller does not have permission to retrieve.
360-
// List or Get can be used to get detailed error messages.
361-
// Get: `policies/{attachment-point}/denypolicies/{policy-id}`
362-
// List: `policies/{attachment-point}/denypolicies`
363-
repeated string inaccessible = 2;
364-
365-
// A page token that can be used in a
366-
// [ListApplicablePoliciesRequest][google.iam.v2.ListApplicablePoliciesRequest]
367-
// to retrieve the next page. If this field is blank, there are no additional
368-
// pages.
369-
string next_page_token = 3;
370-
}
371-
372283
// Metadata for long-running `Policy` operations.
373284
message PolicyOperationMetadata {
374285
// Timestamp when the `google.longrunning.Operation` was created.

0 commit comments

Comments
 (0)