Skip to content

Commit e389435

Browse files
docs: update SelectiveGapicGeneration usage doc
PiperOrigin-RevId: 892649773 Source-Link: googleapis/googleapis@06a20b2 Source-Link: googleapis/googleapis-gen@d9ae664 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNsb3VkX2Rtcy12MS8uT3dsQm90LnlhbWwiLCJoIjoiZDlhZTY2NDUxZjgxYzlkZjk5ZGJkYzliMjNiZDc1ZDAwNzM4MGY0ZSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNsb3VkX3F1b3Rhcy12MS8uT3dsQm90LnlhbWwiLCJoIjoiZDlhZTY2NDUxZjgxYzlkZjk5ZGJkYzliMjNiZDc1ZDAwNzM4MGY0ZSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNsb3VkX3F1b3Rhcy12MWJldGEvLk93bEJvdC55YW1sIiwiaCI6ImQ5YWU2NjQ1MWY4MWM5ZGY5OWRiZGM5YjIzYmQ3NWQwMDczODBmNGUifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNsb3VkX3NlY3VyaXR5X2NvbXBsaWFuY2UtdjEvLk93bEJvdC55YW1sIiwiaCI6ImQ5YWU2NjQ1MWY4MWM5ZGY5OWRiZGM5YjIzYmQ3NWQwMDczODBmNGUifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNvbW1lcmNlLWNvbnN1bWVyLXByb2N1cmVtZW50LXYxLy5Pd2xCb3QueWFtbCIsImgiOiJkOWFlNjY0NTFmODFjOWRmOTlkYmRjOWIyM2JkNzVkMDA3MzgwZjRlIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNvbmZpZGVudGlhbF9jb21wdXRpbmctdjEvLk93bEJvdC55YW1sIiwiaCI6ImQ5YWU2NjQ1MWY4MWM5ZGY5OWRiZGM5YjIzYmQ3NWQwMDczODBmNGUifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNvbmZ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CIsImgiOiJkOWFlNjY0NTFmODFjOWRmOTlkYmRjOWIyM2JkNzVkMDA3MzgwZjRlIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFfY2F0YWxvZy12MS8uT3dsQm90LnlhbWwiLCJoIjoiZDlhZTY2NDUxZjgxYzlkZjk5ZGJkYzliMjNiZDc1ZDAwNzM4MGY0ZSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFfY2F0YWxvZy12MWJldGExLy5Pd2xCb3QueWFtbCIsImgiOiJkOWFlNjY0NTFmODFjOWRmOTlkYmRjOWIyM2JkNzVkMDA3MzgwZjRlIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFfZnVzaW9uLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJkOWFlNjY0NTFmODFjOWRmOTlkYmRjOWIyM2JkNzVkMDA3MzgwZjRlIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFfbGFiZWxpbmctdjFiZXRhMS8uT3dsQm90LnlhbWwiLCJoIjoiZDlhZTY2NDUxZjgxYzlkZjk5ZGJkYzliMjNiZDc1ZDAwNzM4MGY0ZSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFiYXNlX2NlbnRlci12MWJldGEvLk93bEJvdC55YW1sIiwiaCI6ImQ5YWU2NjQ1MWY4MWM5ZGY5OWRiZGM5YjIzYmQ3NWQwMDczODBmNGUifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFmbG93LXYxYmV0YTMvLk93bEJvdC55YW1sIiwiaCI6ImQ5YWU2NjQ1MWY4MWM5ZGY5OWRiZGM5YjIzYmQ3NWQwMDczODBmNGUifQ==
1 parent 067085e commit e389435

1,719 files changed

Lines changed: 410712 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Ignore bundler lockfiles
2+
Gemfile.lock
3+
gems.locked
4+
5+
# Ignore documentation output
6+
doc/*
7+
.yardoc/*
8+
9+
# Ignore test output
10+
coverage/*
11+
12+
# Ignore build artifacts
13+
pkg/*
14+
15+
# Ignore files commonly present in certain dev environments
16+
.vagrant
17+
.DS_STORE
18+
.idea
19+
*.iml
20+
21+
# Ignore synth output
22+
__pycache__
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"api_id": "datamigration.googleapis.com",
3+
"api_shortname": "datamigration",
4+
"client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest",
5+
"distribution_name": "google-cloud-cloud_dms-v1",
6+
"is_cloud": true,
7+
"language": "ruby",
8+
"name": "datamigration",
9+
"name_pretty": "Cloud Database Migration Service V1 API",
10+
"product_documentation": "https://cloud.google.com/database-migration/",
11+
"release_level": "unreleased",
12+
"repo": "googleapis/google-cloud-ruby",
13+
"requires_billing": true,
14+
"ruby-cloud-description": "Database Migration Service makes it easier for you to migrate your data to Google Cloud. Database Migration Service helps you lift and shift your MySQL and PostgreSQL workloads into Cloud SQL. Database Migration Service streamlines networking workflow, manages the initial snapshot and ongoing replication, and provides a status of the migration operation. Note that google-cloud-cloud_dms-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-cloud_dms instead. See the readme for more details.",
15+
"ruby-cloud-env-prefix": "DATABASE_MIGRATION",
16+
"ruby-cloud-product-url": "https://cloud.google.com/database-migration/",
17+
"ruby-cloud-namespace-override": "CloudDms=CloudDMS",
18+
"library_type": "GAPIC_AUTO"
19+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
inherit_gem:
2+
google-style: google-style.yml
3+
4+
AllCops:
5+
Exclude:
6+
- "google-cloud-cloud_dms-v1.gemspec"
7+
- "lib/**/*_pb.rb"
8+
- "proto_docs/**/*"
9+
- "test/**/*"
10+
- "acceptance/**/*"
11+
- "samples/acceptance/**/*"
12+
- "Rakefile"
13+
14+
Layout/LineLength:
15+
Enabled: false
16+
Metrics/AbcSize:
17+
Enabled: false
18+
Metrics/ClassLength:
19+
Enabled: false
20+
Metrics/CyclomaticComplexity:
21+
Enabled: false
22+
Metrics/MethodLength:
23+
Enabled: false
24+
Metrics/ModuleLength:
25+
Enabled: false
26+
Metrics/PerceivedComplexity:
27+
Enabled: false
28+
Naming/AccessorMethodName:
29+
Exclude:
30+
- "snippets/**/*.rb"
31+
Naming/FileName:
32+
Exclude:
33+
- "lib/google-cloud-cloud_dms-v1.rb"
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# frozen_string_literal: true
2+
3+
# Copyright 2026 Google LLC
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18+
19+
toys_version! ">= 0.15.3"
20+
21+
if ENV["RUBY_COMMON_TOOLS"]
22+
common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"]
23+
load File.join(common_tools_dir, "toys", "gapic")
24+
else
25+
load_git remote: "https://github.com/googleapis/ruby-common-tools.git",
26+
path: "toys/gapic",
27+
update: true
28+
end
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
--no-private
2+
--title="Cloud Database Migration Service V1 API"
3+
--exclude _pb\.rb$
4+
--markup markdown
5+
--markup-provider redcarpet
6+
7+
./lib/**/*.rb
8+
./proto_docs/**/*.rb
9+
-
10+
README.md
11+
LICENSE.md
12+
AUTHENTICATION.md
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
# Authentication
2+
3+
The recommended way to authenticate to the google-cloud-cloud_dms-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-cloud_dms-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/cloud_dms/v1"
58+
59+
client = ::Google::Cloud::CloudDMS::V1::DataMigrationService::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/cloud_dms/v1"
68+
69+
::Google::Cloud::CloudDMS::V1::DataMigrationService::Client.configure do |config|
70+
config.credentials = "path/to/credentialfile.json"
71+
end
72+
73+
client = ::Google::Cloud::CloudDMS::V1::DataMigrationService::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-cloud_dms-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/cloud_dms/v1"
100+
101+
ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json"
102+
103+
client = ::Google::Cloud::CloudDMS::V1::DataMigrationService::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).
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Release History
2+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
source "https://rubygems.org"
2+
3+
gemspec
4+
5+
gem "google-style", "~> 1.32.0"
6+
gem "irb", "~> 1.17"
7+
gem "minitest", "~> 6.0.2"
8+
gem "minitest-focus", "~> 1.4"
9+
gem "minitest-mock", "~> 5.27"
10+
gem "minitest-rg", "~> 5.3"
11+
gem "ostruct", "~> 0.5.5"
12+
gem "rake", ">= 13.0"
13+
gem "redcarpet", "~> 3.6"
14+
gem "yard", "~> 0.9"

0 commit comments

Comments
 (0)