Class: Google::Apis::PolicyanalyzerV1::PolicyAnalyzerService

Inherits:
Core::BaseService
  • Object
show all
Defined in:
lib/google/apis/policyanalyzer_v1/service.rb

Overview

Policy Analyzer API

Examples:

require 'google/apis/policyanalyzer_v1'

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

See Also:

Constant Summary collapse

DEFAULT_ENDPOINT_TEMPLATE =
"https://policyanalyzer.$UNIVERSE_DOMAIN$/"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePolicyAnalyzerService

Returns a new instance of PolicyAnalyzerService.



47
48
49
50
51
52
# File 'lib/google/apis/policyanalyzer_v1/service.rb', line 47

def initialize
  super(DEFAULT_ENDPOINT_TEMPLATE, '',
        client_name: 'google-apis-policyanalyzer_v1',
        client_version: Google::Apis::PolicyanalyzerV1::GEM_VERSION)
  @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 'lib/google/apis/policyanalyzer_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 'lib/google/apis/policyanalyzer_v1/service.rb', line 45

def quota_user
  @quota_user
end

Instance Method Details

#query_folder_location_activity_type_activity(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PolicyanalyzerV1::GoogleCloudPolicyanalyzerV1QueryActivityResponse

Queries policy activities on Google Cloud resources.

Parameters:

  • parent (String)

    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/

  • filter (String) (defaults to: nil)

    Optional. Filter expression to restrict the activities returned. For serviceAccountLastAuthentication activities, supported filters are: - activities.full_resource_name=[STRING] - activities.fullResourceName= [STRING] where [STRING] is the full resource name of the service account. For serviceAccountKeyLastAuthentication activities, supported filters are: - activities.full_resource_name=[STRING] - activities.fullResourceName= [STRING] where [STRING] is the full resource name of the service account key.

  • page_size (Fixnum) (defaults to: nil)

    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.

  • page_token (String) (defaults to: nil)

    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.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/google/apis/policyanalyzer_v1/service.rb', line 95

def query_folder_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

#query_organization_location_activity_type_activity(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PolicyanalyzerV1::GoogleCloudPolicyanalyzerV1QueryActivityResponse

Queries policy activities on Google Cloud resources.

Parameters:

  • parent (String)

    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/

  • filter (String) (defaults to: nil)

    Optional. Filter expression to restrict the activities returned. For serviceAccountLastAuthentication activities, supported filters are: - activities.full_resource_name=[STRING] - activities.fullResourceName= [STRING] where [STRING] is the full resource name of the service account. For serviceAccountKeyLastAuthentication activities, supported filters are: - activities.full_resource_name=[STRING] - activities.fullResourceName= [STRING] where [STRING] is the full resource name of the service account key.

  • page_size (Fixnum) (defaults to: nil)

    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.

  • page_token (String) (defaults to: nil)

    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.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



149
150
151
152
153
154
155
156
157
158
159
160
# File 'lib/google/apis/policyanalyzer_v1/service.rb', line 149

def query_organization_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

#query_project_location_activity_type_activity(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::PolicyanalyzerV1::GoogleCloudPolicyanalyzerV1QueryActivityResponse

Queries policy activities on Google Cloud resources.

Parameters:

  • parent (String)

    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/

  • filter (String) (defaults to: nil)

    Optional. Filter expression to restrict the activities returned. For serviceAccountLastAuthentication activities, supported filters are: - activities.full_resource_name=[STRING] - activities.fullResourceName= [STRING] where [STRING] is the full resource name of the service account. For serviceAccountKeyLastAuthentication activities, supported filters are: - activities.full_resource_name=[STRING] - activities.fullResourceName= [STRING] where [STRING] is the full resource name of the service account key.

  • page_size (Fixnum) (defaults to: nil)

    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.

  • page_token (String) (defaults to: nil)

    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.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



203
204
205
206
207
208
209
210
211
212
213
214
# File 'lib/google/apis/policyanalyzer_v1/service.rb', line 203

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