class Google::Apis::PolicyanalyzerV1::PolicyAnalyzerService

Policy Analyzer API

@example

require 'google/apis/policyanalyzer_v1'

Policyanalyzer = Google::Apis::PolicyanalyzerV1 # Alias the module
service = Policyanalyzer::PolicyAnalyzerService.new

@see www.google.com

Attributes

key[RW]

@return [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.
quota_user[RW]

@return [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.

Public Class Methods

new() click to toggle source
Calls superclass method
# File lib/google/apis/policyanalyzer_v1/service.rb, line 45
def initialize
  super('https://policyanalyzer.googleapis.com/', '',
        client_name: 'google-apis-policyanalyzer_v1',
        client_version: Google::Apis::PolicyanalyzerV1::GEM_VERSION)
  @batch_path = 'batch'
end

Public Instance Methods

query_project_location_activity_type_activity(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) click to toggle source

Queries policy activities on Google Cloud resources. @param [String] parent

Required. The container resource on which to execute the request. Acceptable
formats: `projects/[PROJECT_ID|PROJECT_NUMBER]/locations/[LOCATION]/
activityTypes/[ACTIVITY_TYPE]` LOCATION here refers to Google Cloud Locations:
https://cloud.google.com/about/locations/

@param [String] filter

Optional. Filter expression to restrict the activities returned. Supported
filters are: - service_account_last_authn.full_resource_name `=` [STRING] -
service_account_key_last_authn.full_resource_name `=` [STRING]

@param [Fixnum] page_size

Optional. The maximum number of results to return from this request. Max limit
is 1000. Non-positive values are ignored. The presence of `nextPageToken` in
the response indicates that more results might be available.

@param [String] page_token

Optional. If present, then retrieve the next batch of results from the
preceding call to this method. `pageToken` must be the value of `nextPageToken`
from the previous response. The values of other method parameters should be
identical to those in the previous call.

@param [String] fields

Selector specifying which fields to include in a partial response.

@param [String] quota_user

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.

@param [Google::Apis::RequestOptions] options

Request-specific options

@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::PolicyanalyzerV1::GoogleCloudPolicyanalyzerV1QueryActivityResponse] parsed result object @yieldparam err [StandardError] error object if request failed

@return [Google::Apis::PolicyanalyzerV1::GoogleCloudPolicyanalyzerV1QueryActivityResponse]

@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required

# File lib/google/apis/policyanalyzer_v1/service.rb, line 88
def query_project_location_activity_type_activity(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+parent}/activities:query', options)
  command.response_representation = Google::Apis::PolicyanalyzerV1::GoogleCloudPolicyanalyzerV1QueryActivityResponse::Representation
  command.response_class = Google::Apis::PolicyanalyzerV1::GoogleCloudPolicyanalyzerV1QueryActivityResponse
  command.params['parent'] = parent unless parent.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

Protected Instance Methods

apply_command_defaults(command) click to toggle source
# File lib/google/apis/policyanalyzer_v1/service.rb, line 103
def apply_command_defaults(command)
  command.query['key'] = key unless key.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
end