UNPKG

googleapis

Version:
1,251 lines 1.3 MB
/** * 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('alpha'); * * @namespace compute * @type {Function} * @version alpha * @variation alpha * @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; hosts: Resource$Hosts; hostTypes: Resource$Hosttypes; 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; maintenancePolicies: Resource$Maintenancepolicies; networkEndpointGroups: Resource$Networkendpointgroups; networks: Resource$Networks; nodeGroups: Resource$Nodegroups; nodeTemplates: Resource$Nodetemplates; projects: Resource$Projects; regionAutoscalers: Resource$Regionautoscalers; regionBackendServices: Resource$Regionbackendservices; regionCommitments: Resource$Regioncommitments; regionDisks: Resource$Regiondisks; regionDiskTypes: Resource$Regiondisktypes; regionHealthChecks: Resource$Regionhealthchecks; regionInstanceGroupManagers: Resource$Regioninstancegroupmanagers; regionInstanceGroups: Resource$Regioninstancegroups; regionOperations: Resource$Regionoperations; regions: Resource$Regions; regionTargetHttpProxies: Resource$Regiontargethttpproxies; regionUrlMaps: Resource$Regionurlmaps; routers: Resource$Routers; routes: Resource$Routes; securityPolicies: Resource$Securitypolicies; 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; /** * This signifies the networking tier used for configuring this access * configuration and can only take the following values: PREMIUM, STANDARD. If * an AccessConfig is specified without a valid external IP address, an * ephemeral IP will be created with this networkTier. If an AccessConfig * with a valid external IP address is specified, it must match that of the * networkTier associated with the Address resource owning that IP. */ networkTier: string; /** * [Output Only] The public DNS domain name for the instance. */ publicDnsName: 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 ?A? record should be created for the * external IP address of this access configuration. */ setPublicDns: boolean; /** * 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; /** * A fingerprint for the labels being applied to this Address, which is * essentially a hash of the labels set used for optimistic locking. The * fingerprint is initially generated by Compute Engine and changes after * every request to modify or update labels. You must always provide an * up-to-date fingerprint hash in order to update or change labels. To see * the latest fingerprint, make a get() request to retrieve an Address. */ labelFingerprint: string; /** * Labels to apply to this Address resource. These can be later modified by * the setLabels method. Each label key/value must comply with RFC1035. Label * values may be empty. */ labels: any; /** * 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 URL of the network in which to reserve the address. This field can only * be used with INTERNAL type with VPC_PEERING purpose. */ network: string; /** * This signifies the networking tier used for configuring this Address and * can only take the following values: PREMIUM , STANDARD. If this field is * not specified, it is assumed to be PREMIUM. */ networkTier: string; /** * The prefix length if the resource reprensents an IP range. */ prefixLength: number; /** * The purpose of resource, only used with INTERNAL type. */ purpose: 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; /** * The size of the disk in base-2 GB. This supersedes disk_size_gb in * InitializeParams. */ diskSizeGb: string; /** * 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; /** * For LocalSSD disks on VM Instances in STOPPED or SUSPENDED state, this * field is set to PRESERVED iff the LocalSSD data has been saved to a * persistent location by customer request. (see the discard_local_ssd option * on Stop/Suspend). Read-only in the api. */ savedState: 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; /** * [Deprecated] Storage type of the disk. */ diskStorageType: 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; } /** * Specifies the audit configuration for a service. The configuration determines * which permission types are logged, and what identities, if any, are exempted * from logging. An AuditConfig must have one or more AuditLogConfigs. If there * are AuditConfigs for both `allServices` and a specific service, the union of * the two AuditConfigs is used for that service: the log_types specified in * each AuditConfig are enabled, and the exempted_members in each AuditLogConfig * are exempted. Example Policy with multiple AuditConfigs: { * "audit_configs": [ { "service": "allServices" * "audit_log_configs": [ { "log_type": * "DATA_READ", "exempted_members": [ * "user:foo@gmail.com" ] }, { "log_type": * "DATA_WRITE", }, { "log_type": "ADMIN_READ", } * ] }, { "service": "fooservice.googleapis.com" * "audit_log_configs": [ { "log_type": * "DATA_READ", }, { "log_type": "DATA_WRITE", * "exempted_members": [ "user:bar@gmail.com" ] } ] } ] } * For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ * logging. It also exempts foo@gmail.com from DATA_READ logging, and * bar@gmail.com from DATA_WRITE logging. */ export interface Schema$AuditConfig { /** * The configuration for logging of each type of permission. */ auditLogConfigs: Schema$AuditLogConfig[]; exemptedMembers: string[]; /** * Specifies a service that will be enabled for audit logging. For example, * `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a * special value that covers all services. */ service: string; } /** * Provides the configuration for logging a type of permissions. Example: { * "audit_log_configs": [ { "log_type": * "DATA_READ", "exempted_members": [ * "user:foo@gmail.com" ] }, { "log_type": * "DATA_WRITE", } ] } This enables 'DATA_READ' and * 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ * logging. */ export interface Schema$AuditLogConfig { /** * Specifies the identities that do not cause logging for this type of * permission. Follows the same format of [Binding.members][]. */ exemptedMembers: string[]; /** * The log type that this config enables. */ logType: string; } /** * Authorization-related information used by Cloud Audit Logging. */ export interface Schema$AuthorizationLoggingOptions { /** * The type of the permission that was checked. */ permissionType: string; } /** * 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] Target recommended MIG size (number of instances) computed by * autoscaler. Autoscaler calculates recommended MIG size even when * autoscaling policy mode is different from ON. This field is empty when * autoscaler is not connected to the existing managed instance group or * autoscaler did not generate its prediction. */ recommendedSize: number; /** * [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; /** * Defines operating mode for this policy. */ mode: string; /** * Configuration parameters of autoscaling based on queuing system. */ queueBasedScaling: Schema$AutoscalingPolicyQueueBasedScaling; } /** * 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 { /** * A filter string, compatible with a Stackdriver Monitoring filter string for * TimeSeries.list API call. This filter is used to select a specific * TimeSeries for the purpose of autoscaling and to determine whether the * metric is exporting per-instance or per-group data. For the filter to be * valid for autoscaling purposes, the following rules apply: - You can only * use the AND operator for joining selectors. - You can only use direct * equality comparison operator (=) without any functions for each selector. * - You can specify the metric in both the filter string and in the metric * field. However, if specified in both places, the metric must be identical. * - The monitored resource type determines what kind of values are expected * for the metric. If it is a gce_instance, the autoscaler expects the metric * to include a separate TimeSeries for each instance in a group. In such a * case, you cannot filter on resource labels. If the resource type is any * other value, the autoscaler expects this metric to contain values that * apply to the entire autoscaled instance group and resource label filtering * can be performed to point autoscaler at the correct TimeSeries to scale * upon. This is called a per-group metric for the purpose of autoscaling. If * not specified, the type defaults to gce_instance. You should provide a * filter that is selective enough to pick just one TimeSeries for the * autoscaled group or for each of the instances (if you are using * gce_instance resource type). If multiple TimeSeries are returned upon the * query execution, the autoscaler will sum their respective values to obtain * its scaling value. */ filter: string; /** * 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; /** * If scaling is based on a per-group metric value that represents the total * amount of work to be done or resource usage, set this value to an amount * assigned for a single instance of the scaled group. Autoscaler will keep * the number of instances proportional to the value of this metric, the * metric itself should not change value due to group resizing. A good metric * to use with the target is for example * pubsub.googleapis.com/subscription/num_undelivered_messages or a custom * metric exporting the total number of requests coming to your instances. A * bad example would be a metric exporting an average or median latency, since * this value can't include a chunk assignable to a single instance, it * could be better used with utilization_target instead. */ singleInstanceAssignment: number; /** * 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; } /** * Configuration parameters of autoscaling based on queuing system. */ export interface Schema$AutoscalingPolicyQueueBasedScaling { /** * Scaling based on the average number of tasks in the queue per each active * instance. The autoscaler keeps the average number of tasks per instance * below this number, based on data collected in the last couple of minutes. * The autoscaler will also take into account incoming tasks when calculating * when to scale. */ acceptableBacklogPerInstance: number; /** * Configuration for Cloud Pub/Sub subscription queue. */ cloudPubSub: Schema$AutoscalingPolicyQueueBasedScalingCloudPubSub; /** * The scaling algorithm will also calculate throughput estimates on its own; * if you explicitly provide this value, the autoscaler will take into account * your value as well as automatic estimates when deciding how to scale. */ singleWorkerThroughputPerSec: number; } /** * Configuration parameters for scaling based on Cloud Pub/Sub subscription * queue. */ export interface Schema$AutoscalingPolicyQueueBasedScalingCloudPubSub { /** * Cloud Pub/Sub subscription used for scaling. Provide the partial URL * (starting with projects/) or just the subscription name. The subscription * must be assigned to the topic specified in topicName and must be in a pull * configuration. The subscription must belong to the same project as the * Autoscaler. */ subscription: string; /** * Cloud Pub/Sub topic used for scaling. Provide the partial URL or partial * URL (starting with projects/) or just the topic name. The topic must belong * to the same project as the Autoscaler resource. */ topic: string; } /** * 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; /** * This field designates whether this is a failover backend. More than one * failover backend can be configured for a given BackendService. */ failover: boolean; /** * 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 network * endpoint 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 maxConnectionsPerEndpoint must be * set. This cannot be used for internal load balancing. */ maxConnectionsPerEndpoint: 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 network endpoint * 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 * maxRatePerEndpoint must be set. This cannot be used for internal load * balancing. */ maxRatePerEndpoint: 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; /** * Cloud CDN Coniguration for this BackendBucket. */ cdnPolicy: Schema$BackendBucketCdnPolicy; /** * [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; } /** * Message containing Cloud CDN configuration for a backend bucket. */ export interface Schema$BackendBucketCdnPolicy { /** * Number of seconds up to which the response to a signed URL request will be * cached in the CDN. After this time period, the Signed URL will be * revalidated before being served. Defaults to 1hr (3600s). If this field is * set, Cloud CDN will internally act as though all responses from this bucket * had a ?Cache-Control: public, max-age=[TTL]? header, regardless of any * existing Cache-Control header. The actual headers served in resp