Class: Google::Apis::ServicebrokerV1::ServiceBrokerService

Inherits:
Core::BaseService show all
Defined in:
generated/google/apis/servicebroker_v1/service.rb

Overview

Service Broker API

The Google Cloud Platform Service Broker API provides Google hosted implementation of the Open Service Broker API (https://www.openservicebrokerapi.org/).

Examples:

require 'google/apis/servicebroker_v1'

Servicebroker = Google::Apis::ServicebrokerV1 # Alias the module
service = Servicebroker::ServiceBrokerService.new

See Also:

Instance Attribute Summary collapse

Attributes inherited from Core::BaseService

#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path

Instance Method Summary collapse

Methods inherited from Core::BaseService

#batch, #batch_upload, #fetch_all, #http

Methods included from Core::Logging

#logger

Constructor Details

#initializeServiceBrokerService

Returns a new instance of ServiceBrokerService


47
48
49
50
# File 'generated/google/apis/servicebroker_v1/service.rb', line 47

def initialize
  super('https://servicebroker.googleapis.com/', '')
  @batch_path = 'batch'
end

Instance Attribute Details

#keyString

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.

Returns:

  • (String)

    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.


40
41
42
# File 'generated/google/apis/servicebroker_v1/service.rb', line 40

def key
  @key
end

#quota_userString

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.

Returns:

  • (String)

    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.


45
46
47
# File 'generated/google/apis/servicebroker_v1/service.rb', line 45

def quota_user
  @quota_user
end

Instance Method Details

#get_iam_policy(resource, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ServicebrokerV1::GoogleIamV1Policy

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Parameters:

  • resource (String)

    REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


75
76
77
78
79
80
81
82
83
# File 'generated/google/apis/servicebroker_v1/service.rb', line 75

def get_iam_policy(resource, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options)
  command.response_representation = Google::Apis::ServicebrokerV1::GoogleIamV1Policy::Representation
  command.response_class = Google::Apis::ServicebrokerV1::GoogleIamV1Policy
  command.params['resource'] = resource unless resource.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#set_iam_policy(resource, google_iam_v1__set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ServicebrokerV1::GoogleIamV1Policy

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters:

  • resource (String)

    REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

  • google_iam_v1__set_iam_policy_request_object (Google::Apis::ServicebrokerV1::GoogleIamV1SetIamPolicyRequest) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


108
109
110
111
112
113
114
115
116
117
118
# File 'generated/google/apis/servicebroker_v1/service.rb', line 108

def set_iam_policy(resource, google_iam_v1__set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
  command.request_representation = Google::Apis::ServicebrokerV1::GoogleIamV1SetIamPolicyRequest::Representation
  command.request_object = google_iam_v1__set_iam_policy_request_object
  command.response_representation = Google::Apis::ServicebrokerV1::GoogleIamV1Policy::Representation
  command.response_class = Google::Apis::ServicebrokerV1::GoogleIamV1Policy
  command.params['resource'] = resource unless resource.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#test_iam_permissions(resource, google_iam_v1__test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ServicebrokerV1::GoogleIamV1TestIamPermissionsResponse

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Parameters:

  • resource (String)

    REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

  • google_iam_v1__test_iam_permissions_request_object (Google::Apis::ServicebrokerV1::GoogleIamV1TestIamPermissionsRequest) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


147
148
149
150
151
152
153
154
155
156
157
# File 'generated/google/apis/servicebroker_v1/service.rb', line 147

def test_iam_permissions(resource, google_iam_v1__test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
  command.request_representation = Google::Apis::ServicebrokerV1::GoogleIamV1TestIamPermissionsRequest::Representation
  command.request_object = google_iam_v1__test_iam_permissions_request_object
  command.response_representation = Google::Apis::ServicebrokerV1::GoogleIamV1TestIamPermissionsResponse::Representation
  command.response_class = Google::Apis::ServicebrokerV1::GoogleIamV1TestIamPermissionsResponse
  command.params['resource'] = resource unless resource.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end