google-cloud-apigee_registry-v1 0.15.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -4
  3. data/LICENSE.md +2 -2
  4. data/README.md +3 -153
  5. data/lib/google/cloud/apigee_registry/v1/version.rb +1 -1
  6. metadata +15 -113
  7. data/AUTHENTICATION.md +0 -122
  8. data/lib/google/cloud/apigee_registry/v1/bindings_override.rb +0 -324
  9. data/lib/google/cloud/apigee_registry/v1/provisioning/client.rb +0 -730
  10. data/lib/google/cloud/apigee_registry/v1/provisioning/credentials.rb +0 -47
  11. data/lib/google/cloud/apigee_registry/v1/provisioning/operations.rb +0 -841
  12. data/lib/google/cloud/apigee_registry/v1/provisioning/paths.rb +0 -69
  13. data/lib/google/cloud/apigee_registry/v1/provisioning/rest/client.rb +0 -675
  14. data/lib/google/cloud/apigee_registry/v1/provisioning/rest/operations.rb +0 -925
  15. data/lib/google/cloud/apigee_registry/v1/provisioning/rest/service_stub.rb +0 -265
  16. data/lib/google/cloud/apigee_registry/v1/provisioning/rest.rb +0 -55
  17. data/lib/google/cloud/apigee_registry/v1/provisioning.rb +0 -57
  18. data/lib/google/cloud/apigee_registry/v1/registry/client.rb +0 -4095
  19. data/lib/google/cloud/apigee_registry/v1/registry/credentials.rb +0 -47
  20. data/lib/google/cloud/apigee_registry/v1/registry/paths.rb +0 -238
  21. data/lib/google/cloud/apigee_registry/v1/registry/rest/client.rb +0 -3816
  22. data/lib/google/cloud/apigee_registry/v1/registry/rest/service_stub.rb +0 -2406
  23. data/lib/google/cloud/apigee_registry/v1/registry/rest.rb +0 -53
  24. data/lib/google/cloud/apigee_registry/v1/registry.rb +0 -55
  25. data/lib/google/cloud/apigee_registry/v1/rest.rb +0 -39
  26. data/lib/google/cloud/apigee_registry/v1.rb +0 -46
  27. data/lib/google/cloud/apigeeregistry/v1/provisioning_service_pb.rb +0 -34
  28. data/lib/google/cloud/apigeeregistry/v1/provisioning_service_services_pb.rb +0 -50
  29. data/lib/google/cloud/apigeeregistry/v1/registry_models_pb.rb +0 -29
  30. data/lib/google/cloud/apigeeregistry/v1/registry_service_pb.rb +0 -71
  31. data/lib/google/cloud/apigeeregistry/v1/registry_service_services_pb.rb +0 -128
  32. data/lib/google-cloud-apigee_registry-v1.rb +0 -21
  33. data/proto_docs/README.md +0 -4
  34. data/proto_docs/google/api/client.rb +0 -589
  35. data/proto_docs/google/api/field_behavior.rb +0 -85
  36. data/proto_docs/google/api/httpbody.rb +0 -80
  37. data/proto_docs/google/api/launch_stage.rb +0 -71
  38. data/proto_docs/google/api/resource.rb +0 -227
  39. data/proto_docs/google/cloud/apigeeregistry/v1/provisioning_service.rb +0 -157
  40. data/proto_docs/google/cloud/apigeeregistry/v1/registry_models.rb +0 -407
  41. data/proto_docs/google/cloud/apigeeregistry/v1/registry_service.rb +0 -712
  42. data/proto_docs/google/longrunning/operations.rb +0 -191
  43. data/proto_docs/google/protobuf/any.rb +0 -145
  44. data/proto_docs/google/protobuf/duration.rb +0 -98
  45. data/proto_docs/google/protobuf/empty.rb +0 -34
  46. data/proto_docs/google/protobuf/field_mask.rb +0 -229
  47. data/proto_docs/google/protobuf/timestamp.rb +0 -127
  48. data/proto_docs/google/rpc/status.rb +0 -48
  49. data/proto_docs/google/type/expr.rb +0 -75
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 99467223cde1af032df39139d7ea20639fb754e40afa283ede51696da0ed5364
4
- data.tar.gz: a95ef6ddeeed1827aaae61179b2d3d1a7dcd3b798da07a446021b3c0e2a69952
3
+ metadata.gz: cc7c992784566492f54a52820af7710d46e20cd27bde4041e556b74035cd3e4a
4
+ data.tar.gz: 9c3b34662cfaf2c9318ac5aa3c5f848562a4949746a2bca80ca8bcc42a5fedc3
5
5
  SHA512:
6
- metadata.gz: 3d6b4cda6dd393cfdd701c55340a54e2ba93d63cb8730f5e1cd9a4c0eaf21f4e859e08ae749878129118db45f8945d7d10792250125b23f1d2bc4bb0a2f1a450
7
- data.tar.gz: c341c031f96d8f84de1db8fc2b017b338eefd132b203f3ca8c817bfc722e06a7d297da89bc1013150b33221c03e765028a31ff681a2b88eeb24f3e0e23a7d8f6
6
+ metadata.gz: e285148421d07634c326a42a787b5877c384bc1837ef97e4d0ac10c903e186e7302ef5fa317c4e4bb2ff356c479d3a24bb1649c69272acfef6951ec8352cd397
7
+ data.tar.gz: b2a134cd105abc8762a6c09a132db8abb8fe7cf38c4527e745d17462f190615f16754cea8098edf4b0509e39e3502865060bc8a0fb215582ff910e68f2d5e269
data/.yardopts CHANGED
@@ -1,12 +1,9 @@
1
1
  --no-private
2
- --title="Apigee Registry V1 API"
3
- --exclude _pb\.rb$
2
+ --title="Obsolete Gem google-cloud-apigee_registry-v1"
4
3
  --markup markdown
5
4
  --markup-provider redcarpet
6
5
 
7
6
  ./lib/**/*.rb
8
- ./proto_docs/**/*.rb
9
7
  -
10
8
  README.md
11
9
  LICENSE.md
12
- AUTHENTICATION.md
data/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  Apache License
2
2
  Version 2.0, January 2004
3
- http://www.apache.org/licenses/
3
+ https://www.apache.org/licenses/
4
4
 
5
5
  TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
6
 
@@ -192,7 +192,7 @@
192
192
  you may not use this file except in compliance with the License.
193
193
  You may obtain a copy of the License at
194
194
 
195
- http://www.apache.org/licenses/LICENSE-2.0
195
+ https://www.apache.org/licenses/LICENSE-2.0
196
196
 
197
197
  Unless required by applicable law or agreed to in writing, software
198
198
  distributed under the License is distributed on an "AS IS" BASIS,
data/README.md CHANGED
@@ -1,154 +1,4 @@
1
- # Ruby Client for the Apigee Registry V1 API
1
+ # Tombstone for Ruby gem google-cloud-apigee_registry-v1
2
2
 
3
- API Client library for the Apigee Registry V1 API
4
-
5
- The Apigee Registry API allows teams to upload and share machine-readable descriptions of APIs that are in use and in development. These descriptions include API specifications in standard formats like OpenAPI, the Google API Discovery Service Format, and the Protocol Buffers Language. These API specifications can be used by tools like linters, browsers, documentation generators, test runners, proxies, and API client and server generators. The Registry API itself can be seen as a machine-readable enterprise API catalog designed to back online directories, portals, and workflow managers.
6
-
7
- https://github.com/googleapis/google-cloud-ruby
8
-
9
- This gem is a _versioned_ client. It provides basic client classes for a
10
- specific version of the Apigee Registry V1 API. Most users should consider using
11
- the main client gem,
12
- [google-cloud-apigee_registry](https://rubygems.org/gems/google-cloud-apigee_registry).
13
- See the section below titled *Which client should I use?* for more information.
14
-
15
- ## Installation
16
-
17
- ```
18
- $ gem install google-cloud-apigee_registry-v1
19
- ```
20
-
21
- ## Before You Begin
22
-
23
- In order to use this library, you first need to go through the following steps:
24
-
25
- 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
26
- 1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
27
- 1. [Enable the API.](https://console.cloud.google.com/apis/library/apigeeregistry.googleapis.com)
28
- 1. {file:AUTHENTICATION.md Set up authentication.}
29
-
30
- ## Quick Start
31
-
32
- ```ruby
33
- require "google/cloud/apigee_registry/v1"
34
-
35
- client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new
36
- request = ::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest.new # (request fields as keyword arguments...)
37
- response = client.create_instance request
38
- ```
39
-
40
- View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-apigee_registry-v1/latest)
41
- for class and method documentation.
42
-
43
- See also the [Product Documentation](https://cloud.google.com/apigee/docs/api-hub/get-started-registry-api/)
44
- for general usage information.
45
-
46
- ## Debug Logging
47
-
48
- This library comes with opt-in Debug Logging that can help you troubleshoot
49
- your application's integration with the API. When logging is activated, key
50
- events such as requests and responses, along with data payloads and metadata
51
- such as headers and client configuration, are logged to the standard error
52
- stream.
53
-
54
- **WARNING:** Client Library Debug Logging includes your data payloads in
55
- plaintext, which could include sensitive data such as PII for yourself or your
56
- customers, private keys, or other security data that could be compromising if
57
- leaked. Always practice good data hygiene with your application logs, and follow
58
- the principle of least access. Google also recommends that Client Library Debug
59
- Logging be enabled only temporarily during active debugging, and not used
60
- permanently in production.
61
-
62
- To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
63
- to the value `all`. Alternatively, you can set the value to a comma-delimited
64
- list of client library gem names. This will select the default logging behavior,
65
- which writes logs to the standard error stream. On a local workstation, this may
66
- result in logs appearing on the console. When running on a Google Cloud hosting
67
- service such as [Google Cloud Run](https://cloud.google.com/run), this generally
68
- results in logs appearing alongside your application logs in the
69
- [Google Cloud Logging](https://cloud.google.com/logging/) service.
70
-
71
- You can customize logging by modifying the `logger` configuration when
72
- constructing a client object. For example:
73
-
74
- ```ruby
75
- require "google/cloud/apigee_registry/v1"
76
- require "logger"
77
-
78
- client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new do |config|
79
- config.logger = Logger.new "my-app.log"
80
- end
81
- ```
82
-
83
- ## Google Cloud Samples
84
-
85
- To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
86
-
87
- ## Supported Ruby Versions
88
-
89
- This library is supported on Ruby 3.0+.
90
-
91
- Google provides official support for Ruby versions that are actively supported
92
- by Ruby Core—that is, Ruby versions that are either in normal maintenance or
93
- in security maintenance, and not end of life. Older versions of Ruby _may_
94
- still work, but are unsupported and not recommended. See
95
- https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
96
- support schedule.
97
-
98
- ## Which client should I use?
99
-
100
- Most modern Ruby client libraries for Google APIs come in two flavors: the main
101
- client library with a name such as `google-cloud-apigee_registry`,
102
- and lower-level _versioned_ client libraries with names such as
103
- `google-cloud-apigee_registry-v1`.
104
- _In most cases, you should install the main client._
105
-
106
- ### What's the difference between the main client and a versioned client?
107
-
108
- A _versioned client_ provides a basic set of data types and client classes for
109
- a _single version_ of a specific service. (That is, for a service with multiple
110
- versions, there might be a separate versioned client for each service version.)
111
- Most versioned clients are written and maintained by a code generator.
112
-
113
- The _main client_ is designed to provide you with the _recommended_ client
114
- interfaces for the service. There will be only one main client for any given
115
- service, even a service with multiple versions. The main client includes
116
- factory methods for constructing the client objects we recommend for most
117
- users. In some cases, those will be classes provided by an underlying versioned
118
- client; in other cases, they will be handwritten higher-level client objects
119
- with additional capabilities, convenience methods, or best practices built in.
120
- Generally, the main client will default to a recommended service version,
121
- although in some cases you can override this if you need to talk to a specific
122
- service version.
123
-
124
- ### Why would I want to use the main client?
125
-
126
- We recommend that most users install the main client gem for a service. You can
127
- identify this gem as the one _without_ a version in its name, e.g.
128
- `google-cloud-apigee_registry`.
129
- The main client is recommended because it will embody the best practices for
130
- accessing the service, and may also provide more convenient interfaces or
131
- tighter integration into frameworks and third-party libraries. In addition, the
132
- documentation and samples published by Google will generally demonstrate use of
133
- the main client.
134
-
135
- ### Why would I want to use a versioned client?
136
-
137
- You can use a versioned client if you are content with a possibly lower-level
138
- class interface, you explicitly want to avoid features provided by the main
139
- client, or you want to access a specific service version not be covered by the
140
- main client. You can identify versioned client gems because the service version
141
- is part of the name, e.g. `google-cloud-apigee_registry-v1`.
142
-
143
- ### What about the google-apis-<name> clients?
144
-
145
- Client library gems with names that begin with `google-apis-` are based on an
146
- older code generation technology. They talk to a REST/JSON backend (whereas
147
- most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may
148
- not offer the same performance, features, and ease of use provided by more
149
- modern clients.
150
-
151
- The `google-apis-` clients have wide coverage across Google services, so you
152
- might need to use one if there is no modern client available for the service.
153
- However, if a modern client is available, we generally recommend it over the
154
- older `google-apis-` clients.
3
+ This gem is obsolete because the related Google backend is turned down.
4
+ For more information, see https://cloud.google.com/terms/deprecation.
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module ApigeeRegistry
23
23
  module V1
24
- VERSION = "0.15.0"
24
+ VERSION = "0.17.0"
25
25
  end
26
26
  end
27
27
  end
metadata CHANGED
@@ -1,136 +1,37 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-apigee_registry-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  bindir: bin
9
9
  cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z
11
- dependencies:
12
- - !ruby/object:Gem::Dependency
13
- name: gapic-common
14
- requirement: !ruby/object:Gem::Requirement
15
- requirements:
16
- - - "~>"
17
- - !ruby/object:Gem::Version
18
- version: '1.2'
19
- type: :runtime
20
- prerelease: false
21
- version_requirements: !ruby/object:Gem::Requirement
22
- requirements:
23
- - - "~>"
24
- - !ruby/object:Gem::Version
25
- version: '1.2'
26
- - !ruby/object:Gem::Dependency
27
- name: google-cloud-errors
28
- requirement: !ruby/object:Gem::Requirement
29
- requirements:
30
- - - "~>"
31
- - !ruby/object:Gem::Version
32
- version: '1.0'
33
- type: :runtime
34
- prerelease: false
35
- version_requirements: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - "~>"
38
- - !ruby/object:Gem::Version
39
- version: '1.0'
40
- - !ruby/object:Gem::Dependency
41
- name: google-cloud-location
42
- requirement: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - "~>"
45
- - !ruby/object:Gem::Version
46
- version: '1.0'
47
- type: :runtime
48
- prerelease: false
49
- version_requirements: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - "~>"
52
- - !ruby/object:Gem::Version
53
- version: '1.0'
54
- - !ruby/object:Gem::Dependency
55
- name: google-iam-v1
56
- requirement: !ruby/object:Gem::Requirement
57
- requirements:
58
- - - "~>"
59
- - !ruby/object:Gem::Version
60
- version: '1.3'
61
- type: :runtime
62
- prerelease: false
63
- version_requirements: !ruby/object:Gem::Requirement
64
- requirements:
65
- - - "~>"
66
- - !ruby/object:Gem::Version
67
- version: '1.3'
68
- description: The Apigee Registry API allows teams to upload and share machine-readable
69
- descriptions of APIs that are in use and in development. These descriptions include
70
- API specifications in standard formats like OpenAPI, the Google API Discovery Service
71
- Format, and the Protocol Buffers Language. These API specifications can be used
72
- by tools like linters, browsers, documentation generators, test runners, proxies,
73
- and API client and server generators. The Registry API itself can be seen as a machine-readable
74
- enterprise API catalog designed to back online directories, portals, and workflow
75
- managers. Note that google-cloud-apigee_registry-v1 is a version-specific client
76
- library. For most uses, we recommend installing the main client library google-cloud-apigee_registry
77
- instead. See the readme for more details.
11
+ dependencies: []
12
+ description: This gem is obsolete because the related Google backend is turned down.
13
+ For more information, see https://cloud.google.com/terms/deprecation.
78
14
  email: googleapis-packages@google.com
79
15
  executables: []
80
16
  extensions: []
81
17
  extra_rdoc_files: []
82
18
  files:
83
19
  - ".yardopts"
84
- - AUTHENTICATION.md
85
20
  - LICENSE.md
86
21
  - README.md
87
- - lib/google-cloud-apigee_registry-v1.rb
88
- - lib/google/cloud/apigee_registry/v1.rb
89
- - lib/google/cloud/apigee_registry/v1/bindings_override.rb
90
- - lib/google/cloud/apigee_registry/v1/provisioning.rb
91
- - lib/google/cloud/apigee_registry/v1/provisioning/client.rb
92
- - lib/google/cloud/apigee_registry/v1/provisioning/credentials.rb
93
- - lib/google/cloud/apigee_registry/v1/provisioning/operations.rb
94
- - lib/google/cloud/apigee_registry/v1/provisioning/paths.rb
95
- - lib/google/cloud/apigee_registry/v1/provisioning/rest.rb
96
- - lib/google/cloud/apigee_registry/v1/provisioning/rest/client.rb
97
- - lib/google/cloud/apigee_registry/v1/provisioning/rest/operations.rb
98
- - lib/google/cloud/apigee_registry/v1/provisioning/rest/service_stub.rb
99
- - lib/google/cloud/apigee_registry/v1/registry.rb
100
- - lib/google/cloud/apigee_registry/v1/registry/client.rb
101
- - lib/google/cloud/apigee_registry/v1/registry/credentials.rb
102
- - lib/google/cloud/apigee_registry/v1/registry/paths.rb
103
- - lib/google/cloud/apigee_registry/v1/registry/rest.rb
104
- - lib/google/cloud/apigee_registry/v1/registry/rest/client.rb
105
- - lib/google/cloud/apigee_registry/v1/registry/rest/service_stub.rb
106
- - lib/google/cloud/apigee_registry/v1/rest.rb
107
22
  - lib/google/cloud/apigee_registry/v1/version.rb
108
- - lib/google/cloud/apigeeregistry/v1/provisioning_service_pb.rb
109
- - lib/google/cloud/apigeeregistry/v1/provisioning_service_services_pb.rb
110
- - lib/google/cloud/apigeeregistry/v1/registry_models_pb.rb
111
- - lib/google/cloud/apigeeregistry/v1/registry_service_pb.rb
112
- - lib/google/cloud/apigeeregistry/v1/registry_service_services_pb.rb
113
- - proto_docs/README.md
114
- - proto_docs/google/api/client.rb
115
- - proto_docs/google/api/field_behavior.rb
116
- - proto_docs/google/api/httpbody.rb
117
- - proto_docs/google/api/launch_stage.rb
118
- - proto_docs/google/api/resource.rb
119
- - proto_docs/google/cloud/apigeeregistry/v1/provisioning_service.rb
120
- - proto_docs/google/cloud/apigeeregistry/v1/registry_models.rb
121
- - proto_docs/google/cloud/apigeeregistry/v1/registry_service.rb
122
- - proto_docs/google/longrunning/operations.rb
123
- - proto_docs/google/protobuf/any.rb
124
- - proto_docs/google/protobuf/duration.rb
125
- - proto_docs/google/protobuf/empty.rb
126
- - proto_docs/google/protobuf/field_mask.rb
127
- - proto_docs/google/protobuf/timestamp.rb
128
- - proto_docs/google/rpc/status.rb
129
- - proto_docs/google/type/expr.rb
130
23
  homepage: https://github.com/googleapis/google-cloud-ruby
131
24
  licenses:
132
25
  - Apache-2.0
133
26
  metadata: {}
27
+ post_install_message: |2+
28
+
29
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
30
+ The google-cloud-apigee_registry-v1 gem is OBSOLETE.
31
+ For more information, see:
32
+ https://cloud.google.com/terms/deprecation
33
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
34
+
134
35
  rdoc_options: []
135
36
  require_paths:
136
37
  - lib
@@ -138,7 +39,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
138
39
  requirements:
139
40
  - - ">="
140
41
  - !ruby/object:Gem::Version
141
- version: '3.2'
42
+ version: '3.0'
142
43
  required_rubygems_version: !ruby/object:Gem::Requirement
143
44
  requirements:
144
45
  - - ">="
@@ -147,5 +48,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
48
  requirements: []
148
49
  rubygems_version: 3.6.9
149
50
  specification_version: 4
150
- summary: API Client library for the Apigee Registry V1 API
51
+ summary: This gem is obsolete because the related backend is turned down.
151
52
  test_files: []
53
+ ...
data/AUTHENTICATION.md DELETED
@@ -1,122 +0,0 @@
1
- # Authentication
2
-
3
- The recommended way to authenticate to the google-cloud-apigee_registry-v1 library is to use
4
- [Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials).
5
- To review all of your authentication options, see [Credentials lookup](#credential-lookup).
6
-
7
- ## Quickstart
8
-
9
- The following example shows how to set up authentication for a local development
10
- environment with your user credentials.
11
-
12
- **NOTE:** This method is _not_ recommended for running in production. User credentials
13
- should be used only during development.
14
-
15
- 1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk).
16
- 2. Set up a local ADC file with your user credentials:
17
-
18
- ```sh
19
- gcloud auth application-default login
20
- ```
21
-
22
- 3. Write code as if already authenticated.
23
-
24
- For more information about setting up authentication for a local development environment, see
25
- [Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev).
26
-
27
- ## Credential Lookup
28
-
29
- The google-cloud-apigee_registry-v1 library provides several mechanisms to configure your system.
30
- Generally, using Application Default Credentials to facilitate automatic
31
- credentials discovery is the easist method. But if you need to explicitly specify
32
- credentials, there are several methods available to you.
33
-
34
- Credentials are accepted in the following ways, in the following order or precedence:
35
-
36
- 1. Credentials specified in method arguments
37
- 2. Credentials specified in configuration
38
- 3. Credentials pointed to or included in environment variables
39
- 4. Credentials found in local ADC file
40
- 5. Credentials returned by the metadata server for the attached service account (GCP)
41
-
42
- ### Configuration
43
-
44
- You can configure a path to a JSON credentials file, either for an individual client object or
45
- globally, for all client objects. The JSON file can contain credentials created for
46
- [workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation),
47
- [workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a
48
- [service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key).
49
-
50
- Note: Service account keys are a security risk if not managed correctly. You should
51
- [choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree)
52
- whenever possible.
53
-
54
- To configure a credentials file for an individual client initialization:
55
-
56
- ```ruby
57
- require "google/cloud/apigee_registry/v1"
58
-
59
- client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new do |config|
60
- config.credentials = "path/to/credentialfile.json"
61
- end
62
- ```
63
-
64
- To configure a credentials file globally for all clients:
65
-
66
- ```ruby
67
- require "google/cloud/apigee_registry/v1"
68
-
69
- ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.configure do |config|
70
- config.credentials = "path/to/credentialfile.json"
71
- end
72
-
73
- client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new
74
- ```
75
-
76
- ### Environment Variables
77
-
78
- You can also use an environment variable to provide a JSON credentials file.
79
- The environment variable can contain a path to the credentials file or, for
80
- environments such as Docker containers where writing files is not encouraged,
81
- you can include the credentials file itself.
82
-
83
- The JSON file can contain credentials created for
84
- [workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation),
85
- [workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a
86
- [service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key).
87
-
88
- Note: Service account keys are a security risk if not managed correctly. You should
89
- [choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree)
90
- whenever possible.
91
-
92
- The environment variables that google-cloud-apigee_registry-v1
93
- checks for credentials are:
94
-
95
- * `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
96
- * `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
97
-
98
- ```ruby
99
- require "google/cloud/apigee_registry/v1"
100
-
101
- ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json"
102
-
103
- client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new
104
- ```
105
-
106
- ### Local ADC file
107
-
108
- You can set up a local ADC file with your user credentials for authentication during
109
- development. If credentials are not provided in code or in environment variables,
110
- then the local ADC credentials are discovered.
111
-
112
- Follow the steps in [Quickstart](#quickstart) to set up a local ADC file.
113
-
114
- ### Google Cloud Platform environments
115
-
116
- When running on Google Cloud Platform (GCP), including Google Compute Engine
117
- (GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud
118
- Functions (GCF) and Cloud Run, credentials are retrieved from the attached
119
- service account automatically. Code should be written as if already authenticated.
120
-
121
- For more information, see
122
- [Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa).