googleapis
Version:
Google APIs Client Library for Node.js
959 lines • 5.98 MB
TypeScript
/// <reference types="node" />
import { OAuth2Client, JWT, UserRefreshClient, BaseExternalAccountClient, GaxiosPromise, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
import { Readable } from 'stream';
export declare namespace compute_alpha {
export interface Options extends GlobalOptions {
version: 'alpha';
}
interface StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth;
/**
* 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
* ```js
* const {google} = require('googleapis');
* const compute = google.compute('alpha');
* ```
*/
export 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;
firewallPolicies: Resource$Firewallpolicies;
firewalls: Resource$Firewalls;
forwardingRules: Resource$Forwardingrules;
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;
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;
networkFirewallPolicies: Resource$Networkfirewallpolicies;
networks: Resource$Networks;
nodeGroups: Resource$Nodegroups;
nodeTemplates: Resource$Nodetemplates;
nodeTypes: Resource$Nodetypes;
organizationSecurityPolicies: Resource$Organizationsecuritypolicies;
packetMirrorings: Resource$Packetmirrorings;
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;
regionInPlaceSnapshots: Resource$Regioninplacesnapshots;
regionInstanceGroupManagers: Resource$Regioninstancegroupmanagers;
regionInstanceGroups: Resource$Regioninstancegroups;
regionInstances: Resource$Regioninstances;
regionInstantSnapshots: Resource$Regioninstantsnapshots;
regionNetworkEndpointGroups: Resource$Regionnetworkendpointgroups;
regionNetworkFirewallPolicies: Resource$Regionnetworkfirewallpolicies;
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;
serviceAttachments: Resource$Serviceattachments;
snapshots: Resource$Snapshots;
sslCertificates: Resource$Sslcertificates;
sslPolicies: Resource$Sslpolicies;
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;
zoneInPlaceSnapshots: Resource$Zoneinplacesnapshots;
zoneInstantSnapshots: Resource$Zoneinstantsnapshots;
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.
*/
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, read GPUs on Compute Engine. (== resource_for {$api_version\}.acceleratorTypes ==)
*/
export interface Schema$AcceleratorType {
/**
* [Output Only] Creation timestamp in RFC3339 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. Always compute#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] Server-defined URL for this resource's resource id.
*/
selfLinkWithId?: 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. Always compute#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 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 | 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. Always compute#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 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 | 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 {
/**
* [Output Only] The first IPv6 address of the external IPv6 range associated with this instance, prefix length is stored in externalIpv6PrefixLength in ipv6AccessConfig. The field is output only, an IPv6 address from a subnetwork associated with the instance will be allocated dynamically.
*/
externalIpv6?: string | null;
/**
* [Output Only] The prefix length of the external IPv6 range.
*/
externalIpv6PrefixLength?: number | null;
/**
* [Output Only] Type of the resource. Always compute#accessConfig for access configs.
*/
kind?: string | null;
/**
* 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 | null;
/**
* 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 | 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;
/**
* [Output Only] The public DNS domain name for the instance.
*/
publicDnsName?: string | null;
/**
* The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
*/
publicPtrDomainName?: string | null;
/**
* Specifies whether a public DNS 'A' record should be created for the external IP address of this access configuration.
*/
setPublicDns?: boolean | 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.
*/
setPublicPtr?: boolean | null;
/**
* The type of configuration. The default and only option is ONE_TO_ONE_NAT.
*/
type?: string | null;
}
/**
* Use global external addresses for GFE-based external HTTP(S) load balancers in Premium Tier.
*
* Use global internal addresses for reserved peering network range.
*
* Use regional external addresses for the following resources:
*
* - External IP addresses for VM instances - Regional external forwarding rules - Cloud NAT external IP addresses - GFE based LBs in Standard Tier - Network LBs in Premium or Standard Tier - Cloud VPN gateways (both Classic and HA)
*
* Use regional internal IP addresses for subnet IP ranges (primary and secondary). This includes:
*
* - Internal IP addresses for VM instances - Alias IP ranges of VM instances (/32 only) - Regional internal forwarding rules - Internal TCP/UDP load balancer addresses - Internal HTTP(S) load balancer addresses - Cloud DNS inbound forwarding IP addresses
*
* For more information, read reserved IP address.
*
* (== resource_for {$api_version\}.addresses ==) (== resource_for {$api_version\}.globalAddresses ==)
*/
export interface Schema$Address {
/**
* The static IP address represented by this resource.
*/
address?: string | null;
/**
* The type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL.
*/
addressType?: string | null;
/**
* [Output Only] Creation timestamp in RFC3339 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 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 | 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 error 412 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 the setLabels method. Each label key/value pair must comply with RFC1035. 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 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 | null;
/**
* 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 | null;
/**
* 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 | 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, 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.
* - `IPSEC_INTERCONNECT` for addresses created from a private IP range that are reserved for a VLAN attachment in an IPsec-encrypted Cloud Interconnect configuration. These addresses are regional resources.
*/
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] Server-defined URL for this resource with the resource id.
*/
selfLinkWithId?: string | null;
/**
* [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 | 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 a GCE_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. Always compute#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 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 | 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 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 | 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 an Image (e.g., whether or not the OS in the Image supports nested virtualization being enabled or disabled).
*/
export interface Schema$AdvancedMachineFeatures {
/**
* Whether to enable nested virtualization or not (default is false).
*/
enableNestedVirtualization?: boolean | 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;
/**
* 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 as 10.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;
}
export interface Schema$AllocationShareSettings {
/**
* A List of Project names to specify consumer projects for this shared-reservation. This is only valid when share_type's value is SPECIFIC_PROJECTS.
*/
projects?: string[] | null;
/**
* Type of sharing for this shared-reservation
*/
shareType?: 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 is SCSI. For performance characteristics of SCSI over NVMe, see Local 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;
/**
* Specifies the number of hours after reservation creation where instances using the reservation won't be scheduled for maintenance.
*/
maintenanceFreezeDurationHours?: number | null;
/**
* Specifies whether this VM may be a stable fleet VM. Setting this to "Periodic" designates this VM as a Stable Fleet VM.
*
* See go/stable-fleet-ug for more details.
*/
maintenanceInterval?: string | null;
/**
* Minimum cpu platform the reservation.
*/
minCpuPlatform?: string | null;
}
/**
* This reservation type allows to pre allocate specific instance configuration.
*/
export interface Schema$AllocationSpecificSKUReservation {
/**
* 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;
}
/**
* `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message.
*
* Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
*
* Example 1: Pack and unpack a message in C++.
*
* Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... \}
*
* Example 2: Pack and unpack a message in Java.
*
* Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); \}
*
* Example 3: Pack and unpack a message in Python.
*
* foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
*
* Example 4: Pack and unpack a message in Go
*
* foo := &pb.Foo{...\} any, err := anypb.New(foo) if err != nil { ... \} ... foo := &pb.Foo{\} if err := any.UnmarshalTo(foo); err != nil { ... \}
*
* The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z".
*
*
*
* JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:
*
* package google.profile; message Person { string first_name = 1; string last_name = 2; \}
*
* { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": \}
*
* If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):
*
* { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" \}
*/
export interface Schema$Any {
/**
* A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted).
*
* In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:
*
* * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
*
* Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
*
* Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
*/
typeUrl?: string | null;
/**
* Must be a valid serialized protocol buffer of the above specified type.
*/
value?: string | null;
}
/**
* 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 | 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 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 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. 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 | null;
/**
* [Output Only] Type of the resource. Always compute#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 or READ_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, one of initializeParams.sourceImage or initializeParams.sourceSnapshot 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 | null;
/**
* Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
*/
type?: string | null;
/**
* [Output Only] A list of user provided licenses. It represents a list of URLs to the license resource. Unlike regular licenses, user provided licenses can be modified after the disk is created.
*/
userLicenses?: 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.
*
* This property is mutually exclusive with the source property; you can only define one or the other, but not both.
*/
export interface Schema$AttachedDiskInitializeParams {
/**
* An optional description. Provide this property when creating the disk.
*/
description?: string | null;
/**
* Specifies the disk name. If not specified, the default is to use the name of the instance. If a disk with the same name already exists in the given region, the existing disk is attached to the new instance and the new disk is not created.
*/
diskName?: string | null;
/**
* Specifies the size of the disk in base-2 GB. The size must be at least 10 GB. If you specify a sourceImage, which is required for boot disks, the default size is the size of the sourceImage. If you do not specify a sourceImage, the default disk size is 500 GB.
*/
diskSizeGb?: string | null;
/**
* 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 | 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.
*
* 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;
} | null;
/**
* Indicates whether or not the disk can be read/write attached to more than one instance.
*/
multiWriter?: boolean | null;
/**
* Specifies which action to take on instance update with this disk. Default is to use the existing disk.
*/
onUpdateAction?: string | null;
/**
* Indicates how many IOPS must be provisioned for the disk.
*/
provisionedIops?: string | null;
/**
* URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
*/
replicaZones?: string[] | null;
/**
* 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[] | null;
/**
* The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot 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 | null;
/**
* 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 initializeParams.sourceImage 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 | null;
/**
* 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:jose@example.com" ] \}, { "log_type": "DATA_WRITE" \}, { "log_type": "ADMIN_READ" \} ] \}, { "service": "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": "DATA_READ" \}, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] \} ] \} ] \}
*
* For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
*/
export interface Schema$AuditConfig {
/**
* The configuration for logging of each type of permission.
*/
auditLogConfigs?: Schema$AuditLogConfig[];
exemptedMembers?: string[] | null;
/**
* 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 | null;
}
/**
* Provides the configuration for logging a type of permissions. Example:
*
* { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] \}, { "log_type": "DATA_WRITE" \} ] \}
*
* This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.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[] | null;
ignoreChildExemptions?: boolean | null;
/**
* The log type that this config enables.
*/
logType?: string | null;
}
/**
* [Deprecated] The authentication settings for the backend service. The authentication settings for the backend service.
*/
export 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