Reference documentation and code samples for the Maintenance V1BETA API class Google::Cloud::Maintenance::Api::V1beta::Maintenance::Rest::Client.
REST client for the Maintenance service.
Unified Maintenance service
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the Maintenance Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all Maintenance clients ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the Maintenance 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)
#get_resource_maintenance
def get_resource_maintenance(request, options = nil) -> ::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance
def get_resource_maintenance(name: nil) -> ::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance
Retrieve a single resource maintenance.
def get_resource_maintenance(request, options = nil) -> ::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance
get_resource_maintenance
via a request object, either of type
GetResourceMaintenanceRequest or an equivalent Hash.
- request (::Google::Cloud::Maintenance::Api::V1beta::GetResourceMaintenanceRequest, ::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_resource_maintenance(name: nil) -> ::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance
get_resource_maintenance
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 resource within a service.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/maintenance/api/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Maintenance::Api::V1beta::Maintenance::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Maintenance::Api::V1beta::GetResourceMaintenanceRequest.new # Call the get_resource_maintenance method. result = client.get_resource_maintenance request # The returned object is of type Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new Maintenance REST client object.
- (config) — Configure the Maintenance client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Rest::Client.new do |config| config.timeout = 10.0 end
#list_resource_maintenances
def list_resource_maintenances(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance>
def list_resource_maintenances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance>
Retrieve a collection of resource maintenances.
def list_resource_maintenances(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance>
list_resource_maintenances
via a request object, either of type
ListResourceMaintenancesRequest or an equivalent Hash.
- request (::Google::Cloud::Maintenance::Api::V1beta::ListResourceMaintenancesRequest, ::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_resource_maintenances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance>
list_resource_maintenances
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 of the resource maintenance.
- page_size (::Integer) — The maximum number of resource maintenances to send per page.
- page_token (::String) — The page token: If the next_page_token from a previous response is provided, this request will send the subsequent page.
- filter (::String) — Filter the list as specified in https://google.aip.dev/160.
- order_by (::String) — Order results as specified in https://google.aip.dev/132.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/maintenance/api/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Maintenance::Api::V1beta::Maintenance::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Maintenance::Api::V1beta::ListResourceMaintenancesRequest.new # Call the list_resource_maintenances method. result = client.list_resource_maintenances 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::Maintenance::Api::V1beta::ResourceMaintenance. 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)
#summarize_maintenances
def summarize_maintenances(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Maintenance::Api::V1beta::MaintenanceSummary>
def summarize_maintenances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Maintenance::Api::V1beta::MaintenanceSummary>
Retrieves the statistics of a specific maintenance.
def summarize_maintenances(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Maintenance::Api::V1beta::MaintenanceSummary>
summarize_maintenances
via a request object, either of type
SummarizeMaintenancesRequest or an equivalent Hash.
- request (::Google::Cloud::Maintenance::Api::V1beta::SummarizeMaintenancesRequest, ::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 summarize_maintenances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Maintenance::Api::V1beta::MaintenanceSummary>
summarize_maintenances
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 of the resource maintenance.
eg.
projects/123/locations/*
- page_size (::Integer) — The maximum number of resource maintenances to send per page. The default page size is 20 and the maximum is 1000.
- page_token (::String) — The page token: If the next_page_token from a previous response is provided, this request will send the subsequent page.
-
filter (::String) —
Filter the list as specified in https://google.aip.dev/160. Supported fields include:
- state
- resource.location
- resource.resourceName
- resource.type
- maintenance.maintenanceName
- maintenanceStartTime
- maintenanceCompleteTime Examples:
- state="SCHEDULED"
- resource.location="us-central1-c"
- resource.resourceName=~"*/instance-20241212-211259"
- maintenanceStartTime>"2000-10-11T20:44:51Z"
- state="SCHEDULED" OR resource.type="compute.googleapis.com/Instance"
- maintenance.maitenanceName="eb3b709c-9ca1-5472-9fb6-800a3849eda1" AND maintenanceCompleteTime>"2000-10-11T20:44:51Z"
- order_by (::String) — Order results as specified in https://google.aip.dev/132.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Maintenance::Api::V1beta::MaintenanceSummary>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Maintenance::Api::V1beta::MaintenanceSummary>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/maintenance/api/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Maintenance::Api::V1beta::Maintenance::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Maintenance::Api::V1beta::SummarizeMaintenancesRequest.new # Call the summarize_maintenances method. result = client.summarize_maintenances 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::Maintenance::Api::V1beta::MaintenanceSummary. p item end
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)