Reference documentation and code samples for the Developer Connect V1 API class Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.
REST client for the InsightsConfigService service.
Creates and manages InsightsConfigs.
The InsightsConfig resource is the core configuration object to capture events from your Software Development Lifecycle. It acts as the central hub for managing how Developer connect understands your application, its runtime environments, and the artifacts deployed within them. A user can create an InsightsConfig, list previously-requested InsightsConfigs or get InsightsConfigs by their ID to determine the status of the InsightsConfig.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the InsightsConfigService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all InsightsConfigService clients ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the InsightsConfigService 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_insights_config
def create_insights_config(request, options = nil) -> ::Gapic::Operation
def create_insights_config(parent: nil, insights_config_id: nil, insights_config: nil, validate_only: nil) -> ::Gapic::Operation
Creates a new InsightsConfig in a given project and location.
def create_insights_config(request, options = nil) -> ::Gapic::Operation
create_insights_config
via a request object, either of type
CreateInsightsConfigRequest or an equivalent Hash.
- request (::Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest, ::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_insights_config(parent: nil, insights_config_id: nil, insights_config: nil, validate_only: nil) -> ::Gapic::Operation
create_insights_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.
- insights_config_id (::String) — Required. ID of the requesting InsightsConfig.
- insights_config (::Google::Cloud::Developerconnect::V1::InsightsConfig, ::Hash) — Required. The resource being created.
- validate_only (::Boolean) — Optional. If set, validate the request, but do not actually post it.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Developerconnect::V1::CreateInsightsConfigRequest.new # Call the create_insights_config method. result = client.create_insights_config request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#delete_insights_config
def delete_insights_config(request, options = nil) -> ::Gapic::Operation
def delete_insights_config(name: nil, request_id: nil, validate_only: nil, etag: nil) -> ::Gapic::Operation
Delete a single Insight.
def delete_insights_config(request, options = nil) -> ::Gapic::Operation
delete_insights_config
via a request object, either of type
DeleteInsightsConfigRequest or an equivalent Hash.
- request (::Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest, ::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_insights_config(name: nil, request_id: nil, validate_only: nil, etag: nil) -> ::Gapic::Operation
delete_insights_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. Value for parent.
-
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).
- validate_only (::Boolean) — Optional. If set, validate the request, but do not actually post it.
- etag (::String) — Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Developerconnect::V1::DeleteInsightsConfigRequest.new # Call the delete_insights_config method. result = client.delete_insights_config request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#get_insights_config
def get_insights_config(request, options = nil) -> ::Google::Cloud::Developerconnect::V1::InsightsConfig
def get_insights_config(name: nil) -> ::Google::Cloud::Developerconnect::V1::InsightsConfig
Gets details of a single Insight.
def get_insights_config(request, options = nil) -> ::Google::Cloud::Developerconnect::V1::InsightsConfig
get_insights_config
via a request object, either of type
GetInsightsConfigRequest or an equivalent Hash.
- request (::Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest, ::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_insights_config(name: nil) -> ::Google::Cloud::Developerconnect::V1::InsightsConfig
get_insights_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::Developerconnect::V1::InsightsConfig)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Developerconnect::V1::GetInsightsConfigRequest.new # Call the get_insights_config method. result = client.get_insights_config request # The returned object is of type Google::Cloud::Developerconnect::V1::InsightsConfig. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new InsightsConfigService REST client object.
- (config) — Configure the InsightsConfigService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new do |config| config.timeout = 10.0 end
#list_insights_configs
def list_insights_configs(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Developerconnect::V1::InsightsConfig>
def list_insights_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Developerconnect::V1::InsightsConfig>
Lists InsightsConfigs in a given project and location.
def list_insights_configs(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Developerconnect::V1::InsightsConfig>
list_insights_configs
via a request object, either of type
ListInsightsConfigsRequest or an equivalent Hash.
- request (::Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest, ::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_insights_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Developerconnect::V1::InsightsConfig>
list_insights_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 ListInsightsConfigsRequest.
- page_size (::Integer) — Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
- page_token (::String) — Optional. A token identifying a page of results the server should return.
- filter (::String) — Optional. Filtering results. See https://google.aip.dev/160 for more details. Filter string, adhering to the rules in https://google.aip.dev/160. List only InsightsConfigs matching the filter. If filter is empty, all InsightsConfigs are listed.
- order_by (::String) — Optional. Hint for how to order the results.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Developerconnect::V1::InsightsConfig>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Developerconnect::V1::InsightsConfig>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Developerconnect::V1::ListInsightsConfigsRequest.new # Call the list_insights_configs method. result = client.list_insights_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::Developerconnect::V1::InsightsConfig. 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)
#operations_client
def operations_client() -> ::Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Operations
Get the associated client for long-running operations.
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)
#update_insights_config
def update_insights_config(request, options = nil) -> ::Gapic::Operation
def update_insights_config(insights_config: nil, request_id: nil, allow_missing: nil, validate_only: nil) -> ::Gapic::Operation
Updates the parameters of a single InsightsConfig.
def update_insights_config(request, options = nil) -> ::Gapic::Operation
update_insights_config
via a request object, either of type
UpdateInsightsConfigRequest or an equivalent Hash.
- request (::Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest, ::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_insights_config(insights_config: nil, request_id: nil, allow_missing: nil, validate_only: nil) -> ::Gapic::Operation
update_insights_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).
- insights_config (::Google::Cloud::Developerconnect::V1::InsightsConfig, ::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 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).
-
allow_missing (::Boolean) — Optional. If set to true, and the insightsConfig is not found a new
insightsConfig will be created. In this situation
update_mask
is ignored. The creation will succeed only if the input insightsConfig has all the necessary information (e.g a github_config with both user_oauth_token and installation_id properties). - validate_only (::Boolean) — Optional. If set, validate the request, but do not actually post it.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/developer_connect/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Developerconnect::V1::InsightsConfigService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Developerconnect::V1::UpdateInsightsConfigRequest.new # Call the update_insights_config method. result = client.update_insights_config request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end