Skip to content

Commit c7df6b6

Browse files
feat: new iam v3beta client for AccessPolicies (#33878)
* feat: new iam v3beta client for AccessPolicies docs: Updated comments across various messages, fields, enums, and methods in the IAM v3beta API, including PolicyBinding, PolicyKind, ListPolicyBindingsRequest, and SearchTargetPolicyBindingsRequest to improve clarity PiperOrigin-RevId: 901360203 Source-Link: googleapis/googleapis@ef57648 Source-Link: googleapis/googleapis-gen@472a016 Copy-Tag: eyJwIjoiZ29vZ2xlLWlhbS12M2JldGEvLk93bEJvdC55YW1sIiwiaCI6IjQ3MmEwMTZiODY5N2NkYzdiZmFjYjFiZDQ3MjczOTE2Njg1ZWNkNDAifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 03396d8 commit c7df6b6

57 files changed

Lines changed: 7593 additions & 171 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

google-iam-v3beta/.owlbot-manifest.json

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,22 @@
1212
"README.md",
1313
"Rakefile",
1414
"gapic_metadata.json",
15-
"google-iam-v3beta.gemspec",
16-
"lib/google-iam-v3beta.rb",
15+
"google-cloud-iam-v3beta.gemspec",
16+
"lib/google-cloud-iam-v3beta.rb",
17+
"lib/google/cloud/iam/v3beta/version.rb",
1718
"lib/google/iam/v3beta.rb",
19+
"lib/google/iam/v3beta/access_policies.rb",
20+
"lib/google/iam/v3beta/access_policies/client.rb",
21+
"lib/google/iam/v3beta/access_policies/credentials.rb",
22+
"lib/google/iam/v3beta/access_policies/operations.rb",
23+
"lib/google/iam/v3beta/access_policies/paths.rb",
24+
"lib/google/iam/v3beta/access_policies/rest.rb",
25+
"lib/google/iam/v3beta/access_policies/rest/client.rb",
26+
"lib/google/iam/v3beta/access_policies/rest/operations.rb",
27+
"lib/google/iam/v3beta/access_policies/rest/service_stub.rb",
28+
"lib/google/iam/v3beta/access_policies_service_pb.rb",
29+
"lib/google/iam/v3beta/access_policies_service_services_pb.rb",
30+
"lib/google/iam/v3beta/access_policy_resources_pb.rb",
1831
"lib/google/iam/v3beta/operation_metadata_pb.rb",
1932
"lib/google/iam/v3beta/policy_binding_resources_pb.rb",
2033
"lib/google/iam/v3beta/policy_bindings.rb",
@@ -41,13 +54,14 @@
4154
"lib/google/iam/v3beta/principal_access_boundary_policies_service_services_pb.rb",
4255
"lib/google/iam/v3beta/principal_access_boundary_policy_resources_pb.rb",
4356
"lib/google/iam/v3beta/rest.rb",
44-
"lib/google/iam/v3beta/version.rb",
4557
"proto_docs/README.md",
4658
"proto_docs/google/api/client.rb",
4759
"proto_docs/google/api/field_behavior.rb",
4860
"proto_docs/google/api/field_info.rb",
4961
"proto_docs/google/api/launch_stage.rb",
5062
"proto_docs/google/api/resource.rb",
63+
"proto_docs/google/iam/v3beta/access_policies_service.rb",
64+
"proto_docs/google/iam/v3beta/access_policy_resources.rb",
5165
"proto_docs/google/iam/v3beta/operation_metadata.rb",
5266
"proto_docs/google/iam/v3beta/policy_binding_resources.rb",
5367
"proto_docs/google/iam/v3beta/policy_bindings_service.rb",
@@ -62,6 +76,12 @@
6276
"proto_docs/google/rpc/status.rb",
6377
"proto_docs/google/type/expr.rb",
6478
"snippets/Gemfile",
79+
"snippets/access_policies/create_access_policy.rb",
80+
"snippets/access_policies/delete_access_policy.rb",
81+
"snippets/access_policies/get_access_policy.rb",
82+
"snippets/access_policies/list_access_policies.rb",
83+
"snippets/access_policies/search_access_policy_bindings.rb",
84+
"snippets/access_policies/update_access_policy.rb",
6585
"snippets/policy_bindings/create_policy_binding.rb",
6686
"snippets/policy_bindings/delete_policy_binding.rb",
6787
"snippets/policy_bindings/get_policy_binding.rb",
@@ -75,6 +95,10 @@
7595
"snippets/principal_access_boundary_policies/search_principal_access_boundary_policy_bindings.rb",
7696
"snippets/principal_access_boundary_policies/update_principal_access_boundary_policy.rb",
7797
"snippets/snippet_metadata_google.iam.v3beta.json",
98+
"test/google/iam/v3beta/access_policies_operations_test.rb",
99+
"test/google/iam/v3beta/access_policies_paths_test.rb",
100+
"test/google/iam/v3beta/access_policies_rest_test.rb",
101+
"test/google/iam/v3beta/access_policies_test.rb",
78102
"test/google/iam/v3beta/policy_bindings_operations_test.rb",
79103
"test/google/iam/v3beta/policy_bindings_paths_test.rb",
80104
"test/google/iam/v3beta/policy_bindings_rest_test.rb",
@@ -86,6 +110,7 @@
86110
"test/helper.rb"
87111
],
88112
"static": [
89-
".OwlBot.yaml"
113+
".OwlBot.yaml",
114+
"lib/google/iam/v3beta/version.rb"
90115
]
91116
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"api_id": "iam.googleapis.com",
33
"api_shortname": "iam",
4-
"client_documentation": "https://cloud.google.com/ruby/docs/reference/google-iam-v3beta/latest",
5-
"distribution_name": "google-iam-v3beta",
4+
"client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-iam-v3beta/latest",
5+
"distribution_name": "google-cloud-iam-v3beta",
66
"is_cloud": true,
77
"language": "ruby",
88
"name": "iam",
@@ -11,7 +11,7 @@
1111
"release_level": "preview",
1212
"repo": "googleapis/google-cloud-ruby",
1313
"requires_billing": true,
14-
"ruby-cloud-description": "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. Note that google-iam-v3beta is a version-specific client library. For most uses, we recommend installing the main client library google-iam instead. See the readme for more details.",
14+
"ruby-cloud-description": "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. Note that google-cloud-iam-v3beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-iam instead. See the readme for more details.",
1515
"ruby-cloud-product-url": "https://cloud.google.com/iam/docs/overview",
1616
"library_type": "GAPIC_AUTO"
1717
}

google-iam-v3beta/.rubocop.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ inherit_gem:
33

44
AllCops:
55
Exclude:
6-
- "google-iam-v3beta.gemspec"
6+
- "google-cloud-iam-v3beta.gemspec"
77
- "lib/**/*_pb.rb"
88
- "proto_docs/**/*"
99
- "test/**/*"
@@ -30,4 +30,4 @@ Naming/AccessorMethodName:
3030
- "snippets/**/*.rb"
3131
Naming/FileName:
3232
Exclude:
33-
- "lib/google-iam-v3beta.rb"
33+
- "lib/google-cloud-iam-v3beta.rb"

google-iam-v3beta/AUTHENTICATION.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Authentication
22

3-
The recommended way to authenticate to the google-iam-v3beta library is to use
3+
The recommended way to authenticate to the google-cloud-iam-v3beta library is to use
44
[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials).
55
To review all of your authentication options, see [Credentials lookup](#credential-lookup).
66

@@ -26,7 +26,7 @@ For more information about setting up authentication for a local development env
2626

2727
## Credential Lookup
2828

29-
The google-iam-v3beta library provides several mechanisms to configure your system.
29+
The google-cloud-iam-v3beta library provides several mechanisms to configure your system.
3030
Generally, using Application Default Credentials to facilitate automatic
3131
credentials discovery is the easist method. But if you need to explicitly specify
3232
credentials, there are several methods available to you.
@@ -56,7 +56,7 @@ To configure a credentials file for an individual client initialization:
5656
```ruby
5757
require "google/iam/v3beta"
5858

59-
client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config|
59+
client = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config|
6060
config.credentials = "path/to/credentialfile.json"
6161
end
6262
```
@@ -66,11 +66,11 @@ To configure a credentials file globally for all clients:
6666
```ruby
6767
require "google/iam/v3beta"
6868

69-
::Google::Iam::V3beta::PolicyBindings::Client.configure do |config|
69+
::Google::Iam::V3beta::AccessPolicies::Client.configure do |config|
7070
config.credentials = "path/to/credentialfile.json"
7171
end
7272

73-
client = ::Google::Iam::V3beta::PolicyBindings::Client.new
73+
client = ::Google::Iam::V3beta::AccessPolicies::Client.new
7474
```
7575

7676
### Environment Variables
@@ -89,7 +89,7 @@ Note: Service account keys are a security risk if not managed correctly. You sho
8989
[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree)
9090
whenever possible.
9191

92-
The environment variables that google-iam-v3beta
92+
The environment variables that google-cloud-iam-v3beta
9393
checks for credentials are:
9494

9595
* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
@@ -100,7 +100,7 @@ require "google/iam/v3beta"
100100

101101
ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json"
102102

103-
client = ::Google::Iam::V3beta::PolicyBindings::Client.new
103+
client = ::Google::Iam::V3beta::AccessPolicies::Client.new
104104
```
105105

106106
### Local ADC file

google-iam-v3beta/README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ https://github.com/googleapis/google-cloud-ruby
99
This gem is a _versioned_ client. It provides basic client classes for a
1010
specific version of the Identity and Access Management (IAM) V3BETA API. Most users should consider using
1111
the main client gem,
12-
[google-iam](https://rubygems.org/gems/google-iam).
12+
[google-cloud-iam](https://rubygems.org/gems/google-cloud-iam).
1313
See the section below titled *Which client should I use?* for more information.
1414

1515
## Installation
1616

1717
```
18-
$ gem install google-iam-v3beta
18+
$ gem install google-cloud-iam-v3beta
1919
```
2020

2121
## Before You Begin
@@ -32,12 +32,12 @@ In order to use this library, you first need to go through the following steps:
3232
```ruby
3333
require "google/iam/v3beta"
3434

35-
client = ::Google::Iam::V3beta::PolicyBindings::Client.new
36-
request = ::Google::Iam::V3beta::CreatePolicyBindingRequest.new # (request fields as keyword arguments...)
37-
response = client.create_policy_binding request
35+
client = ::Google::Iam::V3beta::AccessPolicies::Client.new
36+
request = ::Google::Iam::V3beta::CreateAccessPolicyRequest.new # (request fields as keyword arguments...)
37+
response = client.create_access_policy request
3838
```
3939

40-
View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-iam-v3beta/latest)
40+
View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-iam-v3beta/latest)
4141
for class and method documentation.
4242

4343
See also the [Product Documentation](https://cloud.google.com/iam/docs/overview)
@@ -75,7 +75,7 @@ constructing a client object. For example:
7575
require "google/iam/v3beta"
7676
require "logger"
7777

78-
client = ::Google::Iam::V3beta::PolicyBindings::Client.new do |config|
78+
client = ::Google::Iam::V3beta::AccessPolicies::Client.new do |config|
7979
config.logger = Logger.new "my-app.log"
8080
end
8181
```
@@ -98,9 +98,9 @@ support schedule.
9898
## Which client should I use?
9999

100100
Most modern Ruby client libraries for Google APIs come in two flavors: the main
101-
client library with a name such as `google-iam`,
101+
client library with a name such as `google-cloud-iam`,
102102
and lower-level _versioned_ client libraries with names such as
103-
`google-iam-v3beta`.
103+
`google-cloud-iam-v3beta`.
104104
_In most cases, you should install the main client._
105105

106106
### What's the difference between the main client and a versioned client?
@@ -125,7 +125,7 @@ service version.
125125

126126
We recommend that most users install the main client gem for a service. You can
127127
identify this gem as the one _without_ a version in its name, e.g.
128-
`google-iam`.
128+
`google-cloud-iam`.
129129
The main client is recommended because it will embody the best practices for
130130
accessing the service, and may also provide more convenient interfaces or
131131
tighter integration into frameworks and third-party libraries. In addition, the
@@ -138,7 +138,7 @@ You can use a versioned client if you are content with a possibly lower-level
138138
class interface, you explicitly want to avoid features provided by the main
139139
client, or you want to access a specific service version not be covered by the
140140
main client. You can identify versioned client gems because the service version
141-
is part of the name, e.g. `google-iam-v3beta`.
141+
is part of the name, e.g. `google-cloud-iam-v3beta`.
142142

143143
### What about the google-apis-<name> clients?
144144

google-iam-v3beta/Rakefile

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Rake::TestTask.new :smoke_test do |t|
3737
end
3838

3939
# Acceptance tests
40-
desc "Run the google-iam-v3beta acceptance tests."
40+
desc "Run the google-cloud-iam-v3beta acceptance tests."
4141
task :acceptance, :project, :keyfile do |t, args|
4242
project = args[:project]
4343
project ||=
@@ -57,8 +57,8 @@ task :acceptance, :project, :keyfile do |t, args|
5757
if project.nil? || keyfile.nil?
5858
fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance"
5959
end
60-
require "google/iam/v3beta/policy_bindings/credentials"
61-
::Google::Iam::V3beta::PolicyBindings::Credentials.env_vars.each do |path|
60+
require "google/iam/v3beta/access_policies/credentials"
61+
::Google::Iam::V3beta::AccessPolicies::Credentials.env_vars.each do |path|
6262
ENV[path] = nil
6363
end
6464
ENV["GOOGLE_CLOUD_PROJECT"] = project
@@ -73,7 +73,7 @@ namespace :acceptance do
7373
if File.directory? "acceptance"
7474
Rake::Task[:smoke_test].invoke
7575
else
76-
puts "The google-iam-v3beta gem has no acceptance tests."
76+
puts "The google-cloud-iam-v3beta gem has no acceptance tests."
7777
end
7878
end
7979

@@ -97,7 +97,7 @@ namespace :samples do
9797
end
9898
end
9999
else
100-
puts "The google-iam-v3beta gem has no samples to test."
100+
puts "The google-cloud-iam-v3beta gem has no samples to test."
101101
end
102102
end
103103

@@ -111,7 +111,7 @@ namespace :samples do
111111
end
112112
end
113113
else
114-
puts "The google-iam-v3beta gem has no samples to test."
114+
puts "The google-cloud-iam-v3beta gem has no samples to test."
115115
end
116116
end
117117
end
@@ -124,31 +124,31 @@ end
124124

125125
desc "Run yard-doctest example tests."
126126
task :doctest do
127-
puts "The google-iam-v3beta gem does not have doctest tests."
127+
puts "The google-cloud-iam-v3beta gem does not have doctest tests."
128128
end
129129

130130
desc "Run the CI build"
131131
task :ci do
132-
header "BUILDING google-iam-v3beta"
133-
header "google-iam-v3beta rubocop", "*"
132+
header "BUILDING google-cloud-iam-v3beta"
133+
header "google-cloud-iam-v3beta rubocop", "*"
134134
Rake::Task[:rubocop].invoke
135-
header "google-iam-v3beta yard", "*"
135+
header "google-cloud-iam-v3beta yard", "*"
136136
Rake::Task[:yard].invoke
137-
header "google-iam-v3beta test", "*"
137+
header "google-cloud-iam-v3beta test", "*"
138138
Rake::Task[:test].invoke
139139
end
140140

141141
namespace :ci do
142142
desc "Run the CI build, with smoke tests."
143143
task :smoke_test do
144144
Rake::Task[:ci].invoke
145-
header "google-iam-v3beta smoke_test", "*"
145+
header "google-cloud-iam-v3beta smoke_test", "*"
146146
Rake::Task[:smoke_test].invoke
147147
end
148148
desc "Run the CI build, with acceptance tests."
149149
task :acceptance do
150150
Rake::Task[:ci].invoke
151-
header "google-iam-v3beta acceptance", "*"
151+
header "google-cloud-iam-v3beta acceptance", "*"
152152
Rake::Task[:acceptance].invoke
153153
end
154154
task :a do

google-iam-v3beta/gapic_metadata.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,45 @@
55
"protoPackage": "google.iam.v3beta",
66
"libraryPackage": "::Google::Iam::V3beta",
77
"services": {
8+
"AccessPolicies": {
9+
"clients": {
10+
"grpc": {
11+
"libraryClient": "::Google::Iam::V3beta::AccessPolicies::Client",
12+
"rpcs": {
13+
"CreateAccessPolicy": {
14+
"methods": [
15+
"create_access_policy"
16+
]
17+
},
18+
"GetAccessPolicy": {
19+
"methods": [
20+
"get_access_policy"
21+
]
22+
},
23+
"UpdateAccessPolicy": {
24+
"methods": [
25+
"update_access_policy"
26+
]
27+
},
28+
"DeleteAccessPolicy": {
29+
"methods": [
30+
"delete_access_policy"
31+
]
32+
},
33+
"ListAccessPolicies": {
34+
"methods": [
35+
"list_access_policies"
36+
]
37+
},
38+
"SearchAccessPolicyBindings": {
39+
"methods": [
40+
"search_access_policy_bindings"
41+
]
42+
}
43+
}
44+
}
45+
}
46+
},
847
"PolicyBindings": {
948
"clients": {
1049
"grpc": {

google-iam-v3beta/google-iam-v3beta.gemspec renamed to google-iam-v3beta/google-cloud-iam-v3beta.gemspec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# -*- ruby -*-
22
# encoding: utf-8
33

4-
require File.expand_path("lib/google/iam/v3beta/version", __dir__)
4+
require File.expand_path("lib/google/cloud/iam/v3beta/version", __dir__)
55

66
Gem::Specification.new do |gem|
7-
gem.name = "google-iam-v3beta"
8-
gem.version = Google::Iam::V3beta::VERSION
7+
gem.name = "google-cloud-iam-v3beta"
8+
gem.version = Google::Cloud::Iam::V3beta::VERSION
99

1010
gem.authors = ["Google LLC"]
1111
gem.email = "googleapis-packages@google.com"
12-
gem.description = "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. Note that google-iam-v3beta is a version-specific client library. For most uses, we recommend installing the main client library google-iam instead. See the readme for more details."
12+
gem.description = "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API. Note that google-cloud-iam-v3beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-iam instead. See the readme for more details."
1313
gem.summary = "Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API."
1414
gem.homepage = "https://github.com/googleapis/google-cloud-ruby"
1515
gem.license = "Apache-2.0"

google-iam-v3beta/lib/google-iam-v3beta.rb renamed to google-iam-v3beta/lib/google-cloud-iam-v3beta.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# frozen_string_literal: true
22

3-
# Copyright 2025 Google LLC
3+
# Copyright 2026 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)