Class: Google::Apis::CloudfunctionsV2beta::ServiceConfig
- Inherits:
-
Object
- Object
- Google::Apis::CloudfunctionsV2beta::ServiceConfig
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/cloudfunctions_v2beta/classes.rb,
lib/google/apis/cloudfunctions_v2beta/representations.rb,
lib/google/apis/cloudfunctions_v2beta/representations.rb
Overview
Describes the Service being deployed. Currently Supported : Cloud Run (fully managed).
Instance Attribute Summary collapse
-
#all_traffic_on_latest_revision ⇒ Boolean
(also: #all_traffic_on_latest_revision?)
Whether 100% of traffic is routed to the latest revision.
-
#available_cpu ⇒ String
The number of CPUs used in a single container instance.
-
#available_memory ⇒ String
The amount of memory available for a function.
-
#binary_authorization_policy ⇒ String
Optional.
-
#direct_vpc_egress ⇒ String
Optional.
-
#direct_vpc_network_interface ⇒ Array<Google::Apis::CloudfunctionsV2beta::DirectVpcNetworkInterface>
Optional.
-
#environment_variables ⇒ Hash<String,String>
Environment variables that shall be available during function execution.
-
#ingress_settings ⇒ String
The ingress settings for the function, controlling what traffic can reach it.
-
#max_instance_count ⇒ Fixnum
The limit on the maximum number of function instances that may coexist at a given time.
-
#max_instance_request_concurrency ⇒ Fixnum
Sets the maximum number of concurrent requests that each instance can receive.
-
#min_instance_count ⇒ Fixnum
The limit on the minimum number of function instances that may coexist at a given time.
-
#revision ⇒ String
Output only.
-
#secret_environment_variables ⇒ Array<Google::Apis::CloudfunctionsV2beta::SecretEnvVar>
Secret environment variables configuration.
-
#secret_volumes ⇒ Array<Google::Apis::CloudfunctionsV2beta::SecretVolume>
Secret volumes configuration.
-
#security_level ⇒ String
Security level configure whether the function only accepts https.
-
#service ⇒ String
Output only.
-
#service_account_email ⇒ String
The email of the service's service account.
-
#timeout_seconds ⇒ Fixnum
The function execution timeout.
-
#uri ⇒ String
Output only.
-
#vpc_connector ⇒ String
The Serverless VPC Access connector that this cloud function can connect to.
-
#vpc_connector_egress_settings ⇒ String
The egress settings for the connector, controlling what traffic is diverted through it.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ServiceConfig
constructor
A new instance of ServiceConfig.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ServiceConfig
Returns a new instance of ServiceConfig.
1894 1895 1896 |
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 1894 def initialize(**args) update!(**args) end |
Instance Attribute Details
#all_traffic_on_latest_revision ⇒ Boolean Also known as: all_traffic_on_latest_revision?
Whether 100% of traffic is routed to the latest revision. On CreateFunction
and UpdateFunction, when set to true, the revision being deployed will serve
100% of traffic, ignoring any traffic split settings, if any. On GetFunction,
true will be returned if the latest revision is serving 100% of traffic.
Corresponds to the JSON property allTrafficOnLatestRevision
1760 1761 1762 |
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 1760 def all_traffic_on_latest_revision @all_traffic_on_latest_revision end |
#available_cpu ⇒ String
The number of CPUs used in a single container instance. Default value is
calculated from available memory. Supports the same values as Cloud Run, see
https://cloud.google.com/run/docs/reference/rest/v1/Container#
resourcerequirements Example: "1" indicates 1 vCPU
Corresponds to the JSON property availableCpu
1769 1770 1771 |
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 1769 def available_cpu @available_cpu end |
#available_memory ⇒ String
The amount of memory available for a function. Defaults to 256M. Supported
units are k, M, G, Mi, Gi. If no unit is supplied the value is interpreted as
bytes. See https://github.com/kubernetes/kubernetes/blob/master/staging/src/
k8s.io/apimachinery/pkg/api/resource/quantity.go a full description.
Corresponds to the JSON property availableMemory
1777 1778 1779 |
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 1777 def available_memory @available_memory end |
#binary_authorization_policy ⇒ String
Optional. The binary authorization policy to be checked when deploying the
Cloud Run service.
Corresponds to the JSON property binaryAuthorizationPolicy
1783 1784 1785 |
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 1783 def @binary_authorization_policy end |
#direct_vpc_egress ⇒ String
Optional. Egress settings for direct VPC. If not provided, it defaults to
VPC_EGRESS_PRIVATE_RANGES_ONLY.
Corresponds to the JSON property directVpcEgress
1789 1790 1791 |
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 1789 def direct_vpc_egress @direct_vpc_egress end |
#direct_vpc_network_interface ⇒ Array<Google::Apis::CloudfunctionsV2beta::DirectVpcNetworkInterface>
Optional. The Direct VPC network interface for the Cloud Function. Currently
only a single Direct VPC is supported.
Corresponds to the JSON property directVpcNetworkInterface
1795 1796 1797 |
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 1795 def direct_vpc_network_interface @direct_vpc_network_interface end |
#environment_variables ⇒ Hash<String,String>
Environment variables that shall be available during function execution.
Corresponds to the JSON property environmentVariables
1800 1801 1802 |
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 1800 def environment_variables @environment_variables end |
#ingress_settings ⇒ String
The ingress settings for the function, controlling what traffic can reach it.
Corresponds to the JSON property ingressSettings
1805 1806 1807 |
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 1805 def ingress_settings @ingress_settings end |
#max_instance_count ⇒ Fixnum
The limit on the maximum number of function instances that may coexist at a
given time. In some cases, such as rapid traffic surges, Cloud Functions may,
for a short period of time, create more instances than the specified max
instances limit. If your function cannot tolerate this temporary behavior, you
may want to factor in a safety margin and set a lower max instances value than
your function can tolerate. See the Max Instances Guide for more details.
Corresponds to the JSON property maxInstanceCount
1816 1817 1818 |
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 1816 def max_instance_count @max_instance_count end |
#max_instance_request_concurrency ⇒ Fixnum
Sets the maximum number of concurrent requests that each instance can receive.
Defaults to 1.
Corresponds to the JSON property maxInstanceRequestConcurrency
1822 1823 1824 |
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 1822 def max_instance_request_concurrency @max_instance_request_concurrency end |
#min_instance_count ⇒ Fixnum
The limit on the minimum number of function instances that may coexist at a
given time. Function instances are kept in idle state for a short period after
they finished executing the request to reduce cold start time for subsequent
requests. Setting a minimum instance count will ensure that the given number
of instances are kept running in idle state always. This can help with cold
start times when jump in incoming request count occurs after the idle instance
would have been stopped in the default case.
Corresponds to the JSON property minInstanceCount
1833 1834 1835 |
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 1833 def min_instance_count @min_instance_count end |
#revision ⇒ String
Output only. The name of service revision.
Corresponds to the JSON property revision
1838 1839 1840 |
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 1838 def revision @revision end |
#secret_environment_variables ⇒ Array<Google::Apis::CloudfunctionsV2beta::SecretEnvVar>
Secret environment variables configuration.
Corresponds to the JSON property secretEnvironmentVariables
1843 1844 1845 |
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 1843 def secret_environment_variables @secret_environment_variables end |
#secret_volumes ⇒ Array<Google::Apis::CloudfunctionsV2beta::SecretVolume>
Secret volumes configuration.
Corresponds to the JSON property secretVolumes
1848 1849 1850 |
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 1848 def secret_volumes @secret_volumes end |
#security_level ⇒ String
Security level configure whether the function only accepts https. This
configuration is only applicable to 1st Gen functions with Http trigger. By
default https is optional for 1st Gen functions; 2nd Gen functions are https
ONLY.
Corresponds to the JSON property securityLevel
1856 1857 1858 |
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 1856 def security_level @security_level end |
#service ⇒ String
Output only. Name of the service associated with a Function. The format of
this field is projects/project/locations/region/services/service`
Corresponds to the JSON propertyservice`
1862 1863 1864 |
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 1862 def service @service end |
#service_account_email ⇒ String
The email of the service's service account. If empty, defaults to `
project_number-compute@developer.gserviceaccount.com.
Corresponds to the JSON propertyserviceAccountEmail`
1868 1869 1870 |
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 1868 def service_account_email @service_account_email end |
#timeout_seconds ⇒ Fixnum
The function execution timeout. Execution is considered failed and can be
terminated if the function is not completed at the end of the timeout period.
Defaults to 60 seconds.
Corresponds to the JSON property timeoutSeconds
1875 1876 1877 |
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 1875 def timeout_seconds @timeout_seconds end |
#uri ⇒ String
Output only. URI of the Service deployed.
Corresponds to the JSON property uri
1880 1881 1882 |
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 1880 def uri @uri end |
#vpc_connector ⇒ String
The Serverless VPC Access connector that this cloud function can connect to.
The format of this field is projects/*/locations/*/connectors/*.
Corresponds to the JSON property vpcConnector
1886 1887 1888 |
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 1886 def vpc_connector @vpc_connector end |
#vpc_connector_egress_settings ⇒ String
The egress settings for the connector, controlling what traffic is diverted
through it.
Corresponds to the JSON property vpcConnectorEgressSettings
1892 1893 1894 |
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 1892 def vpc_connector_egress_settings @vpc_connector_egress_settings end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 |
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 1899 def update!(**args) @all_traffic_on_latest_revision = args[:all_traffic_on_latest_revision] if args.key?(:all_traffic_on_latest_revision) @available_cpu = args[:available_cpu] if args.key?(:available_cpu) @available_memory = args[:available_memory] if args.key?(:available_memory) @binary_authorization_policy = args[:binary_authorization_policy] if args.key?(:binary_authorization_policy) @direct_vpc_egress = args[:direct_vpc_egress] if args.key?(:direct_vpc_egress) @direct_vpc_network_interface = args[:direct_vpc_network_interface] if args.key?(:direct_vpc_network_interface) @environment_variables = args[:environment_variables] if args.key?(:environment_variables) @ingress_settings = args[:ingress_settings] if args.key?(:ingress_settings) @max_instance_count = args[:max_instance_count] if args.key?(:max_instance_count) @max_instance_request_concurrency = args[:max_instance_request_concurrency] if args.key?(:max_instance_request_concurrency) @min_instance_count = args[:min_instance_count] if args.key?(:min_instance_count) @revision = args[:revision] if args.key?(:revision) @secret_environment_variables = args[:secret_environment_variables] if args.key?(:secret_environment_variables) @secret_volumes = args[:secret_volumes] if args.key?(:secret_volumes) @security_level = args[:security_level] if args.key?(:security_level) @service = args[:service] if args.key?(:service) @service_account_email = args[:service_account_email] if args.key?(:service_account_email) @timeout_seconds = args[:timeout_seconds] if args.key?(:timeout_seconds) @uri = args[:uri] if args.key?(:uri) @vpc_connector = args[:vpc_connector] if args.key?(:vpc_connector) @vpc_connector_egress_settings = args[:vpc_connector_egress_settings] if args.key?(:vpc_connector_egress_settings) end |