Method: Google::Cloud::VisionAI::V1::AppPlatform::Rest::Client#deploy_application
- Defined in:
- lib/google/cloud/vision_ai/v1/app_platform/rest/client.rb
#deploy_application(request, options = nil) ⇒ ::Gapic::Operation #deploy_application(name: nil, validate_only: nil, request_id: nil, enable_monitoring: nil) ⇒ ::Gapic::Operation
Deploys a single Application.
783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 |
# File 'lib/google/cloud/vision_ai/v1/app_platform/rest/client.rb', line 783 def deploy_application request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::DeployApplicationRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.deploy_application..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::VisionAI::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.deploy_application.timeout, metadata: , retry_policy: @config.rpcs.deploy_application.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @app_platform_stub.deploy_application request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |