Reference documentation and code samples for the Storage Insights V1 API class Google::Cloud::StorageInsights::V1::StorageInsights::Rest::Client.
REST client for the StorageInsights service.
Service describing handlers for resources
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the StorageInsights Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all StorageInsights clients ::Google::Cloud::StorageInsights::V1::StorageInsights::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the StorageInsights 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_report_config
def create_report_config(request, options = nil) -> ::Google::Cloud::StorageInsights::V1::ReportConfig
def create_report_config(parent: nil, report_config: nil, request_id: nil) -> ::Google::Cloud::StorageInsights::V1::ReportConfig
Creates a new ReportConfig in a given project and location.
def create_report_config(request, options = nil) -> ::Google::Cloud::StorageInsights::V1::ReportConfig
create_report_config
via a request object, either of type
CreateReportConfigRequest or an equivalent Hash.
- request (::Google::Cloud::StorageInsights::V1::CreateReportConfigRequest, ::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_report_config(parent: nil, report_config: nil, request_id: nil) -> ::Google::Cloud::StorageInsights::V1::ReportConfig
create_report_config
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. Value for parent.
- report_config (::Google::Cloud::StorageInsights::V1::ReportConfig, ::Hash) — Required. The resource being created
-
request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique
request ID so that if you must retry your request, the server will know to
ignore the request if it has already been completed. The server will
guarantee that for at least 60 minutes since the first request.
For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::StorageInsights::V1::ReportConfig)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/storage_insights/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::StorageInsights::V1::StorageInsights::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::StorageInsights::V1::CreateReportConfigRequest.new # Call the create_report_config method. result = client.create_report_config request # The returned object is of type Google::Cloud::StorageInsights::V1::ReportConfig. p result
#delete_report_config
def delete_report_config(request, options = nil) -> ::Google::Protobuf::Empty
def delete_report_config(name: nil, force: nil, request_id: nil) -> ::Google::Protobuf::Empty
Deletes a single ReportConfig.
def delete_report_config(request, options = nil) -> ::Google::Protobuf::Empty
delete_report_config
via a request object, either of type
DeleteReportConfigRequest or an equivalent Hash.
- request (::Google::Cloud::StorageInsights::V1::DeleteReportConfigRequest, ::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_report_config(name: nil, force: nil, request_id: nil) -> ::Google::Protobuf::Empty
delete_report_config
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. Name of the resource
- force (::Boolean) — Optional. If set, all ReportDetails for this ReportConfig will be deleted.
-
request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique
request ID so that if you must retry your request, the server will know to
ignore the request if it has already been completed. The server will
guarantee that for at least 60 minutes after the first request.
For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/storage_insights/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::StorageInsights::V1::StorageInsights::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::StorageInsights::V1::DeleteReportConfigRequest.new # Call the delete_report_config method. result = client.delete_report_config request # The returned object is of type Google::Protobuf::Empty. p result
#get_report_config
def get_report_config(request, options = nil) -> ::Google::Cloud::StorageInsights::V1::ReportConfig
def get_report_config(name: nil) -> ::Google::Cloud::StorageInsights::V1::ReportConfig
Gets details of a single ReportConfig.
def get_report_config(request, options = nil) -> ::Google::Cloud::StorageInsights::V1::ReportConfig
get_report_config
via a request object, either of type
GetReportConfigRequest or an equivalent Hash.
- request (::Google::Cloud::StorageInsights::V1::GetReportConfigRequest, ::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_report_config(name: nil) -> ::Google::Cloud::StorageInsights::V1::ReportConfig
get_report_config
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. Name of the resource
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::StorageInsights::V1::ReportConfig)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/storage_insights/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::StorageInsights::V1::StorageInsights::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::StorageInsights::V1::GetReportConfigRequest.new # Call the get_report_config method. result = client.get_report_config request # The returned object is of type Google::Cloud::StorageInsights::V1::ReportConfig. p result
#get_report_detail
def get_report_detail(request, options = nil) -> ::Google::Cloud::StorageInsights::V1::ReportDetail
def get_report_detail(name: nil) -> ::Google::Cloud::StorageInsights::V1::ReportDetail
Gets details of a single ReportDetail.
def get_report_detail(request, options = nil) -> ::Google::Cloud::StorageInsights::V1::ReportDetail
get_report_detail
via a request object, either of type
GetReportDetailRequest or an equivalent Hash.
- request (::Google::Cloud::StorageInsights::V1::GetReportDetailRequest, ::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_report_detail(name: nil) -> ::Google::Cloud::StorageInsights::V1::ReportDetail
get_report_detail
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. Name of the resource
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::StorageInsights::V1::ReportDetail)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/storage_insights/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::StorageInsights::V1::StorageInsights::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::StorageInsights::V1::GetReportDetailRequest.new # Call the get_report_detail method. result = client.get_report_detail request # The returned object is of type Google::Cloud::StorageInsights::V1::ReportDetail. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new StorageInsights REST client object.
- (config) — Configure the StorageInsights client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::StorageInsights::V1::StorageInsights::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::StorageInsights::V1::StorageInsights::Rest::Client.new do |config| config.timeout = 10.0 end
#list_report_configs
def list_report_configs(request, options = nil) -> ::Google::Cloud::StorageInsights::V1::ListReportConfigsResponse
def list_report_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::StorageInsights::V1::ListReportConfigsResponse
Lists ReportConfigs in a given project and location.
def list_report_configs(request, options = nil) -> ::Google::Cloud::StorageInsights::V1::ListReportConfigsResponse
list_report_configs
via a request object, either of type
ListReportConfigsRequest or an equivalent Hash.
- request (::Google::Cloud::StorageInsights::V1::ListReportConfigsRequest, ::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_report_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::StorageInsights::V1::ListReportConfigsResponse
list_report_configs
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. Parent value for ListReportConfigsRequest
- page_size (::Integer) — Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
- page_token (::String) — A token identifying a page of results the server should return.
- filter (::String) — Filtering results
- order_by (::String) — Hint for how to order the results
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::StorageInsights::V1::ListReportConfigsResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/storage_insights/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::StorageInsights::V1::StorageInsights::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::StorageInsights::V1::ListReportConfigsRequest.new # Call the list_report_configs method. result = client.list_report_configs request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::StorageInsights::V1::ReportConfig. p item end
#list_report_details
def list_report_details(request, options = nil) -> ::Google::Cloud::StorageInsights::V1::ListReportDetailsResponse
def list_report_details(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::StorageInsights::V1::ListReportDetailsResponse
Lists ReportDetails in a given project and location.
def list_report_details(request, options = nil) -> ::Google::Cloud::StorageInsights::V1::ListReportDetailsResponse
list_report_details
via a request object, either of type
ListReportDetailsRequest or an equivalent Hash.
- request (::Google::Cloud::StorageInsights::V1::ListReportDetailsRequest, ::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_report_details(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::StorageInsights::V1::ListReportDetailsResponse
list_report_details
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. Parent value for ListReportDetailsRequest
- page_size (::Integer) — Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
- page_token (::String) — A token identifying a page of results the server should return.
- filter (::String) — Filtering results
- order_by (::String) — Hint for how to order the results
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::StorageInsights::V1::ListReportDetailsResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/storage_insights/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::StorageInsights::V1::StorageInsights::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::StorageInsights::V1::ListReportDetailsRequest.new # Call the list_report_details method. result = client.list_report_details request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::StorageInsights::V1::ReportDetail. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Rest::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#logger
def logger() -> Logger
The logger used for request/response debug logging.
- (Logger)
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)
#update_report_config
def update_report_config(request, options = nil) -> ::Google::Cloud::StorageInsights::V1::ReportConfig
def update_report_config(update_mask: nil, report_config: nil, request_id: nil) -> ::Google::Cloud::StorageInsights::V1::ReportConfig
Updates the parameters of a single ReportConfig.
def update_report_config(request, options = nil) -> ::Google::Cloud::StorageInsights::V1::ReportConfig
update_report_config
via a request object, either of type
UpdateReportConfigRequest or an equivalent Hash.
- request (::Google::Cloud::StorageInsights::V1::UpdateReportConfigRequest, ::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_report_config(update_mask: nil, report_config: nil, request_id: nil) -> ::Google::Cloud::StorageInsights::V1::ReportConfig
update_report_config
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. Field mask is used to specify the fields to be overwritten in the ReportConfig resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
- report_config (::Google::Cloud::StorageInsights::V1::ReportConfig, ::Hash) — Required. The resource being updated
-
request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique
request ID so that if you must retry your request, the server will know to
ignore the request if it has already been completed. The server will
guarantee that for at least 60 minutes since the first request.
For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::StorageInsights::V1::ReportConfig)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/storage_insights/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::StorageInsights::V1::StorageInsights::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::StorageInsights::V1::UpdateReportConfigRequest.new # Call the update_report_config method. result = client.update_report_config request # The returned object is of type Google::Cloud::StorageInsights::V1::ReportConfig. p result