Class: Google::Apis::ApikeysV2::V2ServerKeyRestrictions

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

Overview

The IP addresses of callers that are allowed to use the key.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ V2ServerKeyRestrictions

Returns a new instance of V2ServerKeyRestrictions.



459
460
461
# File 'lib/google/apis/apikeys_v2/classes.rb', line 459

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

Instance Attribute Details

#allowed_ipsArray<String>

A list of the caller IP addresses that are allowed to make API calls with this key. Corresponds to the JSON property allowedIps

Returns:

  • (Array<String>)


457
458
459
# File 'lib/google/apis/apikeys_v2/classes.rb', line 457

def allowed_ips
  @allowed_ips
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



464
465
466
# File 'lib/google/apis/apikeys_v2/classes.rb', line 464

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