googleapis
Version:
Google APIs Client Library for Node.js
1,337 lines • 1.58 MB
TypeScript
/**
* Copyright 2015 Google Inc. All Rights Reserved.
*
* 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.
*/
import { AxiosPromise } from 'axios';
import { GoogleApis } from '../..';
import { BodyResponseCallback, GlobalOptions, MethodOptions } from '../../lib/api';
/**
* Compute Engine API
*
* Creates and runs virtual machines on Google Cloud Platform.
*
* @example
* const google = require('googleapis');
* const compute = google.compute('v1');
*
* @namespace compute
* @type {Function}
* @version v1
* @variation v1
* @param {object=} options Options for Compute
*/
export declare class Compute {
_options: GlobalOptions;
google: GoogleApis;
root: this;
acceleratorTypes: Resource$Acceleratortypes;
addresses: Resource$Addresses;
autoscalers: Resource$Autoscalers;
backendBuckets: Resource$Backendbuckets;
backendServices: Resource$Backendservices;
disks: Resource$Disks;
diskTypes: Resource$Disktypes;
firewalls: Resource$Firewalls;
forwardingRules: Resource$Forwardingrules;
globalAddresses: Resource$Globaladdresses;
globalForwardingRules: Resource$Globalforwardingrules;
globalOperations: Resource$Globaloperations;
healthChecks: Resource$Healthchecks;
httpHealthChecks: Resource$Httphealthchecks;
httpsHealthChecks: Resource$Httpshealthchecks;
images: Resource$Images;
instanceGroupManagers: Resource$Instancegroupmanagers;
instanceGroups: Resource$Instancegroups;
instances: Resource$Instances;
instanceTemplates: Resource$Instancetemplates;
interconnectAttachments: Resource$Interconnectattachments;
interconnectLocations: Resource$Interconnectlocations;
interconnects: Resource$Interconnects;
licenseCodes: Resource$Licensecodes;
licenses: Resource$Licenses;
machineTypes: Resource$Machinetypes;
networks: Resource$Networks;
projects: Resource$Projects;
regionAutoscalers: Resource$Regionautoscalers;
regionBackendServices: Resource$Regionbackendservices;
regionCommitments: Resource$Regioncommitments;
regionInstanceGroupManagers: Resource$Regioninstancegroupmanagers;
regionInstanceGroups: Resource$Regioninstancegroups;
regionOperations: Resource$Regionoperations;
regions: Resource$Regions;
routers: Resource$Routers;
routes: Resource$Routes;
snapshots: Resource$Snapshots;
sslCertificates: Resource$Sslcertificates;
sslPolicies: Resource$Sslpolicies;
subnetworks: Resource$Subnetworks;
targetHttpProxies: Resource$Targethttpproxies;
targetHttpsProxies: Resource$Targethttpsproxies;
targetInstances: Resource$Targetinstances;
targetPools: Resource$Targetpools;
targetSslProxies: Resource$Targetsslproxies;
targetTcpProxies: Resource$Targettcpproxies;
targetVpnGateways: Resource$Targetvpngateways;
urlMaps: Resource$Urlmaps;
vpnTunnels: Resource$Vpntunnels;
zoneOperations: Resource$Zoneoperations;
zones: Resource$Zones;
constructor(options: GlobalOptions, google: GoogleApis);
getRoot(): this;
}
/**
* A specification of the type and number of accelerator cards attached to the
* instance.
*/
export interface Schema$AcceleratorConfig {
/**
* The number of the guest accelerator cards exposed to this instance.
*/
acceleratorCount: number;
/**
* Full or partial URL of the accelerator type resource to attach to this
* instance. If you are creating an instance template, specify only the
* accelerator name.
*/
acceleratorType: string;
}
/**
* An Accelerator Type resource. (== resource_for beta.acceleratorTypes ==) (==
* resource_for v1.acceleratorTypes ==)
*/
export interface Schema$AcceleratorType {
/**
* [Output Only] Creation timestamp in RFC3339 text format.
*/
creationTimestamp: string;
/**
* [Output Only] The deprecation status associated with this accelerator type.
*/
deprecated: Schema$DeprecationStatus;
/**
* [Output Only] An optional textual description of the resource.
*/
description: string;
/**
* [Output Only] The unique identifier for the resource. This identifier is
* defined by the server.
*/
id: string;
/**
* [Output Only] The type of the resource. Always compute#acceleratorType for
* accelerator types.
*/
kind: string;
/**
* [Output Only] Maximum accelerator cards allowed per instance.
*/
maximumCardsPerInstance: number;
/**
* [Output Only] Name of the resource.
*/
name: string;
/**
* [Output Only] Server-defined fully-qualified URL for this resource.
*/
selfLink: string;
/**
* [Output Only] The name of the zone where the accelerator type resides, such
* as us-central1-a. You must specify this field as part of the HTTP request
* URL. It is not settable as a field in the request body.
*/
zone: string;
}
export interface Schema$AcceleratorTypeAggregatedList {
/**
* [Output Only] Unique identifier for the resource; defined by the server.
*/
id: string;
/**
* A list of AcceleratorTypesScopedList resources.
*/
items: any;
/**
* [Output Only] Type of resource. Always
* compute#acceleratorTypeAggregatedList for aggregated lists of accelerator
* types.
*/
kind: string;
/**
* [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.
*/
nextPageToken: string;
/**
* [Output Only] Server-defined URL for this resource.
*/
selfLink: string;
/**
* [Output Only] Informational warning message.
*/
warning: any;
}
/**
* Contains a list of accelerator types.
*/
export interface Schema$AcceleratorTypeList {
/**
* [Output Only] Unique identifier for the resource; defined by the server.
*/
id: string;
/**
* A list of AcceleratorType resources.
*/
items: Schema$AcceleratorType[];
/**
* [Output Only] Type of resource. Always compute#acceleratorTypeList for
* lists of accelerator types.
*/
kind: string;
/**
* [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.
*/
nextPageToken: string;
/**
* [Output Only] Server-defined URL for this resource.
*/
selfLink: string;
/**
* [Output Only] Informational warning message.
*/
warning: any;
}
export interface Schema$AcceleratorTypesScopedList {
/**
* [Output Only] List of accelerator types contained in this scope.
*/
acceleratorTypes: Schema$AcceleratorType[];
/**
* [Output Only] An informational warning that appears when the accelerator
* types list is empty.
*/
warning: any;
}
/**
* An access configuration attached to an instance's network interface. Only
* one access config per instance is supported.
*/
export interface Schema$AccessConfig {
/**
* [Output Only] Type of the resource. Always compute#accessConfig for access
* configs.
*/
kind: string;
/**
* The name of this access configuration. The default and recommended name is
* External NAT but you can use any arbitrary string you would like. For
* example, My external IP or Network Access.
*/
name: string;
/**
* An external IP address associated with this instance. Specify an unused
* static external IP address available to the project or leave this field
* undefined to use an IP from a shared ephemeral IP address pool. If you
* specify a static external IP address, it must live in the same region as
* the zone of the instance.
*/
natIP: string;
/**
* The DNS domain name for the public PTR record. This field can only be set
* when the set_public_ptr field is enabled.
*/
publicPtrDomainName: string;
/**
* Specifies whether a public DNS ?PTR? record should be created to map the
* external IP address of the instance to a DNS domain name.
*/
setPublicPtr: boolean;
/**
* The type of configuration. The default and only option is ONE_TO_ONE_NAT.
*/
type: string;
}
/**
* A reserved address resource. (== resource_for beta.addresses ==) (==
* resource_for v1.addresses ==) (== resource_for beta.globalAddresses ==) (==
* resource_for v1.globalAddresses ==)
*/
export interface Schema$Address {
/**
* The static IP address represented by this resource.
*/
address: string;
/**
* The type of address to reserve, either INTERNAL or EXTERNAL. If
* unspecified, defaults to EXTERNAL.
*/
addressType: string;
/**
* [Output Only] Creation timestamp in RFC3339 text format.
*/
creationTimestamp: string;
/**
* An optional description of this resource. Provide this property when you
* create the resource.
*/
description: string;
/**
* [Output Only] The unique identifier for the resource. This identifier is
* defined by the server.
*/
id: string;
/**
* The IP Version that will be used by this address. Valid options are IPV4 or
* IPV6. This can only be specified for a global address.
*/
ipVersion: string;
/**
* [Output Only] Type of the resource. Always compute#address for addresses.
*/
kind: string;
/**
* 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])?` which means the first character
* must be a lowercase letter, and all following characters must be a dash,
* lowercase letter, or digit, except the last character, which cannot be a
* dash.
*/
name: string;
/**
* [Output Only] URL of the region where the regional address resides. This
* field is not applicable to global addresses. You must specify this field as
* part of the HTTP request URL. You cannot set this field in the request
* body.
*/
region: string;
/**
* [Output Only] Server-defined URL for the resource.
*/
selfLink: string;
/**
* [Output Only] The status of the address, which can be one of RESERVING,
* RESERVED, or IN_USE. An address that is RESERVING is currently in the
* process of being reserved. A RESERVED address is currently reserved and
* available to use. An IN_USE address is currently being used by another
* resource and is not available.
*/
status: string;
/**
* The URL of the subnetwork in which to reserve the address. If an IP address
* is specified, it must be within the subnetwork's IP range. This field
* can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER
* purposes.
*/
subnetwork: string;
/**
* [Output Only] The URLs of the resources that are using this address.
*/
users: string[];
}
export interface Schema$AddressAggregatedList {
/**
* [Output Only] Unique identifier for the resource; defined by the server.
*/
id: string;
/**
* A list of AddressesScopedList resources.
*/
items: any;
/**
* [Output Only] Type of resource. Always compute#addressAggregatedList for
* aggregated lists of addresses.
*/
kind: string;
/**
* [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.
*/
nextPageToken: string;
/**
* [Output Only] Server-defined URL for this resource.
*/
selfLink: string;
/**
* [Output Only] Informational warning message.
*/
warning: any;
}
export interface Schema$AddressesScopedList {
/**
* [Output Only] List of addresses contained in this scope.
*/
addresses: Schema$Address[];
/**
* [Output Only] Informational warning which replaces the list of addresses
* when the list is empty.
*/
warning: any;
}
/**
* Contains a list of addresses.
*/
export interface Schema$AddressList {
/**
* [Output Only] Unique identifier for the resource; defined by the server.
*/
id: string;
/**
* A list of Address resources.
*/
items: Schema$Address[];
/**
* [Output Only] Type of resource. Always compute#addressList for lists of
* addresses.
*/
kind: string;
/**
* [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.
*/
nextPageToken: string;
/**
* [Output Only] Server-defined URL for this resource.
*/
selfLink: string;
/**
* [Output Only] Informational warning message.
*/
warning: any;
}
/**
* An alias IP range attached to an instance's network interface.
*/
export interface Schema$AliasIpRange {
/**
* The IP CIDR range represented by this alias IP range. This IP CIDR range
* must belong to the specified subnetwork and cannot contain IP addresses
* reserved by system or used by other network interfaces. This range may be a
* single IP address (e.g. 10.2.3.4), a netmask (e.g. /24) or a CIDR format
* string (e.g. 10.1.2.0/24).
*/
ipCidrRange: string;
/**
* Optional subnetwork secondary range name specifying the secondary range
* from which to allocate the IP CIDR range for this alias IP range. If left
* unspecified, the primary range of the subnetwork will be used.
*/
subnetworkRangeName: string;
}
/**
* An instance-attached disk resource.
*/
export interface Schema$AttachedDisk {
/**
* Specifies whether the disk will be auto-deleted when the instance is
* deleted (but not when the disk is detached from the instance).
*/
autoDelete: boolean;
/**
* Indicates that this is a boot disk. The virtual machine will use the first
* partition of the disk for its root filesystem.
*/
boot: boolean;
/**
* Specifies a unique device name of your choice that is reflected into the
* /dev/disk/by-id/google-* tree of a Linux operating system running within
* the instance. This name can be used to reference the device for mounting,
* resizing, and so on, from within the instance. If not specified, the
* server chooses a default device name to apply to this disk, in the form
* persistent-disks-x, where x is a number assigned by Google Compute Engine.
* This field is only applicable for persistent disks.
*/
deviceName: string;
/**
* Encrypts or decrypts a disk using a customer-supplied encryption key. If
* you are creating a new disk, this field encrypts the new disk using an
* encryption key that you provide. If you are attaching an existing disk that
* is already encrypted, this field decrypts the disk using the
* customer-supplied encryption key. If you encrypt a disk using a
* customer-supplied key, you must provide the same key again when you attempt
* to use this resource at a later time. For example, you must provide the key
* when you create a snapshot or an image from the disk or when you attach the
* disk to a virtual machine instance. If you do not provide an encryption
* key, then the disk will be encrypted using an automatically generated key
* and you do not need to provide a key to use the disk later. Instance
* templates do not store customer-supplied encryption keys, so you cannot use
* your own keys to encrypt disks in a managed instance group.
*/
diskEncryptionKey: Schema$CustomerEncryptionKey;
/**
* A list of features to enable on the guest operating system. Applicable only
* for bootable images. Read Enabling guest operating system features to see
* a list of available options.
*/
guestOsFeatures: Schema$GuestOsFeature[];
/**
* [Output Only] A zero-based index to this disk, where 0 is reserved for the
* boot disk. If you have many disks attached to an instance, each disk would
* have a unique index number.
*/
index: number;
/**
* [Input Only] Specifies the parameters for a new disk that will be created
* alongside the new instance. Use initialization parameters to create boot
* disks or local SSDs attached to the new instance. This property is
* mutually exclusive with the source property; you can only define one or the
* other, but not both.
*/
initializeParams: Schema$AttachedDiskInitializeParams;
/**
* Specifies the disk interface to use for attaching this disk, which is
* either SCSI or NVME. The default is SCSI. Persistent disks must always use
* SCSI and the request will fail if you attempt to attach a persistent disk
* in any other format than SCSI. Local SSDs can use either NVME or SCSI. For
* performance characteristics of SCSI over NVMe, see Local SSD performance.
*/
interface: string;
/**
* [Output Only] Type of the resource. Always compute#attachedDisk for
* attached disks.
*/
kind: string;
/**
* [Output Only] Any valid publicly visible licenses.
*/
licenses: string[];
/**
* The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If
* not specified, the default is to attach the disk in READ_WRITE mode.
*/
mode: string;
/**
* Specifies a valid partial or full URL to an existing Persistent Disk
* resource. When creating a new instance, one of initializeParams.sourceImage
* or disks.source is required except for local SSD. If desired, you can also
* attach existing non-root persistent disks using this property. This field
* is only applicable for persistent disks. Note that for InstanceTemplate,
* specify the disk name, not the URL for the disk.
*/
source: string;
/**
* Specifies the type of the disk, either SCRATCH or PERSISTENT. If not
* specified, the default is PERSISTENT.
*/
type: string;
}
/**
* [Input Only] Specifies the parameters for a new disk that will be created
* alongside the new instance. Use initialization parameters to create boot
* disks or local SSDs attached to the new instance. This property is mutually
* exclusive with the source property; you can only define one or the other, but
* not both.
*/
export interface Schema$AttachedDiskInitializeParams {
/**
* Specifies the disk name. If not specified, the default is to use the name
* of the instance.
*/
diskName: string;
/**
* Specifies the size of the disk in base-2 GB.
*/
diskSizeGb: string;
/**
* Specifies the disk type to use to create the instance. If not specified,
* the default is pd-standard, specified using the full URL. For example:
* https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
* Other values include pd-ssd and local-ssd. If you define this field, you
* can provide either the full or partial URL. For example, the following are
* valid values: -
* https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
* - projects/project/zones/zone/diskTypes/diskType -
* zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the
* name of the disk type, not URL.
*/
diskType: string;
/**
* Labels to apply to this disk. These can be later modified by the
* disks.setLabels method. This field is only applicable for persistent disks.
*/
labels: any;
/**
* The source image to create this disk. When creating a new instance, one of
* initializeParams.sourceImage or disks.source is required except for local
* SSD. To create a disk with one of the public operating system images,
* specify the image by its family name. For example, specify family/debian-8
* to use the latest Debian 8 image:
* projects/debian-cloud/global/images/family/debian-8 Alternatively, use a
* specific version of a public operating system image:
* projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD To create a
* disk with a custom image that you created, specify the image name in the
* following format: global/images/my-custom-image You can also specify a
* custom image by its image family, which returns the latest version of the
* image in that family. Replace the image name with family/family-name:
* global/images/family/my-image-family If the source image is deleted
* later, this field will not be set.
*/
sourceImage: string;
/**
* The customer-supplied encryption key of the source image. Required if the
* source image is protected by a customer-supplied encryption key. Instance
* templates do not store customer-supplied encryption keys, so you cannot
* create disks for instances in a managed instance group if the source images
* are encrypted with your own keys.
*/
sourceImageEncryptionKey: Schema$CustomerEncryptionKey;
}
/**
* Represents an Autoscaler resource. Autoscalers allow you to automatically
* scale virtual machine instances in managed instance groups according to an
* autoscaling policy that you define. For more information, read Autoscaling
* Groups of Instances. (== resource_for beta.autoscalers ==) (== resource_for
* v1.autoscalers ==) (== resource_for beta.regionAutoscalers ==) (==
* resource_for v1.regionAutoscalers ==)
*/
export interface Schema$Autoscaler {
/**
* The configuration parameters for the autoscaling algorithm. You can define
* one or more of the policies for an autoscaler: cpuUtilization,
* customMetricUtilizations, and loadBalancingUtilization. If none of these
* are specified, the default will be to autoscale based on cpuUtilization to
* 0.6 or 60%.
*/
autoscalingPolicy: Schema$AutoscalingPolicy;
/**
* [Output Only] Creation timestamp in RFC3339 text format.
*/
creationTimestamp: string;
/**
* An optional description of this resource. Provide this property when you
* create the resource.
*/
description: string;
/**
* [Output Only] The unique identifier for the resource. This identifier is
* defined by the server.
*/
id: string;
/**
* [Output Only] Type of the resource. Always compute#autoscaler for
* autoscalers.
*/
kind: string;
/**
* 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])?` which means the first character
* must be a lowercase letter, and all following characters must be a dash,
* lowercase letter, or digit, except the last character, which cannot be a
* dash.
*/
name: string;
/**
* [Output Only] URL of the region where the instance group resides (for
* autoscalers living in regional scope).
*/
region: string;
/**
* [Output Only] Server-defined URL for the resource.
*/
selfLink: string;
/**
* [Output Only] The status of the autoscaler configuration.
*/
status: string;
/**
* [Output Only] Human-readable details about the current state of the
* autoscaler. Read the documentation for Commonly returned status messages
* for examples of status messages you might encounter.
*/
statusDetails: Schema$AutoscalerStatusDetails[];
/**
* URL of the managed instance group that this autoscaler will scale.
*/
target: string;
/**
* [Output Only] URL of the zone where the instance group resides (for
* autoscalers living in zonal scope).
*/
zone: string;
}
export interface Schema$AutoscalerAggregatedList {
/**
* [Output Only] Unique identifier for the resource; defined by the server.
*/
id: string;
/**
* A list of AutoscalersScopedList resources.
*/
items: any;
/**
* [Output Only] Type of resource. Always compute#autoscalerAggregatedList for
* aggregated lists of autoscalers.
*/
kind: string;
/**
* [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.
*/
nextPageToken: string;
/**
* [Output Only] Server-defined URL for this resource.
*/
selfLink: string;
/**
* [Output Only] Informational warning message.
*/
warning: any;
}
/**
* Contains a list of Autoscaler resources.
*/
export interface Schema$AutoscalerList {
/**
* [Output Only] Unique identifier for the resource; defined by the server.
*/
id: string;
/**
* A list of Autoscaler resources.
*/
items: Schema$Autoscaler[];
/**
* [Output Only] Type of resource. Always compute#autoscalerList for lists of
* autoscalers.
*/
kind: string;
/**
* [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.
*/
nextPageToken: string;
/**
* [Output Only] Server-defined URL for this resource.
*/
selfLink: string;
/**
* [Output Only] Informational warning message.
*/
warning: any;
}
export interface Schema$AutoscalersScopedList {
/**
* [Output Only] List of autoscalers contained in this scope.
*/
autoscalers: Schema$Autoscaler[];
/**
* [Output Only] Informational warning which replaces the list of autoscalers
* when the list is empty.
*/
warning: any;
}
export interface Schema$AutoscalerStatusDetails {
/**
* The status message.
*/
message: string;
/**
* The type of error returned.
*/
type: string;
}
/**
* Cloud Autoscaler policy.
*/
export interface Schema$AutoscalingPolicy {
/**
* The number of seconds that the autoscaler should wait before it starts
* collecting information from a new instance. This prevents the autoscaler
* from collecting information when the instance is initializing, during which
* the collected usage would not be reliable. The default time autoscaler
* waits is 60 seconds. Virtual machine initialization times might vary
* because of numerous factors. We recommend that you test how long an
* instance may take to initialize. To do this, create an instance and time
* the startup process.
*/
coolDownPeriodSec: number;
/**
* Defines the CPU utilization policy that allows the autoscaler to scale
* based on the average CPU utilization of a managed instance group.
*/
cpuUtilization: Schema$AutoscalingPolicyCpuUtilization;
/**
* Configuration parameters of autoscaling based on a custom metric.
*/
customMetricUtilizations: Schema$AutoscalingPolicyCustomMetricUtilization[];
/**
* Configuration parameters of autoscaling based on load balancer.
*/
loadBalancingUtilization: Schema$AutoscalingPolicyLoadBalancingUtilization;
/**
* The maximum number of instances that the autoscaler can scale up to. This
* is required when creating or updating an autoscaler. The maximum number of
* replicas should not be lower than minimal number of replicas.
*/
maxNumReplicas: number;
/**
* The minimum number of replicas that the autoscaler can scale down to. This
* cannot be less than 0. If not provided, autoscaler will choose a default
* value depending on maximum number of instances allowed.
*/
minNumReplicas: number;
}
/**
* CPU utilization policy.
*/
export interface Schema$AutoscalingPolicyCpuUtilization {
/**
* The target CPU utilization that the autoscaler should maintain. Must be a
* float value in the range (0, 1]. If not specified, the default is 0.6. If
* the CPU level is below the target utilization, the autoscaler scales down
* the number of instances until it reaches the minimum number of instances
* you specified or until the average CPU of your instances reaches the target
* utilization. If the average CPU is above the target utilization, the
* autoscaler scales up until it reaches the maximum number of instances you
* specified or until the average utilization reaches the target utilization.
*/
utilizationTarget: number;
}
/**
* Custom utilization metric policy.
*/
export interface Schema$AutoscalingPolicyCustomMetricUtilization {
/**
* The identifier (type) of the Stackdriver Monitoring metric. The metric
* cannot have negative values. The metric must have a value type of INT64 or
* DOUBLE.
*/
metric: string;
/**
* The target value of the metric that autoscaler should maintain. This must
* be a positive value. A utilization metric scales number of virtual machines
* handling requests to increase or decrease proportionally to the metric. For
* example, a good metric to use as a utilization_target is
* compute.googleapis.com/instance/network/received_bytes_count. The
* autoscaler will work to keep this value constant for each of the instances.
*/
utilizationTarget: number;
/**
* Defines how target utilization value is expressed for a Stackdriver
* Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE. If
* not specified, the default is GAUGE.
*/
utilizationTargetType: string;
}
/**
* Configuration parameters of autoscaling based on load balancing.
*/
export interface Schema$AutoscalingPolicyLoadBalancingUtilization {
/**
* Fraction of backend capacity utilization (set in HTTP(s) load balancing
* configuration) that autoscaler should maintain. Must be a positive float
* value. If not defined, the default is 0.8.
*/
utilizationTarget: number;
}
/**
* Message containing information of one individual backend.
*/
export interface Schema$Backend {
/**
* Specifies the balancing mode for this backend. For global HTTP(S) or
* TCP/SSL load balancing, the default is UTILIZATION. Valid values are
* UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for TCP/SSL). For Internal
* Load Balancing, the default and only supported mode is CONNECTION.
*/
balancingMode: string;
/**
* A multiplier applied to the group's maximum servicing capacity (based
* on UTILIZATION, RATE or CONNECTION). Default value is 1, which means the
* group will serve up to 100% of its configured capacity (depending on
* balancingMode). A setting of 0 means the group is completely drained,
* offering 0% of its available Capacity. Valid range is [0.0,1.0]. This
* cannot be used for internal load balancing.
*/
capacityScaler: number;
/**
* An optional description of this resource. Provide this property when you
* create the resource.
*/
description: string;
/**
* The fully-qualified URL of a Instance Group resource. This instance group
* defines the list of instances that serve traffic. Member virtual machine
* instances from each instance group must live in the same zone as the
* instance group itself. No two backends in a backend service are allowed to
* use same Instance Group resource. Note that you must specify an Instance
* Group resource using the fully-qualified URL, rather than a partial URL.
* When the BackendService has load balancing scheme INTERNAL, the instance
* group must be within the same region as the BackendService.
*/
group: string;
/**
* The max number of simultaneous connections for the group. Can be used with
* either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode,
* either maxConnections or maxConnectionsPerInstance must be set. This
* cannot be used for internal load balancing.
*/
maxConnections: number;
/**
* The max number of simultaneous connections that a single backend instance
* can handle. This is used to calculate the capacity of the group. Can be
* used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION
* mode, either maxConnections or maxConnectionsPerInstance must be set. This
* cannot be used for internal load balancing.
*/
maxConnectionsPerInstance: number;
/**
* The max requests per second (RPS) of the group. Can be used with either
* RATE or UTILIZATION balancing modes, but required if RATE mode. For RATE
* mode, either maxRate or maxRatePerInstance must be set. This cannot be
* used for internal load balancing.
*/
maxRate: number;
/**
* The max requests per second (RPS) that a single backend instance can
* handle. This is used to calculate the capacity of the group. Can be used in
* either balancing mode. For RATE mode, either maxRate or maxRatePerInstance
* must be set. This cannot be used for internal load balancing.
*/
maxRatePerInstance: number;
/**
* Used when balancingMode is UTILIZATION. This ratio defines the CPU
* utilization target for the group. The default is 0.8. Valid range is
* [0.0, 1.0]. This cannot be used for internal load balancing.
*/
maxUtilization: number;
}
/**
* A BackendBucket resource. This resource defines a Cloud Storage bucket.
*/
export interface Schema$BackendBucket {
/**
* Cloud Storage bucket name.
*/
bucketName: string;
/**
* [Output Only] Creation timestamp in RFC3339 text format.
*/
creationTimestamp: string;
/**
* An optional textual description of the resource; provided by the client
* when the resource is created.
*/
description: string;
/**
* If true, enable Cloud CDN for this BackendBucket.
*/
enableCdn: boolean;
/**
* [Output Only] Unique identifier for the resource; defined by the server.
*/
id: string;
/**
* Type of the resource.
*/
kind: string;
/**
* 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])?` which means the first character
* must be a lowercase letter, and all following characters must be a dash,
* lowercase letter, or digit, except the last character, which cannot be a
* dash.
*/
name: string;
/**
* [Output Only] Server-defined URL for the resource.
*/
selfLink: string;
}
/**
* Contains a list of BackendBucket resources.
*/
export interface Schema$BackendBucketList {
/**
* [Output Only] Unique identifier for the resource; defined by the server.
*/
id: string;
/**
* A list of BackendBucket resources.
*/
items: Schema$BackendBucket[];
/**
* Type of resource.
*/
kind: string;
/**
* [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.
*/
nextPageToken: string;
/**
* [Output Only] Server-defined URL for this resource.
*/
selfLink: string;
/**
* [Output Only] Informational warning message.
*/
warning: any;
}
/**
* A BackendService resource. This resource defines a group of backend virtual
* machines and their serving capacity. (== resource_for v1.backendService ==)
* (== resource_for beta.backendService ==)
*/
export interface Schema$BackendService {
/**
* Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE. If
* set to 0, the cookie is non-persistent and lasts only until the end of the
* browser session (or equivalent). The maximum allowed value for TTL is one
* day. When the load balancing scheme is INTERNAL, this field is not used.
*/
affinityCookieTtlSec: number;
/**
* The list of backends that serve this BackendService.
*/
backends: Schema$Backend[];
/**
* Cloud CDN configuration for this BackendService.
*/
cdnPolicy: Schema$BackendServiceCdnPolicy;
connectionDraining: Schema$ConnectionDraining;
/**
* [Output Only] Creation timestamp in RFC3339 text format.
*/
creationTimestamp: string;
/**
* An optional description of this resource. Provide this property when you
* create the resource.
*/
description: string;
/**
* If true, enable Cloud CDN for this BackendService. When the load balancing
* scheme is INTERNAL, this field is not used.
*/
enableCDN: boolean;
/**
* Fingerprint of this resource. A hash of the contents stored in this object.
* This field is used in optimistic locking. This field will be ignored when
* inserting a BackendService. An up-to-date fingerprint must be provided in
* order to update the BackendService.
*/
fingerprint: string;
/**
* The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource for
* health checking this BackendService. Currently at most one health check can
* be specified, and a health check is required for Compute Engine backend
* services. A health check must not be specified for App Engine backend and
* Cloud Function backend. For internal load balancing, a URL to a
* HealthCheck resource must be specified instead.
*/
healthChecks: string[];
iap: Schema$BackendServiceIAP;
/**
* [Output Only] The unique identifier for the resource. This identifier is
* defined by the server.
*/
id: string;
/**
* [Output Only] Type of resource. Always compute#backendService for backend
* services.
*/
kind: string;
/**
* Indicates whether the backend service will be used with internal or
* external load balancing. A backend service created for one type of load
* balancing cannot be used with the other. Possible values are INTERNAL and
* EXTERNAL.
*/
loadBalancingScheme: string;
/**
* 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])?` which means the first character
* must be a lowercase letter, and all following characters must be a dash,
* lowercase letter, or digit, except the last character, which cannot be a
* dash.
*/
name: string;
/**
* Deprecated in favor of portName. The TCP port to connect on the backend.
* The default value is 80. This cannot be used for internal load balancing.
*/
port: number;
/**
* Name of backend port. The same name should appear in the instance groups
* referenced by this service. Required when the load balancing scheme is
* EXTERNAL. When the load balancing scheme is INTERNAL, this field is not
* used.
*/
portName: string;
/**
* The protocol this BackendService uses to communicate with backends.
* Possible values are HTTP, HTTPS, TCP, and SSL. The default is HTTP. For
* internal load balancing, the possible values are TCP and UDP, and the
* default is TCP.
*/
protocol: string;
/**
* [Output Only] URL of the region where the regional backend service resides.
* This field is not applicable to global backend services. You must specify
* this field as part of the HTTP request URL. It is not settable as a field
* in the request body.
*/
region: string;
/**
* [Output Only] Server-defined URL for the resource.
*/
selfLink: string;
/**
* Type of session affinity to use. The default is NONE. When the load
* balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or GENERATED_COOKIE.
* When the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP,
* CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO. When the protocol is UDP, this
* field is not used.
*/
sessionAffinity: string;
/**
* How many seconds to wait for the backend before considering it a failed
* request. Default is 30 seconds.
*/
timeoutSec: number;
}
/**
* Contains a list of BackendServicesScopedList.
*/
export interface Schema$BackendServiceAggregatedList {
/**
* [Output Only] Unique identifier for the resource; defined by the server.
*/
id: string;
/**
* A list of BackendServicesScopedList resources.
*/
items: any;
/**
* Type of resource.
*/
kind: string;
/**
* [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.
*/
nextPageToken: string;
/**
* [Output Only] Server-defined URL for this resource.
*/
selfLink: string;
/**
* [Output Only] Informational warning message.
*/
warning: any;
}
/**
* Message containing Cloud CDN configuration for a backend service.
*/
export interface Schema$BackendServiceCdnPolicy {
/**
* The CacheKeyPolicy for this CdnPolicy.
*/
cacheKeyPolicy: Schema$CacheKeyPolicy;
}
export interface Schema$BackendServiceGroupHealth {
healthStatus: Schema$HealthStatus[];
/**
* [Output Only] Type of resource. Always compute#backendServiceGroupHealth
* for the health of backend services.
*/
kind: string;
}
/**
* Identity-Aware Proxy
*/
export interface Schema$BackendServiceIAP {
enabled: boolean;
oauth2ClientId: string;
oauth2ClientSecret: string;
/**
* [Output Only] SHA256 hash value for the field oauth2_client_secret above.
*/
oauth2ClientSecretSha256: string;
}
/**
* Contains a list of BackendService resources.
*/
export interface Schema$BackendServiceList {
/**
* [Output Only] Unique identifier for the resource; defined by the server.
*/
id: string;
/**
* A list of BackendService resources.
*/
items: Schema$BackendService[];
/**
* [Output Only] Type of resource. Always compute#backendServiceList for lists
* of backend services.
*/
kind: string;
/**
* [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.
*/
nextPageToken: string;
/**
* [Output Only] Server-defined URL for this resource.
*/
selfLink: string;
/**
* [Output Only] Informational warning message.
*/
warning: any;
}
export interface Schema$BackendServicesScopedList {
/**
* List of BackendServices contained in this scope.
*/
backendServices: Schema$BackendService[];
/**
* Informational warning which replaces the list of backend services when the
* list is empty.
*/
warning: any;
}
export interface Schema$CacheInvalidationRule {
/**
* If set, this invalidation rule will only apply to requests with a Host
* header matching host.
*/
host: string;
path: string;
}
/**
* Message containing what to include in the cache key for a request for Cloud
* CDN.
*/
export interface Schema$CacheKeyPolicy {
/**
* If true, requests to different hosts will be cached separately.
*/
includeHost: boolean;
/**
* If true, http and https requests will be cached separately.
*/
includeProtocol: boolean;
/**
* If true, include query string parameters in the cache key according to
* query_string_whitelist and query_string_blacklist. If neither is set, the
* entire query string will be included. If false, the query string will be
* excluded from the cache key entirely.
*/
includeQueryString: boolean;
/**
* Names of query string parameters to exclude in cache keys. All other
* parameters will be included. Either specify query_string_whitelist or
* query_string_blacklist, not both. '&' and '=' will be
* percent encoded and not treated as delimiters.
*/
queryStringBlacklist: string[];
/**
* Names of query string parameters to include in cache keys. All other
* parameters will be excluded. Either specify query_string_whitelist or
* query_string_blacklist, not both. '&' and '=' will be
* percent encoded and not treated as delimiters.
*/
queryStringWhitelist: string[];
}
/**
* Represents a Commitment resource. Creating a Commitment resource means that
* you are purchasing a committed use contract with an explicit start and end
* time. You can create commitments based on vCPUs and memory usage and receive
* discounted rates. For full details, read Signing Up for Committed Use
* Discounts. Committed use discounts are subject to Google Cloud
* Platform's Service Specific Terms. By purchasing a committed use
* discount, you agree to these terms. Committed use discounts will not renew,
* so you must purchase a new commitment to continue receiving discounts. (==
* resource_for beta.commitments ==) (== resource_for v1.commitments ==)
*/
export interface Schema$Commitment {
/**
* [Output Only] Creation timestamp in RFC3339 text format.
*/
creationTimestamp: string;
/**
* An optional description of this resource. Provide this property when you
* create the resource.
*/
description: string;
/**
* [Output Only] Commitment end time in RFC3339 text format.
*/
endTimestamp: string;
/**
* [Output Only] The unique identifier for the resource. This identifier is
* defined by the server.
*/
id: string;
/**
* [Output Only] Type of the resource. Always compute#commitment for
* commitments.
*/
kind: string;
/**
* 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])?` which means the first character
* must be a lowercase letter, and all following characters must be a dash,
* lowercase letter, or digit, except the last character, which cannot be a
* dash.
*/
name: string;
/**
* The plan for this commitment, which determines duration and discount rate.
* The currently supported plans are TWELVE_MONTH (1 year), and
* THIRTY_SIX_MONTH (3 years).
*/
plan: string;
/**
* [Output Only] URL of the region where this commitment may be used.
*/
region: string;
/**
* List