Skip to content

Commit fb22ccd

Browse files
Google APIscopybara-github
authored andcommitted
feat!: Update the public IAM Deny v2beta API
BREAKING CHANGE: remove google.api.resource_reference annotations PiperOrigin-RevId: 468493946
1 parent cda296b commit fb22ccd

4 files changed

Lines changed: 19 additions & 25 deletions

File tree

google/iam/v2beta/BUILD.bazel

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ proto_library(
2828
"//google/api:annotations_proto",
2929
"//google/api:client_proto",
3030
"//google/api:field_behavior_proto",
31-
"//google/api:resource_proto",
3231
"//google/longrunning:operations_proto",
3332
"//google/type:expr_proto",
3433
"@com_google_protobuf//:timestamp_proto",
@@ -75,6 +74,7 @@ java_gapic_library(
7574
test_deps = [
7675
":iam_java_grpc",
7776
],
77+
transport = "grpc+rest",
7878
deps = [
7979
":iam_java_proto",
8080
"//google/api:api_java_proto",
@@ -84,6 +84,7 @@ java_gapic_library(
8484
java_gapic_test(
8585
name = "iam_java_gapic_test_suite",
8686
test_classes = [
87+
"com.google.iam.v2beta.PoliciesClientHttpJsonTest",
8788
"com.google.iam.v2beta.PoliciesClientTest",
8889
],
8990
runtime_deps = [":iam_java_gapic_test"],
@@ -92,6 +93,8 @@ java_gapic_test(
9293
# Open Source Packages
9394
java_gapic_assembly_gradle_pkg(
9495
name = "google-cloud-iam-v2beta-java",
96+
include_samples = True,
97+
transport = "grpc+rest",
9598
deps = [
9699
":iam_java_gapic",
97100
":iam_java_grpc",
@@ -130,6 +133,7 @@ go_gapic_library(
130133
importpath = "cloud.google.com/go/iam/apiv2beta;iam",
131134
metadata = True,
132135
service_yaml = "iam_v2beta.yaml",
136+
transport = "grpc+rest",
133137
deps = [
134138
":iam_go_proto",
135139
"//google/longrunning:longrunning_go_proto",
@@ -171,11 +175,13 @@ py_gapic_library(
171175
srcs = [":iam_proto"],
172176
grpc_service_config = "iam_grpc_service_config.json",
173177
opt_args = [
174-
"warehouse-package-name=google-cloud-iam",
175-
"python-gapic-namespace=google.cloud",
176178
"python-gapic-name=iam",
179+
"python-gapic-namespace=google.cloud",
180+
"warehouse-package-name=google-cloud-iam",
177181
],
178182
service_yaml = "iam_v2beta.yaml",
183+
deps = [
184+
],
179185
)
180186

181187
py_test(
@@ -292,10 +298,9 @@ ruby_grpc_library(
292298
ruby_cloud_gapic_library(
293299
name = "iam_ruby_gapic",
294300
srcs = [":iam_proto_with_info"],
295-
extra_protoc_parameters = [
296-
"ruby-cloud-gem-name=google-cloud-iam-v2beta",
297-
],
301+
extra_protoc_parameters = ["ruby-cloud-gem-name=google-cloud-iam-v2beta"],
298302
grpc_service_config = "iam_grpc_service_config.json",
303+
service_yaml = "iam_v2beta.yaml",
299304
deps = [
300305
":iam_ruby_grpc",
301306
":iam_ruby_proto",

google/iam/v2beta/deny.proto

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,20 @@ package google.iam.v2beta;
1818

1919
import "google/type/expr.proto";
2020

21+
option csharp_namespace = "Google.Cloud.Iam.V2Beta";
2122
option go_package = "google.golang.org/genproto/googleapis/iam/v2beta;iam";
2223
option java_multiple_files = true;
2324
option java_outer_classname = "DenyRuleProto";
2425
option java_package = "com.google.iam.v2beta";
26+
option php_namespace = "Google\\Cloud\\Iam\\V2beta";
2527

2628
// A deny rule in an IAM deny policy.
2729
message DenyRule {
2830
// The identities that are prevented from using one or more permissions on
2931
// Google Cloud resources. This field can contain the following values:
3032
//
3133
// * `principalSet://goog/public:all`: A special identifier that represents
32-
// any user who is on the internet, even if they do not have a Google
34+
// any principal that is on the internet, even if they do not have a Google
3335
// Account or are not logged in.
3436
//
3537
// * `principal://goog/subject/{email_id}`: A specific Google Account.

google/iam/v2beta/iam_v2beta.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ title: Identity and Access Management (IAM) API
55

66
apis:
77
- name: google.iam.v2beta.Policies
8+
- name: google.longrunning.Operations
89

910
types:
1011
- name: google.iam.v2beta.PolicyOperationMetadata

google/iam/v2beta/policy.proto

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,16 @@ package google.iam.v2beta;
1919
import "google/api/annotations.proto";
2020
import "google/api/client.proto";
2121
import "google/api/field_behavior.proto";
22-
import "google/api/resource.proto";
2322
import "google/iam/v2beta/deny.proto";
2423
import "google/longrunning/operations.proto";
2524
import "google/protobuf/timestamp.proto";
2625

26+
option csharp_namespace = "Google.Cloud.Iam.V2Beta";
2727
option go_package = "google.golang.org/genproto/googleapis/iam/v2beta;iam";
2828
option java_multiple_files = true;
2929
option java_outer_classname = "PolicyProto";
3030
option java_package = "com.google.iam.v2beta";
31+
option php_namespace = "Google\\Cloud\\Iam\\V2beta";
3132

3233
// An interface for managing Identity and Access Management (IAM) policies.
3334
service Policies {
@@ -104,11 +105,6 @@ service Policies {
104105

105106
// Data for an IAM policy.
106107
message Policy {
107-
option (google.api.resource) = {
108-
type: "iam.googleapis.com/Policy"
109-
pattern: "policies/{policy}"
110-
};
111-
112108
// Immutable. The resource name of the `Policy`, which must be unique. Format:
113109
// `policies/{attachment_point}/denypolicies/{policy_id}`
114110
//
@@ -219,12 +215,7 @@ message GetPolicyRequest {
219215
//
220216
// For organizations and folders, use the numeric ID in the full resource
221217
// name. For projects, you can use the alphanumeric or the numeric ID.
222-
string name = 1 [
223-
(google.api.field_behavior) = REQUIRED,
224-
(google.api.resource_reference) = {
225-
type: "iam.googleapis.com/Policy"
226-
}
227-
];
218+
string name = 1 [(google.api.field_behavior) = REQUIRED];
228219
}
229220

230221
// Request message for `CreatePolicy`.
@@ -274,12 +265,7 @@ message DeletePolicyRequest {
274265
//
275266
// For organizations and folders, use the numeric ID in the full resource
276267
// name. For projects, you can use the alphanumeric or the numeric ID.
277-
string name = 1 [
278-
(google.api.field_behavior) = REQUIRED,
279-
(google.api.resource_reference) = {
280-
type: "iam.googleapis.com/Policy"
281-
}
282-
];
268+
string name = 1 [(google.api.field_behavior) = REQUIRED];
283269

284270
// Optional. The expected `etag` of the policy to delete. If the value does not match
285271
// the value that is stored in IAM, the request fails with a `409` error code

0 commit comments

Comments
 (0)