Class: Google::Apis::ApigeeV1::GoogleCloudApigeeV1SecurityActionConditionConfig

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/apigee_v1/classes.rb,
lib/google/apis/apigee_v1/representations.rb,
lib/google/apis/apigee_v1/representations.rb

Overview

The following are a list of conditions. A valid SecurityAction must contain at least one condition. Within a condition, each element is ORed. Across conditions elements are ANDed. For example if a SecurityAction has the following: ip_address_ranges: ["ip1", "ip2"] and bot_reasons: ["Flooder", " Robot Abuser"] then this is interpreted as: enforce the action if the incoming request has ((ip_address_ranges = "ip1" OR ip_address_ranges = "ip2") AND ( bot_reasons="Flooder" OR bot_reasons="Robot Abuser")). Conditions other than ip_address_ranges and bot_reasons cannot be ANDed.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudApigeeV1SecurityActionConditionConfig

Returns a new instance of GoogleCloudApigeeV1SecurityActionConditionConfig.



9527
9528
9529
# File 'lib/google/apis/apigee_v1/classes.rb', line 9527

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#access_tokensArray<String>

Optional. A list of access_tokens. Limit 1000 per action. Corresponds to the JSON property accessTokens

Returns:

  • (Array<String>)


9465
9466
9467
# File 'lib/google/apis/apigee_v1/classes.rb', line 9465

def access_tokens
  @access_tokens
end

#api_keysArray<String>

Optional. A list of API keys. Limit 1000 per action. Corresponds to the JSON property apiKeys

Returns:

  • (Array<String>)


9470
9471
9472
# File 'lib/google/apis/apigee_v1/classes.rb', line 9470

def api_keys
  @api_keys
end

#api_productsArray<String>

Optional. A list of API Products. Limit 1000 per action. Corresponds to the JSON property apiProducts

Returns:

  • (Array<String>)


9475
9476
9477
# File 'lib/google/apis/apigee_v1/classes.rb', line 9475

def api_products
  @api_products
end

#asnsArray<Fixnum>

Optional. A list of ASN numbers to act on, e.g. 23. https://en.wikipedia.org/ wiki/Autonomous_system_(Internet) This uses int64 instead of uint32 because of https://linter.aip.dev/141/forbidden-types. Corresponds to the JSON property asns

Returns:

  • (Array<Fixnum>)


9482
9483
9484
# File 'lib/google/apis/apigee_v1/classes.rb', line 9482

def asns
  @asns
end

#bot_reasonsArray<String>

Optional. A list of Bot Reasons. Current options: Flooder, Brute Guessor, Static Content Scraper, OAuth Abuser, Robot Abuser, TorListRule, Advanced Anomaly Detection, Advanced API Scraper, Search Engine Crawlers, Public Clouds, Public Cloud AWS, Public Cloud Azure, and Public Cloud Google. Corresponds to the JSON property botReasons

Returns:

  • (Array<String>)


9490
9491
9492
# File 'lib/google/apis/apigee_v1/classes.rb', line 9490

def bot_reasons
  @bot_reasons
end

#developer_appsArray<String>

Optional. A list of developer apps. Limit 1000 per action. Corresponds to the JSON property developerApps

Returns:

  • (Array<String>)


9495
9496
9497
# File 'lib/google/apis/apigee_v1/classes.rb', line 9495

def developer_apps
  @developer_apps
end

#developersArray<String>

Optional. A list of developers. Limit 1000 per action. Corresponds to the JSON property developers

Returns:

  • (Array<String>)


9500
9501
9502
# File 'lib/google/apis/apigee_v1/classes.rb', line 9500

def developers
  @developers
end

#http_methodsArray<String>

Optional. Act only on particular HTTP methods. E.g. A read-only API can block POST/PUT/DELETE methods. Accepted values are: GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE and PATCH. Corresponds to the JSON property httpMethods

Returns:

  • (Array<String>)


9507
9508
9509
# File 'lib/google/apis/apigee_v1/classes.rb', line 9507

def http_methods
  @http_methods
end

#ip_address_rangesArray<String>

Optional. A list of IP addresses. This could be either IPv4 or IPv6. Limited to 100 per action. Corresponds to the JSON property ipAddressRanges

Returns:

  • (Array<String>)


9513
9514
9515
# File 'lib/google/apis/apigee_v1/classes.rb', line 9513

def ip_address_ranges
  @ip_address_ranges
end

#region_codesArray<String>

Optional. A list of countries/region codes to act on, e.g. US. This follows https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2. Corresponds to the JSON property regionCodes

Returns:

  • (Array<String>)


9519
9520
9521
# File 'lib/google/apis/apigee_v1/classes.rb', line 9519

def region_codes
  @region_codes
end

#user_agentsArray<String>

Optional. A list of user agents to deny. We look for exact matches. Limit 50 per action. Corresponds to the JSON property userAgents

Returns:

  • (Array<String>)


9525
9526
9527
# File 'lib/google/apis/apigee_v1/classes.rb', line 9525

def user_agents
  @user_agents
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
# File 'lib/google/apis/apigee_v1/classes.rb', line 9532

def update!(**args)
  @access_tokens = args[:access_tokens] if args.key?(:access_tokens)
  @api_keys = args[:api_keys] if args.key?(:api_keys)
  @api_products = args[:api_products] if args.key?(:api_products)
  @asns = args[:asns] if args.key?(:asns)
  @bot_reasons = args[:bot_reasons] if args.key?(:bot_reasons)
  @developer_apps = args[:developer_apps] if args.key?(:developer_apps)
  @developers = args[:developers] if args.key?(:developers)
  @http_methods = args[:http_methods] if args.key?(:http_methods)
  @ip_address_ranges = args[:ip_address_ranges] if args.key?(:ip_address_ranges)
  @region_codes = args[:region_codes] if args.key?(:region_codes)
  @user_agents = args[:user_agents] if args.key?(:user_agents)
end