Reference documentation and code samples for the Dataplex V1 API class Google::Cloud::Dataplex::V1::ContentService::Client.
Client for the ContentService service.
ContentService manages Notebook and SQL Scripts for Dataplex.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the ContentService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all ContentService clients ::Google::Cloud::Dataplex::V1::ContentService::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the ContentService 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 Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#create_content
def create_content(request, options = nil) -> ::Google::Cloud::Dataplex::V1::Content
def create_content(parent: nil, content: nil, validate_only: nil) -> ::Google::Cloud::Dataplex::V1::Content
Create a content.
def create_content(request, options = nil) -> ::Google::Cloud::Dataplex::V1::Content
create_content
via a request object, either of type
Google::Cloud::Dataplex::V1::CreateContentRequest or an equivalent Hash.
- request (::Google::Cloud::Dataplex::V1::CreateContentRequest, ::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.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_content(parent: nil, content: nil, validate_only: nil) -> ::Google::Cloud::Dataplex::V1::Content
create_content
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).
- parent (::String) — Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}
- content (::Google::Cloud::Dataplex::V1::Content, ::Hash) — Required. Content resource.
- validate_only (::Boolean) — Optional. Only validate the request, but do not perform mutations. The default is false.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Dataplex::V1::Content)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/dataplex/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dataplex::V1::ContentService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dataplex::V1::CreateContentRequest.new # Call the create_content method. result = client.create_content request # The returned object is of type Google::Cloud::Dataplex::V1::Content. p result
#delete_content
def delete_content(request, options = nil) -> ::Google::Protobuf::Empty
def delete_content(name: nil) -> ::Google::Protobuf::Empty
Delete a content.
def delete_content(request, options = nil) -> ::Google::Protobuf::Empty
delete_content
via a request object, either of type
DeleteContentRequest or an equivalent Hash.
- request (::Google::Cloud::Dataplex::V1::DeleteContentRequest, ::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.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_content(name: nil) -> ::Google::Protobuf::Empty
delete_content
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).
- name (::String) — Required. The resource name of the content: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Protobuf::Empty)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/dataplex/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dataplex::V1::ContentService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dataplex::V1::DeleteContentRequest.new # Call the delete_content method. result = client.delete_content request # The returned object is of type Google::Protobuf::Empty. p result
#get_content
def get_content(request, options = nil) -> ::Google::Cloud::Dataplex::V1::Content
def get_content(name: nil, view: nil) -> ::Google::Cloud::Dataplex::V1::Content
Get a content resource.
def get_content(request, options = nil) -> ::Google::Cloud::Dataplex::V1::Content
get_content
via a request object, either of type
GetContentRequest or an equivalent Hash.
- request (::Google::Cloud::Dataplex::V1::GetContentRequest, ::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.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_content(name: nil, view: nil) -> ::Google::Cloud::Dataplex::V1::Content
get_content
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).
- name (::String) — Required. The resource name of the content: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}
- view (::Google::Cloud::Dataplex::V1::GetContentRequest::ContentView) — Optional. Specify content view to make a partial request.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Dataplex::V1::Content)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/dataplex/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dataplex::V1::ContentService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dataplex::V1::GetContentRequest.new # Call the get_content method. result = client.get_content request # The returned object is of type Google::Cloud::Dataplex::V1::Content. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new ContentService client object.
- (config) — Configure the ContentService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| config.timeout = 10.0 end
#list_content
def list_content(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Content>
def list_content(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Content>
List content.
def list_content(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Content>
list_content
via a request object, either of type
ListContentRequest or an equivalent Hash.
- request (::Google::Cloud::Dataplex::V1::ListContentRequest, ::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.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_content(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Content>
list_content
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).
- parent (::String) — Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}
- page_size (::Integer) — Optional. Maximum number of content to return. The service may return fewer than this value. If unspecified, at most 10 content will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
-
page_token (::String) — Optional. Page token received from a previous
ListContent
call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided toListContent
must match the call that provided the page token. -
filter (::String) — Optional. Filter request. Filters are case-sensitive.
The following formats are supported:
labels.key1 = "value1" labels:key1 type = "NOTEBOOK" type = "SQL_SCRIPT"
These restrictions can be coinjoined with AND, OR and NOT conjunctions.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Content>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Content>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/dataplex/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dataplex::V1::ContentService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dataplex::V1::ListContentRequest.new # Call the list_content method. result = client.list_content request # The returned object is of type Gapic::PagedEnumerable. You can # iterate over all elements by calling #each, and the enumerable # will lazily make API calls to fetch subsequent pages. Other # methods are also available for managing paging directly. result.each do |response| # Each element is of type ::Google::Cloud::Dataplex::V1::Content. p response end
#update_content
def update_content(request, options = nil) -> ::Google::Cloud::Dataplex::V1::Content
def update_content(update_mask: nil, content: nil, validate_only: nil) -> ::Google::Cloud::Dataplex::V1::Content
Update a content. Only supports full resource update.
def update_content(request, options = nil) -> ::Google::Cloud::Dataplex::V1::Content
update_content
via a request object, either of type
UpdateContentRequest or an equivalent Hash.
- request (::Google::Cloud::Dataplex::V1::UpdateContentRequest, ::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.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_content(update_mask: nil, content: nil, validate_only: nil) -> ::Google::Cloud::Dataplex::V1::Content
update_content
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).
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. Mask of fields to update.
-
content (::Google::Cloud::Dataplex::V1::Content, ::Hash) — Required. Update description.
Only fields specified in
update_mask
are updated. - validate_only (::Boolean) — Optional. Only validate the request, but do not perform mutations. The default is false.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Dataplex::V1::Content)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/dataplex/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dataplex::V1::ContentService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dataplex::V1::UpdateContentRequest.new # Call the update_content method. result = client.update_content request # The returned object is of type Google::Cloud::Dataplex::V1::Content. p result