@googleapis/compute
Version:
1,267 lines (1,258 loc) • 9.36 MB
text/typescript
// Copyright 2020 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.
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-empty-interface */
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable no-irregular-whitespace */
import {
OAuth2Client,
JWT,
Compute,
UserRefreshClient,
BaseExternalAccountClient,
GaxiosResponseWithHTTP2,
GoogleConfigurable,
createAPIRequest,
MethodOptions,
StreamMethodOptions,
GlobalOptions,
GoogleAuth,
BodyResponseCallback,
APIRequestContext,
} from 'googleapis-common';
import {Readable} from 'stream';
export namespace compute_v1 {
export interface Options extends GlobalOptions {
version: 'v1';
}
interface StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?:
| string
| OAuth2Client
| JWT
| Compute
| UserRefreshClient
| BaseExternalAccountClient
| GoogleAuth;
/**
* V1 error format.
*/
'$.xgafv'?: string;
/**
* OAuth access token.
*/
access_token?: string;
/**
* Data format for response.
*/
alt?: string;
/**
* JSONP
*/
callback?: 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;
/**
* Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
*/
quotaUser?: string;
/**
* Legacy upload protocol for media (e.g. "media", "multipart").
*/
uploadType?: string;
/**
* Upload protocol for media (e.g. "raw", "multipart").
*/
upload_protocol?: string;
/**
* Legacy name for parameter that has been superseded by `quotaUser`.
*/
userIp?: string;
}
/**
* Compute Engine API
*
* Creates and runs virtual machines on Google Cloud Platform.
*
* @example
* ```js
* const {google} = require('googleapis');
* const compute = google.compute('v1');
* ```
*/
export class Compute {
context: APIRequestContext;
acceleratorTypes: Resource$Acceleratortypes;
addresses: Resource$Addresses;
autoscalers: Resource$Autoscalers;
backendBuckets: Resource$Backendbuckets;
backendServices: Resource$Backendservices;
crossSiteNetworks: Resource$Crosssitenetworks;
disks: Resource$Disks;
diskTypes: Resource$Disktypes;
externalVpnGateways: Resource$Externalvpngateways;
firewallPolicies: Resource$Firewallpolicies;
firewalls: Resource$Firewalls;
forwardingRules: Resource$Forwardingrules;
futureReservations: Resource$Futurereservations;
globalAddresses: Resource$Globaladdresses;
globalForwardingRules: Resource$Globalforwardingrules;
globalNetworkEndpointGroups: Resource$Globalnetworkendpointgroups;
globalOperations: Resource$Globaloperations;
globalOrganizationOperations: Resource$Globalorganizationoperations;
globalPublicDelegatedPrefixes: Resource$Globalpublicdelegatedprefixes;
healthChecks: Resource$Healthchecks;
httpHealthChecks: Resource$Httphealthchecks;
httpsHealthChecks: Resource$Httpshealthchecks;
imageFamilyViews: Resource$Imagefamilyviews;
images: Resource$Images;
instanceGroupManagerResizeRequests: Resource$Instancegroupmanagerresizerequests;
instanceGroupManagers: Resource$Instancegroupmanagers;
instanceGroups: Resource$Instancegroups;
instances: Resource$Instances;
instanceSettings: Resource$Instancesettings;
instanceTemplates: Resource$Instancetemplates;
instantSnapshots: Resource$Instantsnapshots;
interconnectAttachmentGroups: Resource$Interconnectattachmentgroups;
interconnectAttachments: Resource$Interconnectattachments;
interconnectGroups: Resource$Interconnectgroups;
interconnectLocations: Resource$Interconnectlocations;
interconnectRemoteLocations: Resource$Interconnectremotelocations;
interconnects: Resource$Interconnects;
licenseCodes: Resource$Licensecodes;
licenses: Resource$Licenses;
machineImages: Resource$Machineimages;
machineTypes: Resource$Machinetypes;
networkAttachments: Resource$Networkattachments;
networkEdgeSecurityServices: Resource$Networkedgesecurityservices;
networkEndpointGroups: Resource$Networkendpointgroups;
networkFirewallPolicies: Resource$Networkfirewallpolicies;
networkProfiles: Resource$Networkprofiles;
networks: Resource$Networks;
nodeGroups: Resource$Nodegroups;
nodeTemplates: Resource$Nodetemplates;
nodeTypes: Resource$Nodetypes;
organizationSecurityPolicies: Resource$Organizationsecuritypolicies;
packetMirrorings: Resource$Packetmirrorings;
previewFeatures: Resource$Previewfeatures;
projects: Resource$Projects;
publicAdvertisedPrefixes: Resource$Publicadvertisedprefixes;
publicDelegatedPrefixes: Resource$Publicdelegatedprefixes;
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;
regionInstances: Resource$Regioninstances;
regionInstanceTemplates: Resource$Regioninstancetemplates;
regionInstantSnapshots: Resource$Regioninstantsnapshots;
regionNetworkEndpointGroups: Resource$Regionnetworkendpointgroups;
regionNetworkFirewallPolicies: Resource$Regionnetworkfirewallpolicies;
regionNotificationEndpoints: Resource$Regionnotificationendpoints;
regionOperations: Resource$Regionoperations;
regions: Resource$Regions;
regionSecurityPolicies: Resource$Regionsecuritypolicies;
regionSslCertificates: Resource$Regionsslcertificates;
regionSslPolicies: Resource$Regionsslpolicies;
regionTargetHttpProxies: Resource$Regiontargethttpproxies;
regionTargetHttpsProxies: Resource$Regiontargethttpsproxies;
regionTargetTcpProxies: Resource$Regiontargettcpproxies;
regionUrlMaps: Resource$Regionurlmaps;
regionZones: Resource$Regionzones;
reservationBlocks: Resource$Reservationblocks;
reservations: Resource$Reservations;
reservationSubBlocks: Resource$Reservationsubblocks;
resourcePolicies: Resource$Resourcepolicies;
routers: Resource$Routers;
routes: Resource$Routes;
securityPolicies: Resource$Securitypolicies;
serviceAttachments: Resource$Serviceattachments;
snapshots: Resource$Snapshots;
snapshotSettings: Resource$Snapshotsettings;
sslCertificates: Resource$Sslcertificates;
sslPolicies: Resource$Sslpolicies;
storagePools: Resource$Storagepools;
storagePoolTypes: Resource$Storagepooltypes;
subnetworks: Resource$Subnetworks;
targetGrpcProxies: Resource$Targetgrpcproxies;
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;
wireGroups: Resource$Wiregroups;
zoneOperations: Resource$Zoneoperations;
zones: Resource$Zones;
constructor(options: GlobalOptions, google?: GoogleConfigurable) {
this.context = {
_options: options || {},
google,
};
this.acceleratorTypes = new Resource$Acceleratortypes(this.context);
this.addresses = new Resource$Addresses(this.context);
this.autoscalers = new Resource$Autoscalers(this.context);
this.backendBuckets = new Resource$Backendbuckets(this.context);
this.backendServices = new Resource$Backendservices(this.context);
this.crossSiteNetworks = new Resource$Crosssitenetworks(this.context);
this.disks = new Resource$Disks(this.context);
this.diskTypes = new Resource$Disktypes(this.context);
this.externalVpnGateways = new Resource$Externalvpngateways(this.context);
this.firewallPolicies = new Resource$Firewallpolicies(this.context);
this.firewalls = new Resource$Firewalls(this.context);
this.forwardingRules = new Resource$Forwardingrules(this.context);
this.futureReservations = new Resource$Futurereservations(this.context);
this.globalAddresses = new Resource$Globaladdresses(this.context);
this.globalForwardingRules = new Resource$Globalforwardingrules(
this.context
);
this.globalNetworkEndpointGroups =
new Resource$Globalnetworkendpointgroups(this.context);
this.globalOperations = new Resource$Globaloperations(this.context);
this.globalOrganizationOperations =
new Resource$Globalorganizationoperations(this.context);
this.globalPublicDelegatedPrefixes =
new Resource$Globalpublicdelegatedprefixes(this.context);
this.healthChecks = new Resource$Healthchecks(this.context);
this.httpHealthChecks = new Resource$Httphealthchecks(this.context);
this.httpsHealthChecks = new Resource$Httpshealthchecks(this.context);
this.imageFamilyViews = new Resource$Imagefamilyviews(this.context);
this.images = new Resource$Images(this.context);
this.instanceGroupManagerResizeRequests =
new Resource$Instancegroupmanagerresizerequests(this.context);
this.instanceGroupManagers = new Resource$Instancegroupmanagers(
this.context
);
this.instanceGroups = new Resource$Instancegroups(this.context);
this.instances = new Resource$Instances(this.context);
this.instanceSettings = new Resource$Instancesettings(this.context);
this.instanceTemplates = new Resource$Instancetemplates(this.context);
this.instantSnapshots = new Resource$Instantsnapshots(this.context);
this.interconnectAttachmentGroups =
new Resource$Interconnectattachmentgroups(this.context);
this.interconnectAttachments = new Resource$Interconnectattachments(
this.context
);
this.interconnectGroups = new Resource$Interconnectgroups(this.context);
this.interconnectLocations = new Resource$Interconnectlocations(
this.context
);
this.interconnectRemoteLocations =
new Resource$Interconnectremotelocations(this.context);
this.interconnects = new Resource$Interconnects(this.context);
this.licenseCodes = new Resource$Licensecodes(this.context);
this.licenses = new Resource$Licenses(this.context);
this.machineImages = new Resource$Machineimages(this.context);
this.machineTypes = new Resource$Machinetypes(this.context);
this.networkAttachments = new Resource$Networkattachments(this.context);
this.networkEdgeSecurityServices =
new Resource$Networkedgesecurityservices(this.context);
this.networkEndpointGroups = new Resource$Networkendpointgroups(
this.context
);
this.networkFirewallPolicies = new Resource$Networkfirewallpolicies(
this.context
);
this.networkProfiles = new Resource$Networkprofiles(this.context);
this.networks = new Resource$Networks(this.context);
this.nodeGroups = new Resource$Nodegroups(this.context);
this.nodeTemplates = new Resource$Nodetemplates(this.context);
this.nodeTypes = new Resource$Nodetypes(this.context);
this.organizationSecurityPolicies =
new Resource$Organizationsecuritypolicies(this.context);
this.packetMirrorings = new Resource$Packetmirrorings(this.context);
this.previewFeatures = new Resource$Previewfeatures(this.context);
this.projects = new Resource$Projects(this.context);
this.publicAdvertisedPrefixes = new Resource$Publicadvertisedprefixes(
this.context
);
this.publicDelegatedPrefixes = new Resource$Publicdelegatedprefixes(
this.context
);
this.regionAutoscalers = new Resource$Regionautoscalers(this.context);
this.regionBackendServices = new Resource$Regionbackendservices(
this.context
);
this.regionCommitments = new Resource$Regioncommitments(this.context);
this.regionDisks = new Resource$Regiondisks(this.context);
this.regionDiskTypes = new Resource$Regiondisktypes(this.context);
this.regionHealthChecks = new Resource$Regionhealthchecks(this.context);
this.regionHealthCheckServices = new Resource$Regionhealthcheckservices(
this.context
);
this.regionInstanceGroupManagers =
new Resource$Regioninstancegroupmanagers(this.context);
this.regionInstanceGroups = new Resource$Regioninstancegroups(
this.context
);
this.regionInstances = new Resource$Regioninstances(this.context);
this.regionInstanceTemplates = new Resource$Regioninstancetemplates(
this.context
);
this.regionInstantSnapshots = new Resource$Regioninstantsnapshots(
this.context
);
this.regionNetworkEndpointGroups =
new Resource$Regionnetworkendpointgroups(this.context);
this.regionNetworkFirewallPolicies =
new Resource$Regionnetworkfirewallpolicies(this.context);
this.regionNotificationEndpoints =
new Resource$Regionnotificationendpoints(this.context);
this.regionOperations = new Resource$Regionoperations(this.context);
this.regions = new Resource$Regions(this.context);
this.regionSecurityPolicies = new Resource$Regionsecuritypolicies(
this.context
);
this.regionSslCertificates = new Resource$Regionsslcertificates(
this.context
);
this.regionSslPolicies = new Resource$Regionsslpolicies(this.context);
this.regionTargetHttpProxies = new Resource$Regiontargethttpproxies(
this.context
);
this.regionTargetHttpsProxies = new Resource$Regiontargethttpsproxies(
this.context
);
this.regionTargetTcpProxies = new Resource$Regiontargettcpproxies(
this.context
);
this.regionUrlMaps = new Resource$Regionurlmaps(this.context);
this.regionZones = new Resource$Regionzones(this.context);
this.reservationBlocks = new Resource$Reservationblocks(this.context);
this.reservations = new Resource$Reservations(this.context);
this.reservationSubBlocks = new Resource$Reservationsubblocks(
this.context
);
this.resourcePolicies = new Resource$Resourcepolicies(this.context);
this.routers = new Resource$Routers(this.context);
this.routes = new Resource$Routes(this.context);
this.securityPolicies = new Resource$Securitypolicies(this.context);
this.serviceAttachments = new Resource$Serviceattachments(this.context);
this.snapshots = new Resource$Snapshots(this.context);
this.snapshotSettings = new Resource$Snapshotsettings(this.context);
this.sslCertificates = new Resource$Sslcertificates(this.context);
this.sslPolicies = new Resource$Sslpolicies(this.context);
this.storagePools = new Resource$Storagepools(this.context);
this.storagePoolTypes = new Resource$Storagepooltypes(this.context);
this.subnetworks = new Resource$Subnetworks(this.context);
this.targetGrpcProxies = new Resource$Targetgrpcproxies(this.context);
this.targetHttpProxies = new Resource$Targethttpproxies(this.context);
this.targetHttpsProxies = new Resource$Targethttpsproxies(this.context);
this.targetInstances = new Resource$Targetinstances(this.context);
this.targetPools = new Resource$Targetpools(this.context);
this.targetSslProxies = new Resource$Targetsslproxies(this.context);
this.targetTcpProxies = new Resource$Targettcpproxies(this.context);
this.targetVpnGateways = new Resource$Targetvpngateways(this.context);
this.urlMaps = new Resource$Urlmaps(this.context);
this.vpnGateways = new Resource$Vpngateways(this.context);
this.vpnTunnels = new Resource$Vpntunnels(this.context);
this.wireGroups = new Resource$Wiregroups(this.context);
this.zoneOperations = new Resource$Zoneoperations(this.context);
this.zones = new Resource$Zones(this.context);
}
}
/**
* 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 | null;
/**
* 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 | null;
}
/**
* 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, readGPUs on Compute Engine.
*/
export interface Schema$AcceleratorType {
/**
* [Output Only] Creation timestamp inRFC3339 text format.
*/
creationTimestamp?: string | null;
/**
* [Output Only] The deprecation status associated with this accelerator type.
*/
deprecated?: Schema$DeprecationStatus;
/**
* [Output Only] An optional textual description of the resource.
*/
description?: string | null;
/**
* [Output Only] The unique identifier for the resource. This identifier is
* defined by the server.
*/
id?: string | null;
/**
* [Output Only] The type of the resource. Alwayscompute#acceleratorType for accelerator types.
*/
kind?: string | null;
/**
* [Output Only] Maximum number of accelerator cards allowed per instance.
*/
maximumCardsPerInstance?: number | null;
/**
* [Output Only] Name of the resource.
*/
name?: string | null;
/**
* [Output Only] Server-defined, fully qualified URL for this resource.
*/
selfLink?: string | null;
/**
* [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 | null;
}
export interface Schema$AcceleratorTypeAggregatedList {
/**
* [Output Only] Unique identifier for the resource; defined by the server.
*/
id?: string | null;
/**
* A list of AcceleratorTypesScopedList resources.
*/
items?: {[key: string]: Schema$AcceleratorTypesScopedList} | null;
/**
* [Output Only] Type of resource. Alwayscompute#acceleratorTypeAggregatedList for aggregated lists of
* accelerator types.
*/
kind?: string | null;
/**
* [Output Only] This token allows you to get the next page of results for
* list requests. If the number of results is larger thanmaxResults, 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 | null;
/**
* [Output Only] Server-defined URL for this resource.
*/
selfLink?: string | null;
/**
* [Output Only] Unreachable resources.
*/
unreachables?: string[] | null;
/**
* [Output Only] Informational warning message.
*/
warning?: {
code?: string;
data?: Array<{key?: string; value?: string}>;
message?: string;
} | null;
}
/**
* Contains a list of accelerator types.
*/
export interface Schema$AcceleratorTypeList {
/**
* [Output Only] Unique identifier for the resource; defined by the server.
*/
id?: string | null;
/**
* A list of AcceleratorType resources.
*/
items?: Schema$AcceleratorType[];
/**
* [Output Only] Type of resource. Alwayscompute#acceleratorTypeList for lists of accelerator types.
*/
kind?: string | null;
/**
* [Output Only] This token allows you to get the next page of results for
* list requests. If the number of results is larger thanmaxResults, 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 | null;
/**
* [Output Only] Server-defined URL for this resource.
*/
selfLink?: string | null;
/**
* [Output Only] Informational warning message.
*/
warning?: {
code?: string;
data?: Array<{key?: string; value?: string}>;
message?: string;
} | null;
}
export 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;
} | null;
}
/**
* An access configuration attached to an instance's network interface.
* Only one access config per instance is supported.
*/
export interface Schema$AccessConfig {
/**
* Applies to ipv6AccessConfigs only.
* The first IPv6 address of the external IPv6 range associated
* with this instance, prefix length is stored inexternalIpv6PrefixLength in ipv6AccessConfig. To
* use a static external IP address, it must be unused and in the same region
* as the instance's zone. If not specified, Google Cloud will automatically
* assign an external IPv6 address from the instance's subnetwork.
*/
externalIpv6?: string | null;
/**
* Applies to ipv6AccessConfigs only. The prefix length of the
* external IPv6 range.
*/
externalIpv6PrefixLength?: number | null;
/**
* [Output Only] Type of the resource. Alwayscompute#accessConfig for access configs.
*/
kind?: string | null;
/**
* The name of this access configuration. In accessConfigs
* (IPv4), the default and recommended name is External NAT, but
* you can use any arbitrary string, such as My external IP orNetwork Access. In ipv6AccessConfigs, the
* recommend name is External IPv6.
*/
name?: string | null;
/**
* Applies to accessConfigs (IPv4) only. Anexternal 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 | null;
/**
* 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 | null;
/**
* The DNS domain name for the public PTR record.
*
* You can set this field only if the `setPublicPtr` field is enabled inaccessConfig. If this field is unspecified inipv6AccessConfig, a default PTR record will be created for
* first IP in associated external IPv6 range.
*/
publicPtrDomainName?: string | null;
/**
* The resource URL for the security policy associated with this access
* config.
*/
securityPolicy?: string | null;
/**
* Specifies whether a public DNS 'PTR' record should be created to map the
* external IP address of the instance to a DNS domain name.
*
* This field is not used in ipv6AccessConfig. A default PTR
* record will be created if the VM has external IPv6 range associated.
*/
setPublicPtr?: boolean | null;
/**
* The type of configuration. In accessConfigs (IPv4), the
* default and only option is ONE_TO_ONE_NAT. Inipv6AccessConfigs, the default and only option isDIRECT_IPV6.
*/
type?: string | null;
}
/**
* Represents an IP Address resource.
*
* Google Compute Engine has two IP Address resources:
*
* * [Global (external and
* internal)](https://cloud.google.com/compute/docs/reference/rest/v1/globalAddresses)
* * [Regional (external and
* internal)](https://cloud.google.com/compute/docs/reference/rest/v1/addresses)
*
* For more information, see
* Reserving a static external IP address.
*/
export interface Schema$Address {
/**
* The static IP address represented by this resource.
*/
address?: string | null;
/**
* The type of address to reserve, either INTERNAL orEXTERNAL. If unspecified, defaults to EXTERNAL.
*/
addressType?: string | null;
/**
* [Output Only] Creation timestamp inRFC3339
* text format.
*/
creationTimestamp?: string | null;
/**
* An optional description of this resource. Provide this field when you
* create the resource.
*/
description?: string | null;
/**
* [Output Only] The unique identifier for the resource. This identifier is
* defined by the server.
*/
id?: string | null;
/**
* The endpoint type of this address, which should be VM
* or NETLB. This is used for deciding which type of endpoint
* this address can be used after the external IPv6 address reservation.
*/
ipv6EndpointType?: string | null;
/**
* The IP version that will be used by this address. Valid options areIPV4 or IPV6.
*/
ipVersion?: string | null;
/**
* [Output Only] Type of the resource. Always compute#address for
* addresses.
*/
kind?: string | null;
/**
* 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 error412 conditionNotMet.
*
* To see the latest fingerprint, make a get() request to
* retrieve an Address.
*/
labelFingerprint?: string | null;
/**
* Labels for this resource. These can only be added or modified by thesetLabels method. Each label key/value pair must comply withRFC1035.
* Label values may be empty.
*/
labels?: {[key: string]: string} | null;
/**
* Name of the resource. Provided by the client when the resource is created.
* The name must be 1-63 characters long, and comply withRFC1035.
* 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 | null;
/**
* The URL of the network in which to reserve the address. This field can
* only be used with INTERNAL type with theVPC_PEERING purpose.
*/
network?: string | null;
/**
* This signifies the networking tier used for configuring this address and
* can only take the following values: PREMIUM orSTANDARD. Internal IP addresses are always Premium Tier;
* global external IP addresses are always Premium Tier; regional external IP
* addresses can be either Standard or Premium Tier.
*
* If this field is not specified, it is assumed to be PREMIUM.
*/
networkTier?: string | null;
/**
* The prefix length if the resource represents an IP range.
*/
prefixLength?: number | null;
/**
* 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, load balancers, and similar resources.
* - DNS_RESOLVER for a DNS resolver address in a subnetwork
* for a Cloud DNS inbound
* forwarder IP addresses (regional internal IP address in a subnet of
* a VPC network)
* - VPC_PEERING for global internal IP addresses used for
*
* private services access allocated ranges.
* - NAT_AUTO for the regional external IP addresses used by
* Cloud NAT when allocating addresses using
*
* automatic NAT IP address allocation.
* - IPSEC_INTERCONNECT for addresses created from a private
* IP range that are reserved for a VLAN attachment in an
* *HA VPN over Cloud Interconnect* configuration. These addresses
* are regional resources.
* - `SHARED_LOADBALANCER_VIP` for an internal IP address that is assigned
* to multiple internal forwarding rules.
* - `PRIVATE_SERVICE_CONNECT` for a private network address that is
* used to configure Private Service Connect. Only global internal addresses
* can use this purpose.
*/
purpose?: string | null;
/**
* [Output Only] The URL of the region where a regional address resides.
* For regional addresses, you must specify the region as a path parameter in
* the HTTP request URL. *This field is not applicable to global
* addresses.*
*/
region?: string | null;
/**
* [Output Only] Server-defined URL for the resource.
*/
selfLink?: string | null;
/**
* [Output Only] The status of the address, which can be one ofRESERVING, 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 | null;
/**
* 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 aGCE_ENDPOINT or DNS_RESOLVER purpose.
*/
subnetwork?: string | null;
/**
* [Output Only] The URLs of the resources that are using this address.
*/
users?: string[] | null;
}
export interface Schema$AddressAggregatedList {
/**
* [Output Only] Unique identifier for the resource; defined by the server.
*/
id?: string | null;
/**
* A list of AddressesScopedList resources.
*/
items?: {[key: string]: Schema$AddressesScopedList} | null;
/**
* [Output Only] Type of resource. Alwayscompute#addressAggregatedList for aggregated lists of
* addresses.
*/
kind?: string | null;
/**
* [Output Only] This token allows you to get the next page of results for
* list requests. If the number of results is larger thanmaxResults, 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 | null;
/**
* [Output Only] Server-defined URL for this resource.
*/
selfLink?: string | null;
/**
* [Output Only] Unreachable resources.
*/
unreachables?: string[] | null;
/**
* [Output Only] Informational warning message.
*/
warning?: {
code?: string;
data?: Array<{key?: string; value?: string}>;
message?: string;
} | null;
}
export 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;
} | null;
}
/**
* Contains a list of addresses.
*/
export interface Schema$AddressList {
/**
* [Output Only] Unique identifier for the resource; defined by the server.
*/
id?: string | null;
/**
* A list of Address resources.
*/
items?: Schema$Address[];
/**
* [Output Only] Type of resource. Always compute#addressList for
* lists of addresses.
*/
kind?: string | null;
/**
* [Output Only] This token allows you to get the next page of results for
* list requests. If the number of results is larger thanmaxResults, 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 | null;
/**
* [Output Only] Server-defined URL for this resource.
*/
selfLink?: string | null;
/**
* [Output Only] Informational warning message.
*/
warning?: {
code?: string;
data?: Array<{key?: string; value?: string}>;
message?: string;
} | null;
}
/**
* Specifies options for controlling advanced machine features.
* Options that would traditionally be configured in a BIOS belong
* here. Features that require operating system support may have
* corresponding entries in the GuestOsFeatures of anImage (e.g., whether or not the OS in theImage supports nested virtualization being enabled or
* disabled).
*/
export interface Schema$AdvancedMachineFeatures {
/**
* Whether to enable nested virtualization or not (default is false).
*/
enableNestedVirtualization?: boolean | null;
/**
* Whether to enable UEFI networking for instance creation.
*/
enableUefiNetworking?: boolean | null;
/**
* Type of Performance Monitoring Unit requested on instance.
*/
performanceMonitoringUnit?: string | null;
/**
* The number of threads per physical core. To disable simultaneous
* multithreading (SMT) set this to 1. If unset, the maximum number
* of threads supported per core by the underlying processor is
* assumed.
*/
threadsPerCore?: number | null;
/**
* Turbo frequency mode to use for the instance.
* Supported modes include:
* * ALL_CORE_MAX
*
* Using empty string or not setting this field will use the platform-specific
* default turbo mode.
*/
turboMode?: string | null;
/**
* The number of physical cores to expose to an instance. Multiply by
* the number of threads per core to compute the total number of virtual
* CPUs to expose to the instance. If unset, the number of cores is
* inferred from the instance's nominal CPU count and the underlying
* platform's SMT width.
*/
visibleCoreCount?: number | null;
}
/**
* An alias IP range attached to an instance's network interface.
*/
export 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 as10.1.2.0/24).
*/
ipCidrRange?: string | null;
/**
* 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 | null;
}
/**
* This reservation type is specified by total resource amounts (e.g. total
* count of CPUs) and can account for multiple instance SKUs. In other words,
* one can create instances of varying shapes against this reservation.
*/
export interface Schema$AllocationAggregateReservation {
/**
* [Output only] List of resources currently in use.
*/
inUseResources?: Schema$AllocationAggregateReservationReservedResourceInfo[];
/**
* List of reserved resources (CPUs, memory, accelerators).
*/
reservedResources?: Schema$AllocationAggregateReservationReservedResourceInfo[];
/**
* The VM family that all instances scheduled against this reservation must
* belong to.
*/
vmFamily?: string | null;
/**
* The workload type of the instances that will target this reservation.
*/
workloadType?: string | null;
}
export interface Schema$AllocationAggregateReservationReservedResourceInfo {
/**
* Properties of accelerator resources in this reservation.
*/
accelerator?: Schema$AllocationAggregateReservationReservedResourceInfoAccelerator;
}
export interface Schema$AllocationAggregateReservationReservedResourceInfoAccelerator {
/**
* Number of accelerators of specified type.
*/
acceleratorCount?: number | null;
/**
* Full or partial URL to accelerator type. e.g.
* "projects/{PROJECT\}/zones/{ZONE\}/acceleratorTypes/ct4l"
*/
acceleratorType?: string | null;
}
export interface Schema$AllocationReservationSharingPolicy {
/**
* Sharing config for all Google Cloud services.
*/
serviceShareType?: string | null;
}
/**
* [Output Only] Contains output only fields.
*/
export interface Schema$AllocationResourceStatus {
/**
* [Output only] Health information for the reservation.
*/
healthInfo?: Schema$AllocationResourceStatusHealthInfo;
/**
* The number of reservation blocks associated with this reservation.
*/
reservationBlockCount?: number | null;
/**
* Maintenance information for this reservation
*/
reservationMaintenance?: Schema$GroupMaintenanceInfo;
/**
* Allocation Properties of this reservation.
*/
specificSkuAllocation?: Schema$AllocationResourceStatusSpecificSKUAllocation;
}
/**
* Health information for the reservation.
*/
export interface Schema$AllocationResourceStatusHealthInfo {
/**
* The number of reservation blocks that are degraded.
*/
degradedBlockCount?: number | null;
/**
* The health status of the reservation.
*/
healthStatus?: string | null;
/**
* The number of reservation blocks that are healthy.
*/
healthyBlockCount?: number | null;
}
/**
* Contains Properties set for the reservation.
*/
export interface Schema$AllocationResourceStatusSpecificSKUAllocation {
/**
* ID of the instance template used to populate reservation properties.
*/
sourceInstanceTemplateId?: string | null;
/**
* Per service utilization breakdown. The Key is the Google Cloud managed
* service name.
*/
utilizations?: {[key: string]: string} | null;
}
export interface Schema$AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk {
/**
* Specifies the size of the disk in base-2 GB.
*/
diskSizeGb?: string | null;
/**
* Specifies the disk interface to use for attaching this disk, which is
* either SCSI or NVME. The default isSCSI.
* For performance characteristics of SCSI over NVMe, seeLocal SSD performance.
*/
interface?: string | null;
}
/**
* Properties of the SKU instances being reserved.
* Next ID: 9
*/
export 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[];
/**
* An opaque location hint used to place the allocation close to other
* resources.
* This field is for use by internal tools that use the public API.
*/
locationHint?: string | null;
/**
* 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 | null;
/**
* Minimum cpu platform the reservation.
*/
minCpuPlatform?: string | null;
}
/**
* This reservation type allows to pre allocate specific instance
* configuration.
*/
export interface Schema$AllocationSpecificSKUReservation {
/**
* [Output Only] Indicates how many instances are actually usable currently.
*/
assuredCount?: string | null;
/**
* Specifies the number of resources that are allocated.
*/
count?: string | null;
/**
* The instance properties for the reservation.
*/
instanceProperties?: Schema$AllocationSpecificSKUAllocationReservedInstanceProperties;
/**
* [Output Only] Indicates how many instances are in use.
*/
inUseCount?: string | null;
/**
* Specifies the instance template to create the reservation. If you use
* this field, you must exclude the instanceProperties field.
*
* This field is optional, and it can be a full or partial URL. For example,
* the following are all valid URLs to an instance template:
*
*
* - https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate
* - projects/project/global/instanceTemplates/instanceTemplate
* - global/instanceTemplates/instanceTemplate
*/
sourceInstanceTemplate?: string | null;
}
/**
* An instance-attached disk resource.
*/
export interface Schema$AttachedDisk {
/**
* [Output Only] The architecture of the attached disk. Valid values are ARM64
* or X86_64.
*/
architecture?: string | null;
/**
* 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 | null;
/**
* Indicates that this is a boot disk. The virtual machine will use the first
* partition of the disk for its root filesystem.
*/
boot?: boolean | null;
/**
* 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 | null;
/**
* Encrypts or decrypts a disk using acustomer-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.
*
* Note:
*
* Instance templates do not storecustomer-supplied
* encryption keys, so you cannot use your own keys to encrypt disks in amanaged instance group.
*
* You cannot create VMs that have disks with customer-supplied keys using
* the bulk
* insert method.
*/
diskEncryptionKey?: Schema$CustomerEncryptionKey;
/**
* The size of the disk in GB.
*/
diskSizeGb?: string | null;
/**
* [Input Only] Whether to force attach the regional disk even if it's
* currently attached to another instance. If you try to force attach a zonal
* disk to an instance, you will receive an error.
*/
forceAttach?: boolean | null;
/**
* 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 | null;
/**
* [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. For most machine types, the
* default is SCSI. Local SSDs can use either NVME or SCSI.
* In certain configurations, persistent disks can use NVMe. For more
* information, seeAbout
* persistent disks.
*/
interface?: string | null;
/**
* [Output Only] Type of the resource. Alwayscompute#attachedDisk for attached disks.
*/
kind?: string | null;
/**
* [Output Only] Any valid publicly visible licenses.
*/
licenses?: string[] | null;
/**
* The mode in which to attach this disk, either READ_WRITE orREAD_ONLY. If not specified, the default is to attach the disk
* in READ_WRITE mode.
*/
mode?: string | null;
/**
* 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 | null;
/**
* [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 boot disk, one ofinitializeParams.sourceImage orinitializeParams.sourceSnapshot or disks.source
* is required.
*
* 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 for zonal disk,
* and the URL for regional disk.
*/
source?: string | null;
/**
* Specifies the type of the disk, either SCRATCH orPERSISTENT. If not specified, the default isPERSISTENT.
*/
type?: string | null;
}
/**
* [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.
*
*