class Google::Apis::ApikeysV2::V2ApiTarget

A restriction for a specific service and optionally one or multiple specific methods. Both fields are case insensitive.

Attributes

methods_prop[RW]

Optional. List of one or more methods that can be called. If empty, all methods for the service are allowed. A wildcard (*) can be used as the last symbol. Valid examples: `google.cloud.translate.v2.TranslateService. GetSupportedLanguage` `TranslateText` `Get*` `translate.googleapis.com.Get*` Corresponds to the JSON property `methods` @return [Array<String>]

service[RW]

The service for this restriction. It should be the canonical service name, for example: `translate.googleapis.com`. You can use [`gcloud services list`](/sdk/ gcloud/reference/services/list) to get a list of services that are enabled in the project. Corresponds to the JSON property `service` @return [String]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/apikeys_v2/classes.rb, line 194
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/apikeys_v2/classes.rb, line 199
def update!(**args)
  @methods_prop = args[:methods_prop] if args.key?(:methods_prop)
  @service = args[:service] if args.key?(:service)
end