Class: Google::Apis::ApigeeV1::GoogleCloudApigeeV1SecurityAction

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

A SecurityAction is rule that can be enforced at an environment level. The result is one of: - A denied API call - An explicitly allowed API call - A flagged API call (HTTP headers added before the target receives it) At least one condition is required to create a SecurityAction.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudApigeeV1SecurityAction

Returns a new instance of GoogleCloudApigeeV1SecurityAction.



8823
8824
8825
# File 'lib/google/apis/apigee_v1/classes.rb', line 8823

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

Instance Attribute Details

#allowGoogle::Apis::ApigeeV1::GoogleCloudApigeeV1SecurityActionAllow

Message that should be set in case of an Allow Action. This does not have any fields. Corresponds to the JSON property allow



8761
8762
8763
# File 'lib/google/apis/apigee_v1/classes.rb', line 8761

def allow
  @allow
end

#condition_configGoogle::Apis::ApigeeV1::GoogleCloudApigeeV1SecurityActionConditionConfig

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: api_keys: ["key1", "key2"] and developers: ["dev1", "dev2"] then this is interpreted as: enforce the action if the incoming request has (( api_key = "key1" OR api_key="key") AND (developer="dev1" OR developer="dev2")) Corresponds to the JSON property conditionConfig



8771
8772
8773
# File 'lib/google/apis/apigee_v1/classes.rb', line 8771

def condition_config
  @condition_config
end

#create_timeString

Output only. The create time for this SecurityAction. Corresponds to the JSON property createTime

Returns:

  • (String)


8776
8777
8778
# File 'lib/google/apis/apigee_v1/classes.rb', line 8776

def create_time
  @create_time
end

#denyGoogle::Apis::ApigeeV1::GoogleCloudApigeeV1SecurityActionDeny

Message that should be set in case of a Deny Action. Corresponds to the JSON property deny



8781
8782
8783
# File 'lib/google/apis/apigee_v1/classes.rb', line 8781

def deny
  @deny
end

#descriptionString

Optional. An optional user provided description of the SecurityAction. Corresponds to the JSON property description

Returns:

  • (String)


8786
8787
8788
# File 'lib/google/apis/apigee_v1/classes.rb', line 8786

def description
  @description
end

#expire_timeString

The expiration for this SecurityAction. Corresponds to the JSON property expireTime

Returns:

  • (String)


8791
8792
8793
# File 'lib/google/apis/apigee_v1/classes.rb', line 8791

def expire_time
  @expire_time
end

#flagGoogle::Apis::ApigeeV1::GoogleCloudApigeeV1SecurityActionFlag

The message that should be set in the case of a Flag action. Corresponds to the JSON property flag



8796
8797
8798
# File 'lib/google/apis/apigee_v1/classes.rb', line 8796

def flag
  @flag
end

#nameString

Immutable. This field is ignored during creation as per AIP-133. Please set the security_action_id field in the CreateSecurityActionRequest when creating a new SecurityAction. Format: organizations/org/environments/env/ securityActions/security_action Corresponds to the JSON property name

Returns:

  • (String)


8804
8805
8806
# File 'lib/google/apis/apigee_v1/classes.rb', line 8804

def name
  @name
end

#stateString

Required. Only an ENABLED SecurityAction is enforced. An ENABLED SecurityAction past its expiration time will not be enforced. Corresponds to the JSON property state

Returns:

  • (String)


8810
8811
8812
# File 'lib/google/apis/apigee_v1/classes.rb', line 8810

def state
  @state
end

#ttlString

Input only. The TTL for this SecurityAction. Corresponds to the JSON property ttl

Returns:

  • (String)


8815
8816
8817
# File 'lib/google/apis/apigee_v1/classes.rb', line 8815

def ttl
  @ttl
end

#update_timeString

Output only. The update time for this SecurityAction. This reflects when this SecurityAction changed states. Corresponds to the JSON property updateTime

Returns:

  • (String)


8821
8822
8823
# File 'lib/google/apis/apigee_v1/classes.rb', line 8821

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
# File 'lib/google/apis/apigee_v1/classes.rb', line 8828

def update!(**args)
  @allow = args[:allow] if args.key?(:allow)
  @condition_config = args[:condition_config] if args.key?(:condition_config)
  @create_time = args[:create_time] if args.key?(:create_time)
  @deny = args[:deny] if args.key?(:deny)
  @description = args[:description] if args.key?(:description)
  @expire_time = args[:expire_time] if args.key?(:expire_time)
  @flag = args[:flag] if args.key?(:flag)
  @name = args[:name] if args.key?(:name)
  @state = args[:state] if args.key?(:state)
  @ttl = args[:ttl] if args.key?(:ttl)
  @update_time = args[:update_time] if args.key?(:update_time)
end