Reference documentation and code samples for the Filestore V1 API class Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.
REST client for the CloudFilestoreManager service.
Configures and manages Cloud Filestore resources.
Cloud Filestore Manager v1.
The file.googleapis.com service implements the Cloud Filestore API and
defines the following resource model for managing instances:
- The service works with a collection of cloud projects, named:
/projects/ - Each project has a collection of available locations, named:
/locations/ - Each location has a collection of instances and backups, named:
/instances/and/backups/respectively. - As such, Cloud Filestore instances are resources of the form:
/projects/{project_number}/locations/{location_id}/instances/{instance_id}and backups are resources of the form:/projects/{project_number}/locations/{location_id}/backup/{backup_id}
Note that location_id must be a GCP zone for instances and but to a GCP
region for backups; for example:
projects/12345/locations/us-central1-c/instances/my-filestoreprojects/12345/locations/us-central1/backups/my-backup
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::ConfigurationConfigure the CloudFilestoreManager Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all CloudFilestoreManager clients ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::ConfigurationConfigure the CloudFilestoreManager 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_backup
def create_backup(request, options = nil) -> ::Gapic::Operation
def create_backup(parent: nil, backup: nil, backup_id: nil) -> ::Gapic::OperationCreates a backup.
def create_backup(request, options = nil) -> ::Gapic::Operationcreate_backup via a request object, either of type
Google::Cloud::Filestore::V1::CreateBackupRequest or an equivalent Hash.
- request (::Google::Cloud::Filestore::V1::CreateBackupRequest, ::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_backup(parent: nil, backup: nil, backup_id: nil) -> ::Gapic::Operationcreate_backup 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 backup's project and location, in the format
projects/{project_number}/locations/{location}. In Cloud Filestore, backup locations map to GCP regions, for example us-west1. - backup (::Google::Cloud::Filestore::V1::Backup, ::Hash) — Required. A backup resource
-
backup_id (::String) — Required. The ID to use for the backup.
The ID must be unique within the specified project and location.
This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen. Values that do not match this pattern will trigger an INVALID_ARGUMENT error.
- (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.
#create_instance
def create_instance(request, options = nil) -> ::Gapic::Operation
def create_instance(parent: nil, instance_id: nil, instance: nil) -> ::Gapic::OperationCreates an instance. When creating from a backup, the capacity of the new instance needs to be equal to or larger than the capacity of the backup (and also equal to or larger than the minimum capacity of the tier).
def create_instance(request, options = nil) -> ::Gapic::Operationcreate_instance via a request object, either of type
Google::Cloud::Filestore::V1::CreateInstanceRequest or an equivalent Hash.
- request (::Google::Cloud::Filestore::V1::CreateInstanceRequest, ::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_instance(parent: nil, instance_id: nil, instance: nil) -> ::Gapic::Operationcreate_instance 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 instance's project and location, in the format
projects/{project_id}/locations/{location}. In Cloud Filestore, locations map to GCP zones, for example us-west1-b. - instance_id (::String) — Required. The name of the instance to create. The name must be unique for the specified project and location.
- instance (::Google::Cloud::Filestore::V1::Instance, ::Hash) — Required. An instance resource
- (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.
#delete_backup
def delete_backup(request, options = nil) -> ::Gapic::Operation
def delete_backup(name: nil) -> ::Gapic::OperationDeletes a backup.
def delete_backup(request, options = nil) -> ::Gapic::Operationdelete_backup via a request object, either of type
DeleteBackupRequest or an equivalent Hash.
- request (::Google::Cloud::Filestore::V1::DeleteBackupRequest, ::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_backup(name: nil) -> ::Gapic::Operationdelete_backup 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 backup resource name, in the format
projects/{project_number}/locations/{location}/backups/{backup_id}
- (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.
#delete_instance
def delete_instance(request, options = nil) -> ::Gapic::Operation
def delete_instance(name: nil) -> ::Gapic::OperationDeletes an instance.
def delete_instance(request, options = nil) -> ::Gapic::Operationdelete_instance via a request object, either of type
DeleteInstanceRequest or an equivalent Hash.
- request (::Google::Cloud::Filestore::V1::DeleteInstanceRequest, ::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_instance(name: nil) -> ::Gapic::Operationdelete_instance 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 instance resource name, in the format
projects/{project_id}/locations/{location}/instances/{instance_id}
- (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.
#get_backup
def get_backup(request, options = nil) -> ::Google::Cloud::Filestore::V1::Backup
def get_backup(name: nil) -> ::Google::Cloud::Filestore::V1::BackupGets the details of a specific backup.
def get_backup(request, options = nil) -> ::Google::Cloud::Filestore::V1::Backupget_backup via a request object, either of type
GetBackupRequest or an equivalent Hash.
- request (::Google::Cloud::Filestore::V1::GetBackupRequest, ::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_backup(name: nil) -> ::Google::Cloud::Filestore::V1::Backupget_backup 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 backup resource name, in the format
projects/{project_number}/locations/{location}/backups/{backup_id}.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Filestore::V1::Backup)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#get_instance
def get_instance(request, options = nil) -> ::Google::Cloud::Filestore::V1::Instance
def get_instance(name: nil) -> ::Google::Cloud::Filestore::V1::InstanceGets the details of a specific instance.
def get_instance(request, options = nil) -> ::Google::Cloud::Filestore::V1::Instanceget_instance via a request object, either of type
GetInstanceRequest or an equivalent Hash.
- request (::Google::Cloud::Filestore::V1::GetInstanceRequest, ::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_instance(name: nil) -> ::Google::Cloud::Filestore::V1::Instanceget_instance 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 instance resource name, in the format
projects/{project_id}/locations/{location}/instances/{instance_id}.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Filestore::V1::Instance)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#initialize
def initialize() { |config| ... } -> ClientCreate a new CloudFilestoreManager REST client object.
- (config) — Configure the CloudFilestoreManager client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| config.timeout = 10.0 end
#list_backups
def list_backups(request, options = nil) -> ::Google::Cloud::Filestore::V1::ListBackupsResponse
def list_backups(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) -> ::Google::Cloud::Filestore::V1::ListBackupsResponseLists all backups in a project for either a specified location or for all locations.
def list_backups(request, options = nil) -> ::Google::Cloud::Filestore::V1::ListBackupsResponselist_backups via a request object, either of type
ListBackupsRequest or an equivalent Hash.
- request (::Google::Cloud::Filestore::V1::ListBackupsRequest, ::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_backups(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) -> ::Google::Cloud::Filestore::V1::ListBackupsResponselist_backups 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 backup
information, in the format
projects/{project_number}/locations/{location}. In Cloud Filestore, backup locations map to GCP regions, for example us-west1. To retrieve backup information for all locations, use "-" for the{location}value. - page_size (::Integer) — The maximum number of items to return.
- page_token (::String) — The next_page_token value to use if there are additional results to retrieve for this list request.
- order_by (::String) — Sort results. Supported values are "name", "name desc" or "" (unsorted).
- filter (::String) — List filter.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Filestore::V1::ListBackupsResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#list_instances
def list_instances(request, options = nil) -> ::Google::Cloud::Filestore::V1::ListInstancesResponse
def list_instances(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) -> ::Google::Cloud::Filestore::V1::ListInstancesResponseLists all instances in a project for either a specified location or for all locations.
def list_instances(request, options = nil) -> ::Google::Cloud::Filestore::V1::ListInstancesResponselist_instances via a request object, either of type
ListInstancesRequest or an equivalent Hash.
- request (::Google::Cloud::Filestore::V1::ListInstancesRequest, ::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_instances(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) -> ::Google::Cloud::Filestore::V1::ListInstancesResponselist_instances 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 instance
information, in the format
projects/{project_id}/locations/{location}. In Cloud Filestore, locations map to GCP zones, for example us-west1-b. To retrieve instance information for all locations, use "-" for the{location}value. - page_size (::Integer) — The maximum number of items to return.
- page_token (::String) — The next_page_token value to use if there are additional results to retrieve for this list request.
- order_by (::String) — Sort results. Supported values are "name", "name desc" or "" (unsorted).
- filter (::String) — List filter.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Filestore::V1::ListInstancesResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#operations_client
def operations_client() -> ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::OperationsGet the associated client for long-running operations.
#restore_instance
def restore_instance(request, options = nil) -> ::Gapic::Operation
def restore_instance(name: nil, file_share: nil, source_backup: nil) -> ::Gapic::OperationRestores an existing instance's file share from a backup.
The capacity of the instance needs to be equal to or larger than the capacity of the backup (and also equal to or larger than the minimum capacity of the tier).
def restore_instance(request, options = nil) -> ::Gapic::Operationrestore_instance via a request object, either of type
RestoreInstanceRequest or an equivalent Hash.
- request (::Google::Cloud::Filestore::V1::RestoreInstanceRequest, ::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 restore_instance(name: nil, file_share: nil, source_backup: nil) -> ::Gapic::Operationrestore_instance 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 instance, in the format
projects/{project_number}/locations/{location_id}/instances/{instance_id}. - file_share (::String) — Required. Name of the file share in the Cloud Filestore instance that the backup is being restored to.
-
source_backup (::String) — The resource name of the backup, in the format
projects/{project_number}/locations/{location_id}/backups/{backup_id}.
- (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.
#update_backup
def update_backup(request, options = nil) -> ::Gapic::Operation
def update_backup(backup: nil, update_mask: nil) -> ::Gapic::OperationUpdates the settings of a specific backup.
def update_backup(request, options = nil) -> ::Gapic::Operationupdate_backup via a request object, either of type
UpdateBackupRequest or an equivalent Hash.
- request (::Google::Cloud::Filestore::V1::UpdateBackupRequest, ::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_backup(backup: nil, update_mask: nil) -> ::Gapic::Operationupdate_backup 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).
- backup (::Google::Cloud::Filestore::V1::Backup, ::Hash) — Required. A backup resource
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. Mask of fields to update. At least one path must be supplied in this field.
- (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.
#update_instance
def update_instance(request, options = nil) -> ::Gapic::Operation
def update_instance(update_mask: nil, instance: nil) -> ::Gapic::OperationUpdates the settings of a specific instance.
def update_instance(request, options = nil) -> ::Gapic::Operationupdate_instance via a request object, either of type
UpdateInstanceRequest or an equivalent Hash.
- request (::Google::Cloud::Filestore::V1::UpdateInstanceRequest, ::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_instance(update_mask: nil, instance: nil) -> ::Gapic::Operationupdate_instance 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) —
Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields:
- "description"
- "file_shares"
- "labels"
- instance (::Google::Cloud::Filestore::V1::Instance, ::Hash) — Only fields specified in update_mask are updated.
- (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.