Reference documentation and code samples for the Cloud Logging V2 API class Google::Cloud::Logging::V2::ConfigService::Client.
Client for the ConfigService service.
Service for configuring sinks used to route log entries.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the ConfigService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all ConfigService clients ::Google::Cloud::Logging::V2::ConfigService::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the ConfigService 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)
#copy_log_entries
def copy_log_entries(request, options = nil) -> ::Gapic::Operation
def copy_log_entries(name: nil, filter: nil, destination: nil) -> ::Gapic::Operation
Copies a set of log entries from a log bucket to a Cloud Storage bucket.
def copy_log_entries(request, options = nil) -> ::Gapic::Operation
copy_log_entries
via a request object, either of type
Google::Cloud::Logging::V2::CopyLogEntriesRequest or an equivalent Hash.
- request (::Google::Cloud::Logging::V2::CopyLogEntriesRequest, ::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 copy_log_entries(name: nil, filter: nil, destination: nil) -> ::Gapic::Operation
copy_log_entries
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. Log bucket from which to copy log entries.
For example:
"projects/my-project/locations/global/buckets/my-source-bucket"
- filter (::String) — Optional. A filter specifying which log entries to copy. The filter must be no more than 20k characters. An empty filter matches all log entries.
- destination (::String) — Required. Destination to which to copy log entries.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/logging/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Logging::V2::ConfigService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Logging::V2::CopyLogEntriesRequest.new # Call the copy_log_entries method. result = client.copy_log_entries request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#create_bucket
def create_bucket(request, options = nil) -> ::Google::Cloud::Logging::V2::LogBucket
def create_bucket(parent: nil, bucket_id: nil, bucket: nil) -> ::Google::Cloud::Logging::V2::LogBucket
Creates a log bucket that can be used to store log entries. After a bucket has been created, the bucket's location cannot be changed.
def create_bucket(request, options = nil) -> ::Google::Cloud::Logging::V2::LogBucket
create_bucket
via a request object, either of type
Google::Cloud::Logging::V2::CreateBucketRequest or an equivalent Hash.
- request (::Google::Cloud::Logging::V2::CreateBucketRequest, ::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_bucket(parent: nil, bucket_id: nil, bucket: nil) -> ::Google::Cloud::Logging::V2::LogBucket
create_bucket
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 in which to create the log bucket:
"projects/[PROJECT_ID]/locations/[LOCATION_ID]"
For example:
"projects/my-project/locations/global"
-
bucket_id (::String) — Required. A client-assigned identifier such as
"my-bucket"
. Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. - bucket (::Google::Cloud::Logging::V2::LogBucket, ::Hash) — Required. The new bucket. The region specified in the new bucket must be compliant with any Location Restriction Org Policy. The name field in the bucket is ignored.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Logging::V2::LogBucket)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/logging/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Logging::V2::ConfigService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Logging::V2::CreateBucketRequest.new # Call the create_bucket method. result = client.create_bucket request # The returned object is of type Google::Cloud::Logging::V2::LogBucket. p result
#create_exclusion
def create_exclusion(request, options = nil) -> ::Google::Cloud::Logging::V2::LogExclusion
def create_exclusion(parent: nil, exclusion: nil) -> ::Google::Cloud::Logging::V2::LogExclusion
Creates a new exclusion in the _Default sink in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource.
def create_exclusion(request, options = nil) -> ::Google::Cloud::Logging::V2::LogExclusion
create_exclusion
via a request object, either of type
Google::Cloud::Logging::V2::CreateExclusionRequest or an equivalent Hash.
- request (::Google::Cloud::Logging::V2::CreateExclusionRequest, ::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_exclusion(parent: nil, exclusion: nil) -> ::Google::Cloud::Logging::V2::LogExclusion
create_exclusion
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 parent resource in which to create the exclusion:
"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]"
For examples:
"projects/my-logging-project"
"organizations/123456789"
-
exclusion (::Google::Cloud::Logging::V2::LogExclusion, ::Hash) — Required. The new exclusion, whose
name
parameter is an exclusion name that is not already used in the parent resource.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Logging::V2::LogExclusion)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/logging/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Logging::V2::ConfigService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Logging::V2::CreateExclusionRequest.new # Call the create_exclusion method. result = client.create_exclusion request # The returned object is of type Google::Cloud::Logging::V2::LogExclusion. p result
#create_sink
def create_sink(request, options = nil) -> ::Google::Cloud::Logging::V2::LogSink
def create_sink(parent: nil, sink: nil, unique_writer_identity: nil) -> ::Google::Cloud::Logging::V2::LogSink
Creates a sink that exports specified log entries to a destination. The
export of newly-ingested log entries begins immediately, unless the sink's
writer_identity
is not permitted to write to the destination. A sink can
export log entries only from the resource owning the sink.
def create_sink(request, options = nil) -> ::Google::Cloud::Logging::V2::LogSink
create_sink
via a request object, either of type
Google::Cloud::Logging::V2::CreateSinkRequest or an equivalent Hash.
- request (::Google::Cloud::Logging::V2::CreateSinkRequest, ::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_sink(parent: nil, sink: nil, unique_writer_identity: nil) -> ::Google::Cloud::Logging::V2::LogSink
create_sink
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 in which to create the sink:
"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]"
For examples:
"projects/my-project"
"organizations/123456789"
-
sink (::Google::Cloud::Logging::V2::LogSink, ::Hash) — Required. The new sink, whose
name
parameter is a sink identifier that is not already in use. -
unique_writer_identity (::Boolean) — Optional. Determines the kind of IAM identity returned as
writer_identity
in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned aswriter_identity
is the same group or service account used by Cloud Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of
writer_identity
will be a unique service account used only for exports from the new sink. For more information, seewriter_identity
in LogSink.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Logging::V2::LogSink)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/logging/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Logging::V2::ConfigService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Logging::V2::CreateSinkRequest.new # Call the create_sink method. result = client.create_sink request # The returned object is of type Google::Cloud::Logging::V2::LogSink. p result
#create_view
def create_view(request, options = nil) -> ::Google::Cloud::Logging::V2::LogView
def create_view(parent: nil, view_id: nil, view: nil) -> ::Google::Cloud::Logging::V2::LogView
Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views.
def create_view(request, options = nil) -> ::Google::Cloud::Logging::V2::LogView
create_view
via a request object, either of type
Google::Cloud::Logging::V2::CreateViewRequest or an equivalent Hash.
- request (::Google::Cloud::Logging::V2::CreateViewRequest, ::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_view(parent: nil, view_id: nil, view: nil) -> ::Google::Cloud::Logging::V2::LogView
create_view
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 bucket in which to create the view
`"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"`
For example:
"projects/my-project/locations/global/buckets/my-bucket"
- view_id (::String) — Required. The id to use for this view.
- view (::Google::Cloud::Logging::V2::LogView, ::Hash) — Required. The new view.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Logging::V2::LogView)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/logging/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Logging::V2::ConfigService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Logging::V2::CreateViewRequest.new # Call the create_view method. result = client.create_view request # The returned object is of type Google::Cloud::Logging::V2::LogView. p result
#delete_bucket
def delete_bucket(request, options = nil) -> ::Google::Protobuf::Empty
def delete_bucket(name: nil) -> ::Google::Protobuf::Empty
Deletes a log bucket.
Changes the bucket's lifecycle_state
to the DELETE_REQUESTED
state.
After 7 days, the bucket will be purged and all log entries in the bucket
will be permanently deleted.
def delete_bucket(request, options = nil) -> ::Google::Protobuf::Empty
delete_bucket
via a request object, either of type
DeleteBucketRequest or an equivalent Hash.
- request (::Google::Cloud::Logging::V2::DeleteBucketRequest, ::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_bucket(name: nil) -> ::Google::Protobuf::Empty
delete_bucket
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 full resource name of the bucket to delete.
"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
For example:
"projects/my-project/locations/global/buckets/my-bucket"
- (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/logging/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Logging::V2::ConfigService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Logging::V2::DeleteBucketRequest.new # Call the delete_bucket method. result = client.delete_bucket request # The returned object is of type Google::Protobuf::Empty. p result
#delete_exclusion
def delete_exclusion(request, options = nil) -> ::Google::Protobuf::Empty
def delete_exclusion(name: nil) -> ::Google::Protobuf::Empty
Deletes an exclusion in the _Default sink.
def delete_exclusion(request, options = nil) -> ::Google::Protobuf::Empty
delete_exclusion
via a request object, either of type
DeleteExclusionRequest or an equivalent Hash.
- request (::Google::Cloud::Logging::V2::DeleteExclusionRequest, ::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_exclusion(name: nil) -> ::Google::Protobuf::Empty
delete_exclusion
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 an existing exclusion to delete:
"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]"
For example:
"projects/my-project/exclusions/my-exclusion"
- (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/logging/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Logging::V2::ConfigService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Logging::V2::DeleteExclusionRequest.new # Call the delete_exclusion method. result = client.delete_exclusion request # The returned object is of type Google::Protobuf::Empty. p result
#delete_sink
def delete_sink(request, options = nil) -> ::Google::Protobuf::Empty
def delete_sink(sink_name: nil) -> ::Google::Protobuf::Empty
Deletes a sink. If the sink has a unique writer_identity
, then that
service account is also deleted.
def delete_sink(request, options = nil) -> ::Google::Protobuf::Empty
delete_sink
via a request object, either of type
DeleteSinkRequest or an equivalent Hash.
- request (::Google::Cloud::Logging::V2::DeleteSinkRequest, ::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_sink(sink_name: nil) -> ::Google::Protobuf::Empty
delete_sink
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).
-
sink_name (::String) — Required. The full resource name of the sink to delete, including the parent
resource and the sink identifier:
"projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" "folders/[FOLDER_ID]/sinks/[SINK_ID]"
For example:
"projects/my-project/sinks/my-sink"
- (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/logging/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Logging::V2::ConfigService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Logging::V2::DeleteSinkRequest.new # Call the delete_sink method. result = client.delete_sink request # The returned object is of type Google::Protobuf::Empty. p result
#delete_view
def delete_view(request, options = nil) -> ::Google::Protobuf::Empty
def delete_view(name: nil) -> ::Google::Protobuf::Empty
Deletes a view on a log bucket.
If an UNAVAILABLE
error is returned, this indicates that system is not in
a state where it can delete the view. If this occurs, please try again in a
few minutes.
def delete_view(request, options = nil) -> ::Google::Protobuf::Empty
delete_view
via a request object, either of type
DeleteViewRequest or an equivalent Hash.
- request (::Google::Cloud::Logging::V2::DeleteViewRequest, ::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_view(name: nil) -> ::Google::Protobuf::Empty
delete_view
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 full resource name of the view to delete:
"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
For example:
"projects/my-project/locations/global/buckets/my-bucket/views/my-view"
- (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/logging/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Logging::V2::ConfigService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Logging::V2::DeleteViewRequest.new # Call the delete_view method. result = client.delete_view request # The returned object is of type Google::Protobuf::Empty. p result
#get_bucket
def get_bucket(request, options = nil) -> ::Google::Cloud::Logging::V2::LogBucket
def get_bucket(name: nil) -> ::Google::Cloud::Logging::V2::LogBucket
Gets a log bucket.
def get_bucket(request, options = nil) -> ::Google::Cloud::Logging::V2::LogBucket
get_bucket
via a request object, either of type
GetBucketRequest or an equivalent Hash.
- request (::Google::Cloud::Logging::V2::GetBucketRequest, ::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_bucket(name: nil) -> ::Google::Cloud::Logging::V2::LogBucket
get_bucket
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 bucket:
"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
For example:
"projects/my-project/locations/global/buckets/my-bucket"
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Logging::V2::LogBucket)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/logging/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Logging::V2::ConfigService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Logging::V2::GetBucketRequest.new # Call the get_bucket method. result = client.get_bucket request # The returned object is of type Google::Cloud::Logging::V2::LogBucket. p result
#get_cmek_settings
def get_cmek_settings(request, options = nil) -> ::Google::Cloud::Logging::V2::CmekSettings
def get_cmek_settings(name: nil) -> ::Google::Cloud::Logging::V2::CmekSettings
Gets the Logging CMEK settings for the given resource.
Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations and billing accounts. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization.
See Enabling CMEK for Log Router for more information.
def get_cmek_settings(request, options = nil) -> ::Google::Cloud::Logging::V2::CmekSettings
get_cmek_settings
via a request object, either of type
GetCmekSettingsRequest or an equivalent Hash.
- request (::Google::Cloud::Logging::V2::GetCmekSettingsRequest, ::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_cmek_settings(name: nil) -> ::Google::Cloud::Logging::V2::CmekSettings
get_cmek_settings
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 for which to retrieve CMEK settings.
"projects/[PROJECT_ID]/cmekSettings" "organizations/[ORGANIZATION_ID]/cmekSettings" "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" "folders/[FOLDER_ID]/cmekSettings"
For example:
"organizations/12345/cmekSettings"
Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations and billing accounts. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Logging::V2::CmekSettings)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/logging/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Logging::V2::ConfigService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Logging::V2::GetCmekSettingsRequest.new # Call the get_cmek_settings method. result = client.get_cmek_settings request # The returned object is of type Google::Cloud::Logging::V2::CmekSettings. p result
#get_exclusion
def get_exclusion(request, options = nil) -> ::Google::Cloud::Logging::V2::LogExclusion
def get_exclusion(name: nil) -> ::Google::Cloud::Logging::V2::LogExclusion
Gets the description of an exclusion in the _Default sink.
def get_exclusion(request, options = nil) -> ::Google::Cloud::Logging::V2::LogExclusion
get_exclusion
via a request object, either of type
GetExclusionRequest or an equivalent Hash.
- request (::Google::Cloud::Logging::V2::GetExclusionRequest, ::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_exclusion(name: nil) -> ::Google::Cloud::Logging::V2::LogExclusion
get_exclusion
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 an existing exclusion:
"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]"
For example:
"projects/my-project/exclusions/my-exclusion"
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Logging::V2::LogExclusion)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/logging/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Logging::V2::ConfigService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Logging::V2::GetExclusionRequest.new # Call the get_exclusion method. result = client.get_exclusion request # The returned object is of type Google::Cloud::Logging::V2::LogExclusion. p result
#get_settings
def get_settings(request, options = nil) -> ::Google::Cloud::Logging::V2::Settings
def get_settings(name: nil) -> ::Google::Cloud::Logging::V2::Settings
Gets the Log Router settings for the given resource.
Note: Settings for the Log Router can be get for Google Cloud projects, folders, organizations and billing accounts. Currently it can only be configured for organizations. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization.
See Enabling CMEK for Log Router for more information.
def get_settings(request, options = nil) -> ::Google::Cloud::Logging::V2::Settings
get_settings
via a request object, either of type
GetSettingsRequest or an equivalent Hash.
- request (::Google::Cloud::Logging::V2::GetSettingsRequest, ::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_settings(name: nil) -> ::Google::Cloud::Logging::V2::Settings
get_settings
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 for which to retrieve settings.
"projects/[PROJECT_ID]/settings" "organizations/[ORGANIZATION_ID]/settings" "billingAccounts/[BILLING_ACCOUNT_ID]/settings" "folders/[FOLDER_ID]/settings"
For example:
"organizations/12345/settings"
Note: Settings for the Log Router can be get for Google Cloud projects, folders, organizations and billing accounts. Currently it can only be configured for organizations. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Logging::V2::Settings)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/logging/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Logging::V2::ConfigService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Logging::V2::GetSettingsRequest.new # Call the get_settings method. result = client.get_settings request # The returned object is of type Google::Cloud::Logging::V2::Settings. p result
#get_sink
def get_sink(request, options = nil) -> ::Google::Cloud::Logging::V2::LogSink
def get_sink(sink_name: nil) -> ::Google::Cloud::Logging::V2::LogSink
Gets a sink.
def get_sink(request, options = nil) -> ::Google::Cloud::Logging::V2::LogSink
get_sink
via a request object, either of type
GetSinkRequest or an equivalent Hash.
- request (::Google::Cloud::Logging::V2::GetSinkRequest, ::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_sink(sink_name: nil) -> ::Google::Cloud::Logging::V2::LogSink
get_sink
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).
-
sink_name (::String) — Required. The resource name of the sink:
"projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" "folders/[FOLDER_ID]/sinks/[SINK_ID]"
For example:
"projects/my-project/sinks/my-sink"
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Logging::V2::LogSink)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/logging/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Logging::V2::ConfigService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Logging::V2::GetSinkRequest.new # Call the get_sink method. result = client.get_sink request # The returned object is of type Google::Cloud::Logging::V2::LogSink. p result
#get_view
def get_view(request, options = nil) -> ::Google::Cloud::Logging::V2::LogView
def get_view(name: nil) -> ::Google::Cloud::Logging::V2::LogView
Gets a view on a log bucket..
def get_view(request, options = nil) -> ::Google::Cloud::Logging::V2::LogView
get_view
via a request object, either of type
GetViewRequest or an equivalent Hash.
- request (::Google::Cloud::Logging::V2::GetViewRequest, ::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_view(name: nil) -> ::Google::Cloud::Logging::V2::LogView
get_view
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 policy:
"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
For example:
"projects/my-project/locations/global/buckets/my-bucket/views/my-view"
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Logging::V2::LogView)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/logging/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Logging::V2::ConfigService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Logging::V2::GetViewRequest.new # Call the get_view method. result = client.get_view request # The returned object is of type Google::Cloud::Logging::V2::LogView. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new ConfigService client object.
- (config) — Configure the ConfigService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Logging::V2::ConfigService::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Logging::V2::ConfigService::Client.new do |config| config.timeout = 10.0 end
#list_buckets
def list_buckets(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogBucket>
def list_buckets(parent: nil, page_token: nil, page_size: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogBucket>
Lists log buckets.
def list_buckets(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogBucket>
list_buckets
via a request object, either of type
ListBucketsRequest or an equivalent Hash.
- request (::Google::Cloud::Logging::V2::ListBucketsRequest, ::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_buckets(parent: nil, page_token: nil, page_size: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogBucket>
list_buckets
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 parent resource whose buckets are to be listed:
"projects/[PROJECT_ID]/locations/[LOCATION_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]"
Note: The locations portion of the resource must be specified, but supplying the character
-
in place of [LOCATION_ID] will return all buckets. -
page_token (::String) — Optional. If present, then retrieve the next batch of results from the preceding call
to this method.
pageToken
must be the value ofnextPageToken
from the previous response. The values of other method parameters should be identical to those in the previous call. -
page_size (::Integer) — Optional. The maximum number of results to return from this request. Non-positive
values are ignored. The presence of
nextPageToken
in the response indicates that more results might be available.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogBucket>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogBucket>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/logging/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Logging::V2::ConfigService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Logging::V2::ListBucketsRequest.new # Call the list_buckets method. result = client.list_buckets 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::Logging::V2::LogBucket. p response end
#list_exclusions
def list_exclusions(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogExclusion>
def list_exclusions(parent: nil, page_token: nil, page_size: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogExclusion>
Lists all the exclusions on the _Default sink in a parent resource.
def list_exclusions(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogExclusion>
list_exclusions
via a request object, either of type
ListExclusionsRequest or an equivalent Hash.
- request (::Google::Cloud::Logging::V2::ListExclusionsRequest, ::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_exclusions(parent: nil, page_token: nil, page_size: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogExclusion>
list_exclusions
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 parent resource whose exclusions are to be listed.
"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]"
-
page_token (::String) — Optional. If present, then retrieve the next batch of results from the
preceding call to this method.
pageToken
must be the value ofnextPageToken
from the previous response. The values of other method parameters should be identical to those in the previous call. -
page_size (::Integer) — Optional. The maximum number of results to return from this request.
Non-positive values are ignored. The presence of
nextPageToken
in the response indicates that more results might be available.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogExclusion>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogExclusion>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/logging/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Logging::V2::ConfigService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Logging::V2::ListExclusionsRequest.new # Call the list_exclusions method. result = client.list_exclusions 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::Logging::V2::LogExclusion. p response end
#list_sinks
def list_sinks(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogSink>
def list_sinks(parent: nil, page_token: nil, page_size: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogSink>
Lists sinks.
def list_sinks(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogSink>
list_sinks
via a request object, either of type
ListSinksRequest or an equivalent Hash.
- request (::Google::Cloud::Logging::V2::ListSinksRequest, ::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_sinks(parent: nil, page_token: nil, page_size: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogSink>
list_sinks
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 parent resource whose sinks are to be listed:
"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]"
-
page_token (::String) — Optional. If present, then retrieve the next batch of results from the
preceding call to this method.
pageToken
must be the value ofnextPageToken
from the previous response. The values of other method parameters should be identical to those in the previous call. -
page_size (::Integer) — Optional. The maximum number of results to return from this request.
Non-positive values are ignored. The presence of
nextPageToken
in the response indicates that more results might be available.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogSink>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogSink>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/logging/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Logging::V2::ConfigService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Logging::V2::ListSinksRequest.new # Call the list_sinks method. result = client.list_sinks 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::Logging::V2::LogSink. p response end
#list_views
def list_views(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogView>
def list_views(parent: nil, page_token: nil, page_size: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogView>
Lists views on a log bucket.
def list_views(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogView>
list_views
via a request object, either of type
ListViewsRequest or an equivalent Hash.
- request (::Google::Cloud::Logging::V2::ListViewsRequest, ::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_views(parent: nil, page_token: nil, page_size: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogView>
list_views
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 bucket whose views are to be listed:
"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
-
page_token (::String) — Optional. If present, then retrieve the next batch of results from the preceding call
to this method.
pageToken
must be the value ofnextPageToken
from the previous response. The values of other method parameters should be identical to those in the previous call. -
page_size (::Integer) — Optional. The maximum number of results to return from this request.
Non-positive values are ignored. The presence of
nextPageToken
in the response indicates that more results might be available.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogView>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::Logging::V2::LogView>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/logging/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Logging::V2::ConfigService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Logging::V2::ListViewsRequest.new # Call the list_views method. result = client.list_views 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::Logging::V2::LogView. p response end
#operations_client
def operations_client() -> ::Google::Cloud::Logging::V2::ConfigService::Operations
Get the associated client for long-running operations.
#undelete_bucket
def undelete_bucket(request, options = nil) -> ::Google::Protobuf::Empty
def undelete_bucket(name: nil) -> ::Google::Protobuf::Empty
Undeletes a log bucket. A bucket that has been deleted can be undeleted within the grace period of 7 days.
def undelete_bucket(request, options = nil) -> ::Google::Protobuf::Empty
undelete_bucket
via a request object, either of type
UndeleteBucketRequest or an equivalent Hash.
- request (::Google::Cloud::Logging::V2::UndeleteBucketRequest, ::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 undelete_bucket(name: nil) -> ::Google::Protobuf::Empty
undelete_bucket
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 full resource name of the bucket to undelete.
"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
For example:
"projects/my-project/locations/global/buckets/my-bucket"
- (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/logging/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Logging::V2::ConfigService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Logging::V2::UndeleteBucketRequest.new # Call the undelete_bucket method. result = client.undelete_bucket request # The returned object is of type Google::Protobuf::Empty. p result
#update_bucket
def update_bucket(request, options = nil) -> ::Google::Cloud::Logging::V2::LogBucket
def update_bucket(name: nil, bucket: nil, update_mask: nil) -> ::Google::Cloud::Logging::V2::LogBucket
Updates a log bucket. This method replaces the following fields in the
existing bucket with values from the new bucket: retention_period
If the retention period is decreased and the bucket is locked,
FAILED_PRECONDITION
will be returned.
If the bucket has a lifecycle_state
of DELETE_REQUESTED
, then
FAILED_PRECONDITION
will be returned.
After a bucket has been created, the bucket's location cannot be changed.
def update_bucket(request, options = nil) -> ::Google::Cloud::Logging::V2::LogBucket
update_bucket
via a request object, either of type
UpdateBucketRequest or an equivalent Hash.
- request (::Google::Cloud::Logging::V2::UpdateBucketRequest, ::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_bucket(name: nil, bucket: nil, update_mask: nil) -> ::Google::Cloud::Logging::V2::LogBucket
update_bucket
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 full resource name of the bucket to update.
"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
For example:
"projects/my-project/locations/global/buckets/my-bucket"
- bucket (::Google::Cloud::Logging::V2::LogBucket, ::Hash) — Required. The updated bucket.
-
update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. Field mask that specifies the fields in
bucket
that need an update. A bucket field will be overwritten if, and only if, it is in the update mask.name
and output only fields cannot be updated.For a detailed
FieldMask
definition, see: https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example:
updateMask=retention_days
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Logging::V2::LogBucket)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/logging/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Logging::V2::ConfigService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Logging::V2::UpdateBucketRequest.new # Call the update_bucket method. result = client.update_bucket request # The returned object is of type Google::Cloud::Logging::V2::LogBucket. p result
#update_cmek_settings
def update_cmek_settings(request, options = nil) -> ::Google::Cloud::Logging::V2::CmekSettings
def update_cmek_settings(name: nil, cmek_settings: nil, update_mask: nil) -> ::Google::Cloud::Logging::V2::CmekSettings
Updates the Log Router CMEK settings for the given resource.
Note: CMEK for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization.
UpdateCmekSettings
will fail if 1) kms_key_name
is invalid, or 2) the associated service
account does not have the required
roles/cloudkms.cryptoKeyEncrypterDecrypter
role assigned for the key, or
3) access to the key is disabled.
See Enabling CMEK for Log Router for more information.
def update_cmek_settings(request, options = nil) -> ::Google::Cloud::Logging::V2::CmekSettings
update_cmek_settings
via a request object, either of type
UpdateCmekSettingsRequest or an equivalent Hash.
- request (::Google::Cloud::Logging::V2::UpdateCmekSettingsRequest, ::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_cmek_settings(name: nil, cmek_settings: nil, update_mask: nil) -> ::Google::Cloud::Logging::V2::CmekSettings
update_cmek_settings
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 for the CMEK settings to update.
"projects/[PROJECT_ID]/cmekSettings" "organizations/[ORGANIZATION_ID]/cmekSettings" "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" "folders/[FOLDER_ID]/cmekSettings"
For example:
"organizations/12345/cmekSettings"
Note: CMEK for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization.
-
cmek_settings (::Google::Cloud::Logging::V2::CmekSettings, ::Hash) — Required. The CMEK settings to update.
See Enabling CMEK for Log Router for more information.
-
update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. Field mask identifying which fields from
cmek_settings
should be updated. A field will be overwritten if and only if it is in the update mask. Output only fields cannot be updated.See FieldMask for more information.
For example:
"updateMask=kmsKeyName"
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Logging::V2::CmekSettings)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/logging/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Logging::V2::ConfigService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Logging::V2::UpdateCmekSettingsRequest.new # Call the update_cmek_settings method. result = client.update_cmek_settings request # The returned object is of type Google::Cloud::Logging::V2::CmekSettings. p result
#update_exclusion
def update_exclusion(request, options = nil) -> ::Google::Cloud::Logging::V2::LogExclusion
def update_exclusion(name: nil, exclusion: nil, update_mask: nil) -> ::Google::Cloud::Logging::V2::LogExclusion
Changes one or more properties of an existing exclusion in the _Default sink.
def update_exclusion(request, options = nil) -> ::Google::Cloud::Logging::V2::LogExclusion
update_exclusion
via a request object, either of type
UpdateExclusionRequest or an equivalent Hash.
- request (::Google::Cloud::Logging::V2::UpdateExclusionRequest, ::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_exclusion(name: nil, exclusion: nil, update_mask: nil) -> ::Google::Cloud::Logging::V2::LogExclusion
update_exclusion
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 exclusion to update:
"projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]"
For example:
"projects/my-project/exclusions/my-exclusion"
-
exclusion (::Google::Cloud::Logging::V2::LogExclusion, ::Hash) — Required. New values for the existing exclusion. Only the fields specified in
update_mask
are relevant. -
update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. A non-empty list of fields to change in the existing exclusion. New values
for the fields are taken from the corresponding fields in the
LogExclusion included in this request. Fields not mentioned in
update_mask
are not changed and are ignored in the request.For example, to change the filter and description of an exclusion, specify an
update_mask
of"filter,description"
.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Logging::V2::LogExclusion)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/logging/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Logging::V2::ConfigService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Logging::V2::UpdateExclusionRequest.new # Call the update_exclusion method. result = client.update_exclusion request # The returned object is of type Google::Cloud::Logging::V2::LogExclusion. p result
#update_settings
def update_settings(request, options = nil) -> ::Google::Cloud::Logging::V2::Settings
def update_settings(name: nil, settings: nil, update_mask: nil) -> ::Google::Cloud::Logging::V2::Settings
Updates the Log Router settings for the given resource.
Note: Settings for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization.
UpdateSettings
will fail if 1) kms_key_name
is invalid, or 2) the associated service
account does not have the required
roles/cloudkms.cryptoKeyEncrypterDecrypter
role assigned for the key, or
3) access to the key is disabled. 4) location_id
is not supported by
Logging. 5) location_id
violate OrgPolicy.
See Enabling CMEK for Log Router for more information.
def update_settings(request, options = nil) -> ::Google::Cloud::Logging::V2::Settings
update_settings
via a request object, either of type
UpdateSettingsRequest or an equivalent Hash.
- request (::Google::Cloud::Logging::V2::UpdateSettingsRequest, ::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_settings(name: nil, settings: nil, update_mask: nil) -> ::Google::Cloud::Logging::V2::Settings
update_settings
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 for the settings to update.
"organizations/[ORGANIZATION_ID]/settings"
For example:
"organizations/12345/settings"
Note: Settings for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization.
-
settings (::Google::Cloud::Logging::V2::Settings, ::Hash) — Required. The settings to update.
See Enabling CMEK for Log Router for more information.
-
update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. Field mask identifying which fields from
settings
should be updated. A field will be overwritten if and only if it is in the update mask. Output only fields cannot be updated.See FieldMask for more information.
For example:
"updateMask=kmsKeyName"
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Logging::V2::Settings)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/logging/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Logging::V2::ConfigService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Logging::V2::UpdateSettingsRequest.new # Call the update_settings method. result = client.update_settings request # The returned object is of type Google::Cloud::Logging::V2::Settings. p result
#update_sink
def update_sink(request, options = nil) -> ::Google::Cloud::Logging::V2::LogSink
def update_sink(sink_name: nil, sink: nil, unique_writer_identity: nil, update_mask: nil) -> ::Google::Cloud::Logging::V2::LogSink
Updates a sink. This method replaces the following fields in the existing
sink with values from the new sink: destination
, and filter
.
The updated sink might also have a new writer_identity
; see the
unique_writer_identity
field.
def update_sink(request, options = nil) -> ::Google::Cloud::Logging::V2::LogSink
update_sink
via a request object, either of type
UpdateSinkRequest or an equivalent Hash.
- request (::Google::Cloud::Logging::V2::UpdateSinkRequest, ::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_sink(sink_name: nil, sink: nil, unique_writer_identity: nil, update_mask: nil) -> ::Google::Cloud::Logging::V2::LogSink
update_sink
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).
-
sink_name (::String) — Required. The full resource name of the sink to update, including the parent
resource and the sink identifier:
"projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" "folders/[FOLDER_ID]/sinks/[SINK_ID]"
For example:
"projects/my-project/sinks/my-sink"
-
sink (::Google::Cloud::Logging::V2::LogSink, ::Hash) — Required. The updated sink, whose name is the same identifier that appears as part
of
sink_name
. -
unique_writer_identity (::Boolean) —
Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of
writer_identity
in the updated sink depends on both the old and new values of this field:- If the old and new values of this field are both false or both true,
then there is no change to the sink's
writer_identity
. - If the old value is false and the new value is true, then
writer_identity
is changed to a unique service account. - It is an error if the old value is true and the new value is set to false or defaulted to false.
- If the old and new values of this field are both false or both true,
then there is no change to the sink's
-
update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. Field mask that specifies the fields in
sink
that need an update. A sink field will be overwritten if, and only if, it is in the update mask.name
and output only fields cannot be updated.An empty
updateMask
is temporarily treated as using the following mask for backwards compatibility purposes:destination,filter,includeChildren
At some point in the future, behavior will be removed and specifying an empty
updateMask
will be an error.For a detailed
FieldMask
definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example:
updateMask=filter
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Logging::V2::LogSink)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/logging/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Logging::V2::ConfigService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Logging::V2::UpdateSinkRequest.new # Call the update_sink method. result = client.update_sink request # The returned object is of type Google::Cloud::Logging::V2::LogSink. p result
#update_view
def update_view(request, options = nil) -> ::Google::Cloud::Logging::V2::LogView
def update_view(name: nil, view: nil, update_mask: nil) -> ::Google::Cloud::Logging::V2::LogView
Updates a view on a log bucket. This method replaces the following fields
in the existing view with values from the new view: filter
.
If an UNAVAILABLE
error is returned, this indicates that system is not in
a state where it can update the view. If this occurs, please try again in a
few minutes.
def update_view(request, options = nil) -> ::Google::Cloud::Logging::V2::LogView
update_view
via a request object, either of type
UpdateViewRequest or an equivalent Hash.
- request (::Google::Cloud::Logging::V2::UpdateViewRequest, ::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_view(name: nil, view: nil, update_mask: nil) -> ::Google::Cloud::Logging::V2::LogView
update_view
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 full resource name of the view to update
"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]"
For example:
"projects/my-project/locations/global/buckets/my-bucket/views/my-view"
- view (::Google::Cloud::Logging::V2::LogView, ::Hash) — Required. The updated view.
-
update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. Field mask that specifies the fields in
view
that need an update. A field will be overwritten if, and only if, it is in the update mask.name
and output only fields cannot be updated.For a detailed
FieldMask
definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example:
updateMask=filter
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Logging::V2::LogView)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/logging/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Logging::V2::ConfigService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Logging::V2::UpdateViewRequest.new # Call the update_view method. result = client.update_view request # The returned object is of type Google::Cloud::Logging::V2::LogView. p result