Class: Google::Apis::ApigeeV1::GoogleCloudApigeeV1EnvironmentClientIpResolutionConfigHeaderIndexAlgorithm

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

Resolves the client ip based on a custom header.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudApigeeV1EnvironmentClientIpResolutionConfigHeaderIndexAlgorithm

Returns a new instance of GoogleCloudApigeeV1EnvironmentClientIpResolutionConfigHeaderIndexAlgorithm.



4410
4411
4412
# File 'lib/google/apis/apigee_v1/classes.rb', line 4410

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

Instance Attribute Details

#ip_header_indexFixnum

Required. The index of the ip in the header. Positive indices 0, 1, 2, 3 chooses indices from the left (first ips) Negative indices -1, -2, -3 chooses indices from the right (last ips) Corresponds to the JSON property ipHeaderIndex

Returns:

  • (Fixnum)


4402
4403
4404
# File 'lib/google/apis/apigee_v1/classes.rb', line 4402

def ip_header_index
  @ip_header_index
end

#ip_header_nameString

Required. The name of the header to extract the client ip from. We are currently only supporting the X-Forwarded-For header. Corresponds to the JSON property ipHeaderName

Returns:

  • (String)


4408
4409
4410
# File 'lib/google/apis/apigee_v1/classes.rb', line 4408

def ip_header_name
  @ip_header_name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4415
4416
4417
4418
# File 'lib/google/apis/apigee_v1/classes.rb', line 4415

def update!(**args)
  @ip_header_index = args[:ip_header_index] if args.key?(:ip_header_index)
  @ip_header_name = args[:ip_header_name] if args.key?(:ip_header_name)
end