diff --git a/clients/compute/README.md b/clients/compute/README.md index d08ce85b6d..bc7740401e 100644 --- a/clients/compute/README.md +++ b/clients/compute/README.md @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding ```elixir def deps do - [{:google_api_compute, "~> 0.69"}] + [{:google_api_compute, "~> 0.70"}] end ``` diff --git a/clients/compute/lib/google_api/compute/v1/api/instance_group_managers.ex b/clients/compute/lib/google_api/compute/v1/api/instance_group_managers.ex index d666a500e2..bb52ab2eb7 100644 --- a/clients/compute/lib/google_api/compute/v1/api/instance_group_managers.ex +++ b/clients/compute/lib/google_api/compute/v1/api/instance_group_managers.ex @@ -1518,6 +1518,93 @@ defmodule GoogleApi.Compute.V1.Api.InstanceGroupManagers do |> Response.decode(opts ++ [struct: %GoogleApi.Compute.V1.Model.Operation{}]) end + @doc """ + Flags the specified instances in the managed instance group to be resumed. This method increases the targetSize and decreases the targetSuspendedSize of the managed instance group by the number of instances that you resume. The resumeInstances operation is marked DONE if the resumeInstances request is successful. The underlying actions take additional time. You must separately verify the status of the RESUMING action with the listmanagedinstances method. In this request, you can only specify instances that are suspended. For example, if an instance was previously suspended using the suspendInstances method, it can be resumed using the resumeInstances method. If a health check is attached to the managed instance group, the specified instances will be verified as healthy after they are resumed. You can specify a maximum of 1000 instances with this method per request. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Compute.V1.Connection.t`) - Connection to server + * `project` (*type:* `String.t`) - Project ID for this request. + * `zone` (*type:* `String.t`) - The name of the zone where the managed instance group is located. + * `instance_group_manager` (*type:* `String.t`) - The name of the managed instance group. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:userIp` (*type:* `String.t`) - Legacy name for parameter that has been superseded by `quotaUser`. + * `:requestId` (*type:* `String.t`) - An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * `:body` (*type:* `GoogleApi.Compute.V1.Model.InstanceGroupManagersResumeInstancesRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Compute.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec compute_instance_group_managers_resume_instances( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Compute.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def compute_instance_group_managers_resume_instances( + connection, + project, + zone, + instance_group_manager, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :userIp => :query, + :requestId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resumeInstances", + %{ + "project" => URI.encode(project, &URI.char_unreserved?/1), + "zone" => URI.encode(zone, &URI.char_unreserved?/1), + "instanceGroupManager" => URI.encode(instance_group_manager, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Compute.V1.Model.Operation{}]) + end + @doc """ Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group's updatePolicy.type to PROACTIVE. @@ -1692,6 +1779,267 @@ defmodule GoogleApi.Compute.V1.Api.InstanceGroupManagers do |> Response.decode(opts ++ [struct: %GoogleApi.Compute.V1.Model.Operation{}]) end + @doc """ + Flags the specified instances in the managed instance group to be started. This method increases the targetSize and decreases the targetStoppedSize of the managed instance group by the number of instances that you start. The startInstances operation is marked DONE if the startInstances request is successful. The underlying actions take additional time. You must separately verify the status of the STARTING action with the listmanagedinstances method. In this request, you can only specify instances that are stopped. For example, if an instance was previously stopped using the stopInstances method, it can be started using the startInstances method. If a health check is attached to the managed instance group, the specified instances will be verified as healthy after they are started. You can specify a maximum of 1000 instances with this method per request. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Compute.V1.Connection.t`) - Connection to server + * `project` (*type:* `String.t`) - Project ID for this request. + * `zone` (*type:* `String.t`) - The name of the zone where the managed instance group is located. + * `instance_group_manager` (*type:* `String.t`) - The name of the managed instance group. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:userIp` (*type:* `String.t`) - Legacy name for parameter that has been superseded by `quotaUser`. + * `:requestId` (*type:* `String.t`) - An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * `:body` (*type:* `GoogleApi.Compute.V1.Model.InstanceGroupManagersStartInstancesRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Compute.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec compute_instance_group_managers_start_instances( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Compute.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def compute_instance_group_managers_start_instances( + connection, + project, + zone, + instance_group_manager, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :userIp => :query, + :requestId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/startInstances", + %{ + "project" => URI.encode(project, &URI.char_unreserved?/1), + "zone" => URI.encode(zone, &URI.char_unreserved?/1), + "instanceGroupManager" => URI.encode(instance_group_manager, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Compute.V1.Model.Operation{}]) + end + + @doc """ + Flags the specified instances in the managed instance group to be immediately stopped. You can only specify instances that are running in this request. This method reduces the targetSize and increases the targetStoppedSize of the managed instance group by the number of instances that you stop. The stopInstances operation is marked DONE if the stopInstances request is successful. The underlying actions take additional time. You must separately verify the status of the STOPPING action with the listmanagedinstances method. If the standbyPolicy.initialDelaySec field is set, the group delays stopping the instances until initialDelaySec have passed from instance.creationTimestamp (that is, when the instance was created). This delay gives your application time to set itself up and initialize on the instance. If more than initialDelaySec seconds have passed since instance.creationTimestamp when this method is called, there will be zero delay. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is stopped. Stopped instances can be started using the startInstances method. You can specify a maximum of 1000 instances with this method per request. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Compute.V1.Connection.t`) - Connection to server + * `project` (*type:* `String.t`) - Project ID for this request. + * `zone` (*type:* `String.t`) - The name of the zone where the managed instance group is located. + * `instance_group_manager` (*type:* `String.t`) - The name of the managed instance group. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:userIp` (*type:* `String.t`) - Legacy name for parameter that has been superseded by `quotaUser`. + * `:requestId` (*type:* `String.t`) - An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * `:body` (*type:* `GoogleApi.Compute.V1.Model.InstanceGroupManagersStopInstancesRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Compute.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec compute_instance_group_managers_stop_instances( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Compute.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def compute_instance_group_managers_stop_instances( + connection, + project, + zone, + instance_group_manager, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :userIp => :query, + :requestId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/stopInstances", + %{ + "project" => URI.encode(project, &URI.char_unreserved?/1), + "zone" => URI.encode(zone, &URI.char_unreserved?/1), + "instanceGroupManager" => URI.encode(instance_group_manager, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Compute.V1.Model.Operation{}]) + end + + @doc """ + Flags the specified instances in the managed instance group to be immediately suspended. You can only specify instances that are running in this request. This method reduces the targetSize and increases the targetSuspendedSize of the managed instance group by the number of instances that you suspend. The suspendInstances operation is marked DONE if the suspendInstances request is successful. The underlying actions take additional time. You must separately verify the status of the SUSPENDING action with the listmanagedinstances method. If the standbyPolicy.initialDelaySec field is set, the group delays suspension of the instances until initialDelaySec have passed from instance.creationTimestamp (that is, when the instance was created). This delay gives your application time to set itself up and initialize on the instance. If more than initialDelaySec seconds have passed since instance.creationTimestamp when this method is called, there will be zero delay. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is suspended. Suspended instances can be resumed using the resumeInstances method. You can specify a maximum of 1000 instances with this method per request. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Compute.V1.Connection.t`) - Connection to server + * `project` (*type:* `String.t`) - Project ID for this request. + * `zone` (*type:* `String.t`) - The name of the zone where the managed instance group is located. + * `instance_group_manager` (*type:* `String.t`) - The name of the managed instance group. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:userIp` (*type:* `String.t`) - Legacy name for parameter that has been superseded by `quotaUser`. + * `:requestId` (*type:* `String.t`) - An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * `:body` (*type:* `GoogleApi.Compute.V1.Model.InstanceGroupManagersSuspendInstancesRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Compute.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec compute_instance_group_managers_suspend_instances( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Compute.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def compute_instance_group_managers_suspend_instances( + connection, + project, + zone, + instance_group_manager, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :userIp => :query, + :requestId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/suspendInstances", + %{ + "project" => URI.encode(project, &URI.char_unreserved?/1), + "zone" => URI.encode(zone, &URI.char_unreserved?/1), + "instanceGroupManager" => URI.encode(instance_group_manager, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Compute.V1.Model.Operation{}]) + end + @doc """ Inserts or updates per-instance configurations for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch. diff --git a/clients/compute/lib/google_api/compute/v1/api/instances.ex b/clients/compute/lib/google_api/compute/v1/api/instances.ex index 8067d7521c..eff186129a 100644 --- a/clients/compute/lib/google_api/compute/v1/api/instances.ex +++ b/clients/compute/lib/google_api/compute/v1/api/instances.ex @@ -3613,7 +3613,7 @@ defmodule GoogleApi.Compute.V1.Api.Instances do * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:userIp` (*type:* `String.t`) - Legacy name for parameter that has been superseded by `quotaUser`. * `:port` (*type:* `integer()`) - Specifies which COM or serial port to retrieve data from. - * `:start` (*type:* `String.t`) - Specifies the starting byte position of the output to return. To start with the first byte of output to the specified port, omit this field or set it to `0`. If the output for that byte position is available, this field matches the `start` parameter sent with the request. If the amount of serial console output exceeds the size of the buffer (1 MB), the oldest output is discarded and is no longer available. If the requested start position refers to discarded output, the start position is adjusted to the oldest output still available, and the adjusted start position is returned as the `start` property value. You can also provide a negative start position, which translates to the most recent number of bytes written to the serial port. For example, -3 is interpreted as the most recent 3 bytes written to the serial console. + * `:start` (*type:* `String.t`) - Specifies the starting byte position of the output to return. To start with the first byte of output to the specified port, omit this field or set it to `0`. If the output for that byte position is available, this field matches the `start` parameter sent with the request. If the amount of serial console output exceeds the size of the buffer (1 MB), the oldest output is discarded and is no longer available. If the requested start position refers to discarded output, the start position is adjusted to the oldest output still available, and the adjusted start position is returned as the `start` property value. You can also provide a negative start position, which translates to the most recent number of bytes written to the serial port. For example, -3 is interpreted as the most recent 3 bytes written to the serial console. Note that the negative start is bounded by the retained buffer size, and the returned serial console output will not exceed the max buffer size. * `opts` (*type:* `keyword()`) - Call options ## Returns diff --git a/clients/compute/lib/google_api/compute/v1/api/network_profiles.ex b/clients/compute/lib/google_api/compute/v1/api/network_profiles.ex new file mode 100644 index 0000000000..e88be14946 --- /dev/null +++ b/clients/compute/lib/google_api/compute/v1/api/network_profiles.ex @@ -0,0 +1,177 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Compute.V1.Api.NetworkProfiles do + @moduledoc """ + API calls for all endpoints tagged `NetworkProfiles`. + """ + + alias GoogleApi.Compute.V1.Connection + alias GoogleApi.Gax.{Request, Response} + + @library_version Mix.Project.config() |> Keyword.get(:version, "") + + @doc """ + Returns the specified network profile. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Compute.V1.Connection.t`) - Connection to server + * `project` (*type:* `String.t`) - Project ID for this request. + * `network_profile` (*type:* `String.t`) - Name of the network profile to return. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:userIp` (*type:* `String.t`) - Legacy name for parameter that has been superseded by `quotaUser`. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Compute.V1.Model.NetworkProfile{}}` on success + * `{:error, info}` on failure + """ + @spec compute_network_profiles_get( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Compute.V1.Model.NetworkProfile.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def compute_network_profiles_get( + connection, + project, + network_profile, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :userIp => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/projects/{project}/global/networkProfiles/{networkProfile}", %{ + "project" => URI.encode(project, &URI.char_unreserved?/1), + "networkProfile" => URI.encode(network_profile, &(URI.char_unreserved?(&1) || &1 == ?/)) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Compute.V1.Model.NetworkProfile{}]) + end + + @doc """ + Retrieves a list of network profiles available to the specified project. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Compute.V1.Connection.t`) - Connection to server + * `project` (*type:* `String.t`) - Project ID for this request. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:userIp` (*type:* `String.t`) - Legacy name for parameter that has been superseded by `quotaUser`. + * `:filter` (*type:* `String.t`) - A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + * `:maxResults` (*type:* `integer()`) - The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * `:orderBy` (*type:* `String.t`) - Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * `:pageToken` (*type:* `String.t`) - Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * `:returnPartialSuccess` (*type:* `boolean()`) - Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Compute.V1.Model.NetworkProfilesListResponse{}}` on success + * `{:error, info}` on failure + """ + @spec compute_network_profiles_list(Tesla.Env.client(), String.t(), keyword(), keyword()) :: + {:ok, GoogleApi.Compute.V1.Model.NetworkProfilesListResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def compute_network_profiles_list(connection, project, optional_params \\ [], opts \\ []) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :userIp => :query, + :filter => :query, + :maxResults => :query, + :orderBy => :query, + :pageToken => :query, + :returnPartialSuccess => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/projects/{project}/global/networkProfiles", %{ + "project" => URI.encode(project, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.Compute.V1.Model.NetworkProfilesListResponse{}] + ) + end +end diff --git a/clients/compute/lib/google_api/compute/v1/api/region_instance_group_managers.ex b/clients/compute/lib/google_api/compute/v1/api/region_instance_group_managers.ex index c6b23afa64..3403ffe0aa 100644 --- a/clients/compute/lib/google_api/compute/v1/api/region_instance_group_managers.ex +++ b/clients/compute/lib/google_api/compute/v1/api/region_instance_group_managers.ex @@ -1433,6 +1433,93 @@ defmodule GoogleApi.Compute.V1.Api.RegionInstanceGroupManagers do |> Response.decode(opts ++ [struct: %GoogleApi.Compute.V1.Model.Operation{}]) end + @doc """ + Flags the specified instances in the managed instance group to be resumed. This method increases the targetSize and decreases the targetSuspendedSize of the managed instance group by the number of instances that you resume. The resumeInstances operation is marked DONE if the resumeInstances request is successful. The underlying actions take additional time. You must separately verify the status of the RESUMING action with the listmanagedinstances method. In this request, you can only specify instances that are suspended. For example, if an instance was previously suspended using the suspendInstances method, it can be resumed using the resumeInstances method. If a health check is attached to the managed instance group, the specified instances will be verified as healthy after they are resumed. You can specify a maximum of 1000 instances with this method per request. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Compute.V1.Connection.t`) - Connection to server + * `project` (*type:* `String.t`) - Project ID for this request. + * `region` (*type:* `String.t`) - Name of the region scoping this request. + * `instance_group_manager` (*type:* `String.t`) - Name of the managed instance group. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:userIp` (*type:* `String.t`) - Legacy name for parameter that has been superseded by `quotaUser`. + * `:requestId` (*type:* `String.t`) - An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * `:body` (*type:* `GoogleApi.Compute.V1.Model.RegionInstanceGroupManagersResumeInstancesRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Compute.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec compute_region_instance_group_managers_resume_instances( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Compute.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def compute_region_instance_group_managers_resume_instances( + connection, + project, + region, + instance_group_manager, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :userIp => :query, + :requestId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resumeInstances", + %{ + "project" => URI.encode(project, &URI.char_unreserved?/1), + "region" => URI.encode(region, &URI.char_unreserved?/1), + "instanceGroupManager" => URI.encode(instance_group_manager, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Compute.V1.Model.Operation{}]) + end + @doc """ Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected. @@ -1607,6 +1694,267 @@ defmodule GoogleApi.Compute.V1.Api.RegionInstanceGroupManagers do |> Response.decode(opts ++ [struct: %GoogleApi.Compute.V1.Model.Operation{}]) end + @doc """ + Flags the specified instances in the managed instance group to be started. This method increases the targetSize and decreases the targetStoppedSize of the managed instance group by the number of instances that you start. The startInstances operation is marked DONE if the startInstances request is successful. The underlying actions take additional time. You must separately verify the status of the STARTING action with the listmanagedinstances method. In this request, you can only specify instances that are stopped. For example, if an instance was previously stopped using the stopInstances method, it can be started using the startInstances method. If a health check is attached to the managed instance group, the specified instances will be verified as healthy after they are started. You can specify a maximum of 1000 instances with this method per request. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Compute.V1.Connection.t`) - Connection to server + * `project` (*type:* `String.t`) - Project ID for this request. + * `region` (*type:* `String.t`) - Name of the region scoping this request. + * `instance_group_manager` (*type:* `String.t`) - Name of the managed instance group. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:userIp` (*type:* `String.t`) - Legacy name for parameter that has been superseded by `quotaUser`. + * `:requestId` (*type:* `String.t`) - An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * `:body` (*type:* `GoogleApi.Compute.V1.Model.RegionInstanceGroupManagersStartInstancesRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Compute.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec compute_region_instance_group_managers_start_instances( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Compute.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def compute_region_instance_group_managers_start_instances( + connection, + project, + region, + instance_group_manager, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :userIp => :query, + :requestId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/startInstances", + %{ + "project" => URI.encode(project, &URI.char_unreserved?/1), + "region" => URI.encode(region, &URI.char_unreserved?/1), + "instanceGroupManager" => URI.encode(instance_group_manager, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Compute.V1.Model.Operation{}]) + end + + @doc """ + Flags the specified instances in the managed instance group to be immediately stopped. You can only specify instances that are running in this request. This method reduces the targetSize and increases the targetStoppedSize of the managed instance group by the number of instances that you stop. The stopInstances operation is marked DONE if the stopInstances request is successful. The underlying actions take additional time. You must separately verify the status of the STOPPING action with the listmanagedinstances method. If the standbyPolicy.initialDelaySec field is set, the group delays stopping the instances until initialDelaySec have passed from instance.creationTimestamp (that is, when the instance was created). This delay gives your application time to set itself up and initialize on the instance. If more than initialDelaySec seconds have passed since instance.creationTimestamp when this method is called, there will be zero delay. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is stopped. Stopped instances can be started using the startInstances method. You can specify a maximum of 1000 instances with this method per request. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Compute.V1.Connection.t`) - Connection to server + * `project` (*type:* `String.t`) - Project ID for this request. + * `region` (*type:* `String.t`) - Name of the region scoping this request. + * `instance_group_manager` (*type:* `String.t`) - The name of the managed instance group. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:userIp` (*type:* `String.t`) - Legacy name for parameter that has been superseded by `quotaUser`. + * `:requestId` (*type:* `String.t`) - An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * `:body` (*type:* `GoogleApi.Compute.V1.Model.RegionInstanceGroupManagersStopInstancesRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Compute.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec compute_region_instance_group_managers_stop_instances( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Compute.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def compute_region_instance_group_managers_stop_instances( + connection, + project, + region, + instance_group_manager, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :userIp => :query, + :requestId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/stopInstances", + %{ + "project" => URI.encode(project, &URI.char_unreserved?/1), + "region" => URI.encode(region, &URI.char_unreserved?/1), + "instanceGroupManager" => URI.encode(instance_group_manager, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Compute.V1.Model.Operation{}]) + end + + @doc """ + Flags the specified instances in the managed instance group to be immediately suspended. You can only specify instances that are running in this request. This method reduces the targetSize and increases the targetSuspendedSize of the managed instance group by the number of instances that you suspend. The suspendInstances operation is marked DONE if the suspendInstances request is successful. The underlying actions take additional time. You must separately verify the status of the SUSPENDING action with the listmanagedinstances method. If the standbyPolicy.initialDelaySec field is set, the group delays suspension of the instances until initialDelaySec have passed from instance.creationTimestamp (that is, when the instance was created). This delay gives your application time to set itself up and initialize on the instance. If more than initialDelaySec seconds have passed since instance.creationTimestamp when this method is called, there will be zero delay. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is suspended. Suspended instances can be resumed using the resumeInstances method. You can specify a maximum of 1000 instances with this method per request. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Compute.V1.Connection.t`) - Connection to server + * `project` (*type:* `String.t`) - Project ID for this request. + * `region` (*type:* `String.t`) - Name of the region scoping this request. + * `instance_group_manager` (*type:* `String.t`) - Name of the managed instance group. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:userIp` (*type:* `String.t`) - Legacy name for parameter that has been superseded by `quotaUser`. + * `:requestId` (*type:* `String.t`) - An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * `:body` (*type:* `GoogleApi.Compute.V1.Model.RegionInstanceGroupManagersSuspendInstancesRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Compute.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec compute_region_instance_group_managers_suspend_instances( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Compute.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def compute_region_instance_group_managers_suspend_instances( + connection, + project, + region, + instance_group_manager, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :userIp => :query, + :requestId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/suspendInstances", + %{ + "project" => URI.encode(project, &URI.char_unreserved?/1), + "region" => URI.encode(region, &URI.char_unreserved?/1), + "instanceGroupManager" => URI.encode(instance_group_manager, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Compute.V1.Model.Operation{}]) + end + @doc """ Inserts or updates per-instance configurations for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch. diff --git a/clients/compute/lib/google_api/compute/v1/api/region_security_policies.ex b/clients/compute/lib/google_api/compute/v1/api/region_security_policies.ex index f882ca36fc..ddf3bb797d 100644 --- a/clients/compute/lib/google_api/compute/v1/api/region_security_policies.ex +++ b/clients/compute/lib/google_api/compute/v1/api/region_security_policies.ex @@ -788,4 +788,91 @@ defmodule GoogleApi.Compute.V1.Api.RegionSecurityPolicies do |> Connection.execute(request) |> Response.decode(opts ++ [struct: %GoogleApi.Compute.V1.Model.Operation{}]) end + + @doc """ + Sets the labels on a security policy. To learn more about labels, read the Labeling Resources documentation. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Compute.V1.Connection.t`) - Connection to server + * `project` (*type:* `String.t`) - Project ID for this request. + * `region` (*type:* `String.t`) - The region for this request. + * `resource` (*type:* `String.t`) - Name or id of the resource for this request. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:userIp` (*type:* `String.t`) - Legacy name for parameter that has been superseded by `quotaUser`. + * `:requestId` (*type:* `String.t`) - An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * `:body` (*type:* `GoogleApi.Compute.V1.Model.RegionSetLabelsRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Compute.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec compute_region_security_policies_set_labels( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Compute.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def compute_region_security_policies_set_labels( + connection, + project, + region, + resource, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :userIp => :query, + :requestId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/projects/{project}/regions/{region}/securityPolicies/{resource}/setLabels", + %{ + "project" => URI.encode(project, &URI.char_unreserved?/1), + "region" => URI.encode(region, &URI.char_unreserved?/1), + "resource" => URI.encode(resource, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Compute.V1.Model.Operation{}]) + end end diff --git a/clients/compute/lib/google_api/compute/v1/metadata.ex b/clients/compute/lib/google_api/compute/v1/metadata.ex index 6f0ec6d1c7..48b1ecdaa3 100644 --- a/clients/compute/lib/google_api/compute/v1/metadata.ex +++ b/clients/compute/lib/google_api/compute/v1/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.Compute.V1 do API client metadata for GoogleApi.Compute.V1. """ - @discovery_revision "20241105" + @discovery_revision "20241201" def discovery_revision(), do: @discovery_revision end diff --git a/clients/compute/lib/google_api/compute/v1/model/backend_bucket_cdn_policy.ex b/clients/compute/lib/google_api/compute/v1/model/backend_bucket_cdn_policy.ex index 3965919ec3..2ae80f35ae 100644 --- a/clients/compute/lib/google_api/compute/v1/model/backend_bucket_cdn_policy.ex +++ b/clients/compute/lib/google_api/compute/v1/model/backend_bucket_cdn_policy.ex @@ -23,7 +23,7 @@ defmodule GoogleApi.Compute.V1.Model.BackendBucketCdnPolicy do * `bypassCacheOnRequestHeaders` (*type:* `list(GoogleApi.Compute.V1.Model.BackendBucketCdnPolicyBypassCacheOnRequestHeader.t)`, *default:* `nil`) - Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. * `cacheKeyPolicy` (*type:* `GoogleApi.Compute.V1.Model.BackendBucketCdnPolicyCacheKeyPolicy.t`, *default:* `nil`) - The CacheKeyPolicy for this CdnPolicy. - * `cacheMode` (*type:* `String.t`, *default:* `nil`) - Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting performance and increasing load on the origin server. FORCE_CACHE_ALL Cache all content, ignoring any "private", "no-store" or "no-cache" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, per-user (user identifiable) content. CACHE_ALL_STATIC Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), will not be cached. + * `cacheMode` (*type:* `String.t`, *default:* `nil`) - Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting performance and increasing load on the origin server. FORCE_CACHE_ALL Cache all content, ignoring any "private", "no-store" or "no-cache" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, per-user (user identifiable) content. CACHE_ALL_STATIC Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), will not be cached. If no value is provided for cdnPolicy.cacheMode, it defaults to CACHE_ALL_STATIC. * `clientTtl` (*type:* `integer()`, *default:* `nil`) - Specifies a separate client (e.g. browser client) maximum TTL. This is used to clamp the max-age (or Expires) value sent to the client. With FORCE_CACHE_ALL, the lesser of client_ttl and default_ttl is used for the response max-age directive, along with a "public" directive. For cacheable content in CACHE_ALL_STATIC mode, client_ttl clamps the max-age from the origin (if specified), or else sets the response max-age directive to the lesser of the client_ttl and default_ttl, and also ensures a "public" cache-control directive is present. If a client TTL is not specified, a default value (1 hour) will be used. The maximum allowed value is 31,622,400s (1 year). * `defaultTtl` (*type:* `integer()`, *default:* `nil`) - Specifies the default TTL for cached content served by this origin for responses that do not have an existing valid TTL (max-age or s-max-age). Setting a TTL of "0" means "always revalidate". The value of defaultTTL cannot be set to a value greater than that of maxTTL, but can be equal. When the cacheMode is set to FORCE_CACHE_ALL, the defaultTTL will overwrite the TTL set in all responses. The maximum allowed value is 31,622,400s (1 year), noting that infrequently accessed objects may be evicted from the cache before the defined TTL. * `maxTtl` (*type:* `integer()`, *default:* `nil`) - Specifies the maximum allowed TTL for cached content served by this origin. Cache directives that attempt to set a max-age or s-maxage higher than this, or an Expires header more than maxTTL seconds in the future will be capped at the value of maxTTL, as if it were the value of an s-maxage Cache-Control directive. Headers sent to the client will not be modified. Setting a TTL of "0" means "always revalidate". The maximum allowed value is 31,622,400s (1 year), noting that infrequently accessed objects may be evicted from the cache before the defined TTL. diff --git a/clients/compute/lib/google_api/compute/v1/model/backend_service_cdn_policy.ex b/clients/compute/lib/google_api/compute/v1/model/backend_service_cdn_policy.ex index c3912c72b0..c3eacd6d8d 100644 --- a/clients/compute/lib/google_api/compute/v1/model/backend_service_cdn_policy.ex +++ b/clients/compute/lib/google_api/compute/v1/model/backend_service_cdn_policy.ex @@ -23,7 +23,7 @@ defmodule GoogleApi.Compute.V1.Model.BackendServiceCdnPolicy do * `bypassCacheOnRequestHeaders` (*type:* `list(GoogleApi.Compute.V1.Model.BackendServiceCdnPolicyBypassCacheOnRequestHeader.t)`, *default:* `nil`) - Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. * `cacheKeyPolicy` (*type:* `GoogleApi.Compute.V1.Model.CacheKeyPolicy.t`, *default:* `nil`) - The CacheKeyPolicy for this CdnPolicy. - * `cacheMode` (*type:* `String.t`, *default:* `nil`) - Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting performance and increasing load on the origin server. FORCE_CACHE_ALL Cache all content, ignoring any "private", "no-store" or "no-cache" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, per-user (user identifiable) content. CACHE_ALL_STATIC Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), will not be cached. + * `cacheMode` (*type:* `String.t`, *default:* `nil`) - Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting performance and increasing load on the origin server. FORCE_CACHE_ALL Cache all content, ignoring any "private", "no-store" or "no-cache" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, per-user (user identifiable) content. CACHE_ALL_STATIC Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), will not be cached. If no value is provided for cdnPolicy.cacheMode, it defaults to CACHE_ALL_STATIC. * `clientTtl` (*type:* `integer()`, *default:* `nil`) - Specifies a separate client (e.g. browser client) maximum TTL. This is used to clamp the max-age (or Expires) value sent to the client. With FORCE_CACHE_ALL, the lesser of client_ttl and default_ttl is used for the response max-age directive, along with a "public" directive. For cacheable content in CACHE_ALL_STATIC mode, client_ttl clamps the max-age from the origin (if specified), or else sets the response max-age directive to the lesser of the client_ttl and default_ttl, and also ensures a "public" cache-control directive is present. If a client TTL is not specified, a default value (1 hour) will be used. The maximum allowed value is 31,622,400s (1 year). * `defaultTtl` (*type:* `integer()`, *default:* `nil`) - Specifies the default TTL for cached content served by this origin for responses that do not have an existing valid TTL (max-age or s-max-age). Setting a TTL of "0" means "always revalidate". The value of defaultTTL cannot be set to a value greater than that of maxTTL, but can be equal. When the cacheMode is set to FORCE_CACHE_ALL, the defaultTTL will overwrite the TTL set in all responses. The maximum allowed value is 31,622,400s (1 year), noting that infrequently accessed objects may be evicted from the cache before the defined TTL. * `maxTtl` (*type:* `integer()`, *default:* `nil`) - Specifies the maximum allowed TTL for cached content served by this origin. Cache directives that attempt to set a max-age or s-maxage higher than this, or an Expires header more than maxTTL seconds in the future will be capped at the value of maxTTL, as if it were the value of an s-maxage Cache-Control directive. Headers sent to the client will not be modified. Setting a TTL of "0" means "always revalidate". The maximum allowed value is 31,622,400s (1 year), noting that infrequently accessed objects may be evicted from the cache before the defined TTL. diff --git a/clients/compute/lib/google_api/compute/v1/model/http_route_rule.ex b/clients/compute/lib/google_api/compute/v1/model/http_route_rule.ex index 719f79ba5e..23943f6f1c 100644 --- a/clients/compute/lib/google_api/compute/v1/model/http_route_rule.ex +++ b/clients/compute/lib/google_api/compute/v1/model/http_route_rule.ex @@ -26,9 +26,9 @@ defmodule GoogleApi.Compute.V1.Model.HttpRouteRule do * `headerAction` (*type:* `GoogleApi.Compute.V1.Model.HttpHeaderAction.t`, *default:* `nil`) - Specifies changes to request and response headers that need to take effect for the selected backendService. The headerAction value specified here is applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction HeaderAction is not supported for load balancers that have their loadBalancingScheme set to EXTERNAL. Not supported when the URL map is bound to a target gRPC proxy that has validateForProxyless field set to true. * `matchRules` (*type:* `list(GoogleApi.Compute.V1.Model.HttpRouteRuleMatch.t)`, *default:* `nil`) - The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule. * `priority` (*type:* `integer()`, *default:* `nil`) - For routeRules within a given pathMatcher, priority determines the order in which a load balancer interprets routeRules. RouteRules are evaluated in order of priority, from the lowest to highest number. The priority of a rule decreases as its number increases (1, 2, 3, N+1). The first rule that matches the request is applied. You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number from 0 to 2147483647 inclusive. Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules. - * `routeAction` (*type:* `GoogleApi.Compute.V1.Model.HttpRouteAction.t`, *default:* `nil`) - In response to a matching matchRule, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of urlRedirect, service or routeAction.weightedBackendService must be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a route rule's routeAction. - * `service` (*type:* `String.t`, *default:* `nil`) - The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of urlRedirect, service or routeAction.weightedBackendService must be set. - * `urlRedirect` (*type:* `GoogleApi.Compute.V1.Model.HttpRedirectAction.t`, *default:* `nil`) - When this rule is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. Not supported when the URL map is bound to a target gRPC proxy. + * `routeAction` (*type:* `GoogleApi.Compute.V1.Model.HttpRouteAction.t`, *default:* `nil`) - In response to a matching matchRule, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a route rule's routeAction. + * `service` (*type:* `String.t`, *default:* `nil`) - The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. + * `urlRedirect` (*type:* `GoogleApi.Compute.V1.Model.HttpRedirectAction.t`, *default:* `nil`) - When this rule is matched, the request is redirected to a URL specified by urlRedirect. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. Not supported when the URL map is bound to a target gRPC proxy. """ use GoogleApi.Gax.ModelBase diff --git a/clients/compute/lib/google_api/compute/v1/model/instance_group_manager.ex b/clients/compute/lib/google_api/compute/v1/model/instance_group_manager.ex index 768893805a..b9b4f801b0 100644 --- a/clients/compute/lib/google_api/compute/v1/model/instance_group_manager.ex +++ b/clients/compute/lib/google_api/compute/v1/model/instance_group_manager.ex @@ -42,10 +42,13 @@ defmodule GoogleApi.Compute.V1.Model.InstanceGroupManager do * `satisfiesPzi` (*type:* `boolean()`, *default:* `nil`) - [Output Only] Reserved for future use. * `satisfiesPzs` (*type:* `boolean()`, *default:* `nil`) - [Output Only] Reserved for future use. * `selfLink` (*type:* `String.t`, *default:* `nil`) - [Output Only] The URL for this managed instance group. The server defines this URL. + * `standbyPolicy` (*type:* `GoogleApi.Compute.V1.Model.InstanceGroupManagerStandbyPolicy.t`, *default:* `nil`) - Standby policy for stopped and suspended instances. * `statefulPolicy` (*type:* `GoogleApi.Compute.V1.Model.StatefulPolicy.t`, *default:* `nil`) - Stateful configuration for this Instanced Group Manager * `status` (*type:* `GoogleApi.Compute.V1.Model.InstanceGroupManagerStatus.t`, *default:* `nil`) - [Output Only] The status of this managed instance group. * `targetPools` (*type:* `list(String.t)`, *default:* `nil`) - The URLs for all TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group. * `targetSize` (*type:* `integer()`, *default:* `nil`) - The target number of running instances for this managed instance group. You can reduce this number by using the instanceGroupManager deleteInstances or abandonInstances methods. Resizing the group also changes this number. + * `targetStoppedSize` (*type:* `integer()`, *default:* `nil`) - The target number of stopped instances for this managed instance group. This number changes when you: - Stop instance using the stopInstances method or start instances using the startInstances method. - Manually change the targetStoppedSize using the update method. + * `targetSuspendedSize` (*type:* `integer()`, *default:* `nil`) - The target number of suspended instances for this managed instance group. This number changes when you: - Suspend instance using the suspendInstances method or resume instances using the resumeInstances method. - Manually change the targetSuspendedSize using the update method. * `updatePolicy` (*type:* `GoogleApi.Compute.V1.Model.InstanceGroupManagerUpdatePolicy.t`, *default:* `nil`) - The update policy for this managed instance group. * `versions` (*type:* `list(GoogleApi.Compute.V1.Model.InstanceGroupManagerVersion.t)`, *default:* `nil`) - Specifies the instance templates used by this managed instance group to create instances. Each version is defined by an instanceTemplate and a name. Every version can appear at most once per instance group. This field overrides the top-level instanceTemplate field. Read more about the relationships between these fields. Exactly one version must leave the targetSize field unset. That version will be applied to all remaining instances. For more information, read about canary updates. * `zone` (*type:* `String.t`, *default:* `nil`) - [Output Only] The URL of a zone where the managed instance group is located (for zonal resources). @@ -80,10 +83,14 @@ defmodule GoogleApi.Compute.V1.Model.InstanceGroupManager do :satisfiesPzi => boolean() | nil, :satisfiesPzs => boolean() | nil, :selfLink => String.t() | nil, + :standbyPolicy => + GoogleApi.Compute.V1.Model.InstanceGroupManagerStandbyPolicy.t() | nil, :statefulPolicy => GoogleApi.Compute.V1.Model.StatefulPolicy.t() | nil, :status => GoogleApi.Compute.V1.Model.InstanceGroupManagerStatus.t() | nil, :targetPools => list(String.t()) | nil, :targetSize => integer() | nil, + :targetStoppedSize => integer() | nil, + :targetSuspendedSize => integer() | nil, :updatePolicy => GoogleApi.Compute.V1.Model.InstanceGroupManagerUpdatePolicy.t() | nil, :versions => list(GoogleApi.Compute.V1.Model.InstanceGroupManagerVersion.t()) | nil, :zone => String.t() | nil @@ -123,10 +130,13 @@ defmodule GoogleApi.Compute.V1.Model.InstanceGroupManager do field(:satisfiesPzi) field(:satisfiesPzs) field(:selfLink) + field(:standbyPolicy, as: GoogleApi.Compute.V1.Model.InstanceGroupManagerStandbyPolicy) field(:statefulPolicy, as: GoogleApi.Compute.V1.Model.StatefulPolicy) field(:status, as: GoogleApi.Compute.V1.Model.InstanceGroupManagerStatus) field(:targetPools, type: :list) field(:targetSize) + field(:targetStoppedSize) + field(:targetSuspendedSize) field(:updatePolicy, as: GoogleApi.Compute.V1.Model.InstanceGroupManagerUpdatePolicy) field(:versions, as: GoogleApi.Compute.V1.Model.InstanceGroupManagerVersion, type: :list) field(:zone) diff --git a/clients/compute/lib/google_api/compute/v1/model/instance_group_manager_standby_policy.ex b/clients/compute/lib/google_api/compute/v1/model/instance_group_manager_standby_policy.ex new file mode 100644 index 0000000000..019f057c6d --- /dev/null +++ b/clients/compute/lib/google_api/compute/v1/model/instance_group_manager_standby_policy.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Compute.V1.Model.InstanceGroupManagerStandbyPolicy do + @moduledoc """ + + + ## Attributes + + * `initialDelaySec` (*type:* `integer()`, *default:* `nil`) - Specifies the number of seconds that the MIG should wait to suspend or stop a VM after that VM was created. The initial delay gives the initialization script the time to prepare your VM for a quick scale out. The value of initial delay must be between 0 and 3600 seconds. The default value is 0. + * `mode` (*type:* `String.t`, *default:* `nil`) - Defines how a MIG resumes or starts VMs from a standby pool when the group scales out. The default mode is `MANUAL`. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :initialDelaySec => integer() | nil, + :mode => String.t() | nil + } + + field(:initialDelaySec) + field(:mode) +end + +defimpl Poison.Decoder, for: GoogleApi.Compute.V1.Model.InstanceGroupManagerStandbyPolicy do + def decode(value, options) do + GoogleApi.Compute.V1.Model.InstanceGroupManagerStandbyPolicy.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Compute.V1.Model.InstanceGroupManagerStandbyPolicy do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/compute/lib/google_api/compute/v1/model/instance_group_managers_resume_instances_request.ex b/clients/compute/lib/google_api/compute/v1/model/instance_group_managers_resume_instances_request.ex new file mode 100644 index 0000000000..f592cc62d5 --- /dev/null +++ b/clients/compute/lib/google_api/compute/v1/model/instance_group_managers_resume_instances_request.ex @@ -0,0 +1,48 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Compute.V1.Model.InstanceGroupManagersResumeInstancesRequest do + @moduledoc """ + + + ## Attributes + + * `instances` (*type:* `list(String.t)`, *default:* `nil`) - The URLs of one or more instances to resume. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :instances => list(String.t()) | nil + } + + field(:instances, type: :list) +end + +defimpl Poison.Decoder, + for: GoogleApi.Compute.V1.Model.InstanceGroupManagersResumeInstancesRequest do + def decode(value, options) do + GoogleApi.Compute.V1.Model.InstanceGroupManagersResumeInstancesRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.Compute.V1.Model.InstanceGroupManagersResumeInstancesRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/compute/lib/google_api/compute/v1/model/instance_group_managers_start_instances_request.ex b/clients/compute/lib/google_api/compute/v1/model/instance_group_managers_start_instances_request.ex new file mode 100644 index 0000000000..748fb2506a --- /dev/null +++ b/clients/compute/lib/google_api/compute/v1/model/instance_group_managers_start_instances_request.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Compute.V1.Model.InstanceGroupManagersStartInstancesRequest do + @moduledoc """ + + + ## Attributes + + * `instances` (*type:* `list(String.t)`, *default:* `nil`) - The URLs of one or more instances to start. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :instances => list(String.t()) | nil + } + + field(:instances, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.Compute.V1.Model.InstanceGroupManagersStartInstancesRequest do + def decode(value, options) do + GoogleApi.Compute.V1.Model.InstanceGroupManagersStartInstancesRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Compute.V1.Model.InstanceGroupManagersStartInstancesRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/compute/lib/google_api/compute/v1/model/instance_group_managers_stop_instances_request.ex b/clients/compute/lib/google_api/compute/v1/model/instance_group_managers_stop_instances_request.ex new file mode 100644 index 0000000000..ff5db07a5d --- /dev/null +++ b/clients/compute/lib/google_api/compute/v1/model/instance_group_managers_stop_instances_request.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Compute.V1.Model.InstanceGroupManagersStopInstancesRequest do + @moduledoc """ + + + ## Attributes + + * `forceStop` (*type:* `boolean()`, *default:* `nil`) - If this flag is set to true, the Instance Group Manager will proceed to stop the instances, skipping initialization on them. + * `instances` (*type:* `list(String.t)`, *default:* `nil`) - The URLs of one or more instances to stop. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :forceStop => boolean() | nil, + :instances => list(String.t()) | nil + } + + field(:forceStop) + field(:instances, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.Compute.V1.Model.InstanceGroupManagersStopInstancesRequest do + def decode(value, options) do + GoogleApi.Compute.V1.Model.InstanceGroupManagersStopInstancesRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Compute.V1.Model.InstanceGroupManagersStopInstancesRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/compute/lib/google_api/compute/v1/model/instance_group_managers_suspend_instances_request.ex b/clients/compute/lib/google_api/compute/v1/model/instance_group_managers_suspend_instances_request.ex new file mode 100644 index 0000000000..28606e3e63 --- /dev/null +++ b/clients/compute/lib/google_api/compute/v1/model/instance_group_managers_suspend_instances_request.ex @@ -0,0 +1,51 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Compute.V1.Model.InstanceGroupManagersSuspendInstancesRequest do + @moduledoc """ + + + ## Attributes + + * `forceSuspend` (*type:* `boolean()`, *default:* `nil`) - If this flag is set to true, the Instance Group Manager will proceed to suspend the instances, skipping initialization on them. + * `instances` (*type:* `list(String.t)`, *default:* `nil`) - The URLs of one or more instances to suspend. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :forceSuspend => boolean() | nil, + :instances => list(String.t()) | nil + } + + field(:forceSuspend) + field(:instances, type: :list) +end + +defimpl Poison.Decoder, + for: GoogleApi.Compute.V1.Model.InstanceGroupManagersSuspendInstancesRequest do + def decode(value, options) do + GoogleApi.Compute.V1.Model.InstanceGroupManagersSuspendInstancesRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.Compute.V1.Model.InstanceGroupManagersSuspendInstancesRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/compute/lib/google_api/compute/v1/model/interconnect_location.ex b/clients/compute/lib/google_api/compute/v1/model/interconnect_location.ex index d4e41c4b4c..208e3ee8d0 100644 --- a/clients/compute/lib/google_api/compute/v1/model/interconnect_location.ex +++ b/clients/compute/lib/google_api/compute/v1/model/interconnect_location.ex @@ -23,7 +23,7 @@ defmodule GoogleApi.Compute.V1.Model.InterconnectLocation do * `address` (*type:* `String.t`, *default:* `nil`) - [Output Only] The postal address of the Point of Presence, each line in the address is separated by a newline character. * `availabilityZone` (*type:* `String.t`, *default:* `nil`) - [Output Only] Availability zone for this InterconnectLocation. Within a metropolitan area (metro), maintenance will not be simultaneously scheduled in more than one availability zone. Example: "zone1" or "zone2". - * `availableFeatures` (*type:* `list(String.t)`, *default:* `nil`) - [Output only] List of features available at this InterconnectLocation, which can take one of the following values: - MACSEC + * `availableFeatures` (*type:* `list(String.t)`, *default:* `nil`) - [Output only] List of features available at this InterconnectLocation, which can take one of the following values: - IF_MACSEC * `availableLinkTypes` (*type:* `list(String.t)`, *default:* `nil`) - [Output only] List of link types available at this InterconnectLocation, which can take one of the following values: - LINK_TYPE_ETHERNET_10G_LR - LINK_TYPE_ETHERNET_100G_LR * `city` (*type:* `String.t`, *default:* `nil`) - [Output Only] Metropolitan area designator that indicates which city an interconnect is located. For example: "Chicago, IL", "Amsterdam, Netherlands". * `continent` (*type:* `String.t`, *default:* `nil`) - [Output Only] Continent for this location, which can take one of the following values: - AFRICA - ASIA_PAC - EUROPE - NORTH_AMERICA - SOUTH_AMERICA diff --git a/clients/compute/lib/google_api/compute/v1/model/license.ex b/clients/compute/lib/google_api/compute/v1/model/license.ex index 040d895c44..9bf396552a 100644 --- a/clients/compute/lib/google_api/compute/v1/model/license.ex +++ b/clients/compute/lib/google_api/compute/v1/model/license.ex @@ -28,7 +28,7 @@ defmodule GoogleApi.Compute.V1.Model.License do * `kind` (*type:* `String.t`, *default:* `compute#license`) - [Output Only] Type of resource. Always compute#license for licenses. * `licenseCode` (*type:* `String.t`, *default:* `nil`) - [Output Only] The unique code used to attach this license to images, snapshots, and disks. * `name` (*type:* `String.t`, *default:* `nil`) - Name of the resource. The name must be 1-63 characters long and comply with RFC1035. - * `resourceRequirements` (*type:* `GoogleApi.Compute.V1.Model.LicenseResourceRequirements.t`, *default:* `nil`) - + * `resourceRequirements` (*type:* `GoogleApi.Compute.V1.Model.LicenseResourceRequirements.t`, *default:* `nil`) - [Input Only] Deprecated. * `selfLink` (*type:* `String.t`, *default:* `nil`) - [Output Only] Server-defined URL for the resource. * `transferable` (*type:* `boolean()`, *default:* `nil`) - If false, licenses will not be copied from the source resource when creating an image from a disk, disk from snapshot, or snapshot from disk. """ diff --git a/clients/compute/lib/google_api/compute/v1/model/license_resource_requirements.ex b/clients/compute/lib/google_api/compute/v1/model/license_resource_requirements.ex index d071562296..1a98959acf 100644 --- a/clients/compute/lib/google_api/compute/v1/model/license_resource_requirements.ex +++ b/clients/compute/lib/google_api/compute/v1/model/license_resource_requirements.ex @@ -21,8 +21,8 @@ defmodule GoogleApi.Compute.V1.Model.LicenseResourceRequirements do ## Attributes - * `minGuestCpuCount` (*type:* `integer()`, *default:* `nil`) - Minimum number of guest cpus required to use the Instance. Enforced at Instance creation and Instance start. - * `minMemoryMb` (*type:* `integer()`, *default:* `nil`) - Minimum memory required to use the Instance. Enforced at Instance creation and Instance start. + * `minGuestCpuCount` (*type:* `integer()`, *default:* `nil`) - [Input Only] Deprecated. This field no longer reflects the minimum number of guest cpus required to use the Instance. + * `minMemoryMb` (*type:* `integer()`, *default:* `nil`) - [Input Only] Deprecated. This field no longer reflects the minimum memory required to use the Instance. """ use GoogleApi.Gax.ModelBase diff --git a/clients/compute/lib/google_api/compute/v1/model/network.ex b/clients/compute/lib/google_api/compute/v1/model/network.ex index 4b9b8653fc..d67ec399ea 100644 --- a/clients/compute/lib/google_api/compute/v1/model/network.ex +++ b/clients/compute/lib/google_api/compute/v1/model/network.ex @@ -34,6 +34,7 @@ defmodule GoogleApi.Compute.V1.Model.Network do * `mtu` (*type:* `integer()`, *default:* `nil`) - Maximum Transmission Unit in bytes. The minimum value for this field is 1300 and the maximum value is 8896. The suggested value is 1500, which is the default MTU used on the Internet, or 8896 if you want to use Jumbo frames. If unspecified, the value defaults to 1460. * `name` (*type:* `String.t`, *default:* `nil`) - Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit. * `networkFirewallPolicyEnforcementOrder` (*type:* `String.t`, *default:* `nil`) - The network firewall policy enforcement order. Can be either AFTER_CLASSIC_FIREWALL or BEFORE_CLASSIC_FIREWALL. Defaults to AFTER_CLASSIC_FIREWALL if the field is not specified. + * `networkProfile` (*type:* `String.t`, *default:* `nil`) - A full or partial URL of the network profile to apply to this network. This field can be set only at resource creation time. For example, the following are valid URLs: - https://www.googleapis.com/compute/{api_version}/projects/{project_id}/global/networkProfiles/{network_profile_name} - projects/{project_id}/global/networkProfiles/{network_profile_name} * `peerings` (*type:* `list(GoogleApi.Compute.V1.Model.NetworkPeering.t)`, *default:* `nil`) - [Output Only] A list of network peerings for the resource. * `routingConfig` (*type:* `GoogleApi.Compute.V1.Model.NetworkRoutingConfig.t`, *default:* `nil`) - The network-level routing configuration for this network. Used by Cloud Router to determine what type of network-wide routing behavior to enforce. * `selfLink` (*type:* `String.t`, *default:* `nil`) - [Output Only] Server-defined URL for the resource. @@ -57,6 +58,7 @@ defmodule GoogleApi.Compute.V1.Model.Network do :mtu => integer() | nil, :name => String.t() | nil, :networkFirewallPolicyEnforcementOrder => String.t() | nil, + :networkProfile => String.t() | nil, :peerings => list(GoogleApi.Compute.V1.Model.NetworkPeering.t()) | nil, :routingConfig => GoogleApi.Compute.V1.Model.NetworkRoutingConfig.t() | nil, :selfLink => String.t() | nil, @@ -77,6 +79,7 @@ defmodule GoogleApi.Compute.V1.Model.Network do field(:mtu) field(:name) field(:networkFirewallPolicyEnforcementOrder) + field(:networkProfile) field(:peerings, as: GoogleApi.Compute.V1.Model.NetworkPeering, type: :list) field(:routingConfig, as: GoogleApi.Compute.V1.Model.NetworkRoutingConfig) field(:selfLink) diff --git a/clients/compute/lib/google_api/compute/v1/model/network_profile.ex b/clients/compute/lib/google_api/compute/v1/model/network_profile.ex new file mode 100644 index 0000000000..3a6f8838fa --- /dev/null +++ b/clients/compute/lib/google_api/compute/v1/model/network_profile.ex @@ -0,0 +1,73 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Compute.V1.Model.NetworkProfile do + @moduledoc """ + NetworkProfile represents a Google managed network profile resource. + + ## Attributes + + * `creationTimestamp` (*type:* `String.t`, *default:* `nil`) - [Output Only] Creation timestamp in RFC3339 text format. + * `description` (*type:* `String.t`, *default:* `nil`) - [Output Only] An optional description of this resource. + * `features` (*type:* `GoogleApi.Compute.V1.Model.NetworkProfileNetworkFeatures.t`, *default:* `nil`) - [Output Only] Features supported by the network. + * `id` (*type:* `String.t`, *default:* `nil`) - [Output Only] The unique identifier for the resource. This identifier is defined by the server. + * `kind` (*type:* `String.t`, *default:* `compute#networkProfile`) - [Output Only] Type of the resource. Always compute#networkProfile for network profiles. + * `location` (*type:* `GoogleApi.Compute.V1.Model.NetworkProfileLocation.t`, *default:* `nil`) - [Output Only] Location to which the network is restricted. + * `name` (*type:* `String.t`, *default:* `nil`) - [Output Only] Name of the resource. + * `selfLink` (*type:* `String.t`, *default:* `nil`) - [Output Only] Server-defined URL for the resource. + * `selfLinkWithId` (*type:* `String.t`, *default:* `nil`) - [Output Only] Server-defined URL for this resource with the resource id. + * `zone` (*type:* `String.t`, *default:* `nil`) - [Output Only] Zone to which the network is restricted. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :creationTimestamp => String.t() | nil, + :description => String.t() | nil, + :features => GoogleApi.Compute.V1.Model.NetworkProfileNetworkFeatures.t() | nil, + :id => String.t() | nil, + :kind => String.t() | nil, + :location => GoogleApi.Compute.V1.Model.NetworkProfileLocation.t() | nil, + :name => String.t() | nil, + :selfLink => String.t() | nil, + :selfLinkWithId => String.t() | nil, + :zone => String.t() | nil + } + + field(:creationTimestamp) + field(:description) + field(:features, as: GoogleApi.Compute.V1.Model.NetworkProfileNetworkFeatures) + field(:id) + field(:kind) + field(:location, as: GoogleApi.Compute.V1.Model.NetworkProfileLocation) + field(:name) + field(:selfLink) + field(:selfLinkWithId) + field(:zone) +end + +defimpl Poison.Decoder, for: GoogleApi.Compute.V1.Model.NetworkProfile do + def decode(value, options) do + GoogleApi.Compute.V1.Model.NetworkProfile.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Compute.V1.Model.NetworkProfile do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/compute/lib/google_api/compute/v1/model/network_profile_location.ex b/clients/compute/lib/google_api/compute/v1/model/network_profile_location.ex new file mode 100644 index 0000000000..32b0a1d331 --- /dev/null +++ b/clients/compute/lib/google_api/compute/v1/model/network_profile_location.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Compute.V1.Model.NetworkProfileLocation do + @moduledoc """ + + + ## Attributes + + * `name` (*type:* `String.t`, *default:* `nil`) - + * `scope` (*type:* `String.t`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :name => String.t() | nil, + :scope => String.t() | nil + } + + field(:name) + field(:scope) +end + +defimpl Poison.Decoder, for: GoogleApi.Compute.V1.Model.NetworkProfileLocation do + def decode(value, options) do + GoogleApi.Compute.V1.Model.NetworkProfileLocation.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Compute.V1.Model.NetworkProfileLocation do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/compute/lib/google_api/compute/v1/model/network_profile_network_features.ex b/clients/compute/lib/google_api/compute/v1/model/network_profile_network_features.ex new file mode 100644 index 0000000000..ebe1874624 --- /dev/null +++ b/clients/compute/lib/google_api/compute/v1/model/network_profile_network_features.ex @@ -0,0 +1,109 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Compute.V1.Model.NetworkProfileNetworkFeatures do + @moduledoc """ + + + ## Attributes + + * `addressPurposes` (*type:* `list(String.t)`, *default:* `nil`) - Specifies what address purposes are supported. If empty, all address purposes are supported. + * `allowAliasIpRanges` (*type:* `String.t`, *default:* `nil`) - Specifies whether alias IP ranges (and secondary address ranges) are allowed. + * `allowAutoModeSubnet` (*type:* `String.t`, *default:* `nil`) - Specifies whether auto mode subnet creation is allowed. + * `allowClassDFirewalls` (*type:* `String.t`, *default:* `nil`) - Specifies whether firewalls for Class D address ranges are supported. + * `allowCloudNat` (*type:* `String.t`, *default:* `nil`) - Specifies whether cloud NAT creation is allowed. + * `allowCloudRouter` (*type:* `String.t`, *default:* `nil`) - Specifies whether cloud router creation is allowed. + * `allowExternalIpAccess` (*type:* `String.t`, *default:* `nil`) - Specifies whether VMs are allowed to have external IP access on network interfaces connected to this VPC. + * `allowInterconnect` (*type:* `String.t`, *default:* `nil`) - Specifies whether Cloud Interconnect creation is allowed. + * `allowLoadBalancing` (*type:* `String.t`, *default:* `nil`) - Specifies whether cloud load balancing is allowed. + * `allowMultiNicInSameNetwork` (*type:* `String.t`, *default:* `nil`) - Specifies whether multi-nic in the same network is allowed. + * `allowPacketMirroring` (*type:* `String.t`, *default:* `nil`) - Specifies whether Packet Mirroring 1.0 is supported. + * `allowPrivateGoogleAccess` (*type:* `String.t`, *default:* `nil`) - Specifies whether private Google access is allowed. + * `allowPsc` (*type:* `String.t`, *default:* `nil`) - Specifies whether PSC creation is allowed. + * `allowSameNetworkUnicast` (*type:* `String.t`, *default:* `nil`) - Specifies whether unicast within the same network is allowed. + * `allowStaticRoutes` (*type:* `String.t`, *default:* `nil`) - Specifies whether static route creation is allowed. + * `allowSubInterfaces` (*type:* `String.t`, *default:* `nil`) - Specifies whether sub interfaces are allowed. + * `allowVpcPeering` (*type:* `String.t`, *default:* `nil`) - Specifies whether VPC peering is allowed. + * `allowVpn` (*type:* `String.t`, *default:* `nil`) - Specifies whether VPN creation is allowed. + * `interfaceTypes` (*type:* `list(String.t)`, *default:* `nil`) - If set, limits the interface types that the network supports. If empty, all interface types are supported. + * `subnetPurposes` (*type:* `list(String.t)`, *default:* `nil`) - Specifies which subnetwork purposes are supported. + * `subnetStackTypes` (*type:* `list(String.t)`, *default:* `nil`) - Specifies which subnetwork stack types are supported. + * `unicast` (*type:* `String.t`, *default:* `nil`) - Specifies which type of unicast is supported. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :addressPurposes => list(String.t()) | nil, + :allowAliasIpRanges => String.t() | nil, + :allowAutoModeSubnet => String.t() | nil, + :allowClassDFirewalls => String.t() | nil, + :allowCloudNat => String.t() | nil, + :allowCloudRouter => String.t() | nil, + :allowExternalIpAccess => String.t() | nil, + :allowInterconnect => String.t() | nil, + :allowLoadBalancing => String.t() | nil, + :allowMultiNicInSameNetwork => String.t() | nil, + :allowPacketMirroring => String.t() | nil, + :allowPrivateGoogleAccess => String.t() | nil, + :allowPsc => String.t() | nil, + :allowSameNetworkUnicast => String.t() | nil, + :allowStaticRoutes => String.t() | nil, + :allowSubInterfaces => String.t() | nil, + :allowVpcPeering => String.t() | nil, + :allowVpn => String.t() | nil, + :interfaceTypes => list(String.t()) | nil, + :subnetPurposes => list(String.t()) | nil, + :subnetStackTypes => list(String.t()) | nil, + :unicast => String.t() | nil + } + + field(:addressPurposes, type: :list) + field(:allowAliasIpRanges) + field(:allowAutoModeSubnet) + field(:allowClassDFirewalls) + field(:allowCloudNat) + field(:allowCloudRouter) + field(:allowExternalIpAccess) + field(:allowInterconnect) + field(:allowLoadBalancing) + field(:allowMultiNicInSameNetwork) + field(:allowPacketMirroring) + field(:allowPrivateGoogleAccess) + field(:allowPsc) + field(:allowSameNetworkUnicast) + field(:allowStaticRoutes) + field(:allowSubInterfaces) + field(:allowVpcPeering) + field(:allowVpn) + field(:interfaceTypes, type: :list) + field(:subnetPurposes, type: :list) + field(:subnetStackTypes, type: :list) + field(:unicast) +end + +defimpl Poison.Decoder, for: GoogleApi.Compute.V1.Model.NetworkProfileNetworkFeatures do + def decode(value, options) do + GoogleApi.Compute.V1.Model.NetworkProfileNetworkFeatures.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Compute.V1.Model.NetworkProfileNetworkFeatures do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/compute/lib/google_api/compute/v1/model/network_profiles_list_response.ex b/clients/compute/lib/google_api/compute/v1/model/network_profiles_list_response.ex new file mode 100644 index 0000000000..2ceca89f01 --- /dev/null +++ b/clients/compute/lib/google_api/compute/v1/model/network_profiles_list_response.ex @@ -0,0 +1,67 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Compute.V1.Model.NetworkProfilesListResponse do + @moduledoc """ + Contains a list of network profiles. + + ## Attributes + + * `etag` (*type:* `String.t`, *default:* `nil`) - + * `id` (*type:* `String.t`, *default:* `nil`) - [Output Only] Unique identifier for the resource; defined by the server. + * `items` (*type:* `list(GoogleApi.Compute.V1.Model.NetworkProfile.t)`, *default:* `nil`) - A list of NetworkProfile resources. + * `kind` (*type:* `String.t`, *default:* `compute#networkProfileList`) - [Output Only] Type of resource. Always compute#networkProfileList for network profiles. + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + * `selfLink` (*type:* `String.t`, *default:* `nil`) - [Output Only] Server-defined URL for this resource. + * `unreachables` (*type:* `list(String.t)`, *default:* `nil`) - [Output Only] Unreachable resources. end_interface: MixerListResponseWithEtagBuilder + * `warning` (*type:* `GoogleApi.Compute.V1.Model.NetworkProfilesListResponseWarning.t`, *default:* `nil`) - [Output Only] Informational warning message. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :etag => String.t() | nil, + :id => String.t() | nil, + :items => list(GoogleApi.Compute.V1.Model.NetworkProfile.t()) | nil, + :kind => String.t() | nil, + :nextPageToken => String.t() | nil, + :selfLink => String.t() | nil, + :unreachables => list(String.t()) | nil, + :warning => GoogleApi.Compute.V1.Model.NetworkProfilesListResponseWarning.t() | nil + } + + field(:etag) + field(:id) + field(:items, as: GoogleApi.Compute.V1.Model.NetworkProfile, type: :list) + field(:kind) + field(:nextPageToken) + field(:selfLink) + field(:unreachables, type: :list) + field(:warning, as: GoogleApi.Compute.V1.Model.NetworkProfilesListResponseWarning) +end + +defimpl Poison.Decoder, for: GoogleApi.Compute.V1.Model.NetworkProfilesListResponse do + def decode(value, options) do + GoogleApi.Compute.V1.Model.NetworkProfilesListResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Compute.V1.Model.NetworkProfilesListResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/compute/lib/google_api/compute/v1/model/network_profiles_list_response_warning.ex b/clients/compute/lib/google_api/compute/v1/model/network_profiles_list_response_warning.ex new file mode 100644 index 0000000000..bd2460656c --- /dev/null +++ b/clients/compute/lib/google_api/compute/v1/model/network_profiles_list_response_warning.ex @@ -0,0 +1,53 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Compute.V1.Model.NetworkProfilesListResponseWarning do + @moduledoc """ + [Output Only] Informational warning message. + + ## Attributes + + * `code` (*type:* `String.t`, *default:* `nil`) - [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. + * `data` (*type:* `list(GoogleApi.Compute.V1.Model.NetworkProfilesListResponseWarningData.t)`, *default:* `nil`) - [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } + * `message` (*type:* `String.t`, *default:* `nil`) - [Output Only] A human-readable description of the warning code. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :code => String.t() | nil, + :data => + list(GoogleApi.Compute.V1.Model.NetworkProfilesListResponseWarningData.t()) | nil, + :message => String.t() | nil + } + + field(:code) + field(:data, as: GoogleApi.Compute.V1.Model.NetworkProfilesListResponseWarningData, type: :list) + field(:message) +end + +defimpl Poison.Decoder, for: GoogleApi.Compute.V1.Model.NetworkProfilesListResponseWarning do + def decode(value, options) do + GoogleApi.Compute.V1.Model.NetworkProfilesListResponseWarning.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Compute.V1.Model.NetworkProfilesListResponseWarning do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/compute/lib/google_api/compute/v1/model/network_profiles_list_response_warning_data.ex b/clients/compute/lib/google_api/compute/v1/model/network_profiles_list_response_warning_data.ex new file mode 100644 index 0000000000..19c0b2ecab --- /dev/null +++ b/clients/compute/lib/google_api/compute/v1/model/network_profiles_list_response_warning_data.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Compute.V1.Model.NetworkProfilesListResponseWarningData do + @moduledoc """ + + + ## Attributes + + * `key` (*type:* `String.t`, *default:* `nil`) - [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). + * `value` (*type:* `String.t`, *default:* `nil`) - [Output Only] A warning data value corresponding to the key. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :key => String.t() | nil, + :value => String.t() | nil + } + + field(:key) + field(:value) +end + +defimpl Poison.Decoder, for: GoogleApi.Compute.V1.Model.NetworkProfilesListResponseWarningData do + def decode(value, options) do + GoogleApi.Compute.V1.Model.NetworkProfilesListResponseWarningData.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Compute.V1.Model.NetworkProfilesListResponseWarningData do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/compute/lib/google_api/compute/v1/model/network_routing_config.ex b/clients/compute/lib/google_api/compute/v1/model/network_routing_config.ex index 1dfa79843e..cede617661 100644 --- a/clients/compute/lib/google_api/compute/v1/model/network_routing_config.ex +++ b/clients/compute/lib/google_api/compute/v1/model/network_routing_config.ex @@ -21,15 +21,24 @@ defmodule GoogleApi.Compute.V1.Model.NetworkRoutingConfig do ## Attributes + * `bgpAlwaysCompareMed` (*type:* `boolean()`, *default:* `nil`) - Enable comparison of Multi-Exit Discriminators (MED) across routes with different neighbor ASNs when using the STANDARD BGP best path selection algorithm. + * `bgpBestPathSelectionMode` (*type:* `String.t`, *default:* `nil`) - The BGP best path selection algorithm to be employed within this network for dynamic routes learned by Cloud Routers. Can be LEGACY (default) or STANDARD. + * `bgpInterRegionCost` (*type:* `String.t`, *default:* `nil`) - Allows to define a preferred approach for handling inter-region cost in the selection process when using the STANDARD BGP best path selection algorithm. Can be DEFAULT or ADD_COST_TO_MED. * `routingMode` (*type:* `String.t`, *default:* `nil`) - The network-wide routing mode to use. If set to REGIONAL, this network's Cloud Routers will only advertise routes with subnets of this network in the same region as the router. If set to GLOBAL, this network's Cloud Routers will advertise routes with all subnets of this network, across regions. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :bgpAlwaysCompareMed => boolean() | nil, + :bgpBestPathSelectionMode => String.t() | nil, + :bgpInterRegionCost => String.t() | nil, :routingMode => String.t() | nil } + field(:bgpAlwaysCompareMed) + field(:bgpBestPathSelectionMode) + field(:bgpInterRegionCost) field(:routingMode) end diff --git a/clients/compute/lib/google_api/compute/v1/model/path_matcher.ex b/clients/compute/lib/google_api/compute/v1/model/path_matcher.ex index 8948b4a90d..40ad7fb8ee 100644 --- a/clients/compute/lib/google_api/compute/v1/model/path_matcher.ex +++ b/clients/compute/lib/google_api/compute/v1/model/path_matcher.ex @@ -22,9 +22,9 @@ defmodule GoogleApi.Compute.V1.Model.PathMatcher do ## Attributes * `defaultCustomErrorResponsePolicy` (*type:* `GoogleApi.Compute.V1.Model.CustomErrorResponsePolicy.t`, *default:* `nil`) - defaultCustomErrorResponsePolicy specifies how the Load Balancer returns error responses when BackendServiceor BackendBucket responds with an error. This policy takes effect at the PathMatcher level and applies only when no policy has been defined for the error code at lower levels like RouteRule and PathRule within this PathMatcher. If an error code does not have a policy defined in defaultCustomErrorResponsePolicy, then a policy defined for the error code in UrlMap.defaultCustomErrorResponsePolicy takes effect. For example, consider a UrlMap with the following configuration: - UrlMap.defaultCustomErrorResponsePolicy is configured with policies for 5xx and 4xx errors - A RouteRule for /coming_soon/ is configured for the error code 404. If the request is for www.myotherdomain.com and a 404 is encountered, the policy under UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 response is encountered for the request www.example.com/current_events/, the pathMatcher's policy takes effect. If however, the request for www.example.com/coming_soon/ encounters a 404, the policy in RouteRule.customErrorResponsePolicy takes effect. If any of the requests in this example encounter a 500 error code, the policy at UrlMap.defaultCustomErrorResponsePolicy takes effect. When used in conjunction with pathMatcher.defaultRouteAction.retryPolicy, retries take precedence. Only once all retries are exhausted, the defaultCustomErrorResponsePolicy is applied. While attempting a retry, if load balancer is successful in reaching the service, the defaultCustomErrorResponsePolicy is ignored and the response from the service is returned to the client. defaultCustomErrorResponsePolicy is supported only for global external Application Load Balancers. - * `defaultRouteAction` (*type:* `GoogleApi.Compute.V1.Model.HttpRouteAction.t`, *default:* `nil`) - defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. If defaultRouteAction is specified, don't set defaultUrlRedirect. If defaultRouteAction.weightedBackendServices is specified, don't set defaultService. URL maps for classic Application Load Balancers only support the urlRewrite action within a path matcher's defaultRouteAction. - * `defaultService` (*type:* `String.t`, *default:* `nil`) - The full or partial URL to the BackendService resource. This URL is used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: - https://www.googleapis.com/compute/v1/projects/project /global/backendServices/backendService - compute/v1/projects/project/global/backendServices/backendService - global/backendServices/backendService If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified. If defaultService is specified, then set either defaultUrlRedirect or defaultRouteAction.weightedBackendService. Don't set both. Authorization requires one or more of the following Google IAM permissions on the specified resource default_service: - compute.backendBuckets.use - compute.backendServices.use - * `defaultUrlRedirect` (*type:* `GoogleApi.Compute.V1.Model.HttpRedirectAction.t`, *default:* `nil`) - When none of the specified pathRules or routeRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, then set either defaultService or defaultRouteAction. Don't set both. Not supported when the URL map is bound to a target gRPC proxy. + * `defaultRouteAction` (*type:* `GoogleApi.Compute.V1.Model.HttpRouteAction.t`, *default:* `nil`) - defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. Only one of defaultUrlRedirect, defaultService or defaultRouteAction.weightedBackendService can be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a path matcher's defaultRouteAction. + * `defaultService` (*type:* `String.t`, *default:* `nil`) - The full or partial URL to the BackendService resource. This URL is used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: - https://www.googleapis.com/compute/v1/projects/project /global/backendServices/backendService - compute/v1/projects/project/global/backendServices/backendService - global/backendServices/backendService If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. Only one of defaultUrlRedirect, defaultService or defaultRouteAction.weightedBackendService can be set. Authorization requires one or more of the following Google IAM permissions on the specified resource default_service: - compute.backendBuckets.use - compute.backendServices.use + * `defaultUrlRedirect` (*type:* `GoogleApi.Compute.V1.Model.HttpRedirectAction.t`, *default:* `nil`) - When none of the specified pathRules or routeRules match, the request is redirected to a URL specified by defaultUrlRedirect. Only one of defaultUrlRedirect, defaultService or defaultRouteAction.weightedBackendService can be set. Not supported when the URL map is bound to a target gRPC proxy. * `description` (*type:* `String.t`, *default:* `nil`) - An optional description of this resource. Provide this property when you create the resource. * `headerAction` (*type:* `GoogleApi.Compute.V1.Model.HttpHeaderAction.t`, *default:* `nil`) - Specifies changes to request and response headers that need to take effect for the selected backend service. HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap HeaderAction is not supported for load balancers that have their loadBalancingScheme set to EXTERNAL. Not supported when the URL map is bound to a target gRPC proxy that has validateForProxyless field set to true. * `name` (*type:* `String.t`, *default:* `nil`) - The name to which this PathMatcher is referred by the HostRule. diff --git a/clients/compute/lib/google_api/compute/v1/model/path_rule.ex b/clients/compute/lib/google_api/compute/v1/model/path_rule.ex index eb5c03c06b..71239dc23e 100644 --- a/clients/compute/lib/google_api/compute/v1/model/path_rule.ex +++ b/clients/compute/lib/google_api/compute/v1/model/path_rule.ex @@ -23,9 +23,9 @@ defmodule GoogleApi.Compute.V1.Model.PathRule do * `customErrorResponsePolicy` (*type:* `GoogleApi.Compute.V1.Model.CustomErrorResponsePolicy.t`, *default:* `nil`) - customErrorResponsePolicy specifies how the Load Balancer returns error responses when BackendServiceor BackendBucket responds with an error. If a policy for an error code is not configured for the PathRule, a policy for the error code configured in pathMatcher.defaultCustomErrorResponsePolicy is applied. If one is not specified in pathMatcher.defaultCustomErrorResponsePolicy, the policy configured in UrlMap.defaultCustomErrorResponsePolicy takes effect. For example, consider a UrlMap with the following configuration: - UrlMap.defaultCustomErrorResponsePolicy are configured with policies for 5xx and 4xx errors - A PathRule for /coming_soon/ is configured for the error code 404. If the request is for www.myotherdomain.com and a 404 is encountered, the policy under UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 response is encountered for the request www.example.com/current_events/, the pathMatcher's policy takes effect. If however, the request for www.example.com/coming_soon/ encounters a 404, the policy in PathRule.customErrorResponsePolicy takes effect. If any of the requests in this example encounter a 500 error code, the policy at UrlMap.defaultCustomErrorResponsePolicy takes effect. customErrorResponsePolicy is supported only for global external Application Load Balancers. * `paths` (*type:* `list(String.t)`, *default:* `nil`) - The list of path patterns to match. Each must start with / and the only place a * is allowed is at the end following a /. The string fed to the path matcher does not include any text after the first ? or #, and those chars are not allowed here. - * `routeAction` (*type:* `GoogleApi.Compute.V1.Model.HttpRouteAction.t`, *default:* `nil`) - In response to a matching path, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a path rule's routeAction. - * `service` (*type:* `String.t`, *default:* `nil`) - The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of urlRedirect, service or routeAction.weightedBackendService must be set. - * `urlRedirect` (*type:* `GoogleApi.Compute.V1.Model.HttpRedirectAction.t`, *default:* `nil`) - When a path pattern is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. Not supported when the URL map is bound to a target gRPC proxy. + * `routeAction` (*type:* `GoogleApi.Compute.V1.Model.HttpRouteAction.t`, *default:* `nil`) - In response to a matching path, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a path rule's routeAction. + * `service` (*type:* `String.t`, *default:* `nil`) - The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. + * `urlRedirect` (*type:* `GoogleApi.Compute.V1.Model.HttpRedirectAction.t`, *default:* `nil`) - When a path pattern is matched, the request is redirected to a URL specified by urlRedirect. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. Not supported when the URL map is bound to a target gRPC proxy. """ use GoogleApi.Gax.ModelBase diff --git a/clients/compute/lib/google_api/compute/v1/model/per_instance_config.ex b/clients/compute/lib/google_api/compute/v1/model/per_instance_config.ex index 3775a71d39..93e275f17e 100644 --- a/clients/compute/lib/google_api/compute/v1/model/per_instance_config.ex +++ b/clients/compute/lib/google_api/compute/v1/model/per_instance_config.ex @@ -22,7 +22,7 @@ defmodule GoogleApi.Compute.V1.Model.PerInstanceConfig do ## Attributes * `fingerprint` (*type:* `String.t`, *default:* `nil`) - Fingerprint of this per-instance config. This field can be used in optimistic locking. It is ignored when inserting a per-instance config. An up-to-date fingerprint must be provided in order to update an existing per-instance configuration or the field needs to be unset. - * `name` (*type:* `String.t`, *default:* `nil`) - The name of a per-instance configuration and its corresponding instance. Serves as a merge key during UpdatePerInstanceConfigs operations, that is, if a per-instance configuration with the same name exists then it will be updated, otherwise a new one will be created for the VM instance with the same name. An attempt to create a per-instance configconfiguration for a VM instance that either doesn't exist or is not part of the group will result in an error. + * `name` (*type:* `String.t`, *default:* `nil`) - The name of a per-instance configuration and its corresponding instance. Serves as a merge key during UpdatePerInstanceConfigs operations, that is, if a per-instance configuration with the same name exists then it will be updated, otherwise a new one will be created for the VM instance with the same name. An attempt to create a per-instance configuration for a VM instance that either doesn't exist or is not part of the group will result in an error. * `preservedState` (*type:* `GoogleApi.Compute.V1.Model.PreservedState.t`, *default:* `nil`) - The intended preserved state for the given instance. Does not contain preserved state generated from a stateful policy. * `status` (*type:* `String.t`, *default:* `nil`) - The status of applying this per-instance configuration on the corresponding managed instance. """ diff --git a/clients/compute/lib/google_api/compute/v1/model/project.ex b/clients/compute/lib/google_api/compute/v1/model/project.ex index 27355fe62c..d8011bc413 100644 --- a/clients/compute/lib/google_api/compute/v1/model/project.ex +++ b/clients/compute/lib/google_api/compute/v1/model/project.ex @@ -27,13 +27,13 @@ defmodule GoogleApi.Compute.V1.Model.Project do * `defaultNetworkTier` (*type:* `String.t`, *default:* `nil`) - This signifies the default network tier used for configuring resources of the project and can only take the following values: PREMIUM, STANDARD. Initially the default network tier is PREMIUM. * `defaultServiceAccount` (*type:* `String.t`, *default:* `nil`) - [Output Only] Default service account used by VMs running in this project. * `description` (*type:* `String.t`, *default:* `nil`) - An optional textual description of the resource. - * `enabledFeatures` (*type:* `list(String.t)`, *default:* `nil`) - Restricted features enabled for use on this project. + * `enabledFeatures` (*type:* `list(String.t)`, *default:* `nil`) - An optional list of restricted features enabled for use on this project. * `id` (*type:* `String.t`, *default:* `nil`) - [Output Only] The unique identifier for the resource. This identifier is defined by the server. This is *not* the project ID, and is just a unique ID used by Compute Engine to identify resources. * `kind` (*type:* `String.t`, *default:* `compute#project`) - [Output Only] Type of the resource. Always compute#project for projects. * `name` (*type:* `String.t`, *default:* `nil`) - The project ID. For example: my-example-project. Use the project ID to make requests to Compute Engine. * `quotas` (*type:* `list(GoogleApi.Compute.V1.Model.Quota.t)`, *default:* `nil`) - [Output Only] Quotas assigned to this project. * `selfLink` (*type:* `String.t`, *default:* `nil`) - [Output Only] Server-defined URL for the resource. - * `usageExportLocation` (*type:* `GoogleApi.Compute.V1.Model.UsageExportLocation.t`, *default:* `nil`) - The naming prefix for daily usage reports and the Google Cloud Storage bucket where they are stored. + * `usageExportLocation` (*type:* `GoogleApi.Compute.V1.Model.UsageExportLocation.t`, *default:* `nil`) - An optional naming prefix for daily usage reports and the Google Cloud Storage bucket where they are stored. * `vmDnsSetting` (*type:* `String.t`, *default:* `nil`) - [Output Only] Default internal DNS setting used by VMs running in this project. * `xpnProjectStatus` (*type:* `String.t`, *default:* `nil`) - [Output Only] The role this project has in a shared VPC configuration. Currently, only projects with the host role, which is specified by the value HOST, are differentiated. """ diff --git a/clients/compute/lib/google_api/compute/v1/model/region_instance_group_managers_resume_instances_request.ex b/clients/compute/lib/google_api/compute/v1/model/region_instance_group_managers_resume_instances_request.ex new file mode 100644 index 0000000000..a6d8264d4b --- /dev/null +++ b/clients/compute/lib/google_api/compute/v1/model/region_instance_group_managers_resume_instances_request.ex @@ -0,0 +1,51 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Compute.V1.Model.RegionInstanceGroupManagersResumeInstancesRequest do + @moduledoc """ + + + ## Attributes + + * `instances` (*type:* `list(String.t)`, *default:* `nil`) - The URLs of one or more instances to resume. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :instances => list(String.t()) | nil + } + + field(:instances, type: :list) +end + +defimpl Poison.Decoder, + for: GoogleApi.Compute.V1.Model.RegionInstanceGroupManagersResumeInstancesRequest do + def decode(value, options) do + GoogleApi.Compute.V1.Model.RegionInstanceGroupManagersResumeInstancesRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.Compute.V1.Model.RegionInstanceGroupManagersResumeInstancesRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/compute/lib/google_api/compute/v1/model/region_instance_group_managers_start_instances_request.ex b/clients/compute/lib/google_api/compute/v1/model/region_instance_group_managers_start_instances_request.ex new file mode 100644 index 0000000000..84c47492ee --- /dev/null +++ b/clients/compute/lib/google_api/compute/v1/model/region_instance_group_managers_start_instances_request.ex @@ -0,0 +1,51 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Compute.V1.Model.RegionInstanceGroupManagersStartInstancesRequest do + @moduledoc """ + + + ## Attributes + + * `instances` (*type:* `list(String.t)`, *default:* `nil`) - The URLs of one or more instances to start. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :instances => list(String.t()) | nil + } + + field(:instances, type: :list) +end + +defimpl Poison.Decoder, + for: GoogleApi.Compute.V1.Model.RegionInstanceGroupManagersStartInstancesRequest do + def decode(value, options) do + GoogleApi.Compute.V1.Model.RegionInstanceGroupManagersStartInstancesRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.Compute.V1.Model.RegionInstanceGroupManagersStartInstancesRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/compute/lib/google_api/compute/v1/model/region_instance_group_managers_stop_instances_request.ex b/clients/compute/lib/google_api/compute/v1/model/region_instance_group_managers_stop_instances_request.ex new file mode 100644 index 0000000000..f6810e3fec --- /dev/null +++ b/clients/compute/lib/google_api/compute/v1/model/region_instance_group_managers_stop_instances_request.ex @@ -0,0 +1,54 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Compute.V1.Model.RegionInstanceGroupManagersStopInstancesRequest do + @moduledoc """ + + + ## Attributes + + * `forceStop` (*type:* `boolean()`, *default:* `nil`) - If this flag is set to true, the Instance Group Manager will proceed to stop the instances, skipping initialization on them. + * `instances` (*type:* `list(String.t)`, *default:* `nil`) - The URLs of one or more instances to stop. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :forceStop => boolean() | nil, + :instances => list(String.t()) | nil + } + + field(:forceStop) + field(:instances, type: :list) +end + +defimpl Poison.Decoder, + for: GoogleApi.Compute.V1.Model.RegionInstanceGroupManagersStopInstancesRequest do + def decode(value, options) do + GoogleApi.Compute.V1.Model.RegionInstanceGroupManagersStopInstancesRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.Compute.V1.Model.RegionInstanceGroupManagersStopInstancesRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/compute/lib/google_api/compute/v1/model/region_instance_group_managers_suspend_instances_request.ex b/clients/compute/lib/google_api/compute/v1/model/region_instance_group_managers_suspend_instances_request.ex new file mode 100644 index 0000000000..3814c47b11 --- /dev/null +++ b/clients/compute/lib/google_api/compute/v1/model/region_instance_group_managers_suspend_instances_request.ex @@ -0,0 +1,54 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Compute.V1.Model.RegionInstanceGroupManagersSuspendInstancesRequest do + @moduledoc """ + + + ## Attributes + + * `forceSuspend` (*type:* `boolean()`, *default:* `nil`) - If this flag is set to true, the Instance Group Manager will proceed to suspend the instances, skipping initialization on them. + * `instances` (*type:* `list(String.t)`, *default:* `nil`) - The URLs of one or more instances to suspend. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :forceSuspend => boolean() | nil, + :instances => list(String.t()) | nil + } + + field(:forceSuspend) + field(:instances, type: :list) +end + +defimpl Poison.Decoder, + for: GoogleApi.Compute.V1.Model.RegionInstanceGroupManagersSuspendInstancesRequest do + def decode(value, options) do + GoogleApi.Compute.V1.Model.RegionInstanceGroupManagersSuspendInstancesRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.Compute.V1.Model.RegionInstanceGroupManagersSuspendInstancesRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/compute/lib/google_api/compute/v1/model/resource_status.ex b/clients/compute/lib/google_api/compute/v1/model/resource_status.ex index 193caaf341..4c59ef9ced 100644 --- a/clients/compute/lib/google_api/compute/v1/model/resource_status.ex +++ b/clients/compute/lib/google_api/compute/v1/model/resource_status.ex @@ -21,7 +21,7 @@ defmodule GoogleApi.Compute.V1.Model.ResourceStatus do ## Attributes - * `physicalHost` (*type:* `String.t`, *default:* `nil`) - [Output Only] An opaque ID of the host on which the VM is running. + * `physicalHost` (*type:* `String.t`, *default:* `nil`) - [Output Only] The precise location of your instance within the zone's data center, including the block, sub-block, and host. The field is formatted as follows: blockId/subBlockId/hostId. * `scheduling` (*type:* `GoogleApi.Compute.V1.Model.ResourceStatusScheduling.t`, *default:* `nil`) - * `upcomingMaintenance` (*type:* `GoogleApi.Compute.V1.Model.UpcomingMaintenance.t`, *default:* `nil`) - """ diff --git a/clients/compute/lib/google_api/compute/v1/model/route.ex b/clients/compute/lib/google_api/compute/v1/model/route.ex index 60b550889c..f68e775445 100644 --- a/clients/compute/lib/google_api/compute/v1/model/route.ex +++ b/clients/compute/lib/google_api/compute/v1/model/route.ex @@ -33,8 +33,11 @@ defmodule GoogleApi.Compute.V1.Model.Route do * `nextHopHub` (*type:* `String.t`, *default:* `nil`) - [Output Only] The full resource name of the Network Connectivity Center hub that will handle matching packets. * `nextHopIlb` (*type:* `String.t`, *default:* `nil`) - The URL to a forwarding rule of type loadBalancingScheme=INTERNAL that should handle matching packets or the IP address of the forwarding Rule. For example, the following are all valid URLs: - https://www.googleapis.com/compute/v1/projects/project/regions/region /forwardingRules/forwardingRule - regions/region/forwardingRules/forwardingRule If an IP address is provided, must specify an IPv4 address in dot-decimal notation or an IPv6 address in RFC 4291 format. For example, the following are all valid IP addresses: - 10.128.0.56 - 2001:db8::2d9:51:0:0 - 2001:db8:0:0:2d9:51:0:0 IPv6 addresses will be displayed using RFC 5952 compressed format (e.g. 2001:db8::2d9:51:0:0). Should never be an IPv4-mapped IPv6 address. * `nextHopInstance` (*type:* `String.t`, *default:* `nil`) - The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example: https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/ + * `nextHopInterRegionCost` (*type:* `integer()`, *default:* `nil`) - [Output only] Internal fixed region-to-region cost that Google Cloud calculates based on factors such as network performance, distance, and available bandwidth between regions. * `nextHopIp` (*type:* `String.t`, *default:* `nil`) - The network IP address of an instance that should handle matching packets. Both IPv6 address and IPv4 addresses are supported. Must specify an IPv4 address in dot-decimal notation (e.g. 192.0.2.99) or an IPv6 address in RFC 4291 format (e.g. 2001:db8::2d9:51:0:0 or 2001:db8:0:0:2d9:51:0:0). IPv6 addresses will be displayed using RFC 5952 compressed format (e.g. 2001:db8::2d9:51:0:0). Should never be an IPv4-mapped IPv6 address. + * `nextHopMed` (*type:* `integer()`, *default:* `nil`) - [Output Only] Multi-Exit Discriminator, a BGP route metric that indicates the desirability of a particular route in a network. * `nextHopNetwork` (*type:* `String.t`, *default:* `nil`) - The URL of the local network if it should handle matching packets. + * `nextHopOrigin` (*type:* `String.t`, *default:* `nil`) - [Output Only] Indicates the origin of the route. Can be IGP (Interior Gateway Protocol), EGP (Exterior Gateway Protocol), or INCOMPLETE. * `nextHopPeering` (*type:* `String.t`, *default:* `nil`) - [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035. * `nextHopVpnTunnel` (*type:* `String.t`, *default:* `nil`) - The URL to a VpnTunnel that should handle matching packets. * `priority` (*type:* `integer()`, *default:* `nil`) - The priority of this route. Priority is used to break ties in cases where there is more than one matching route of equal prefix length. In cases where multiple routes have equal prefix length, the one with the lowest-numbered priority value wins. The default value is `1000`. The priority value must be from `0` to `65535`, inclusive. @@ -60,8 +63,11 @@ defmodule GoogleApi.Compute.V1.Model.Route do :nextHopHub => String.t() | nil, :nextHopIlb => String.t() | nil, :nextHopInstance => String.t() | nil, + :nextHopInterRegionCost => integer() | nil, :nextHopIp => String.t() | nil, + :nextHopMed => integer() | nil, :nextHopNetwork => String.t() | nil, + :nextHopOrigin => String.t() | nil, :nextHopPeering => String.t() | nil, :nextHopVpnTunnel => String.t() | nil, :priority => integer() | nil, @@ -84,8 +90,11 @@ defmodule GoogleApi.Compute.V1.Model.Route do field(:nextHopHub) field(:nextHopIlb) field(:nextHopInstance) + field(:nextHopInterRegionCost) field(:nextHopIp) + field(:nextHopMed) field(:nextHopNetwork) + field(:nextHopOrigin) field(:nextHopPeering) field(:nextHopVpnTunnel) field(:priority) diff --git a/clients/compute/lib/google_api/compute/v1/model/security_policy_rule_rate_limit_options.ex b/clients/compute/lib/google_api/compute/v1/model/security_policy_rule_rate_limit_options.ex index 0418b3676d..d65bcd6723 100644 --- a/clients/compute/lib/google_api/compute/v1/model/security_policy_rule_rate_limit_options.ex +++ b/clients/compute/lib/google_api/compute/v1/model/security_policy_rule_rate_limit_options.ex @@ -24,7 +24,7 @@ defmodule GoogleApi.Compute.V1.Model.SecurityPolicyRuleRateLimitOptions do * `banDurationSec` (*type:* `integer()`, *default:* `nil`) - Can only be specified if the action for the rule is "rate_based_ban". If specified, determines the time (in seconds) the traffic will continue to be banned by the rate limit after the rate falls below the threshold. * `banThreshold` (*type:* `GoogleApi.Compute.V1.Model.SecurityPolicyRuleRateLimitOptionsThreshold.t`, *default:* `nil`) - Can only be specified if the action for the rule is "rate_based_ban". If specified, the key will be banned for the configured 'ban_duration_sec' when the number of requests that exceed the 'rate_limit_threshold' also exceed this 'ban_threshold'. * `conformAction` (*type:* `String.t`, *default:* `nil`) - Action to take for requests that are under the configured rate limit threshold. Valid option is "allow" only. - * `enforceOnKey` (*type:* `String.t`, *default:* `nil`) - Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if "enforceOnKey" is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL. - HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes. - SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session. - REGION_CODE: The country/region from which the request originates. - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL. - USER_IP: The IP address of the originating client, which is resolved based on "userIpRequestHeaders" configured with the security policy. If there is no "userIpRequestHeaders" configuration or an IP address cannot be resolved from it, the key type defaults to IP. + * `enforceOnKey` (*type:* `String.t`, *default:* `nil`) - Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if "enforceOnKey" is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL. - HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes. - SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session. - REGION_CODE: The country/region from which the request originates. - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL. - USER_IP: The IP address of the originating client, which is resolved based on "userIpRequestHeaders" configured with the security policy. If there is no "userIpRequestHeaders" configuration or an IP address cannot be resolved from it, the key type defaults to IP. - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL. * `enforceOnKeyConfigs` (*type:* `list(GoogleApi.Compute.V1.Model.SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig.t)`, *default:* `nil`) - If specified, any combination of values of enforce_on_key_type/enforce_on_key_name is treated as the key on which ratelimit threshold/action is enforced. You can specify up to 3 enforce_on_key_configs. If enforce_on_key_configs is specified, enforce_on_key must not be specified. * `enforceOnKeyName` (*type:* `String.t`, *default:* `nil`) - Rate limit key name applicable only for the following key types: HTTP_HEADER -- Name of the HTTP header whose value is taken as the key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key value. * `exceedAction` (*type:* `String.t`, *default:* `nil`) - Action to take for requests that are above the configured rate limit threshold, to either deny with a specified HTTP response code, or redirect to a different endpoint. Valid options are `deny(STATUS)`, where valid values for `STATUS` are 403, 404, 429, and 502, and `redirect`, where the redirect parameters come from `exceedRedirectOptions` below. The `redirect` action is only supported in Global Security Policies of type CLOUD_ARMOR. diff --git a/clients/compute/lib/google_api/compute/v1/model/security_policy_rule_rate_limit_options_enforce_on_key_config.ex b/clients/compute/lib/google_api/compute/v1/model/security_policy_rule_rate_limit_options_enforce_on_key_config.ex index 855bcbc570..f04c1755e8 100644 --- a/clients/compute/lib/google_api/compute/v1/model/security_policy_rule_rate_limit_options_enforce_on_key_config.ex +++ b/clients/compute/lib/google_api/compute/v1/model/security_policy_rule_rate_limit_options_enforce_on_key_config.ex @@ -22,7 +22,7 @@ defmodule GoogleApi.Compute.V1.Model.SecurityPolicyRuleRateLimitOptionsEnforceOn ## Attributes * `enforceOnKeyName` (*type:* `String.t`, *default:* `nil`) - Rate limit key name applicable only for the following key types: HTTP_HEADER -- Name of the HTTP header whose value is taken as the key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key value. - * `enforceOnKeyType` (*type:* `String.t`, *default:* `nil`) - Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if "enforceOnKeyConfigs" is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL. - HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes. - SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session. - REGION_CODE: The country/region from which the request originates. - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL. - USER_IP: The IP address of the originating client, which is resolved based on "userIpRequestHeaders" configured with the security policy. If there is no "userIpRequestHeaders" configuration or an IP address cannot be resolved from it, the key type defaults to IP. + * `enforceOnKeyType` (*type:* `String.t`, *default:* `nil`) - Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if "enforceOnKeyConfigs" is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL. - HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes. - SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session. - REGION_CODE: The country/region from which the request originates. - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL. - USER_IP: The IP address of the originating client, which is resolved based on "userIpRequestHeaders" configured with the security policy. If there is no "userIpRequestHeaders" configuration or an IP address cannot be resolved from it, the key type defaults to IP. - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL. """ use GoogleApi.Gax.ModelBase diff --git a/clients/compute/lib/google_api/compute/v1/model/subnetwork.ex b/clients/compute/lib/google_api/compute/v1/model/subnetwork.ex index ded64f6906..2ff5c046da 100644 --- a/clients/compute/lib/google_api/compute/v1/model/subnetwork.ex +++ b/clients/compute/lib/google_api/compute/v1/model/subnetwork.ex @@ -38,7 +38,7 @@ defmodule GoogleApi.Compute.V1.Model.Subnetwork do * `network` (*type:* `String.t`, *default:* `nil`) - The URL of the network to which this subnetwork belongs, provided by the client when initially creating the subnetwork. This field can be set only at resource creation time. * `privateIpGoogleAccess` (*type:* `boolean()`, *default:* `nil`) - Whether the VMs in this subnet can access Google services without assigned external IP addresses. This field can be both set at resource creation time and updated using setPrivateIpGoogleAccess. * `privateIpv6GoogleAccess` (*type:* `String.t`, *default:* `nil`) - This field is for internal use. This field can be both set at resource creation time and updated using patch. - * `purpose` (*type:* `String.t`, *default:* `nil`) - The purpose of the resource. This field can be either PRIVATE, GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PRIVATE_SERVICE_CONNECT, or PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY are user-created subnetworks that are reserved for Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY. + * `purpose` (*type:* `String.t`, *default:* `nil`) - The purpose of the resource. This field can be either PRIVATE, GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PEER_MIGRATION or PRIVATE_SERVICE_CONNECT. PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY are user-created subnetworks that are reserved for Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. A subnet with purpose set to PEER_MIGRATION is used for subnet migration from one peered VPC to another. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY. * `region` (*type:* `String.t`, *default:* `nil`) - URL of the region where the Subnetwork resides. This field can be set only at resource creation time. * `reservedInternalRange` (*type:* `String.t`, *default:* `nil`) - The URL of the reserved internal range. * `role` (*type:* `String.t`, *default:* `nil`) - The role of subnetwork. Currently, this field is only used when purpose is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Envoy-based load balancers in a region. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request. diff --git a/clients/compute/lib/google_api/compute/v1/model/target_https_proxy.ex b/clients/compute/lib/google_api/compute/v1/model/target_https_proxy.ex index 049a5f8403..5ccbccc57f 100644 --- a/clients/compute/lib/google_api/compute/v1/model/target_https_proxy.ex +++ b/clients/compute/lib/google_api/compute/v1/model/target_https_proxy.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.Compute.V1.Model.TargetHttpsProxy do @moduledoc """ - Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/v1/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/v1/regionTargetHttpsProxies) A target HTTPS proxy is a component of GCP HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts. + Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/v1/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/v1/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts. ## Attributes diff --git a/clients/compute/lib/google_api/compute/v1/model/url_map.ex b/clients/compute/lib/google_api/compute/v1/model/url_map.ex index 6174558ad7..64a0171bdd 100644 --- a/clients/compute/lib/google_api/compute/v1/model/url_map.ex +++ b/clients/compute/lib/google_api/compute/v1/model/url_map.ex @@ -23,9 +23,9 @@ defmodule GoogleApi.Compute.V1.Model.UrlMap do * `creationTimestamp` (*type:* `String.t`, *default:* `nil`) - [Output Only] Creation timestamp in RFC3339 text format. * `defaultCustomErrorResponsePolicy` (*type:* `GoogleApi.Compute.V1.Model.CustomErrorResponsePolicy.t`, *default:* `nil`) - defaultCustomErrorResponsePolicy specifies how the Load Balancer returns error responses when BackendServiceor BackendBucket responds with an error. This policy takes effect at the load balancer level and applies only when no policy has been defined for the error code at lower levels like PathMatcher, RouteRule and PathRule within this UrlMap. For example, consider a UrlMap with the following configuration: - defaultCustomErrorResponsePolicy containing policies for responding to 5xx and 4xx errors - A PathMatcher configured for *.example.com has defaultCustomErrorResponsePolicy for 4xx. If a request for http://www.example.com/ encounters a 404, the policy in pathMatcher.defaultCustomErrorResponsePolicy will be enforced. When the request for http://www.example.com/ encounters a 502, the policy in UrlMap.defaultCustomErrorResponsePolicy will be enforced. When a request that does not match any host in *.example.com such as http://www.myotherexample.com/, encounters a 404, UrlMap.defaultCustomErrorResponsePolicy takes effect. When used in conjunction with defaultRouteAction.retryPolicy, retries take precedence. Only once all retries are exhausted, the defaultCustomErrorResponsePolicy is applied. While attempting a retry, if load balancer is successful in reaching the service, the defaultCustomErrorResponsePolicy is ignored and the response from the service is returned to the client. defaultCustomErrorResponsePolicy is supported only for global external Application Load Balancers. - * `defaultRouteAction` (*type:* `GoogleApi.Compute.V1.Model.HttpRouteAction.t`, *default:* `nil`) - defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. URL maps for classic Application Load Balancers only support the urlRewrite action within defaultRouteAction. defaultRouteAction has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true. - * `defaultService` (*type:* `String.t`, *default:* `nil`) - The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any defaultRouteAction.weightedBackendServices. Conversely, if defaultRouteAction specifies any defaultRouteAction.weightedBackendServices, defaultService must not be specified. If defaultService is specified, then set either defaultUrlRedirect , or defaultRouteAction.weightedBackendService Don't set both. defaultService has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true. - * `defaultUrlRedirect` (*type:* `GoogleApi.Compute.V1.Model.HttpRedirectAction.t`, *default:* `nil`) - When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. Not supported when the URL map is bound to a target gRPC proxy. + * `defaultRouteAction` (*type:* `GoogleApi.Compute.V1.Model.HttpRouteAction.t`, *default:* `nil`) - defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. Only one of defaultUrlRedirect, defaultService or defaultRouteAction.weightedBackendService can be set. URL maps for classic Application Load Balancers only support the urlRewrite action within defaultRouteAction. defaultRouteAction has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true. + * `defaultService` (*type:* `String.t`, *default:* `nil`) - The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. Only one of defaultUrlRedirect, defaultService or defaultRouteAction.weightedBackendService can be set. defaultService has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true. + * `defaultUrlRedirect` (*type:* `GoogleApi.Compute.V1.Model.HttpRedirectAction.t`, *default:* `nil`) - When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. Only one of defaultUrlRedirect, defaultService or defaultRouteAction.weightedBackendService can be set. Not supported when the URL map is bound to a target gRPC proxy. * `description` (*type:* `String.t`, *default:* `nil`) - An optional description of this resource. Provide this property when you create the resource. * `fingerprint` (*type:* `String.t`, *default:* `nil`) - Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field is ignored when inserting a UrlMap. An up-to-date fingerprint must be provided in order to update the UrlMap, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a UrlMap. * `headerAction` (*type:* `GoogleApi.Compute.V1.Model.HttpHeaderAction.t`, *default:* `nil`) - Specifies changes to request and response headers that need to take effect for the selected backendService. The headerAction specified here take effect after headerAction specified under pathMatcher. headerAction is not supported for load balancers that have their loadBalancingScheme set to EXTERNAL. Not supported when the URL map is bound to a target gRPC proxy that has validateForProxyless field set to true. diff --git a/clients/compute/lib/google_api/compute/v1/model/usable_subnetwork.ex b/clients/compute/lib/google_api/compute/v1/model/usable_subnetwork.ex index 9130bedb4d..923ad0b182 100644 --- a/clients/compute/lib/google_api/compute/v1/model/usable_subnetwork.ex +++ b/clients/compute/lib/google_api/compute/v1/model/usable_subnetwork.ex @@ -26,7 +26,7 @@ defmodule GoogleApi.Compute.V1.Model.UsableSubnetwork do * `ipCidrRange` (*type:* `String.t`, *default:* `nil`) - The range of internal addresses that are owned by this subnetwork. * `ipv6AccessType` (*type:* `String.t`, *default:* `nil`) - The access type of IPv6 address this subnet holds. It's immutable and can only be specified during creation or the first time the subnet is updated into IPV4_IPV6 dual stack. * `network` (*type:* `String.t`, *default:* `nil`) - Network URL. - * `purpose` (*type:* `String.t`, *default:* `nil`) - The purpose of the resource. This field can be either PRIVATE, GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PRIVATE_SERVICE_CONNECT, or PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY are user-created subnetworks that are reserved for Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY. + * `purpose` (*type:* `String.t`, *default:* `nil`) - The purpose of the resource. This field can be either PRIVATE, GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PEER_MIGRATION or PRIVATE_SERVICE_CONNECT. PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY are user-created subnetworks that are reserved for Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. A subnet with purpose set to PEER_MIGRATION is used for subnet migration from one peered VPC to another. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY. * `role` (*type:* `String.t`, *default:* `nil`) - The role of subnetwork. Currently, this field is only used when purpose is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Envoy-based load balancers in a region. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request. * `secondaryIpRanges` (*type:* `list(GoogleApi.Compute.V1.Model.UsableSubnetworkSecondaryRange.t)`, *default:* `nil`) - Secondary IP ranges. * `stackType` (*type:* `String.t`, *default:* `nil`) - The stack type for the subnet. If set to IPV4_ONLY, new VMs in the subnet are assigned IPv4 addresses only. If set to IPV4_IPV6, new VMs in the subnet can be assigned both IPv4 and IPv6 addresses. If not specified, IPV4_ONLY is used. This field can be both set at resource creation time and updated using patch. diff --git a/clients/compute/mix.exs b/clients/compute/mix.exs index d63940c435..0c137de8a5 100644 --- a/clients/compute/mix.exs +++ b/clients/compute/mix.exs @@ -18,7 +18,7 @@ defmodule GoogleApi.Compute.Mixfile do use Mix.Project - @version "0.69.0" + @version "0.70.0" def project() do [