Class: Google::Apis::PolicyanalyzerV1beta1::PolicyAnalyzerService

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

Overview

Policy Analyzer API

Examples:

require 'google/apis/policyanalyzer_v1beta1'

Policyanalyzer = Google::Apis::PolicyanalyzerV1beta1 # 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_v1beta1/service.rb', line 47

def initialize
  super(DEFAULT_ENDPOINT_TEMPLATE, '',
        client_name: 'google-apis-policyanalyzer_v1beta1',
        client_version: Google::Apis::PolicyanalyzerV1beta1::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_v1beta1/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_v1beta1/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::PolicyanalyzerV1beta1::GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse

Queries policy activities on GCP 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 GCP Locations: https:// cloud.google.com/about/locations/

  • filter (String) (defaults to: nil)

    Optional. Optional filter expression to restrict the activities returned. Supported filters are: - service_account_last_authn.full_resource_name = - service_account_key_last_authn.full_resource_name =

  • 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



90
91
92
93
94
95
96
97
98
99
100
101
# File 'lib/google/apis/policyanalyzer_v1beta1/service.rb', line 90

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, 'v1beta1/{+parent}/activities:query', options)
  command.response_representation = Google::Apis::PolicyanalyzerV1beta1::GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse::Representation
  command.response_class = Google::Apis::PolicyanalyzerV1beta1::GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse
  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::PolicyanalyzerV1beta1::GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse

Queries policy activities on GCP 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 GCP Locations: https:// cloud.google.com/about/locations/

  • filter (String) (defaults to: nil)

    Optional. Optional filter expression to restrict the activities returned. Supported filters are: - service_account_last_authn.full_resource_name = - service_account_key_last_authn.full_resource_name =

  • 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



139
140
141
142
143
144
145
146
147
148
149
150
# File 'lib/google/apis/policyanalyzer_v1beta1/service.rb', line 139

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, 'v1beta1/{+parent}/activities:query', options)
  command.response_representation = Google::Apis::PolicyanalyzerV1beta1::GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse::Representation
  command.response_class = Google::Apis::PolicyanalyzerV1beta1::GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse
  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::PolicyanalyzerV1beta1::GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse

Queries policy activities on GCP 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 GCP Locations: https:// cloud.google.com/about/locations/

  • filter (String) (defaults to: nil)

    Optional. Optional filter expression to restrict the activities returned. Supported filters are: - service_account_last_authn.full_resource_name = - service_account_key_last_authn.full_resource_name =

  • 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



188
189
190
191
192
193
194
195
196
197
198
199
# File 'lib/google/apis/policyanalyzer_v1beta1/service.rb', line 188

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, 'v1beta1/{+parent}/activities:query', options)
  command.response_representation = Google::Apis::PolicyanalyzerV1beta1::GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse::Representation
  command.response_class = Google::Apis::PolicyanalyzerV1beta1::GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse
  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