googleapis
Version:
Google APIs Client Library for Node.js
962 lines • 2.89 MB
TypeScript
/**
* 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.
*/
import { OAuth2Client, JWT, UserRefreshClient } from 'google-auth-library';
import { GoogleConfigurable, MethodOptions, GlobalOptions, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
import { GaxiosPromise } from 'gaxios';
export declare namespace compute_alpha {
interface Options extends GlobalOptions {
version: 'alpha';
}
interface StandardParameters {
/**
* Data format for the response.
*/
alt?: string;
/**
* Selector specifying which fields to include in a partial response.
*/
fields?: string;
/**
* 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.
*/
key?: string;
/**
* OAuth 2.0 token for the current user.
*/
oauth_token?: string;
/**
* Returns response with indentations and line breaks.
*/
prettyPrint?: boolean;
/**
* An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
*/
quotaUser?: string;
/**
* Deprecated. Please use quotaUser instead.
*/
userIp?: string;
}
/**
* 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
*/
class Compute {
context: APIRequestContext;
acceleratorTypes: Resource$Acceleratortypes;
addresses: Resource$Addresses;
autoscalers: Resource$Autoscalers;
backendBuckets: Resource$Backendbuckets;
backendServices: Resource$Backendservices;
disks: Resource$Disks;
diskTypes: Resource$Disktypes;
externalVpnGateways: Resource$Externalvpngateways;
firewalls: Resource$Firewalls;
forwardingRules: Resource$Forwardingrules;
globalAddresses: Resource$Globaladdresses;
globalForwardingRules: Resource$Globalforwardingrules;
globalNetworkEndpointGroups: Resource$Globalnetworkendpointgroups;
globalOperations: Resource$Globaloperations;
globalOrganizationOperations: Resource$Globalorganizationoperations;
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;
machineImages: Resource$Machineimages;
machineTypes: Resource$Machinetypes;
networkEndpointGroups: Resource$Networkendpointgroups;
networks: Resource$Networks;
nodeGroups: Resource$Nodegroups;
nodeTemplates: Resource$Nodetemplates;
nodeTypes: Resource$Nodetypes;
organizationSecurityPolicies: Resource$Organizationsecuritypolicies;
packetMirrorings: Resource$Packetmirrorings;
projects: Resource$Projects;
regionAutoscalers: Resource$Regionautoscalers;
regionBackendServices: Resource$Regionbackendservices;
regionCommitments: Resource$Regioncommitments;
regionDisks: Resource$Regiondisks;
regionDiskTypes: Resource$Regiondisktypes;
regionHealthChecks: Resource$Regionhealthchecks;
regionHealthCheckServices: Resource$Regionhealthcheckservices;
regionInstanceGroupManagers: Resource$Regioninstancegroupmanagers;
regionInstanceGroups: Resource$Regioninstancegroups;
regionNotificationEndpoints: Resource$Regionnotificationendpoints;
regionOperations: Resource$Regionoperations;
regions: Resource$Regions;
regionSslCertificates: Resource$Regionsslcertificates;
regionTargetHttpProxies: Resource$Regiontargethttpproxies;
regionTargetHttpsProxies: Resource$Regiontargethttpsproxies;
regionUrlMaps: Resource$Regionurlmaps;
reservations: Resource$Reservations;
resourcePolicies: Resource$Resourcepolicies;
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;
vpnGateways: Resource$Vpngateways;
vpnTunnels: Resource$Vpntunnels;
zoneOperations: Resource$Zoneoperations;
zones: Resource$Zones;
constructor(options: GlobalOptions, google?: GoogleConfigurable);
}
/**
* A specification of the type and number of accelerator cards attached to the instance.
*/
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. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
*/
acceleratorType?: string;
}
/**
* Represents an Accelerator Type resource. Google Cloud Platform provides graphics processing units (accelerators) that you can add to VM instances to improve or accelerate performance when working with intensive workloads. For more information, read GPUs on Compute Engine. (== resource_for beta.acceleratorTypes ==) (== resource_for v1.acceleratorTypes ==)
*/
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] Server-defined URL for this resource's resource id.
*/
selfLinkWithId?: 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;
}
interface Schema$AcceleratorTypeAggregatedList {
/**
* [Output Only] Unique identifier for the resource; defined by the server.
*/
id?: string;
/**
* A list of AcceleratorTypesScopedList resources.
*/
items?: {
[key: string]: Schema$AcceleratorTypesScopedList;
};
/**
* [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?: {
code?: string;
data?: Array<{
key?: string;
value?: string;
}>;
message?: string;
};
}
/**
* Contains a list of accelerator types.
*/
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?: {
code?: string;
data?: Array<{
key?: string;
value?: string;
}>;
message?: string;
};
}
interface Schema$AcceleratorTypesScopedList {
/**
* [Output Only] A 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?: {
code?: string;
data?: Array<{
key?: string;
value?: string;
}>;
message?: string;
};
}
/**
* An access configuration attached to an instance's network interface. Only one access config per instance is supported.
*/
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, such as 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. You can set this field only if the `setPublicPtr` 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;
}
/**
* Represents an IP Address resource. An address resource represents a regional internal IP address. Regional internal IP addresses are RFC 1918 addresses that come from either a primary or secondary IP range of a subnet in a VPC network. Regional external IP addresses can be assigned to GCP VM instances, Cloud VPN gateways, regional external forwarding rules for network load balancers (in either Standard or Premium Tier), and regional external forwarding rules for HTTP(S), SSL Proxy, and TCP Proxy load balancers in Standard Tier. For more information, read IP addresses. A globalAddresses resource represent a global external IP address. Global external IP addresses are IPv4 or IPv6 addresses. They can only be assigned to global forwarding rules for HTTP(S), SSL Proxy, or TCP Proxy load balancers in Premium Tier. For more information, read Global resources. (== resource_for beta.addresses ==) (== resource_for v1.addresses ==) (== resource_for beta.globalAddresses ==) (== resource_for v1.globalAddresses ==)
*/
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 field 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, otherwise the request will fail with error 412 conditionNotMet. 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?: {
[key: string]: 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])?`. 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.
*/
name?: string;
/**
* The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with the VPC_PEERING purpose.
*/
network?: string;
/**
* This signifies the networking tier used for configuring this address and can only take the following values: PREMIUM or STANDARD. Global forwarding rules can only be Premium Tier. Regional forwarding rules can be either Premium or Standard Tier. Standard Tier addresses applied to regional forwarding rules can be used with any external load balancer. Regional forwarding rules in Premium Tier can only be used with a network load balancer. 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 this resource, which can be one of the following values: - `GCE_ENDPOINT` for addresses that are used by VM instances, alias IP ranges, internal load balancers, and similar resources. - `DNS_RESOLVER` for a DNS resolver address in a subnetwork - `VPC_PEERING` for addresses that are reserved for VPC peer networks. - `NAT_AUTO` for addresses that are external IP addresses automatically reserved for Cloud NAT.
*/
purpose?: string;
/**
* [Output Only] The 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.
*/
region?: string;
/**
* [Output Only] Server-defined URL for the resource.
*/
selfLink?: string;
/**
* [Output Only] Server-defined URL for this resource with the resource id.
*/
selfLinkWithId?: 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 a GCE_ENDPOINT or DNS_RESOLVER purpose.
*/
subnetwork?: string;
/**
* [Output Only] The URLs of the resources that are using this address.
*/
users?: string[];
}
interface Schema$AddressAggregatedList {
/**
* [Output Only] Unique identifier for the resource; defined by the server.
*/
id?: string;
/**
* A list of AddressesScopedList resources.
*/
items?: {
[key: string]: Schema$AddressesScopedList;
};
/**
* [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?: {
code?: string;
data?: Array<{
key?: string;
value?: string;
}>;
message?: string;
};
}
interface Schema$AddressesScopedList {
/**
* [Output Only] A 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?: {
code?: string;
data?: Array<{
key?: string;
value?: string;
}>;
message?: string;
};
}
/**
* Contains a list of addresses.
*/
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?: {
code?: string;
data?: Array<{
key?: string;
value?: string;
}>;
message?: string;
};
}
/**
* An alias IP range attached to an instance's network interface.
*/
interface Schema$AliasIpRange {
/**
* The IP alias ranges to allocate for this interface. 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 (such as 10.2.3.4), a netmask (such as /24) or a CIDR-formatted string (such as 10.1.2.0/24).
*/
ipCidrRange?: string;
/**
* The name of a subnetwork secondary IP range from which to allocate an IP alias range. If not specified, the primary range of the subnetwork is used.
*/
subnetworkRangeName?: string;
}
interface Schema$AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk {
/**
* Specifies the size of the disk in base-2 GB.
*/
diskSizeGb?: string;
/**
* Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
*/
interface?: string;
}
/**
* Properties of the SKU instances being reserved.
*/
interface Schema$AllocationSpecificSKUAllocationReservedInstanceProperties {
/**
* Specifies accelerator type and count.
*/
guestAccelerators?: Schema$AcceleratorConfig[];
/**
* Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd.
*/
localSsds?: Schema$AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk[];
/**
* Specifies type of machine (name only) which has fixed number of vCPUs and fixed amount of memory. This also includes specifying custom machine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern.
*/
machineType?: string;
/**
* Minimum cpu platform the reservation.
*/
minCpuPlatform?: string;
}
/**
* This reservation type allows to pre allocate specific instance configuration.
*/
interface Schema$AllocationSpecificSKUReservation {
/**
* Specifies number of resources that are allocated.
*/
count?: string;
/**
* The instance properties for this specific sku reservation.
*/
instanceProperties?: Schema$AllocationSpecificSKUAllocationReservedInstanceProperties;
/**
* [OutputOnly] Indicates how many resource are in use.
*/
inUseCount?: string;
}
/**
* An instance-attached disk resource.
*/
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-disk-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. TODO(b/131765817): Update documentation when NVME is supported.
*/
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 if 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;
/**
* [Output Only] shielded vm initial state stored on disk
*/
shieldedInstanceInitialState?: Schema$InitialStateConfig;
/**
* 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.
*/
interface Schema$AttachedDiskInitializeParams {
/**
* An optional description. Provide this property when creating the disk.
*/
description?: string;
/**
* Specifies the disk name. If not specified, the default is to use the name of the instance. If the disk with the instance name exists already in the given zone/region, a new name will be automatically generated.
*/
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;
/**
* 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. Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
*/
guestOsFeatures?: Schema$GuestOsFeature[];
/**
* 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?: {
[key: string]: string;
};
/**
* URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
*/
replicaZones?: string[];
/**
* Resource policies applied to this disk for automatic snapshot creations. Specified using the full or partial URL. For instance template, specify only the resource policy name.
*/
resourcePolicies?: string[];
/**
* 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-9 to use the latest Debian 9 image: projects/debian-cloud/global/images/family/debian-9 Alternatively, use a specific version of a public operating system image: projects/debian-cloud/global/images/debian-9-stretch-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;
/**
* The source snapshot to create this disk. When creating a new instance, one of initializeParams.sourceSnapshot or disks.source is required except for local SSD. To create a disk with a snapshot that you created, specify the snapshot name in the following format: global/snapshots/my-backup If the source snapshot is deleted later, this field will not be set.
*/
sourceSnapshot?: string;
/**
* The customer-supplied encryption key of the source snapshot.
*/
sourceSnapshotEncryptionKey?: 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.
*/
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.
*/
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;
}
/**
* The authentication settings for the backend service.
*/
interface Schema$AuthenticationPolicy {
/**
* List of authentication methods that can be used for origin authentication. Similar to peers, these will be evaluated in order the first valid one will be used to set origin identity. If none of these methods pass, the request will be rejected with authentication failed error (401). Leave the list empty if origin authentication is not required.
*/
origins?: Schema$OriginAuthenticationMethod[];
/**
* List of authentication methods that can be used for peer authentication. They will be evaluated in order the first valid one will be used to set peer identity. If none of these methods pass, the request will be rejected with authentication failed error (401). Leave the list empty if peer authentication is not required.
*/
peers?: Schema$PeerAuthenticationMethod[];
/**
* Define whether peer or origin identity should be used for principal. Default value is USE_PEER. If peer (or origin) identity is not available, either because peer/origin authentication is not defined, or failed, principal will be left unset. In other words, binding rule does not affect the decision to accept or reject request. This field can be set to one of the following: USE_PEER: Principal will be set to the identity from peer authentication. USE_ORIGIN: Principal will be set to the identity from origin authentication.
*/
principalBinding?: string;
/**
* Configures the mechanism to obtain server-side security certificates and identity information.
*/
serverTlsContext?: Schema$TlsContext;
}
/**
* Authorization configuration provides service-level and method-level access control for a service.
*/
interface Schema$AuthorizationConfig {
/**
* List of RbacPolicies.
*/
policies?: Schema$RbacPolicy[];
}
/**
* Authorization-related information used by Cloud Audit Logging.
*/
interface Schema$AuthorizationLoggingOptions {
/**
* The type of the permission that was checked.
*/
permissionType?: string;
}
/**
* Represents an Autoscaler resource. Use autoscalers to automatically add or delete instances from a managed instance group according to your defined autoscaling policy. For more information, read Autoscaling Groups of Instances. For zonal managed instance groups resource, use the autoscaler resource. For regional managed instance groups, use the regionAutoscalers resource. (== resource_for beta.autoscalers ==) (== resource_for v1.autoscalers ==) (== resource_for beta.regionAutoscalers ==) (== resource_for v1.regionAutoscalers ==)
*/
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] Server-defined URL for this resource with the resource id.
*/
selfLinkWithId?: 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;
}
interface Schema$AutoscalerAggregatedList {
/**
* [Output Only] Unique identifier for the resource; defined by the server.
*/
id?: string;
/**
* A list of AutoscalersScopedList resources.
*/
items?: {
[key: string]: Schema$AutoscalersScopedList;
};
/**
* [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?: {
code?: string;
data?: Array<{
key?: string;
value?: string;
}>;
message?: string;
};
}
/**
* Contains a list of Autoscaler resources.
*/
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?: {
code?: string;
data?: Array<{
key?: string;
value?: string;
}>;
message?: string;
};
}
interface Schema$AutoscalersScopedList {
/**
* [Output Only] A 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?: {
code?: string;
data?: Array<{
key?: string;
value?: string;
}>;
message?: string;
};
}
interface Schema$AutoscalerStatusDetails {
/**
* The status message.
*/
message?: string;
/**
* The type of error returned.
*/
type?: string;
}
/**
* Cloud Autoscaler policy.
*/
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;
scaleDownControl?: Schema$AutoscalingPolicyScaleDownControl;
}
/**
* CPU utilization policy.
*/
interface Schema$AutoscalingPolicyCpuUtilization {
/**
* The target CPU utilization that the autoscaler should maint