lib/google/cloud/domains/v1beta1/domains/client.rb in google-cloud-domains-v1beta1-0.2.3 vs lib/google/cloud/domains/v1beta1/domains/client.rb in google-cloud-domains-v1beta1-0.3.0
- old
+ new
@@ -339,18 +339,18 @@
# @param domain_notices [::Array<::Google::Cloud::Domains::V1beta1::DomainNotice>]
# The list of domain notices that you acknowledge. Call
# `RetrieveRegisterParameters` to see the notices that need acknowledgement.
# @param contact_notices [::Array<::Google::Cloud::Domains::V1beta1::ContactNotice>]
# The list of contact notices that the caller acknowledges. The notices
- # required here depend on the values specified in
+ # needed here depend on the values specified in
# `registration.contact_settings`.
# @param yearly_price [::Google::Type::Money, ::Hash]
# Required. Yearly price to register or renew the domain.
# The value that should be put here can be obtained from
# RetrieveRegisterParameters or SearchDomains calls.
# @param validate_only [::Boolean]
- # When true, only validation will be performed, without actually registering
+ # When true, only validation is performed, without actually registering
# the domain. Follows:
# https://cloud.google.com/apis/design/design_patterns#request_validation
#
# @yield [response, operation] Access the result along with the RPC operation
# @yieldparam response [::Gapic::Operation]
@@ -399,10 +399,196 @@
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
##
+ # 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`.
+ #
+ # @overload retrieve_transfer_parameters(request, options = nil)
+ # Pass arguments to `retrieve_transfer_parameters` via a request object, either of type
+ # {::Google::Cloud::Domains::V1beta1::RetrieveTransferParametersRequest} or an equivalent Hash.
+ #
+ # @param request [::Google::Cloud::Domains::V1beta1::RetrieveTransferParametersRequest, ::Hash]
+ # A request object representing the call parameters. Required. To specify no
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
+ # @param options [::Gapic::CallOptions, ::Hash]
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
+ #
+ # @overload retrieve_transfer_parameters(domain_name: nil, location: nil)
+ # Pass arguments to `retrieve_transfer_parameters` via keyword arguments. Note that at
+ # least one keyword argument is required. To specify no parameters, or to keep all
+ # the default parameter values, pass an empty Hash as a request object (see above).
+ #
+ # @param domain_name [::String]
+ # Required. The domain name. Unicode domain names must be expressed in Punycode format.
+ # @param location [::String]
+ # Required. The location. Must be in the format `projects/*/locations/*`.
+ #
+ # @yield [response, operation] Access the result along with the RPC operation
+ # @yieldparam response [::Google::Cloud::Domains::V1beta1::RetrieveTransferParametersResponse]
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
+ #
+ # @return [::Google::Cloud::Domains::V1beta1::RetrieveTransferParametersResponse]
+ #
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
+ #
+ def retrieve_transfer_parameters request, options = nil
+ raise ::ArgumentError, "request must be provided" if request.nil?
+
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Domains::V1beta1::RetrieveTransferParametersRequest
+
+ # Converts hash and nil to an options object
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
+
+ # Customize the options with defaults
+ metadata = @config.rpcs.retrieve_transfer_parameters.metadata.to_h
+
+ # Set x-goog-api-client and x-goog-user-project headers
+ metadata[:"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::V1beta1::VERSION
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
+
+ header_params = {
+ "location" => request.location
+ }
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
+ metadata[:"x-goog-request-params"] ||= request_params_header
+
+ options.apply_defaults timeout: @config.rpcs.retrieve_transfer_parameters.timeout,
+ metadata: metadata,
+ retry_policy: @config.rpcs.retrieve_transfer_parameters.retry_policy
+
+ options.apply_defaults timeout: @config.timeout,
+ metadata: @config.metadata,
+ retry_policy: @config.retry_policy
+
+ @domains_stub.call_rpc :retrieve_transfer_parameters, request, options: options do |response, operation|
+ yield response, operation if block_given?
+ return response
+ end
+ rescue ::GRPC::BadStatus => e
+ raise ::Google::Cloud::Error.from_error(e)
+ end
+
+ ##
+ # 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.
+ #
+ # @overload transfer_domain(request, options = nil)
+ # Pass arguments to `transfer_domain` via a request object, either of type
+ # {::Google::Cloud::Domains::V1beta1::TransferDomainRequest} or an equivalent Hash.
+ #
+ # @param request [::Google::Cloud::Domains::V1beta1::TransferDomainRequest, ::Hash]
+ # A request object representing the call parameters. Required. To specify no
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
+ # @param options [::Gapic::CallOptions, ::Hash]
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
+ #
+ # @overload transfer_domain(parent: nil, registration: nil, contact_notices: nil, yearly_price: nil, authorization_code: nil, validate_only: nil)
+ # Pass arguments to `transfer_domain` via keyword arguments. Note that at
+ # least one keyword argument is required. To specify no parameters, or to keep all
+ # the default parameter values, pass an empty Hash as a request object (see above).
+ #
+ # @param parent [::String]
+ # Required. The parent resource of the `Registration`. Must be in the
+ # format `projects/*/locations/*`.
+ # @param registration [::Google::Cloud::Domains::V1beta1::Registration, ::Hash]
+ # Required. The complete `Registration` resource to be created.
+ #
+ # You can leave `registration.dns_settings` unset to import the
+ # domain's current DNS configuration from its current registrar. Use this
+ # option only if you are sure that the domain's current DNS service
+ # does not cease upon transfer, as is often the case for DNS services
+ # provided for free by the registrar.
+ # @param contact_notices [::Array<::Google::Cloud::Domains::V1beta1::ContactNotice>]
+ # The list of contact notices that you acknowledge. The notices
+ # needed here depend on the values specified in
+ # `registration.contact_settings`.
+ # @param yearly_price [::Google::Type::Money, ::Hash]
+ # Required. Acknowledgement of the price to transfer or renew the domain for one year.
+ # Call `RetrieveTransferParameters` to obtain the price, which you must
+ # acknowledge.
+ # @param authorization_code [::Google::Cloud::Domains::V1beta1::AuthorizationCode, ::Hash]
+ # The domain's transfer authorization code. You can obtain this from the
+ # domain's current registrar.
+ # @param validate_only [::Boolean]
+ # Validate the request without actually transferring the domain.
+ #
+ # @yield [response, operation] Access the result along with the RPC operation
+ # @yieldparam response [::Gapic::Operation]
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
+ #
+ # @return [::Gapic::Operation]
+ #
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
+ #
+ def transfer_domain request, options = nil
+ raise ::ArgumentError, "request must be provided" if request.nil?
+
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Domains::V1beta1::TransferDomainRequest
+
+ # Converts hash and nil to an options object
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
+
+ # Customize the options with defaults
+ metadata = @config.rpcs.transfer_domain.metadata.to_h
+
+ # Set x-goog-api-client and x-goog-user-project headers
+ metadata[:"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::V1beta1::VERSION
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
+
+ header_params = {
+ "parent" => request.parent
+ }
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
+ metadata[:"x-goog-request-params"] ||= request_params_header
+
+ options.apply_defaults timeout: @config.rpcs.transfer_domain.timeout,
+ metadata: metadata,
+ retry_policy: @config.rpcs.transfer_domain.retry_policy
+
+ options.apply_defaults timeout: @config.timeout,
+ metadata: @config.metadata,
+ retry_policy: @config.retry_policy
+
+ @domains_stub.call_rpc :transfer_domain, request, options: options do |response, operation|
+ response = ::Gapic::Operation.new response, @operations_client, options: options
+ yield response, operation if block_given?
+ return response
+ end
+ rescue ::GRPC::BadStatus => e
+ raise ::Google::Cloud::Error.from_error(e)
+ end
+
+ ##
# Lists the `Registration` resources in a project.
#
# @overload list_registrations(request, options = nil)
# Pass arguments to `list_registrations` via a request object, either of type
# {::Google::Cloud::Domains::V1beta1::ListRegistrationsRequest} or an equivalent Hash.
@@ -586,12 +772,12 @@
#
# @param registration [::Google::Cloud::Domains::V1beta1::Registration, ::Hash]
# Fields of the `Registration` to update.
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
# Required. The field mask describing which fields to update as a comma-separated list.
- # For example, if only the labels are being updated, the `update_mask` would
- # be `"labels"`.
+ # For example, if only the labels are being updated, the `update_mask` is
+ # `"labels"`.
#
# @yield [response, operation] Access the result along with the RPC operation
# @yieldparam response [::Gapic::Operation]
# @yieldparam operation [::GRPC::ActiveCall::Operation]
#
@@ -663,11 +849,11 @@
# @param management_settings [::Google::Cloud::Domains::V1beta1::ManagementSettings, ::Hash]
# Fields of the `ManagementSettings` to update.
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
# Required. The field mask describing which fields to update as a comma-separated list.
# For example, if only the transfer lock is being updated, the `update_mask`
- # would be `"transfer_lock_state"`.
+ # is `"transfer_lock_state"`.
#
# @yield [response, operation] Access the result along with the RPC operation
# @yieldparam response [::Gapic::Operation]
# @yieldparam operation [::GRPC::ActiveCall::Operation]
#
@@ -739,17 +925,17 @@
# @param dns_settings [::Google::Cloud::Domains::V1beta1::DnsSettings, ::Hash]
# Fields of the `DnsSettings` to update.
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
# Required. The field mask describing which fields to update as a comma-separated list.
# For example, if only the name servers are being updated for an existing
- # Custom DNS configuration, the `update_mask` would be
+ # Custom DNS configuration, the `update_mask` is
# `"custom_dns.name_servers"`.
#
# When changing the DNS provider from one type to another, pass the new
# provider's field name as part of the field mask. For example, when changing
# from a Google Domains DNS configuration to a Custom DNS configuration, the
- # `update_mask` would be `"custom_dns"`. //
+ # `update_mask` is `"custom_dns"`. //
# @param validate_only [::Boolean]
# Validate the request without actually updating the DNS settings.
#
# @yield [response, operation] Access the result along with the RPC operation
# @yieldparam response [::Gapic::Operation]
@@ -824,14 +1010,14 @@
# @param contact_settings [::Google::Cloud::Domains::V1beta1::ContactSettings, ::Hash]
# Fields of the `ContactSettings` to update.
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
# Required. The field mask describing which fields to update as a comma-separated list.
# For example, if only the registrant contact is being updated, the
- # `update_mask` would be `"registrant_contact"`.
+ # `update_mask` is `"registrant_contact"`.
# @param contact_notices [::Array<::Google::Cloud::Domains::V1beta1::ContactNotice>]
# The list of contact notices that the caller acknowledges. The notices
- # required here depend on the values specified in `contact_settings`.
+ # needed here depend on the values specified in `contact_settings`.
# @param validate_only [::Boolean]
# Validate the request without actually updating the contact settings.
#
# @yield [response, operation] Access the result along with the RPC operation
# @yieldparam response [::Gapic::Operation]
@@ -880,25 +1066,20 @@
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
##
- # Exports a `Registration` that you no longer want to use with
- # Cloud Domains. You can continue to use the domain in
- # [Google Domains](https://domains.google/) until it expires.
+ # Exports a `Registration` resource, such that it is no longer managed by
+ # Cloud Domains.
#
- # If the export is successful:
+ # When an active domain is successfully exported, you can continue to use the
+ # domain in [Google Domains](https://domains.google/) 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.
#
- # * The resource's `state` becomes `EXPORTED`, meaning that it is no longer
- # managed by Cloud Domains
- # * Because individual users can own domains in Google Domains, the calling
- # user becomes the domain's sole owner. Permissions for the domain are
- # subsequently managed in Google Domains.
- # * Without further action, the domain does not renew automatically.
- # The new owner can set up billing in Google Domains to renew the domain
- # if needed.
- #
# @overload export_registration(request, options = nil)
# Pass arguments to `export_registration` via a request object, either of type
# {::Google::Cloud::Domains::V1beta1::ExportRegistrationRequest} or an equivalent Hash.
#
# @param request [::Google::Cloud::Domains::V1beta1::ExportRegistrationRequest, ::Hash]
@@ -965,15 +1146,28 @@
end
##
# Deletes a `Registration` resource.
#
- # This method only works on resources in one of the following states:
+ # This method works on any `Registration` resource using [Subscription or
+ # Commitment billing](/domains/pricing#billing-models), provided that the
+ # resource was created at least 1 day in the past.
#
+ # For `Registration` resources using
+ # [Monthly billing](/domains/pricing#billing-models), this method works if:
+ #
# * `state` is `EXPORTED` with `expire_time` in the past
# * `state` is `REGISTRATION_FAILED`
+ # * `state` is `TRANSFER_FAILED`
#
+ # When an active registration is successfully deleted, you can continue to
+ # use the domain in [Google Domains](https://domains.google/) 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.
+ #
# @overload delete_registration(request, options = nil)
# Pass arguments to `delete_registration` via a request object, either of type
# {::Google::Cloud::Domains::V1beta1::DeleteRegistrationRequest} or an equivalent Hash.
#
# @param request [::Google::Cloud::Domains::V1beta1::DeleteRegistrationRequest, ::Hash]
@@ -1333,10 +1527,20 @@
# RPC-specific configuration for `register_domain`
# @return [::Gapic::Config::Method]
#
attr_reader :register_domain
##
+ # RPC-specific configuration for `retrieve_transfer_parameters`
+ # @return [::Gapic::Config::Method]
+ #
+ attr_reader :retrieve_transfer_parameters
+ ##
+ # RPC-specific configuration for `transfer_domain`
+ # @return [::Gapic::Config::Method]
+ #
+ attr_reader :transfer_domain
+ ##
# RPC-specific configuration for `list_registrations`
# @return [::Gapic::Config::Method]
#
attr_reader :list_registrations
##
@@ -1391,9 +1595,13 @@
@search_domains = ::Gapic::Config::Method.new search_domains_config
retrieve_register_parameters_config = parent_rpcs.retrieve_register_parameters if parent_rpcs.respond_to? :retrieve_register_parameters
@retrieve_register_parameters = ::Gapic::Config::Method.new retrieve_register_parameters_config
register_domain_config = parent_rpcs.register_domain if parent_rpcs.respond_to? :register_domain
@register_domain = ::Gapic::Config::Method.new register_domain_config
+ retrieve_transfer_parameters_config = parent_rpcs.retrieve_transfer_parameters if parent_rpcs.respond_to? :retrieve_transfer_parameters
+ @retrieve_transfer_parameters = ::Gapic::Config::Method.new retrieve_transfer_parameters_config
+ transfer_domain_config = parent_rpcs.transfer_domain if parent_rpcs.respond_to? :transfer_domain
+ @transfer_domain = ::Gapic::Config::Method.new transfer_domain_config
list_registrations_config = parent_rpcs.list_registrations if parent_rpcs.respond_to? :list_registrations
@list_registrations = ::Gapic::Config::Method.new list_registrations_config
get_registration_config = parent_rpcs.get_registration if parent_rpcs.respond_to? :get_registration
@get_registration = ::Gapic::Config::Method.new get_registration_config
update_registration_config = parent_rpcs.update_registration if parent_rpcs.respond_to? :update_registration