Class: Google::Cloud::ConfigService::V1::Config::Rest::Client
- Inherits:
-
Object
- Object
- Google::Cloud::ConfigService::V1::Config::Rest::Client
- Includes:
- Paths
- Defined in:
- lib/google/cloud/config_service/v1/config/rest/client.rb
Overview
REST client for the Config service.
Infrastructure Manager is a managed service that automates the deployment and management of Google Cloud infrastructure resources.
Defined Under Namespace
Classes: Configuration
Instance Attribute Summary collapse
-
#iam_policy_client ⇒ Google::Iam::V1::IAMPolicy::Rest::Client
readonly
Get the associated client for mix-in of the IAMPolicy.
-
#location_client ⇒ Google::Cloud::Location::Locations::Rest::Client
readonly
Get the associated client for mix-in of the Locations.
-
#operations_client ⇒ ::Google::Cloud::ConfigService::V1::Config::Rest::Operations
readonly
Get the associated client for long-running operations.
Class Method Summary collapse
-
.configure {|config| ... } ⇒ Client::Configuration
Configure the Config Client class.
Instance Method Summary collapse
-
#configure {|config| ... } ⇒ Client::Configuration
Configure the Config Client instance.
-
#create_deployment(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Creates a Deployment.
-
#delete_deployment(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Deletes a Deployment.
-
#delete_statefile(request, options = nil) {|result, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes Terraform state file in a given deployment.
-
#export_deployment_statefile(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::ConfigService::V1::Statefile
Exports Terraform state file from a given deployment.
-
#export_lock_info(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::ConfigService::V1::LockInfo
Exports the lock info on a locked deployment.
-
#export_revision_statefile(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::ConfigService::V1::Statefile
Exports Terraform state file from a given revision.
-
#get_deployment(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::ConfigService::V1::Deployment
Gets details about a Deployment.
-
#get_resource(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::ConfigService::V1::Resource
Gets details about a Resource deployed by Infra Manager.
-
#get_revision(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::ConfigService::V1::Revision
Gets details about a Revision.
-
#import_statefile(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::ConfigService::V1::Statefile
Imports Terraform state file in a given deployment.
-
#initialize {|config| ... } ⇒ Client
constructor
Create a new Config REST client object.
-
#list_deployments(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::ConfigService::V1::ListDeploymentsResponse
Lists Deployments in a given project and location.
-
#list_resources(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::ConfigService::V1::ListResourcesResponse
Lists Resources in a given revision.
-
#list_revisions(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::ConfigService::V1::ListRevisionsResponse
Lists Revisions of a deployment.
-
#lock_deployment(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Locks a deployment.
-
#universe_domain ⇒ String
The effective universe domain.
-
#unlock_deployment(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Unlocks a locked deployment.
-
#update_deployment(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Updates a Deployment.
Methods included from Paths
#deployment_path, #location_path, #resource_path, #revision_path, #service_account_path, #worker_pool_path
Constructor Details
#initialize {|config| ... } ⇒ Client
Create a new Config REST client object.
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'lib/google/cloud/config_service/v1/config/rest/client.rb', line 126 def initialize # Create the configuration object @config = Configuration.new Client.configure # Yield the configuration if needed yield @config if block_given? # Create credentials credentials = @config.credentials # Use self-signed JWT if the endpoint is unchanged from default, # but only if the default endpoint does not have a region prefix. enable_self_signed_jwt = @config.endpoint.nil? || (@config.endpoint == Configuration::DEFAULT_ENDPOINT && !@config.endpoint.split(".").first.include?("-")) credentials ||= Credentials.default scope: @config.scope, enable_self_signed_jwt: enable_self_signed_jwt if credentials.is_a?(::String) || credentials.is_a?(::Hash) credentials = Credentials.new credentials, scope: @config.scope end @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id @operations_client = ::Google::Cloud::ConfigService::V1::Config::Rest::Operations.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @config.endpoint config.universe_domain = @config.universe_domain end @config_stub = ::Google::Cloud::ConfigService::V1::Config::Rest::ServiceStub.new( endpoint: @config.endpoint, endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, universe_domain: @config.universe_domain, credentials: credentials ) @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @config_stub.endpoint config.universe_domain = @config_stub.universe_domain config.bindings_override = @config.bindings_override end @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @config_stub.endpoint config.universe_domain = @config_stub.universe_domain config.bindings_override = @config.bindings_override end end |
Instance Attribute Details
#iam_policy_client ⇒ Google::Iam::V1::IAMPolicy::Rest::Client (readonly)
Get the associated client for mix-in of the IAMPolicy.
199 200 201 |
# File 'lib/google/cloud/config_service/v1/config/rest/client.rb', line 199 def iam_policy_client @iam_policy_client end |
#location_client ⇒ Google::Cloud::Location::Locations::Rest::Client (readonly)
Get the associated client for mix-in of the Locations.
192 193 194 |
# File 'lib/google/cloud/config_service/v1/config/rest/client.rb', line 192 def location_client @location_client end |
#operations_client ⇒ ::Google::Cloud::ConfigService::V1::Config::Rest::Operations (readonly)
Get the associated client for long-running operations.
185 186 187 |
# File 'lib/google/cloud/config_service/v1/config/rest/client.rb', line 185 def operations_client @operations_client end |
Class Method Details
.configure {|config| ... } ⇒ Client::Configuration
Configure the Config Client class.
See Configuration for a description of the configuration fields.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/google/cloud/config_service/v1/config/rest/client.rb', line 64 def self.configure @configure ||= begin namespace = ["Google", "Cloud", "ConfigService", "V1"] parent_config = while namespace.any? parent_name = namespace.join "::" parent_const = const_get parent_name break parent_const.configure if parent_const.respond_to? :configure namespace.pop end default_config = Client::Configuration.new parent_config default_config end yield @configure if block_given? @configure end |
Instance Method Details
#configure {|config| ... } ⇒ Client::Configuration
Configure the Config Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on configure.
See Configuration for a description of the configuration fields.
96 97 98 99 |
# File 'lib/google/cloud/config_service/v1/config/rest/client.rb', line 96 def configure yield @config if block_given? @config end |
#create_deployment(request, options = nil) ⇒ ::Gapic::Operation #create_deployment(parent: nil, deployment_id: nil, deployment: nil, request_id: nil) ⇒ ::Gapic::Operation
Creates a Deployment.
468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 |
# File 'lib/google/cloud/config_service/v1/config/rest/client.rb', line 468 def create_deployment request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::CreateDeploymentRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_deployment..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ConfigService::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_deployment.timeout, metadata: , retry_policy: @config.rpcs.create_deployment.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_stub.create_deployment request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_deployment(request, options = nil) ⇒ ::Gapic::Operation #delete_deployment(name: nil, request_id: nil, force: nil, delete_policy: nil) ⇒ ::Gapic::Operation
Deletes a Deployment.
688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 |
# File 'lib/google/cloud/config_service/v1/config/rest/client.rb', line 688 def delete_deployment request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::DeleteDeploymentRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_deployment..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ConfigService::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_deployment.timeout, metadata: , retry_policy: @config.rpcs.delete_deployment.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_stub.delete_deployment request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_statefile(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_statefile(name: nil, lock_id: nil) ⇒ ::Google::Protobuf::Empty
Deletes Terraform state file in a given deployment.
1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 |
# File 'lib/google/cloud/config_service/v1/config/rest/client.rb', line 1402 def delete_statefile request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::DeleteStatefileRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_statefile..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ConfigService::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_statefile.timeout, metadata: , retry_policy: @config.rpcs.delete_statefile.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_stub.delete_statefile request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#export_deployment_statefile(request, options = nil) ⇒ ::Google::Cloud::ConfigService::V1::Statefile #export_deployment_statefile(parent: nil, draft: nil) ⇒ ::Google::Cloud::ConfigService::V1::Statefile
Exports Terraform state file from a given deployment.
1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 |
# File 'lib/google/cloud/config_service/v1/config/rest/client.rb', line 1154 def export_deployment_statefile request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::ExportDeploymentStatefileRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.export_deployment_statefile..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ConfigService::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.export_deployment_statefile.timeout, metadata: , retry_policy: @config.rpcs.export_deployment_statefile.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_stub.export_deployment_statefile request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#export_lock_info(request, options = nil) ⇒ ::Google::Cloud::ConfigService::V1::LockInfo #export_lock_info(name: nil) ⇒ ::Google::Cloud::ConfigService::V1::LockInfo
Exports the lock info on a locked deployment.
1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 |
# File 'lib/google/cloud/config_service/v1/config/rest/client.rb', line 1657 def export_lock_info request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::ExportLockInfoRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.export_lock_info..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ConfigService::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.export_lock_info.timeout, metadata: , retry_policy: @config.rpcs.export_lock_info.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_stub.export_lock_info request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#export_revision_statefile(request, options = nil) ⇒ ::Google::Cloud::ConfigService::V1::Statefile #export_revision_statefile(parent: nil) ⇒ ::Google::Cloud::ConfigService::V1::Statefile
Exports Terraform state file from a given revision.
1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 |
# File 'lib/google/cloud/config_service/v1/config/rest/client.rb', line 1234 def export_revision_statefile request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::ExportRevisionStatefileRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.export_revision_statefile..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ConfigService::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.export_revision_statefile.timeout, metadata: , retry_policy: @config.rpcs.export_revision_statefile.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_stub.export_revision_statefile request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_deployment(request, options = nil) ⇒ ::Google::Cloud::ConfigService::V1::Deployment #get_deployment(name: nil) ⇒ ::Google::Cloud::ConfigService::V1::Deployment
Gets details about a Deployment.
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 |
# File 'lib/google/cloud/config_service/v1/config/rest/client.rb', line 363 def get_deployment request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::GetDeploymentRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_deployment..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ConfigService::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_deployment.timeout, metadata: , retry_policy: @config.rpcs.get_deployment.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_stub.get_deployment request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_resource(request, options = nil) ⇒ ::Google::Cloud::ConfigService::V1::Resource #get_resource(name: nil) ⇒ ::Google::Cloud::ConfigService::V1::Resource
Gets details about a Resource deployed by Infra Manager.
963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 |
# File 'lib/google/cloud/config_service/v1/config/rest/client.rb', line 963 def get_resource request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::GetResourceRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_resource..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ConfigService::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_resource.timeout, metadata: , retry_policy: @config.rpcs.get_resource.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_stub.get_resource request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_revision(request, options = nil) ⇒ ::Google::Cloud::ConfigService::V1::Revision #get_revision(name: nil) ⇒ ::Google::Cloud::ConfigService::V1::Revision
Gets details about a Revision.
883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 |
# File 'lib/google/cloud/config_service/v1/config/rest/client.rb', line 883 def get_revision request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::GetRevisionRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_revision..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ConfigService::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_revision.timeout, metadata: , retry_policy: @config.rpcs.get_revision.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_stub.get_revision request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#import_statefile(request, options = nil) ⇒ ::Google::Cloud::ConfigService::V1::Statefile #import_statefile(parent: nil, lock_id: nil, skip_draft: nil) ⇒ ::Google::Cloud::ConfigService::V1::Statefile
Imports Terraform state file in a given deployment. The state file does not take effect until the Deployment has been unlocked.
1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 |
# File 'lib/google/cloud/config_service/v1/config/rest/client.rb', line 1320 def import_statefile request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::ImportStatefileRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.import_statefile..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ConfigService::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.import_statefile.timeout, metadata: , retry_policy: @config.rpcs.import_statefile.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_stub.import_statefile request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_deployments(request, options = nil) ⇒ ::Google::Cloud::ConfigService::V1::ListDeploymentsResponse #list_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Google::Cloud::ConfigService::V1::ListDeploymentsResponse
Lists Deployments in a given project and location.
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 |
# File 'lib/google/cloud/config_service/v1/config/rest/client.rb', line 284 def list_deployments request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::ListDeploymentsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_deployments..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ConfigService::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_deployments.timeout, metadata: , retry_policy: @config.rpcs.list_deployments.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_stub.list_deployments request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_resources(request, options = nil) ⇒ ::Google::Cloud::ConfigService::V1::ListResourcesResponse #list_resources(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Google::Cloud::ConfigService::V1::ListResourcesResponse
Lists Resources in a given revision.
1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 |
# File 'lib/google/cloud/config_service/v1/config/rest/client.rb', line 1070 def list_resources request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::ListResourcesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_resources..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ConfigService::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_resources.timeout, metadata: , retry_policy: @config.rpcs.list_resources.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_stub.list_resources request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_revisions(request, options = nil) ⇒ ::Google::Cloud::ConfigService::V1::ListRevisionsResponse #list_revisions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Google::Cloud::ConfigService::V1::ListRevisionsResponse
Lists Revisions of a deployment.
804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 |
# File 'lib/google/cloud/config_service/v1/config/rest/client.rb', line 804 def list_revisions request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::ListRevisionsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_revisions..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ConfigService::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_revisions.timeout, metadata: , retry_policy: @config.rpcs.list_revisions.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_stub.list_revisions request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#lock_deployment(request, options = nil) ⇒ ::Gapic::Operation #lock_deployment(name: nil) ⇒ ::Gapic::Operation
Locks a deployment.
1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 |
# File 'lib/google/cloud/config_service/v1/config/rest/client.rb', line 1488 def lock_deployment request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::LockDeploymentRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.lock_deployment..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ConfigService::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.lock_deployment.timeout, metadata: , retry_policy: @config.rpcs.lock_deployment.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_stub.lock_deployment request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#universe_domain ⇒ String
The effective universe domain
106 107 108 |
# File 'lib/google/cloud/config_service/v1/config/rest/client.rb', line 106 def universe_domain @config_stub.universe_domain end |
#unlock_deployment(request, options = nil) ⇒ ::Gapic::Operation #unlock_deployment(name: nil, lock_id: nil) ⇒ ::Gapic::Operation
Unlocks a locked deployment.
1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 |
# File 'lib/google/cloud/config_service/v1/config/rest/client.rb', line 1577 def unlock_deployment request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::UnlockDeploymentRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.unlock_deployment..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ConfigService::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.unlock_deployment.timeout, metadata: , retry_policy: @config.rpcs.unlock_deployment.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_stub.unlock_deployment request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#update_deployment(request, options = nil) ⇒ ::Gapic::Operation #update_deployment(update_mask: nil, deployment: nil, request_id: nil) ⇒ ::Gapic::Operation
Updates a Deployment.
579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 |
# File 'lib/google/cloud/config_service/v1/config/rest/client.rb', line 579 def update_deployment request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ConfigService::V1::UpdateDeploymentRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_deployment..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ConfigService::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_deployment.timeout, metadata: , retry_policy: @config.rpcs.update_deployment.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @config_stub.update_deployment request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |