Class: Google::Apis::FtpV1::CloudFTPService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::FtpV1::CloudFTPService
- Defined in:
- lib/google/apis/ftp_v1/service.rb
Overview
Cloud FTP API
Cloud FTP is a managed service that allows transferring files directly to Google Cloud Storage using SFTP.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://ftp.$UNIVERSE_DOMAIN$/"
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::Empty
Starts asynchronous cancellation on a long-running operation.
-
#create_project_location_server(parent, server_object = nil, request_id: nil, server_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::Operation
Creates a new Server in a given project and location.
-
#create_project_location_server_user(parent, user_object = nil, request_id: nil, user_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::Operation
Creates a new User in a given project and location and Server.
-
#delete_project_location_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::Empty
Deletes a long-running operation.
-
#delete_project_location_server(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::Operation
Deletes a single Server.
-
#delete_project_location_server_user(name, force: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::Operation
Deletes a single User.
-
#get_project_location(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::Location
Gets information about a location.
-
#get_project_location_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::Operation
Gets the latest state of a long-running operation.
-
#get_project_location_server(name, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::Server
Gets details of a single Server.
-
#get_project_location_server_user(name, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::User
Gets details of a single User.
-
#initialize ⇒ CloudFTPService
constructor
A new instance of CloudFTPService.
-
#list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::ListOperationsResponse
Lists operations that match the specified filter in the request.
-
#list_project_location_server_users(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::ListUsersResponse
Lists Users in a given project and location.
-
#list_project_location_servers(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::ListServersResponse
Lists Servers in a given project and location.
-
#list_project_locations(name, extra_location_types: nil, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::ListLocationsResponse
Lists information about the supported locations for this service.
-
#patch_project_location_server(name, server_object = nil, request_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::Operation
Updates the parameters of a single Server.
-
#patch_project_location_server_user(name, user_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::Operation
Updates the parameters of a single User.
-
#start_server(name, start_server_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::Operation
Starts a stopping/stopped Server.
-
#stop_server(name, stop_server_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::Operation
Stops an active Server.
Constructor Details
#initialize ⇒ CloudFTPService
Returns a new instance of CloudFTPService.
48 49 50 51 52 53 |
# File 'lib/google/apis/ftp_v1/service.rb', line 48 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-ftp_v1', client_version: Google::Apis::FtpV1::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
41 42 43 |
# File 'lib/google/apis/ftp_v1/service.rb', line 41 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
46 47 48 |
# File 'lib/google/apis/ftp_v1/service.rb', line 46 def quota_user @quota_user end |
Instance Method Details
#cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::Empty
Starts asynchronous cancellation on a long-running operation. The server makes
a best effort to cancel the operation, but success is not guaranteed. If the
server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.
Clients can use Operations.GetOperation or other methods to check whether the
cancellation succeeded or whether the operation completed despite cancellation.
On successful cancellation, the operation is not deleted; instead, it becomes
an operation with an Operation.error value with a google.rpc.Status.code of 1
, corresponding to Code.CANCELLED.
169 170 171 172 173 174 175 176 177 178 179 |
# File 'lib/google/apis/ftp_v1/service.rb', line 169 def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:cancel', ) command.request_representation = Google::Apis::FtpV1::CancelOperationRequest::Representation command.request_object = cancel_operation_request_object command.response_representation = Google::Apis::FtpV1::Empty::Representation command.response_class = Google::Apis::FtpV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_project_location_server(parent, server_object = nil, request_id: nil, server_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::Operation
Creates a new Server in a given project and location.
329 330 331 332 333 334 335 336 337 338 339 340 341 |
# File 'lib/google/apis/ftp_v1/service.rb', line 329 def create_project_location_server(parent, server_object = nil, request_id: nil, server_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/servers', ) command.request_representation = Google::Apis::FtpV1::Server::Representation command.request_object = server_object command.response_representation = Google::Apis::FtpV1::Operation::Representation command.response_class = Google::Apis::FtpV1::Operation command.params['parent'] = parent unless parent.nil? command.query['requestId'] = request_id unless request_id.nil? command.query['serverId'] = server_id unless server_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_project_location_server_user(parent, user_object = nil, request_id: nil, user_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::Operation
Creates a new User in a given project and location and Server.
607 608 609 610 611 612 613 614 615 616 617 618 619 |
# File 'lib/google/apis/ftp_v1/service.rb', line 607 def create_project_location_server_user(parent, user_object = nil, request_id: nil, user_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/users', ) command.request_representation = Google::Apis::FtpV1::User::Representation command.request_object = user_object command.response_representation = Google::Apis::FtpV1::Operation::Representation command.response_class = Google::Apis::FtpV1::Operation command.params['parent'] = parent unless parent.nil? command.query['requestId'] = request_id unless request_id.nil? command.query['userId'] = user_id unless user_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_project_location_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::Empty
Deletes a long-running operation. This method indicates that the client is no
longer interested in the operation result. It does not cancel the operation.
If the server doesn't support this method, it returns google.rpc.Code.
UNIMPLEMENTED.
204 205 206 207 208 209 210 211 212 |
# File 'lib/google/apis/ftp_v1/service.rb', line 204 def delete_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::FtpV1::Empty::Representation command.response_class = Google::Apis::FtpV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_project_location_server(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::Operation
Deletes a single Server.
363 364 365 366 367 368 369 370 371 |
# File 'lib/google/apis/ftp_v1/service.rb', line 363 def delete_project_location_server(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::FtpV1::Operation::Representation command.response_class = Google::Apis::FtpV1::Operation command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_project_location_server_user(name, force: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::Operation
Deletes a single User.
643 644 645 646 647 648 649 650 651 652 |
# File 'lib/google/apis/ftp_v1/service.rb', line 643 def delete_project_location_server_user(name, force: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::FtpV1::Operation::Representation command.response_class = Google::Apis::FtpV1::Operation command.params['name'] = name unless name.nil? command.query['force'] = force unless force.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_location(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::Location
Gets information about a location.
75 76 77 78 79 80 81 82 83 |
# File 'lib/google/apis/ftp_v1/service.rb', line 75 def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::FtpV1::Location::Representation command.response_class = Google::Apis::FtpV1::Location command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_location_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::Operation
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
235 236 237 238 239 240 241 242 243 |
# File 'lib/google/apis/ftp_v1/service.rb', line 235 def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::FtpV1::Operation::Representation command.response_class = Google::Apis::FtpV1::Operation command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_location_server(name, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::Server
Gets details of a single Server.
395 396 397 398 399 400 401 402 403 404 |
# File 'lib/google/apis/ftp_v1/service.rb', line 395 def get_project_location_server(name, view: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::FtpV1::Server::Representation command.response_class = Google::Apis::FtpV1::Server command.params['name'] = name unless name.nil? command.query['view'] = view unless view.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_location_server_user(name, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::User
Gets details of a single User.
676 677 678 679 680 681 682 683 684 685 |
# File 'lib/google/apis/ftp_v1/service.rb', line 676 def get_project_location_server_user(name, view: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::FtpV1::User::Representation command.response_class = Google::Apis::FtpV1::User command.params['name'] = name unless name.nil? command.query['view'] = view unless view.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::ListOperationsResponse
Lists operations that match the specified filter in the request. If the server
doesn't support this method, it returns UNIMPLEMENTED.
280 281 282 283 284 285 286 287 288 289 290 291 292 |
# File 'lib/google/apis/ftp_v1/service.rb', line 280 def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}/operations', ) command.response_representation = Google::Apis::FtpV1::ListOperationsResponse::Representation command.response_class = Google::Apis::FtpV1::ListOperationsResponse command.params['name'] = name unless name.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['returnPartialSuccess'] = return_partial_success unless return_partial_success.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_location_server_users(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::ListUsersResponse
Lists Users in a given project and location.
719 720 721 722 723 724 725 726 727 728 729 730 731 732 |
# File 'lib/google/apis/ftp_v1/service.rb', line 719 def list_project_location_server_users(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/users', ) command.response_representation = Google::Apis::FtpV1::ListUsersResponse::Representation command.response_class = Google::Apis::FtpV1::ListUsersResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['view'] = view unless view.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_location_servers(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::ListServersResponse
Lists Servers in a given project and location.
437 438 439 440 441 442 443 444 445 446 447 448 449 450 |
# File 'lib/google/apis/ftp_v1/service.rb', line 437 def list_project_location_servers(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/servers', ) command.response_representation = Google::Apis::FtpV1::ListServersResponse::Representation command.response_class = Google::Apis::FtpV1::ListServersResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['view'] = view unless view.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_locations(name, extra_location_types: nil, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::ListLocationsResponse
Lists information about the supported locations for this service. This method
lists locations based on the resource scope provided in the
ListLocationsRequest.name field: * Global locations: If name is empty,
the method lists the public locations available to all projects. * Project-
specific locations: If name follows the format projects/project`, the
method lists locations visible to that specific project. This includes public,
private, or other project-specific locations enabled for the project. For gRPC
and client library implementations, the resource name is passed as thename`
field. For direct service calls, the resource name is incorporated into the
request path based on the specific service implementation and version.
127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/google/apis/ftp_v1/service.rb', line 127 def list_project_locations(name, extra_location_types: nil, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}/locations', ) command.response_representation = Google::Apis::FtpV1::ListLocationsResponse::Representation command.response_class = Google::Apis::FtpV1::ListLocationsResponse command.params['name'] = name unless name.nil? command.query['extraLocationTypes'] = extra_location_types unless extra_location_types.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_project_location_server(name, server_object = nil, request_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::Operation
Updates the parameters of a single Server.
490 491 492 493 494 495 496 497 498 499 500 501 502 |
# File 'lib/google/apis/ftp_v1/service.rb', line 490 def patch_project_location_server(name, server_object = nil, request_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', ) command.request_representation = Google::Apis::FtpV1::Server::Representation command.request_object = server_object command.response_representation = Google::Apis::FtpV1::Operation::Representation command.response_class = Google::Apis::FtpV1::Operation command.params['name'] = name unless name.nil? command.query['requestId'] = request_id unless request_id.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_project_location_server_user(name, user_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::Operation
Updates the parameters of a single User.
762 763 764 765 766 767 768 769 770 771 772 773 |
# File 'lib/google/apis/ftp_v1/service.rb', line 762 def patch_project_location_server_user(name, user_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', ) command.request_representation = Google::Apis::FtpV1::User::Representation command.request_object = user_object command.response_representation = Google::Apis::FtpV1::Operation::Representation command.response_class = Google::Apis::FtpV1::Operation command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#start_server(name, start_server_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::Operation
Starts a stopping/stopped Server.
526 527 528 529 530 531 532 533 534 535 536 |
# File 'lib/google/apis/ftp_v1/service.rb', line 526 def start_server(name, start_server_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:start', ) command.request_representation = Google::Apis::FtpV1::StartServerRequest::Representation command.request_object = start_server_request_object command.response_representation = Google::Apis::FtpV1::Operation::Representation command.response_class = Google::Apis::FtpV1::Operation command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#stop_server(name, stop_server_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FtpV1::Operation
Stops an active Server.
560 561 562 563 564 565 566 567 568 569 570 |
# File 'lib/google/apis/ftp_v1/service.rb', line 560 def stop_server(name, stop_server_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:stop', ) command.request_representation = Google::Apis::FtpV1::StopServerRequest::Representation command.request_object = stop_server_request_object command.response_representation = Google::Apis::FtpV1::Operation::Representation command.response_class = Google::Apis::FtpV1::Operation command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |