google-cloud-metastore-v1beta 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3c112fd7a4662c8b7ef176f0dc799667a836497a5fd54ca1fe3a12d0f672c2ff
4
- data.tar.gz: abb5901dad9afd4261a7cd9e30dc057306b835ebc5afa4c16ea4ef8d8226d275
3
+ metadata.gz: 71a6f62650164a0f55c61c3e21ca77ee52fae49edd74e73ec7c2e3ddfe3cfc79
4
+ data.tar.gz: 7bc10fbf944b68f2fd3b211cb1cd1deb5426ec3ff9b272adba921d4682115416
5
5
  SHA512:
6
- metadata.gz: 47708800194a44571565d630a1f0bd685237711410ebe2eee4f95a25aea1df08b2870ec8c5a62ac99b766b4091a286d12f6116b2412382ee05c7f424ec5c7619
7
- data.tar.gz: 448467525f2ee1928a53ca6d977f9f945a5f9e949098aee0b228dd36f739a883c0a299ea3c98432bb5d47dee73ce758ecbb103e6ebb1695ffac182cce8943c26
6
+ metadata.gz: 95cc5e8407a0b7a719efd1e2d9862858c6d97b00291d52f6c57105cdd1e5dd97c49e77c42c867639a7aa4c9cc87bf07e902a5384533f0c7eba606bf3747cb028
7
+ data.tar.gz: 8f738642ae413e89a88acad7bc3aa1ac806b4111cfde56a0d739e2e540d338441496db4a1de6b4de05507a4fb1ec25ab32e733d6c3d27a4141046362aa728e00
data/AUTHENTICATION.md CHANGED
@@ -114,7 +114,7 @@ credentials are discovered.
114
114
  To configure your system for this, simply:
115
115
 
116
116
  1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
117
- 2. Authenticate using OAuth 2.0 `$ gcloud auth login`
117
+ 2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
118
118
  3. Write code as if already authenticated.
119
119
 
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
data/README.md CHANGED
@@ -46,7 +46,7 @@ for general usage information.
46
46
  ## Enabling Logging
47
47
 
48
48
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
49
+ The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
50
  or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
51
51
  that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
52
  and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
@@ -28,8 +28,8 @@ module Google
28
28
  # Client for the DataprocMetastore service.
29
29
  #
30
30
  # Configures and manages metastore services.
31
- # Metastore services are fully managed, highly available, auto-scaled,
32
- # auto-healing, OSS-native deployments of technical metadata management
31
+ # Metastore services are fully managed, highly available, autoscaled,
32
+ # autohealing, OSS-native deployments of technical metadata management
33
33
  # software. Each metastore service exposes a network endpoint through which
34
34
  # metadata queries are served. Metadata queries can originate from a variety
35
35
  # of sources, including Apache Hive, Apache Presto, and Apache Spark.
@@ -969,7 +969,7 @@ module Google
969
969
  # Required. The relative resource name of the service in which to create a
970
970
  # metastore import, in the following form:
971
971
  #
972
- # `projects/{project_number}/locations/{location_id}/services/{service_id}`
972
+ # `projects/{project_number}/locations/{location_id}/services/{service_id}`.
973
973
  # @param metadata_import_id [::String]
974
974
  # Required. The ID of the metadata import, which is used as the final
975
975
  # component of the metadata import's name.
@@ -1209,7 +1209,7 @@ module Google
1209
1209
  # Required. The relative resource name of the metastore service to run
1210
1210
  # export, in the following form:
1211
1211
  #
1212
- # `projects/{project_id}/locations/{location_id}/services/{service_id}`
1212
+ # `projects/{project_id}/locations/{location_id}/services/{service_id}`.
1213
1213
  # @param request_id [::String]
1214
1214
  # Optional. A request ID. Specify a unique request ID to allow the server to
1215
1215
  # ignore the request if it has completed. The server will ignore subsequent
@@ -1321,12 +1321,12 @@ module Google
1321
1321
  # Required. The relative resource name of the metastore service to run
1322
1322
  # restore, in the following form:
1323
1323
  #
1324
- # `projects/{project_id}/locations/{location_id}/services/{service_id}`
1324
+ # `projects/{project_id}/locations/{location_id}/services/{service_id}`.
1325
1325
  # @param backup [::String]
1326
1326
  # Required. The relative resource name of the metastore service backup to
1327
1327
  # restore from, in the following form:
1328
1328
  #
1329
- # `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
1329
+ # `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
1330
1330
  # @param restore_type [::Google::Cloud::Metastore::V1beta::Restore::RestoreType]
1331
1331
  # Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
1332
1332
  # @param request_id [::String]
@@ -1619,7 +1619,7 @@ module Google
1619
1619
  end
1620
1620
 
1621
1621
  ##
1622
- # Creates a new Backup in a given project and location.
1622
+ # Creates a new backup in a given project and location.
1623
1623
  #
1624
1624
  # @overload create_backup(request, options = nil)
1625
1625
  # Pass arguments to `create_backup` via a request object, either of type
@@ -1640,7 +1640,7 @@ module Google
1640
1640
  # Required. The relative resource name of the service in which to create a
1641
1641
  # backup of the following form:
1642
1642
  #
1643
- # `projects/{project_number}/locations/{location_id}/services/{service_id}`
1643
+ # `projects/{project_number}/locations/{location_id}/services/{service_id}`.
1644
1644
  # @param backup_id [::String]
1645
1645
  # Required. The ID of the backup, which is used as the final component of the
1646
1646
  # backup's name.
@@ -1846,6 +1846,409 @@ module Google
1846
1846
  raise ::Google::Cloud::Error.from_error(e)
1847
1847
  end
1848
1848
 
1849
+ ##
1850
+ # Removes the attached IAM policies for a resource
1851
+ #
1852
+ # @overload remove_iam_policy(request, options = nil)
1853
+ # Pass arguments to `remove_iam_policy` via a request object, either of type
1854
+ # {::Google::Cloud::Metastore::V1beta::RemoveIamPolicyRequest} or an equivalent Hash.
1855
+ #
1856
+ # @param request [::Google::Cloud::Metastore::V1beta::RemoveIamPolicyRequest, ::Hash]
1857
+ # A request object representing the call parameters. Required. To specify no
1858
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1859
+ # @param options [::Gapic::CallOptions, ::Hash]
1860
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1861
+ #
1862
+ # @overload remove_iam_policy(resource: nil, asynchronous: nil)
1863
+ # Pass arguments to `remove_iam_policy` via keyword arguments. Note that at
1864
+ # least one keyword argument is required. To specify no parameters, or to keep all
1865
+ # the default parameter values, pass an empty Hash as a request object (see above).
1866
+ #
1867
+ # @param resource [::String]
1868
+ # Required. The relative resource name of the dataplane resource to remove
1869
+ # IAM policy, in the following form:
1870
+ #
1871
+ # `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
1872
+ # or
1873
+ # `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
1874
+ # @param asynchronous [::Boolean]
1875
+ # Optional. Removes IAM policy attached to database or table asynchronously
1876
+ # when it is set. The default is false.
1877
+ #
1878
+ # @yield [response, operation] Access the result along with the RPC operation
1879
+ # @yieldparam response [::Google::Cloud::Metastore::V1beta::RemoveIamPolicyResponse]
1880
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1881
+ #
1882
+ # @return [::Google::Cloud::Metastore::V1beta::RemoveIamPolicyResponse]
1883
+ #
1884
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1885
+ #
1886
+ # @example Basic example
1887
+ # require "google/cloud/metastore/v1beta"
1888
+ #
1889
+ # # Create a client object. The client can be reused for multiple calls.
1890
+ # client = Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new
1891
+ #
1892
+ # # Create a request. To set request fields, pass in keyword arguments.
1893
+ # request = Google::Cloud::Metastore::V1beta::RemoveIamPolicyRequest.new
1894
+ #
1895
+ # # Call the remove_iam_policy method.
1896
+ # result = client.remove_iam_policy request
1897
+ #
1898
+ # # The returned object is of type Google::Cloud::Metastore::V1beta::RemoveIamPolicyResponse.
1899
+ # p result
1900
+ #
1901
+ def remove_iam_policy request, options = nil
1902
+ raise ::ArgumentError, "request must be provided" if request.nil?
1903
+
1904
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Metastore::V1beta::RemoveIamPolicyRequest
1905
+
1906
+ # Converts hash and nil to an options object
1907
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1908
+
1909
+ # Customize the options with defaults
1910
+ metadata = @config.rpcs.remove_iam_policy.metadata.to_h
1911
+
1912
+ # Set x-goog-api-client and x-goog-user-project headers
1913
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1914
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1915
+ gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
1916
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1917
+
1918
+ header_params = {}
1919
+ if request.resource
1920
+ header_params["resource"] = request.resource
1921
+ end
1922
+
1923
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1924
+ metadata[:"x-goog-request-params"] ||= request_params_header
1925
+
1926
+ options.apply_defaults timeout: @config.rpcs.remove_iam_policy.timeout,
1927
+ metadata: metadata,
1928
+ retry_policy: @config.rpcs.remove_iam_policy.retry_policy
1929
+
1930
+ options.apply_defaults timeout: @config.timeout,
1931
+ metadata: @config.metadata,
1932
+ retry_policy: @config.retry_policy
1933
+
1934
+ @dataproc_metastore_stub.call_rpc :remove_iam_policy, request, options: options do |response, operation|
1935
+ yield response, operation if block_given?
1936
+ return response
1937
+ end
1938
+ rescue ::GRPC::BadStatus => e
1939
+ raise ::Google::Cloud::Error.from_error(e)
1940
+ end
1941
+
1942
+ ##
1943
+ # Query DPMS metadata.
1944
+ #
1945
+ # @overload query_metadata(request, options = nil)
1946
+ # Pass arguments to `query_metadata` via a request object, either of type
1947
+ # {::Google::Cloud::Metastore::V1beta::QueryMetadataRequest} or an equivalent Hash.
1948
+ #
1949
+ # @param request [::Google::Cloud::Metastore::V1beta::QueryMetadataRequest, ::Hash]
1950
+ # A request object representing the call parameters. Required. To specify no
1951
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1952
+ # @param options [::Gapic::CallOptions, ::Hash]
1953
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1954
+ #
1955
+ # @overload query_metadata(service: nil, query: nil)
1956
+ # Pass arguments to `query_metadata` via keyword arguments. Note that at
1957
+ # least one keyword argument is required. To specify no parameters, or to keep all
1958
+ # the default parameter values, pass an empty Hash as a request object (see above).
1959
+ #
1960
+ # @param service [::String]
1961
+ # Required. The relative resource name of the metastore service to query
1962
+ # metadata, in the following format:
1963
+ #
1964
+ # `projects/{project_id}/locations/{location_id}/services/{service_id}`.
1965
+ # @param query [::String]
1966
+ # Required. A read-only SQL query to execute against the metadata database.
1967
+ # The query cannot change or mutate the data.
1968
+ #
1969
+ # @yield [response, operation] Access the result along with the RPC operation
1970
+ # @yieldparam response [::Gapic::Operation]
1971
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1972
+ #
1973
+ # @return [::Gapic::Operation]
1974
+ #
1975
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1976
+ #
1977
+ # @example Basic example
1978
+ # require "google/cloud/metastore/v1beta"
1979
+ #
1980
+ # # Create a client object. The client can be reused for multiple calls.
1981
+ # client = Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new
1982
+ #
1983
+ # # Create a request. To set request fields, pass in keyword arguments.
1984
+ # request = Google::Cloud::Metastore::V1beta::QueryMetadataRequest.new
1985
+ #
1986
+ # # Call the query_metadata method.
1987
+ # result = client.query_metadata request
1988
+ #
1989
+ # # The returned object is of type Gapic::Operation. You can use this
1990
+ # # object to check the status of an operation, cancel it, or wait
1991
+ # # for results. Here is how to block until completion:
1992
+ # result.wait_until_done! timeout: 60
1993
+ # if result.response?
1994
+ # p result.response
1995
+ # else
1996
+ # puts "Error!"
1997
+ # end
1998
+ #
1999
+ def query_metadata request, options = nil
2000
+ raise ::ArgumentError, "request must be provided" if request.nil?
2001
+
2002
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Metastore::V1beta::QueryMetadataRequest
2003
+
2004
+ # Converts hash and nil to an options object
2005
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2006
+
2007
+ # Customize the options with defaults
2008
+ metadata = @config.rpcs.query_metadata.metadata.to_h
2009
+
2010
+ # Set x-goog-api-client and x-goog-user-project headers
2011
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2012
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2013
+ gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
2014
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2015
+
2016
+ header_params = {}
2017
+ if request.service
2018
+ header_params["service"] = request.service
2019
+ end
2020
+
2021
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2022
+ metadata[:"x-goog-request-params"] ||= request_params_header
2023
+
2024
+ options.apply_defaults timeout: @config.rpcs.query_metadata.timeout,
2025
+ metadata: metadata,
2026
+ retry_policy: @config.rpcs.query_metadata.retry_policy
2027
+
2028
+ options.apply_defaults timeout: @config.timeout,
2029
+ metadata: @config.metadata,
2030
+ retry_policy: @config.retry_policy
2031
+
2032
+ @dataproc_metastore_stub.call_rpc :query_metadata, request, options: options do |response, operation|
2033
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2034
+ yield response, operation if block_given?
2035
+ return response
2036
+ end
2037
+ rescue ::GRPC::BadStatus => e
2038
+ raise ::Google::Cloud::Error.from_error(e)
2039
+ end
2040
+
2041
+ ##
2042
+ # Move a table to another database.
2043
+ #
2044
+ # @overload move_table_to_database(request, options = nil)
2045
+ # Pass arguments to `move_table_to_database` via a request object, either of type
2046
+ # {::Google::Cloud::Metastore::V1beta::MoveTableToDatabaseRequest} or an equivalent Hash.
2047
+ #
2048
+ # @param request [::Google::Cloud::Metastore::V1beta::MoveTableToDatabaseRequest, ::Hash]
2049
+ # A request object representing the call parameters. Required. To specify no
2050
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2051
+ # @param options [::Gapic::CallOptions, ::Hash]
2052
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2053
+ #
2054
+ # @overload move_table_to_database(service: nil, table_name: nil, db_name: nil, destination_db_name: nil)
2055
+ # Pass arguments to `move_table_to_database` via keyword arguments. Note that at
2056
+ # least one keyword argument is required. To specify no parameters, or to keep all
2057
+ # the default parameter values, pass an empty Hash as a request object (see above).
2058
+ #
2059
+ # @param service [::String]
2060
+ # Required. The relative resource name of the metastore service to mutate
2061
+ # metadata, in the following format:
2062
+ #
2063
+ # `projects/{project_id}/locations/{location_id}/services/{service_id}`.
2064
+ # @param table_name [::String]
2065
+ # Required. The name of the table to be moved.
2066
+ # @param db_name [::String]
2067
+ # Required. The name of the database where the table resides.
2068
+ # @param destination_db_name [::String]
2069
+ # Required. The name of the database where the table should be moved.
2070
+ #
2071
+ # @yield [response, operation] Access the result along with the RPC operation
2072
+ # @yieldparam response [::Gapic::Operation]
2073
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2074
+ #
2075
+ # @return [::Gapic::Operation]
2076
+ #
2077
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2078
+ #
2079
+ # @example Basic example
2080
+ # require "google/cloud/metastore/v1beta"
2081
+ #
2082
+ # # Create a client object. The client can be reused for multiple calls.
2083
+ # client = Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new
2084
+ #
2085
+ # # Create a request. To set request fields, pass in keyword arguments.
2086
+ # request = Google::Cloud::Metastore::V1beta::MoveTableToDatabaseRequest.new
2087
+ #
2088
+ # # Call the move_table_to_database method.
2089
+ # result = client.move_table_to_database request
2090
+ #
2091
+ # # The returned object is of type Gapic::Operation. You can use this
2092
+ # # object to check the status of an operation, cancel it, or wait
2093
+ # # for results. Here is how to block until completion:
2094
+ # result.wait_until_done! timeout: 60
2095
+ # if result.response?
2096
+ # p result.response
2097
+ # else
2098
+ # puts "Error!"
2099
+ # end
2100
+ #
2101
+ def move_table_to_database request, options = nil
2102
+ raise ::ArgumentError, "request must be provided" if request.nil?
2103
+
2104
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Metastore::V1beta::MoveTableToDatabaseRequest
2105
+
2106
+ # Converts hash and nil to an options object
2107
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2108
+
2109
+ # Customize the options with defaults
2110
+ metadata = @config.rpcs.move_table_to_database.metadata.to_h
2111
+
2112
+ # Set x-goog-api-client and x-goog-user-project headers
2113
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2114
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2115
+ gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
2116
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2117
+
2118
+ header_params = {}
2119
+ if request.service
2120
+ header_params["service"] = request.service
2121
+ end
2122
+
2123
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2124
+ metadata[:"x-goog-request-params"] ||= request_params_header
2125
+
2126
+ options.apply_defaults timeout: @config.rpcs.move_table_to_database.timeout,
2127
+ metadata: metadata,
2128
+ retry_policy: @config.rpcs.move_table_to_database.retry_policy
2129
+
2130
+ options.apply_defaults timeout: @config.timeout,
2131
+ metadata: @config.metadata,
2132
+ retry_policy: @config.retry_policy
2133
+
2134
+ @dataproc_metastore_stub.call_rpc :move_table_to_database, request, options: options do |response, operation|
2135
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2136
+ yield response, operation if block_given?
2137
+ return response
2138
+ end
2139
+ rescue ::GRPC::BadStatus => e
2140
+ raise ::Google::Cloud::Error.from_error(e)
2141
+ end
2142
+
2143
+ ##
2144
+ # Alter metadata resource location. The metadata resource can be a database,
2145
+ # table, or partition. This functionality only updates the parent directory
2146
+ # for the respective metadata resource and does not transfer any existing
2147
+ # data to the new location.
2148
+ #
2149
+ # @overload alter_metadata_resource_location(request, options = nil)
2150
+ # Pass arguments to `alter_metadata_resource_location` via a request object, either of type
2151
+ # {::Google::Cloud::Metastore::V1beta::AlterMetadataResourceLocationRequest} or an equivalent Hash.
2152
+ #
2153
+ # @param request [::Google::Cloud::Metastore::V1beta::AlterMetadataResourceLocationRequest, ::Hash]
2154
+ # A request object representing the call parameters. Required. To specify no
2155
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2156
+ # @param options [::Gapic::CallOptions, ::Hash]
2157
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2158
+ #
2159
+ # @overload alter_metadata_resource_location(service: nil, resource_name: nil, location_uri: nil)
2160
+ # Pass arguments to `alter_metadata_resource_location` via keyword arguments. Note that at
2161
+ # least one keyword argument is required. To specify no parameters, or to keep all
2162
+ # the default parameter values, pass an empty Hash as a request object (see above).
2163
+ #
2164
+ # @param service [::String]
2165
+ # Required. The relative resource name of the metastore service to mutate
2166
+ # metadata, in the following format:
2167
+ #
2168
+ # `projects/{project_id}/locations/{location_id}/services/{service_id}`.
2169
+ # @param resource_name [::String]
2170
+ # Required. The relative metadata resource name in the following format.
2171
+ #
2172
+ # `databases/{database_id}`
2173
+ # or
2174
+ # `databases/{database_id}/tables/{table_id}`
2175
+ # or
2176
+ # `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
2177
+ # @param location_uri [::String]
2178
+ # Required. The new location URI for the metadata resource.
2179
+ #
2180
+ # @yield [response, operation] Access the result along with the RPC operation
2181
+ # @yieldparam response [::Gapic::Operation]
2182
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2183
+ #
2184
+ # @return [::Gapic::Operation]
2185
+ #
2186
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2187
+ #
2188
+ # @example Basic example
2189
+ # require "google/cloud/metastore/v1beta"
2190
+ #
2191
+ # # Create a client object. The client can be reused for multiple calls.
2192
+ # client = Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new
2193
+ #
2194
+ # # Create a request. To set request fields, pass in keyword arguments.
2195
+ # request = Google::Cloud::Metastore::V1beta::AlterMetadataResourceLocationRequest.new
2196
+ #
2197
+ # # Call the alter_metadata_resource_location method.
2198
+ # result = client.alter_metadata_resource_location request
2199
+ #
2200
+ # # The returned object is of type Gapic::Operation. You can use this
2201
+ # # object to check the status of an operation, cancel it, or wait
2202
+ # # for results. Here is how to block until completion:
2203
+ # result.wait_until_done! timeout: 60
2204
+ # if result.response?
2205
+ # p result.response
2206
+ # else
2207
+ # puts "Error!"
2208
+ # end
2209
+ #
2210
+ def alter_metadata_resource_location request, options = nil
2211
+ raise ::ArgumentError, "request must be provided" if request.nil?
2212
+
2213
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Metastore::V1beta::AlterMetadataResourceLocationRequest
2214
+
2215
+ # Converts hash and nil to an options object
2216
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2217
+
2218
+ # Customize the options with defaults
2219
+ metadata = @config.rpcs.alter_metadata_resource_location.metadata.to_h
2220
+
2221
+ # Set x-goog-api-client and x-goog-user-project headers
2222
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2223
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2224
+ gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
2225
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2226
+
2227
+ header_params = {}
2228
+ if request.service
2229
+ header_params["service"] = request.service
2230
+ end
2231
+
2232
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2233
+ metadata[:"x-goog-request-params"] ||= request_params_header
2234
+
2235
+ options.apply_defaults timeout: @config.rpcs.alter_metadata_resource_location.timeout,
2236
+ metadata: metadata,
2237
+ retry_policy: @config.rpcs.alter_metadata_resource_location.retry_policy
2238
+
2239
+ options.apply_defaults timeout: @config.timeout,
2240
+ metadata: @config.metadata,
2241
+ retry_policy: @config.retry_policy
2242
+
2243
+ @dataproc_metastore_stub.call_rpc :alter_metadata_resource_location, request, options: options do |response, operation|
2244
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2245
+ yield response, operation if block_given?
2246
+ return response
2247
+ end
2248
+ rescue ::GRPC::BadStatus => e
2249
+ raise ::Google::Cloud::Error.from_error(e)
2250
+ end
2251
+
1849
2252
  ##
1850
2253
  # Configuration class for the DataprocMetastore API.
1851
2254
  #
@@ -2056,6 +2459,26 @@ module Google
2056
2459
  # @return [::Gapic::Config::Method]
2057
2460
  #
2058
2461
  attr_reader :delete_backup
2462
+ ##
2463
+ # RPC-specific configuration for `remove_iam_policy`
2464
+ # @return [::Gapic::Config::Method]
2465
+ #
2466
+ attr_reader :remove_iam_policy
2467
+ ##
2468
+ # RPC-specific configuration for `query_metadata`
2469
+ # @return [::Gapic::Config::Method]
2470
+ #
2471
+ attr_reader :query_metadata
2472
+ ##
2473
+ # RPC-specific configuration for `move_table_to_database`
2474
+ # @return [::Gapic::Config::Method]
2475
+ #
2476
+ attr_reader :move_table_to_database
2477
+ ##
2478
+ # RPC-specific configuration for `alter_metadata_resource_location`
2479
+ # @return [::Gapic::Config::Method]
2480
+ #
2481
+ attr_reader :alter_metadata_resource_location
2059
2482
 
2060
2483
  # @private
2061
2484
  def initialize parent_rpcs = nil
@@ -2089,6 +2512,14 @@ module Google
2089
2512
  @create_backup = ::Gapic::Config::Method.new create_backup_config
2090
2513
  delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup
2091
2514
  @delete_backup = ::Gapic::Config::Method.new delete_backup_config
2515
+ remove_iam_policy_config = parent_rpcs.remove_iam_policy if parent_rpcs.respond_to? :remove_iam_policy
2516
+ @remove_iam_policy = ::Gapic::Config::Method.new remove_iam_policy_config
2517
+ query_metadata_config = parent_rpcs.query_metadata if parent_rpcs.respond_to? :query_metadata
2518
+ @query_metadata = ::Gapic::Config::Method.new query_metadata_config
2519
+ move_table_to_database_config = parent_rpcs.move_table_to_database if parent_rpcs.respond_to? :move_table_to_database
2520
+ @move_table_to_database = ::Gapic::Config::Method.new move_table_to_database_config
2521
+ alter_metadata_resource_location_config = parent_rpcs.alter_metadata_resource_location if parent_rpcs.respond_to? :alter_metadata_resource_location
2522
+ @alter_metadata_resource_location = ::Gapic::Config::Method.new alter_metadata_resource_location_config
2092
2523
 
2093
2524
  yield self if block_given?
2094
2525
  end
@@ -45,6 +45,25 @@ module Google
45
45
  "projects/#{project}/locations/#{location}/services/#{service}/backups/#{backup}"
46
46
  end
47
47
 
48
+ ##
49
+ # Create a fully-qualified Lake resource string.
50
+ #
51
+ # The resource will be in the following format:
52
+ #
53
+ # `projects/{project}/locations/{location}/lakes/{lake}`
54
+ #
55
+ # @param project [String]
56
+ # @param location [String]
57
+ # @param lake [String]
58
+ #
59
+ # @return [::String]
60
+ def lake_path project:, location:, lake:
61
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
62
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
63
+
64
+ "projects/#{project}/locations/#{location}/lakes/#{lake}"
65
+ end
66
+
48
67
  ##
49
68
  # Create a fully-qualified Location resource string.
50
69
  #
@@ -119,6 +138,25 @@ module Google
119
138
  "projects/#{project}/locations/#{location}/services/#{service}"
120
139
  end
121
140
 
141
+ ##
142
+ # Create a fully-qualified Subnetwork resource string.
143
+ #
144
+ # The resource will be in the following format:
145
+ #
146
+ # `projects/{project}/regions/{region}/subnetworks/{subnetwork}`
147
+ #
148
+ # @param project [String]
149
+ # @param region [String]
150
+ # @param subnetwork [String]
151
+ #
152
+ # @return [::String]
153
+ def subnetwork_path project:, region:, subnetwork:
154
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
155
+ raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/"
156
+
157
+ "projects/#{project}/regions/#{region}/subnetworks/#{subnetwork}"
158
+ end
159
+
122
160
  extend self
123
161
  end
124
162
  end
@@ -33,8 +33,8 @@ module Google
33
33
  module V1beta
34
34
  ##
35
35
  # Configures and manages metastore services.
36
- # Metastore services are fully managed, highly available, auto-scaled,
37
- # auto-healing, OSS-native deployments of technical metadata management
36
+ # Metastore services are fully managed, highly available, autoscaled,
37
+ # autohealing, OSS-native deployments of technical metadata management
38
38
  # software. Each metastore service exposes a network endpoint through which
39
39
  # metadata queries are served. Metadata queries can originate from a variety
40
40
  # of sources, including Apache Hive, Apache Presto, and Apache Spark.
@@ -50,7 +50,7 @@ module Google
50
50
  #
51
51
  # `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
52
52
  #
53
- # To load this service and instantiate a client:
53
+ # @example Load this service and instantiate a gRPC client
54
54
  #
55
55
  # require "google/cloud/metastore/v1beta/dataproc_metastore"
56
56
  # client = ::Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new