Reference documentation and code samples for the Backup and DR Service V1 API class Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.
REST client for the BackupDrProtectionSummary service.
The Protection Summary service.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::ConfigurationConfigure the BackupDrProtectionSummary Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all BackupDrProtectionSummary clients ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::ConfigurationConfigure the BackupDrProtectionSummary 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)
#iam_policy_client
def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Rest::ClientGet the associated client for mix-in of the IAMPolicy.
- (Google::Iam::V1::IAMPolicy::Rest::Client)
#initialize
def initialize() { |config| ... } -> ClientCreate a new BackupDrProtectionSummary REST client object.
- (config) — Configure the BackupDrProtectionSummary client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new do |config| config.timeout = 10.0 end
#list_resource_backup_configs
def list_resource_backup_configs(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::ResourceBackupConfig>
def list_resource_backup_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::ResourceBackupConfig>Lists ResourceBackupConfigs.
def list_resource_backup_configs(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::ResourceBackupConfig>list_resource_backup_configs via a request object, either of type
ListResourceBackupConfigsRequest or an equivalent Hash.
- request (::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest, ::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_backup_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::ResourceBackupConfig>list_resource_backup_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. The project and location for which to retrieve resource backup configs. Format: 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and DR, locations map to Google Cloud regions, for example us-central1.
- page_size (::Integer) — Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will use 100 as default. Maximum value is 500 and values above 500 will be coerced to 500.
- page_token (::String) — Optional. A token identifying a page of results the server should return.
- filter (::String) — Optional. Filtering results.
- 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::BackupDR::V1::ResourceBackupConfig>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::ResourceBackupConfig>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/backupdr/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.new # Call the list_resource_backup_configs method. result = client.list_resource_backup_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::BackupDR::V1::ResourceBackupConfig. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Rest::ClientGet the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#logger
def logger() -> LoggerThe logger used for request/response debug logging.
- (Logger)
#universe_domain
def universe_domain() -> StringThe effective universe domain
- (String)