Class: Google::Cloud::Domains::V1::Domains::Rest::Client
- Inherits:
-
Object
- Object
- Google::Cloud::Domains::V1::Domains::Rest::Client
- Includes:
- Paths
- Defined in:
- lib/google/cloud/domains/v1/domains/rest/client.rb
Overview
REST client for the Domains service.
The Cloud Domains API enables management and configuration of domain names.
Defined Under Namespace
Classes: Configuration
Instance Attribute Summary collapse
-
#operations_client ⇒ ::Google::Cloud::Domains::V1::Domains::Rest::Operations
readonly
Get the associated client for long-running operations.
Class Method Summary collapse
-
.configure {|config| ... } ⇒ Client::Configuration
Configure the Domains Client class.
Instance Method Summary collapse
-
#configure {|config| ... } ⇒ Client::Configuration
Configure the Domains Client instance.
-
#configure_contact_settings(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Updates a
Registration's contact settings. -
#configure_dns_settings(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Updates a
Registration's DNS settings. -
#configure_management_settings(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Updates a
Registration's management settings. -
#delete_registration(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Deletes a
Registrationresource. -
#export_registration(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Exports a
Registrationresource, such that it is no longer managed by Cloud Domains. -
#get_registration(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Domains::V1::Registration
Gets the details of a
Registrationresource. -
#initialize {|config| ... } ⇒ Client
constructor
Create a new Domains REST client object.
-
#list_registrations(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Domains::V1::Registration>
Lists the
Registrationresources in a project. -
#register_domain(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Registers a new domain name and creates a corresponding
Registrationresource. -
#reset_authorization_code(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Domains::V1::AuthorizationCode
Resets the authorization code of the
Registrationto a new random string. -
#retrieve_authorization_code(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Domains::V1::AuthorizationCode
Gets the authorization code of the
Registrationfor the purpose of transferring the domain to another registrar. -
#retrieve_register_parameters(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Domains::V1::RetrieveRegisterParametersResponse
Gets parameters needed to register a new domain name, including price and up-to-date availability.
-
#retrieve_transfer_parameters(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Domains::V1::RetrieveTransferParametersResponse
Gets parameters needed to transfer a domain name from another registrar to Cloud Domains.
-
#search_domains(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Domains::V1::SearchDomainsResponse
Searches for available domain names similar to the provided query.
-
#transfer_domain(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Transfers a domain name from another registrar to Cloud Domains.
-
#universe_domain ⇒ String
The effective universe domain.
-
#update_registration(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Updates select fields of a
Registrationresource, notablylabels.
Methods included from Paths
#location_path, #registration_path
Constructor Details
#initialize {|config| ... } ⇒ Client
Create a new Domains REST client object.
123 124 125 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 |
# File 'lib/google/cloud/domains/v1/domains/rest/client.rb', line 123 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::Domains::V1::Domains::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 @domains_stub = ::Google::Cloud::Domains::V1::Domains::Rest::ServiceStub.new( endpoint: @config.endpoint, endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, universe_domain: @config.universe_domain, credentials: credentials ) end |
Instance Attribute Details
#operations_client ⇒ ::Google::Cloud::Domains::V1::Domains::Rest::Operations (readonly)
Get the associated client for long-running operations.
166 167 168 |
# File 'lib/google/cloud/domains/v1/domains/rest/client.rb', line 166 def operations_client @operations_client end |
Class Method Details
.configure {|config| ... } ⇒ Client::Configuration
Configure the Domains Client class.
See Configuration for a description of the configuration fields.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/google/cloud/domains/v1/domains/rest/client.rb', line 61 def self.configure @configure ||= begin namespace = ["Google", "Cloud", "Domains", "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 Domains 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.
93 94 95 96 |
# File 'lib/google/cloud/domains/v1/domains/rest/client.rb', line 93 def configure yield @config if block_given? @config end |
#configure_contact_settings(request, options = nil) ⇒ ::Gapic::Operation #configure_contact_settings(registration: nil, contact_settings: nil, update_mask: nil, contact_notices: nil, validate_only: nil) ⇒ ::Gapic::Operation
Updates a Registration's contact settings. Some changes require
confirmation by the domain's registrant contact .
1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 |
# File 'lib/google/cloud/domains/v1/domains/rest/client.rb', line 1201 def configure_contact_settings request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Domains::V1::ConfigureContactSettingsRequest # 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.configure_contact_settings..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::Domains::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.configure_contact_settings.timeout, metadata: , retry_policy: @config.rpcs.configure_contact_settings.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @domains_stub.configure_contact_settings 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 |
#configure_dns_settings(request, options = nil) ⇒ ::Gapic::Operation #configure_dns_settings(registration: nil, dns_settings: nil, update_mask: nil, validate_only: nil) ⇒ ::Gapic::Operation
Updates a Registration's DNS settings.
1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 |
# File 'lib/google/cloud/domains/v1/domains/rest/client.rb', line 1102 def configure_dns_settings request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Domains::V1::ConfigureDnsSettingsRequest # 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.configure_dns_settings..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::Domains::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.configure_dns_settings.timeout, metadata: , retry_policy: @config.rpcs.configure_dns_settings.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @domains_stub.configure_dns_settings 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 |
#configure_management_settings(request, options = nil) ⇒ ::Gapic::Operation #configure_management_settings(registration: nil, management_settings: nil, update_mask: nil) ⇒ ::Gapic::Operation
Updates a Registration's management settings.
1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 |
# File 'lib/google/cloud/domains/v1/domains/rest/client.rb', line 1001 def configure_management_settings request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Domains::V1::ConfigureManagementSettingsRequest # 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.configure_management_settings..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::Domains::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.configure_management_settings.timeout, metadata: , retry_policy: @config.rpcs.configure_management_settings.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @domains_stub.configure_management_settings 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_registration(request, options = nil) ⇒ ::Gapic::Operation #delete_registration(name: nil) ⇒ ::Gapic::Operation
Deletes a Registration resource.
This method works on any Registration resource using Subscription or
Commitment billing, provided that the
resource was created at least 1 day in the past.
For Registration resources using
Monthly billing, this method works if:
stateisEXPORTEDwithexpire_timein the paststateisREGISTRATION_FAILEDstateisTRANSFER_FAILED
When an active registration is successfully deleted, you can continue to use the domain in Google Domains until it expires. The calling user becomes the domain's sole owner in Google Domains, and permissions for the domain are subsequently managed there. The domain does not renew automatically unless the new owner sets up billing in Google Domains.
1401 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/domains/v1/domains/rest/client.rb', line 1401 def delete_registration request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Domains::V1::DeleteRegistrationRequest # 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_registration..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::Domains::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_registration.timeout, metadata: , retry_policy: @config.rpcs.delete_registration.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @domains_stub.delete_registration 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 |
#export_registration(request, options = nil) ⇒ ::Gapic::Operation #export_registration(name: nil) ⇒ ::Gapic::Operation
Exports a Registration resource, such that it is no longer managed by
Cloud Domains.
When an active domain is successfully exported, you can continue to use the domain in Google Domains until it expires. The calling user becomes the domain's sole owner in Google Domains, and permissions for the domain are subsequently managed there. The domain does not renew automatically unless the new owner sets up billing in Google Domains.
1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 |
# File 'lib/google/cloud/domains/v1/domains/rest/client.rb', line 1296 def export_registration request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Domains::V1::ExportRegistrationRequest # 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_registration..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::Domains::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.export_registration.timeout, metadata: , retry_policy: @config.rpcs.export_registration.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @domains_stub.export_registration 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 |
#get_registration(request, options = nil) ⇒ ::Google::Cloud::Domains::V1::Registration #get_registration(name: nil) ⇒ ::Google::Cloud::Domains::V1::Registration
Gets the details of a Registration resource.
814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 |
# File 'lib/google/cloud/domains/v1/domains/rest/client.rb', line 814 def get_registration request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Domains::V1::GetRegistrationRequest # 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_registration..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::Domains::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_registration.timeout, metadata: , retry_policy: @config.rpcs.get_registration.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @domains_stub.get_registration 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_registrations(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Domains::V1::Registration> #list_registrations(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Domains::V1::Registration>
Lists the Registration resources in a project.
734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 |
# File 'lib/google/cloud/domains/v1/domains/rest/client.rb', line 734 def list_registrations request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Domains::V1::ListRegistrationsRequest # 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_registrations..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::Domains::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_registrations.timeout, metadata: , retry_policy: @config.rpcs.list_registrations.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @domains_stub.list_registrations request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @domains_stub, :list_registrations, "registrations", request, result, yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#register_domain(request, options = nil) ⇒ ::Gapic::Operation #register_domain(parent: nil, registration: nil, domain_notices: nil, contact_notices: nil, yearly_price: nil, validate_only: nil) ⇒ ::Gapic::Operation
Registers a new domain name and creates a corresponding Registration
resource.
Call RetrieveRegisterParameters first to check availability of the domain
name and determine parameters like price that are needed to build a call to
this method.
A successful call creates a Registration resource in state
REGISTRATION_PENDING, which resolves to ACTIVE within 1-2
minutes, indicating that the domain was successfully registered. If the
resource ends up in state REGISTRATION_FAILED, it indicates that the
domain was not registered successfully, and you can safely delete the
resource and retry registration.
415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 |
# File 'lib/google/cloud/domains/v1/domains/rest/client.rb', line 415 def register_domain request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Domains::V1::RegisterDomainRequest # 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.register_domain..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::Domains::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.register_domain.timeout, metadata: , retry_policy: @config.rpcs.register_domain.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @domains_stub.register_domain 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 |
#reset_authorization_code(request, options = nil) ⇒ ::Google::Cloud::Domains::V1::AuthorizationCode #reset_authorization_code(registration: nil) ⇒ ::Google::Cloud::Domains::V1::AuthorizationCode
Resets the authorization code of the Registration to a new random string.
You can call this method only after 60 days have elapsed since the initial domain registration.
1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 |
# File 'lib/google/cloud/domains/v1/domains/rest/client.rb', line 1567 def request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Domains::V1::ResetAuthorizationCodeRequest # 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...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::Domains::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs..timeout, metadata: , retry_policy: @config.rpcs..retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @domains_stub. 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 |
#retrieve_authorization_code(request, options = nil) ⇒ ::Google::Cloud::Domains::V1::AuthorizationCode #retrieve_authorization_code(registration: nil) ⇒ ::Google::Cloud::Domains::V1::AuthorizationCode
Gets the authorization code of the Registration for the purpose of
transferring the domain to another registrar.
You can call this method only after 60 days have elapsed since the initial domain registration.
1485 1486 1487 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 |
# File 'lib/google/cloud/domains/v1/domains/rest/client.rb', line 1485 def request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Domains::V1::RetrieveAuthorizationCodeRequest # 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...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::Domains::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs..timeout, metadata: , retry_policy: @config.rpcs..retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @domains_stub. 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 |
#retrieve_register_parameters(request, options = nil) ⇒ ::Google::Cloud::Domains::V1::RetrieveRegisterParametersResponse #retrieve_register_parameters(domain_name: nil, location: nil) ⇒ ::Google::Cloud::Domains::V1::RetrieveRegisterParametersResponse
Gets parameters needed to register a new domain name, including price and
up-to-date availability. Use the returned values to call RegisterDomain.
300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 |
# File 'lib/google/cloud/domains/v1/domains/rest/client.rb', line 300 def retrieve_register_parameters request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Domains::V1::RetrieveRegisterParametersRequest # 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.retrieve_register_parameters..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::Domains::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.retrieve_register_parameters.timeout, metadata: , retry_policy: @config.rpcs.retrieve_register_parameters.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @domains_stub.retrieve_register_parameters 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 |
#retrieve_transfer_parameters(request, options = nil) ⇒ ::Google::Cloud::Domains::V1::RetrieveTransferParametersResponse #retrieve_transfer_parameters(domain_name: nil, location: nil) ⇒ ::Google::Cloud::Domains::V1::RetrieveTransferParametersResponse
Gets parameters needed to transfer a domain name from another registrar to Cloud Domains. For domains managed by Google Domains, transferring to Cloud Domains is not supported.
Use the returned values to call TransferDomain.
501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 |
# File 'lib/google/cloud/domains/v1/domains/rest/client.rb', line 501 def retrieve_transfer_parameters request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Domains::V1::RetrieveTransferParametersRequest # 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.retrieve_transfer_parameters..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::Domains::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.retrieve_transfer_parameters.timeout, metadata: , retry_policy: @config.rpcs.retrieve_transfer_parameters.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @domains_stub.retrieve_transfer_parameters 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 |
#search_domains(request, options = nil) ⇒ ::Google::Cloud::Domains::V1::SearchDomainsResponse #search_domains(query: nil, location: nil) ⇒ ::Google::Cloud::Domains::V1::SearchDomainsResponse
Searches for available domain names similar to the provided query.
Availability results from this method are approximate; call
RetrieveRegisterParameters on a domain before registering to confirm
availability.
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
# File 'lib/google/cloud/domains/v1/domains/rest/client.rb', line 219 def search_domains request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Domains::V1::SearchDomainsRequest # 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.search_domains..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::Domains::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.search_domains.timeout, metadata: , retry_policy: @config.rpcs.search_domains.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @domains_stub.search_domains 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 |
#transfer_domain(request, options = nil) ⇒ ::Gapic::Operation #transfer_domain(parent: nil, registration: nil, contact_notices: nil, yearly_price: nil, authorization_code: nil, validate_only: nil) ⇒ ::Gapic::Operation
Transfers a domain name from another registrar to Cloud Domains. For domains managed by Google Domains, transferring to Cloud Domains is not supported.
Before calling this method, go to the domain's current registrar to unlock
the domain for transfer and retrieve the domain's transfer authorization
code. Then call RetrieveTransferParameters to confirm that the domain is
unlocked and to get values needed to build a call to this method.
A successful call creates a Registration resource in state
TRANSFER_PENDING. It can take several days to complete the transfer
process. The registrant can often speed up this process by approving the
transfer through the current registrar, either by clicking a link in an
email from the registrar or by visiting the registrar's website.
A few minutes after transfer approval, the resource transitions to state
ACTIVE, indicating that the transfer was successful. If the transfer is
rejected or the request expires without being approved, the resource can
end up in state TRANSFER_FAILED. If transfer fails, you can safely delete
the resource and retry the transfer.
628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 |
# File 'lib/google/cloud/domains/v1/domains/rest/client.rb', line 628 def transfer_domain request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Domains::V1::TransferDomainRequest # 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.transfer_domain..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::Domains::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.transfer_domain.timeout, metadata: , retry_policy: @config.rpcs.transfer_domain.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @domains_stub.transfer_domain 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
103 104 105 |
# File 'lib/google/cloud/domains/v1/domains/rest/client.rb', line 103 def universe_domain @domains_stub.universe_domain end |
#update_registration(request, options = nil) ⇒ ::Gapic::Operation #update_registration(registration: nil, update_mask: nil) ⇒ ::Gapic::Operation
Updates select fields of a Registration resource, notably labels. To
update other fields, use the appropriate custom update method:
- To update management settings, see
ConfigureManagementSettings - To update DNS configuration, see
ConfigureDnsSettings - To update contact information, see
ConfigureContactSettings
908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 |
# File 'lib/google/cloud/domains/v1/domains/rest/client.rb', line 908 def update_registration request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Domains::V1::UpdateRegistrationRequest # 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_registration..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::Domains::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_registration.timeout, metadata: , retry_policy: @config.rpcs.update_registration.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @domains_stub.update_registration 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 |