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.



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

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>)


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

def allowed_ips
  @allowed_ips
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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