Module: Google::Cloud::AppEngine

Defined in:
lib/google/cloud/app_engine.rb,
lib/google/cloud/app_engine/version.rb

Constant Summary collapse

VERSION =
"1.4.0"

Class Method Summary collapse

Class Method Details

.applications(version: :v1, transport: :grpc, &block) ⇒ ::Object

Create a new client object for Applications.

By default, this returns an instance of Google::Cloud::AppEngine::V1::Applications::Client for a gRPC client for version V1 of the API. However, you can specify a different API version by passing it in the version parameter. If the Applications service is supported by that API version, and the corresponding gem is available, the appropriate versioned client will be returned. You can also specify a different transport by passing :rest or :grpc in the transport parameter.

About Applications

Manages App Engine applications.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v1)

    The API version to connect to. Optional. Defaults to :v1.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



70
71
72
73
74
75
76
77
78
79
80
# File 'lib/google/cloud/app_engine.rb', line 70

def self.applications version: :v1, transport: :grpc, &block
  require "google/cloud/app_engine/#{version.to_s.downcase}"

  package_name = Google::Cloud::AppEngine
                 .constants
                 .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
                 .first
  service_module = Google::Cloud::AppEngine.const_get(package_name).const_get(:Applications)
  service_module = service_module.const_get(:Rest) if transport == :rest
  service_module.const_get(:Client).new(&block)
end

.authorized_certificates(version: :v1, transport: :grpc, &block) ⇒ ::Object

Create a new client object for AuthorizedCertificates.

By default, this returns an instance of Google::Cloud::AppEngine::V1::AuthorizedCertificates::Client for a gRPC client for version V1 of the API. However, you can specify a different API version by passing it in the version parameter. If the AuthorizedCertificates service is supported by that API version, and the corresponding gem is available, the appropriate versioned client will be returned. You can also specify a different transport by passing :rest or :grpc in the transport parameter.

About AuthorizedCertificates

Manages SSL certificates a user is authorized to administer. A user can administer any SSL certificates applicable to their authorized domains.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v1)

    The API version to connect to. Optional. Defaults to :v1.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



286
287
288
289
290
291
292
293
294
295
296
# File 'lib/google/cloud/app_engine.rb', line 286

def self.authorized_certificates version: :v1, transport: :grpc, &block
  require "google/cloud/app_engine/#{version.to_s.downcase}"

  package_name = Google::Cloud::AppEngine
                 .constants
                 .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
                 .first
  service_module = Google::Cloud::AppEngine.const_get(package_name).const_get(:AuthorizedCertificates)
  service_module = service_module.const_get(:Rest) if transport == :rest
  service_module.const_get(:Client).new(&block)
end

.authorized_domains(version: :v1, transport: :grpc, &block) ⇒ ::Object

Create a new client object for AuthorizedDomains.

By default, this returns an instance of Google::Cloud::AppEngine::V1::AuthorizedDomains::Client for a gRPC client for version V1 of the API. However, you can specify a different API version by passing it in the version parameter. If the AuthorizedDomains service is supported by that API version, and the corresponding gem is available, the appropriate versioned client will be returned. You can also specify a different transport by passing :rest or :grpc in the transport parameter.

About AuthorizedDomains

Manages domains a user is authorized to administer. To authorize use of a domain, verify ownership via Webmaster Central.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v1)

    The API version to connect to. Optional. Defaults to :v1.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



251
252
253
254
255
256
257
258
259
260
261
# File 'lib/google/cloud/app_engine.rb', line 251

def self.authorized_domains version: :v1, transport: :grpc, &block
  require "google/cloud/app_engine/#{version.to_s.downcase}"

  package_name = Google::Cloud::AppEngine
                 .constants
                 .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
                 .first
  service_module = Google::Cloud::AppEngine.const_get(package_name).const_get(:AuthorizedDomains)
  service_module = service_module.const_get(:Rest) if transport == :rest
  service_module.const_get(:Client).new(&block)
end

.configure {|::Google::Cloud.configure.app_engine| ... } ⇒ ::Google::Cloud::Config

Configure the google-cloud-app_engine library.

The following configuration parameters are supported:

  • credentials (type: String, Hash, Google::Auth::Credentials) - The path to the keyfile as a String, the contents of the keyfile as a Hash, or a Google::Auth::Credentials object.
  • lib_name (type: String) - The library name as recorded in instrumentation and logging.
  • lib_version (type: String) - The library version as recorded in instrumentation and logging.
  • interceptors (type: Array<GRPC::ClientInterceptor>) - An array of interceptors that are run before calls are executed.
  • timeout (type: Numeric) - Default timeout in seconds.
  • metadata (type: Hash{Symbol=>String}) - Additional headers to be sent with the call.
  • retry_policy (type: Hash) - The retry policy. The value is a hash with the following keys:
    • :initial_delay (type: Numeric) - The initial delay in seconds.
    • :max_delay (type: Numeric) - The max delay in seconds.
    • :multiplier (type: Numeric) - The incremental backoff multiplier.
    • :retry_codes (type: Array<String>) - The error codes that should trigger a retry.

Yields:

Returns:

  • (::Google::Cloud::Config)

    The default configuration used by this library



360
361
362
363
364
# File 'lib/google/cloud/app_engine.rb', line 360

def self.configure
  yield ::Google::Cloud.configure.app_engine if block_given?

  ::Google::Cloud.configure.app_engine
end

.domain_mappings(version: :v1, transport: :grpc, &block) ⇒ ::Object

Create a new client object for DomainMappings.

By default, this returns an instance of Google::Cloud::AppEngine::V1::DomainMappings::Client for a gRPC client for version V1 of the API. However, you can specify a different API version by passing it in the version parameter. If the DomainMappings service is supported by that API version, and the corresponding gem is available, the appropriate versioned client will be returned. You can also specify a different transport by passing :rest or :grpc in the transport parameter.

About DomainMappings

Manages domains serving an application.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v1)

    The API version to connect to. Optional. Defaults to :v1.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



320
321
322
323
324
325
326
327
328
329
330
# File 'lib/google/cloud/app_engine.rb', line 320

def self.domain_mappings version: :v1, transport: :grpc, &block
  require "google/cloud/app_engine/#{version.to_s.downcase}"

  package_name = Google::Cloud::AppEngine
                 .constants
                 .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
                 .first
  service_module = Google::Cloud::AppEngine.const_get(package_name).const_get(:DomainMappings)
  service_module = service_module.const_get(:Rest) if transport == :rest
  service_module.const_get(:Client).new(&block)
end

.firewall(version: :v1, transport: :grpc, &block) ⇒ ::Object

Create a new client object for Firewall.

By default, this returns an instance of Google::Cloud::AppEngine::V1::Firewall::Client for a gRPC client for version V1 of the API. However, you can specify a different API version by passing it in the version parameter. If the Firewall service is supported by that API version, and the corresponding gem is available, the appropriate versioned client will be returned. You can also specify a different transport by passing :rest or :grpc in the transport parameter.

About Firewall

Firewall resources are used to define a collection of access control rules for an Application. Each rule is defined with a position which specifies the rule's order in the sequence of rules, an IP range to be matched against requests, and an action to take upon matching requests.

Every request is evaluated against the Firewall rules in priority order. Processesing stops at the first rule which matches the request's IP address. A final rule always specifies an action that applies to all remaining IP addresses. The default final rule for a newly-created application will be set to "allow" if not otherwise specified by the user.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v1)

    The API version to connect to. Optional. Defaults to :v1.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



215
216
217
218
219
220
221
222
223
224
225
# File 'lib/google/cloud/app_engine.rb', line 215

def self.firewall version: :v1, transport: :grpc, &block
  require "google/cloud/app_engine/#{version.to_s.downcase}"

  package_name = Google::Cloud::AppEngine
                 .constants
                 .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
                 .first
  service_module = Google::Cloud::AppEngine.const_get(package_name).const_get(:Firewall)
  service_module = service_module.const_get(:Rest) if transport == :rest
  service_module.const_get(:Client).new(&block)
end

.instances(version: :v1, transport: :grpc, &block) ⇒ ::Object

Create a new client object for Instances.

By default, this returns an instance of Google::Cloud::AppEngine::V1::Instances::Client for a gRPC client for version V1 of the API. However, you can specify a different API version by passing it in the version parameter. If the Instances service is supported by that API version, and the corresponding gem is available, the appropriate versioned client will be returned. You can also specify a different transport by passing :rest or :grpc in the transport parameter.

About Instances

Manages instances of a version.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v1)

    The API version to connect to. Optional. Defaults to :v1.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



172
173
174
175
176
177
178
179
180
181
182
# File 'lib/google/cloud/app_engine.rb', line 172

def self.instances version: :v1, transport: :grpc, &block
  require "google/cloud/app_engine/#{version.to_s.downcase}"

  package_name = Google::Cloud::AppEngine
                 .constants
                 .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
                 .first
  service_module = Google::Cloud::AppEngine.const_get(package_name).const_get(:Instances)
  service_module = service_module.const_get(:Rest) if transport == :rest
  service_module.const_get(:Client).new(&block)
end

.services(version: :v1, transport: :grpc, &block) ⇒ ::Object

Create a new client object for Services.

By default, this returns an instance of Google::Cloud::AppEngine::V1::Services::Client for a gRPC client for version V1 of the API. However, you can specify a different API version by passing it in the version parameter. If the Services service is supported by that API version, and the corresponding gem is available, the appropriate versioned client will be returned. You can also specify a different transport by passing :rest or :grpc in the transport parameter.

About Services

Manages services of an application.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v1)

    The API version to connect to. Optional. Defaults to :v1.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



104
105
106
107
108
109
110
111
112
113
114
# File 'lib/google/cloud/app_engine.rb', line 104

def self.services version: :v1, transport: :grpc, &block
  require "google/cloud/app_engine/#{version.to_s.downcase}"

  package_name = Google::Cloud::AppEngine
                 .constants
                 .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
                 .first
  service_module = Google::Cloud::AppEngine.const_get(package_name).const_get(:Services)
  service_module = service_module.const_get(:Rest) if transport == :rest
  service_module.const_get(:Client).new(&block)
end

.versions(version: :v1, transport: :grpc, &block) ⇒ ::Object

Create a new client object for Versions.

By default, this returns an instance of Google::Cloud::AppEngine::V1::Versions::Client for a gRPC client for version V1 of the API. However, you can specify a different API version by passing it in the version parameter. If the Versions service is supported by that API version, and the corresponding gem is available, the appropriate versioned client will be returned. You can also specify a different transport by passing :rest or :grpc in the transport parameter.

About Versions

Manages versions of a service.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v1)

    The API version to connect to. Optional. Defaults to :v1.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



138
139
140
141
142
143
144
145
146
147
148
# File 'lib/google/cloud/app_engine.rb', line 138

def self.versions version: :v1, transport: :grpc, &block
  require "google/cloud/app_engine/#{version.to_s.downcase}"

  package_name = Google::Cloud::AppEngine
                 .constants
                 .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
                 .first
  service_module = Google::Cloud::AppEngine.const_get(package_name).const_get(:Versions)
  service_module = service_module.const_get(:Rest) if transport == :rest
  service_module.const_get(:Client).new(&block)
end