Meta tags:
description= Create reservations of Compute Engine VM instances that are shared by multiple projects.;
Headings (most frequently used words):
console, gcloud, rest, specify, create, shared, reservation, and, terraform, go, java, node, js, python, required, an, stay, organized, with, collections, save, categorize, content, based, on, your, preferences, before, you, begin, troubleshooting, what, next, roles, instance, template, existing, vm, properties, directly, products, pricing, support, resources, engage, permissions,
Text of the page (most frequently used words):
the (532), #reservation (243), #create (233), and (207), for (171), with (163), vms (153), you (127), compute (120), projects (109), instance (108), reservations (105), zone (105), that (90), project (82), use (81), using (69), cloud (65), share (64), troubleshoot (63), template (63), about (62), google (61), can (60), following (57), shared (56), your (55), disk (53), set (52), manage (50), gcloud (50), resources (48), this (48), delete (48), time (48), view (47), name (47), projectid (45), machine (43), disks (43), consume (40), request (39), select (39), local (39), server (39), type (38), operation (38), engine (36), count (35), specific (35), reservation_name (34), include (34), mig (34), configure (34), specify (33), windows (33), example (32), reserve (32), from (31), overview (31), number_of_vms (30), performance (30), sharesettings (29), project_id (29), gpu (29), default (29), consumer_project_id_2 (28), consumer_project_id_1 (28), com (27), properties (27), import (27), cli (27), more (26), organization (26), identity (26), post (25), zones (25), field (25), one (25), make (24), digit (24), section (24), want (24), replace (23), consumer (23), must (23), authentication (23), specific_projects (22), custom (22), instances (22), see (21), monitor (21), cpu (21), number (21), existing (21), access (21), hyperdisk (21), sql (21), sharetype (20), install (20), images (20), policies (19), https (19), projectmap (19), machine_type (19), automatically (19), add (19), application (19), network (19), page (18), creation (18), specificreservation (18), specifying (18), only (18), where (18), creating (18), owner (18), setting (18), then (18), string (18), credentials (18), information (17), are (17), googleapis (17), after (17), date (17), ssd (17), image (17), linux (17), duration (16), seconds (16), beta (16), formatted (16), offset (16), service (16), based (16), regional (16), terms (15), how (15), follows (15), which (15), available (15), global (15), environment (15), virtual (15), snapshots (15), groups (15), ssh (15), recommendations (15), configuration (15), enable (14), jobs (14), same (14), resource (14), consumer_project_ids (14), policy (14), region (14), persistent (14), development (14), external (14), provider (14), workload (14), host (14), load (14), apply (14), connect (14), samples (13), have (13), any (13), central1 (13), when (13), new (13), login (13), best (13), management (13), bulk (13), microsoft (13), cluster (13), two (12), platform (12), don (12), command (12), console (12), instance_template_url (12), reservationsclient (12), const (12), multiple (12), idp (12), federated (12), user (12), practices (12), storage (12), sole (12), availability (12), need (11), attach (11), body (11), minutes (11), let (11), reserved (11), interface (11), gpus (11), flag (11), run (11), options (11), reference (11), zonal (11), build (11), attached (11), workloads (11), stateful (11), details (10), commitments (10), method (10), separated (10), true (10), target (10), these (10), click (10), managed (10), created (10), templates (10), instancetemplates (10), client (10), error (10), reservationname (10), update (10), shell (10), metadata (10), migs (10), machines (10), migrate (10), logs (10), sign (9), other (9), instanceproperties (9), machinetype (9), insert (9), standard (9), 100 (9), optional (9), manually (9), regions (9), return (9), get (9), compute_v1 (9), running (9), roles (9), licenses (9), tenant (9), openshift (9), shutdown (9), start (9), hpc (9), training (8), code (8), support (8), java (8), license (8), day (8), delete_after_duration (8), hour (8), month (8), yyyy (8), delete_at_time (8), pre (8), allow_all (8), specifically (8), minimum (8), each (8), allowed (8), appears (8), auto (8), stop (8), sourceinstancetemplate (8), response (8), str (8), node (8), permissions (8), account (8), optimize (8), internal (8), choose (8), disaster (8), recovery (8), high (8), agent (8), guest (8), boot (8), keys (8), h4d (8), flexibility (8), dns (8), optimized (8), tpu (8), status (7), thumb (7), send (7), vertex (7), prediction (7), already (7), ids (7), without (7), terraform (7), list (7), services (7), match (7), group (7), single (7), print (7), during (7), will (7), wait (7), location (7), initialize (7), modify (7), err (7), proto (7), computepb (7), source (7), first (7), demand (7), across (7), networking (7), startup (7), balancing (7), benchmark (7), idle (7), addresses (7), scale (7), deploy (7), back (7), mysql (7), remove (7), maintenance (7), snapshot (7), backup (7), events (6), utc (6), learn (6), deleteafterduration (6), deleteattime (6), general (6), methods (6), nvme (6), 375 (6), predefined (6), define (6), flags (6), sharing (6), require (6), directly (6), complete (6), enter (6), matching (6), sys (6), file (6), newbuilder (6), requests (6), capacity (6), control (6), required (6), review (6), usage (6), security (6), migration (6), data (6), updates (6), instant (6), files (6), nested (6), applications (6), mode (6), pools (6), failover (6), extension (6), change (6), transfer (6), customized (6), spot (6), understand (5), consumption (5), while (5), might (5), specificreservationrequired (5), values (5), interface_type (5), rest (5), verify (5), allow (5), configurations (5), uses (5), sharesettingsprojectconfig (5), allocationspecificskureservation (5), result (5), stderr (5), exception (5), timeout (5), concurrent (5), used (5), zoneoperationsclient (5), before (5), locations (5), explains (5), returned (5), confirm (5), signed (5), auth (5), discounts (5), monitoring (5), databases (5), accounts (5), errors (5), future (5), drivers (5), virtualization (5), nvidia (5), operations (5), placement (5), highly (5), multi (5), schedules (5), audit (5), symphony (5), email (5), scripts (5), manager (5), between (5), operating (5), systems (5), enhanced (5), capabilities (5), tenancy (5), restore (5), types (5), workstation (5), faq (5), flex (5), português (4), español (4), all (4), down (4), sample (4), its (4), troubleshooting (4), pacific (4), pst (4), alternatively (4), coordinated (4), universal (4), colons (4), year (4), hyphens (4), rfc (4), 3339 (4), timestamp (4), feature (4), subject (4), offerings (4), features (4), limited (4), launch (4), stage (4), descriptions (4), preview (4), fields (4), servicesharetype (4), sure (4), min_cpu_platform (4), scsi (4), model (4), accelerator_type (4), number_of_accelerators (4), optionally (4), ten (4), including (4), hours (4), size (4), accelerator (4), charges (4), consuming (4), series (4), instance_template_name (4), exists (4), shared_project_id (4), instance_properties (4), flush (4), warning (4), warnings (4), verbose_name (4), await (4), reservationresource (4), computelib (4), insertreservationrequest (4), instancetemplateuri (4), vmcount (4), createsharedreservation (4), static (4), public (4), constraint (4), nil (4), fmt (4), ctx (4), consumed (4), prevent (4), apis (4), authenticate (4), plan (4), cuds (4), tools (4), distributed (4), issues (4), ubuntu (4), bandwidth (4), tcp (4), pmu (4), upgrade (4), live (4), autoscaling (4), cross (4), calendar (4), metrics (4), health (4), active (4), clusters (4), containers (4), container (4), database (4), postgresql (4), extensions (4), work (4), suspend (4), resize (4), graceful (4), plans (4), replication (4), bound (4), otherwise (3), content (3), apache (3), next (3), platforms (3), instead (3), specified (3), ensure (3), fails (3), per (3), vcpus (3), block (3), project_map (3), share_settings (3), take (3), minute (3), finishes (3), option (3), deleting (3), useful (3), avoid (3), unnecessary (3), current (3), lists (3), add_box (3), exactly (3), outside (3), similar (3), those (3), note (3), url (3), exist (3), full (3), specifies (3), returns (3), args (3), creates (3), error_code (3), there (3), long (3), int (3), python (3), settings (3), todo (3), developer (3), once (3), ioexception (3), timeoutexception (3), executionexception (3), given (3), format (3), util (3), sourcetemplate (3), baseprojectid (3), writer (3), within (3), check (3), document (3), place (3), edit (3), orgpolicy (3), administrator (3), documentation (3), api (3), has (3), quota (3), commitment (3), committed (3), costs (3), utilization (3), guides (3), infrastructure (3), observability (3), analytics (3), automatic (3), encryption (3), pro (3), serial (3), patterns (3), higher (3), manual (3), scalable (3), resilient (3), autoscale (3), balancer (3), testing (3), ibm (3), spectrum (3), perform (3), deploying (3), prepare (3), deployment (3), rhel (3), protect (3), certificates (3), query (3), state (3), disable (3), increase (3), schedule (3), lifecycle (3), design (3), non (3), pool (3), move (3), workstations (3), tpus (3), product (3), 한국어 (2), 日本語 (2), עברית (2), brasil (2), italiano (2), indonesia (2), français (2), américa (2), latina (2), deutsch (2), english (2), site (2), youtube (2), center (2), started (2), system (2), pricing (2), products (2), last (2), updated (2), 2026 (2), licensed (2), under (2), feedback (2), 400 (2), 86400 (2), reservationsharingpolicy (2), reserving (2), mincpuplatform (2), supports (2), localssds (2), disksizegb (2), doesn (2), chosen (2), supported (2), guestaccelerators (2), share_type (2), days (2), 1d2h3m4s (2), 30m (2), min (2), number_of_local_ssd_disks (2), comma (2), doing (2), ready (2), shared_project (2), wait_for_extended_operation (2), source_instance_template (2), amount (2), def (2), error_message (2), runtimeerror (2), raise (2), raised (2), but (2), were (2), extendedoperation (2), callcreatecomputesharedreservation (2), split (2), consumer_project_id (2), customer (2), instancetemplatename (2), vmsnumber (2), variables (2), instantiate (2), timeunit (2), setzone (2), putprojectmap (2), needs (2), interruptedexception (2), throws (2), your_reservation_name (2), your_project_id (2), sharedreservationsownerprojects (2), main (2), unable (2), errorf (2), req (2), context (2), www (2), instancetemplate (2), template_name (2), path (2), volume (2), restrict (2), not (2), sections (2), admin (2), iam (2), provide (2), allowlist (2), until (2), viewing (2), restrictions (2), requirements (2), purchasing (2), exchange (2), purchase (2), improve (2), reduce (2), sdk (2), languages (2), frameworks (2), industry (2), solutions (2), hybrid (2), multicloud (2), pipelines (2), hosting (2), registration (2), sles (2), export (2), port (2), collecting (2), nodes (2), report (2), arm (2), core (2), rdp (2), app (2), latency (2), analyze (2), visible (2), cores (2), generation (2), underutilized (2), insights (2), globally (2), web (2), autohealing (2), iis (2), autoscaler (2), autoscalers (2), activity (2), kubernetes (2), directory (2), redis (2), cloning (2), always (2), alwayson (2), volumes (2), synchronization (2), switch (2), byol (2), payg (2), byos (2), changes (2), families (2), guide (2), securing (2), event (2), simulate (2), topology (2), together (2), repairs (2), repair (2), failures (2), suspended (2), stopped (2), distribution (2), physical (2), cancel (2), limit (2), interfaces (2), ipv6 (2), decrease (2), basic (2), consistent (2), scoped (2), copy (2), appliances (2), asynchronous (2), throughput (2), encrypt (2), names (2), mount (2), memory (2), extreme (2), balanced (2), through (2), advanced (2), rdma (2), preemptible (2), provisioning (2), models (2), rtx (2), vws (2), constraints (2), technology (2), areas (2), close (2), subscribe, newsletter, our, third, decade, climate, action, join, cookies, privacy, tech, twitter, blog, engage, certification, architecture, getting, github, release, notes, community, forums, contact, sales, marketplace, easy, easytounderstand, solved, problem, solvedmyproblem, otherup, hard, hardtounderstand, incorrect, incorrectinformationorsamplecode, missing, missingtheinformationsamplesineed, otherdown, tell, except, noted, registered, trademark, oracle, affiliates, developers, creative, commons, attribution, what, deletes, acceleratorcount, acceleratortype, google_compute_reservation, ensuring, changing, newly, both, overriding, 123456789012, iter, reservation_resource, partial, exclude, allocated, specific_reservation, disk_size_gb, allocationspecificskuallocationallocatedinstancepropertiesreserveddisk, local_ssds, allocationspecificskuallocationreservedinstanceproperties, object, represents, gcp, create_compute_shared_reservation, message, futures, timeouterror, case, taking, longer, than, received, raises, whatever, none, indefinitely, finish, reporting, verbose, they, printed, execution, ends, successful, waits, extended, 300, api_core, extended_operation, typing, annotations, __future__, log, pop, done, latestresponse, function, async, getprojectid, uncomment, protos, library, getstatus, failed, throw, haserror, insertasync, setreservationresource, setproject, setsourceinstancetemplate, setcount, setspecificreservation, setsharesettings, setspecificreservationrequired, setname, consumer_project_2, consumer_project_1, valueof, setsharetype, try, reused, your_instance_template_name, uri, docs, shared_reservation_constraint, visit, them, void, class, fprintf, int64, map, background, formats, west3, your_project_id2, destination, newreservationsrestclient, clientinterface, func, particular, golang, org, protobuf, apiv1, such, bind, look, references, inside, contains, explained, requires, mismatched, however, because, recommended, modified, also, able, usereadonly, contain, exact, expand, granting, folders, organizations, policyadmin, ask, grant, haven, verifies, selecting, installed, previously, latest, version, components, init, installation, tab, been, added, empty, grants, permission, editing, begin, incurs, even, being, billing, known, level, spending, hardware, pages, hosts, save, categorize, preferences, stay, organized, collections, home, renewal, resizing, common, pay, output, diagnostic, sudoers, screenshots, generate, bug, blackwell, soft, lockups, bus, locks, rescue, inaccessible, dumps, kernel, panic, fstab, unresponsive, suspension, reboots, shutdowns, connectivity, tips, nics, dpdk, resiliency, communication, compact, idpf, irdma, driver, nic, customize, threads, sustained, merge, extend, renew, cost, savings, dynamic, overcommit, cpus, floating, reliable, udp, backends, routing, scaling, combine, cud, decisions, signals, serving, predictions, organize, labels, replica, states, observe, reports, tensorflow, inference, tensorrt5, learning, monte, carlo, spark, forwarding, others, integrate, clustering, 2016, sharepoint, strategies, passive, inactive, setups, built, integrations, validation, deployed, transition, test, hammerdb, bucket, aws, ec2, pacemaker, s2d, netapp, hot, standby, drbd, architectures, private, address, mailjet, mailgun, sendgrid, sending, blue, green, deployments, lamp, joomla, asp, net, interactive, mongodb, flask, servers, over, mtls, random, generator, virtio, rng, accurate, protocol, ntp, append, els, packages, deprecate, versions, family, trusted, red, hat, knowledgebase, functionality, risks, vpc, controls, confidential, kek, secure, expiration, shielded, attributes, handle, notices, process, faulty, unmanaged, affect, preserved, turn, off, alternate, repairing, maintain, upgrades, override, selectively, applying, accelerate, out, outage, rebalance, reenable, proactive, redistribution, shape, distribute, info, accidental, deletion, spread, rename, reset, resume, restart, referrers, uuid, recover, corrupted, duplicate, clones, alerts, backups, vss, regionally, different, protection, considerations, synchronous, consistency, failback, replicate, provisioned, iops, limits, evaluate, help, kms, supplied, symbolic, links, practice, device, ram, additional, exapools, ptr, record, failure, rates, tags, automate, password, powershell, sac, securely, apps, root, vpn, bastion, iap, connection, browser, connections, networks, iso, imported, prerequisites, importing, exporting, bring, own, detach, reattach, accounting, provision, examples, slurm, team, slice, slices, adds, scenarios, deterministic, base, aci, configured, preempted, historical, alternative, displays, ops, logging, subnet, gpudirect, enabled, ultra, hostname, quickstarts, office, licensing, premium, strategy, gemini, bare, metal, accelerators, scores, purpose, discover, free, skip,
Text of the page (random words):
ncetemplates s projectid your_instance_template_name number of instances for which capacity needs to be reserved int vmcount 3 createsharedreservation projectid zone reservationname instancetemplateuri vmcount creates a shared reservation with the given name in the given zone public static status createsharedreservation string projectid string zone string reservationname string instancetemplateuri int vmcount throws executionexception interruptedexception timeoutexception ioexception initialize client that will be used to send requests this client only needs to be created once and can be reused for multiple requests try reservationsclient reservationsclient reservationsclient create sharesettings sharesettings sharesettings newbuilder setsharetype string valueof sharesettings sharetype specific_projects the ids of projects that can consume this reservation you can include up to 100 consumer projects these projects must be in the same organization as the owner project don t include the owner project by default it is already allowed to consume the reservation putprojectmap consumer_project_1 sharesettingsprojectconfig newbuilder build putprojectmap consumer_project_2 sharesettingsprojectconfig newbuilder build build reservation reservationresource reservation newbuilder setname reservationname setzone zone setspecificreservationrequired true setsharesettings sharesettings setspecificreservation allocationspecificskureservation newbuilder setcount vmcount setsourceinstancetemplate instancetemplateuri build build insertreservationrequest request insertreservationrequest newbuilder setproject projectid setzone zone setreservationresource reservationresource build operation response reservationsclient insertasync request get 3 timeunit minutes if response haserror throw new error reservation creation failed response return response getstatus node js import the compute library const computelib require google cloud compute const compute computelib protos google cloud compute v1 todo developer uncomment reservationsclient and zoneoperationsclient before running the sample instantiate a reservationsclient reservationsclient new computelib reservationsclient instantiate a zoneoperationsclient zoneoperationsclient new computelib zoneoperationsclient todo developer update these variables before running the sample the id of the project where you want to reserve resources and where the instance template exists const projectid await reservationsclient getprojectid the zone in which to reserve resources const zone us central1 a the name of the reservation to create const reservationname reservation 01 the number of vms to reserve const vmsnumber 3 the name of an existing instance template const instancetemplatename global instance template name the location of the instance template const location global async function callcreatecomputesharedreservation create reservation for 3 vms in zone us central1 a by specifying a instance template const specificreservation new compute allocationspecificskureservation count vmsnumber sourceinstancetemplate projects projectid location instancetemplates instancetemplatename create share settings share reservation with one customer project const sharesettings new compute sharesettings sharetype specific_projects projectmap the ids of projects that can consume this reservation you can include up to 100 consumer projects these projects must be in the same organization as the owner project don t include the owner project by default it is already allowed to consume the reservation consumer_project_id projectid consumer_project_id create a reservation const reservation new compute reservation name reservationname specificreservation specificreservationrequired true sharesettings const response await reservationsclient insert project projectid reservationresource reservation zone let operation response latestresponse wait for the create reservation operation to complete while operation status done operation await zoneoperationsclient wait operation operation name project projectid zone operation zone split pop console log reservation reservationname created return response return await callcreatecomputesharedreservation python from __future__ import annotations import sys from typing import any from google api_core extended_operation import extendedoperation from google cloud import compute_v1 def wait_for_extended_operation operation extendedoperation verbose_name str operation timeout int 300 any waits for the extended long running operation to complete if the operation is successful it will return its result if the operation ends with an error an exception will be raised if there were any warnings during the execution of the operation they will be printed to sys stderr args operation a long running operation you want to wait on verbose_name optional a more verbose name of the operation used only during error and warning reporting timeout how long in seconds to wait for operation to finish if none wait indefinitely returns whatever the operation result returns raises this method will raise the exception received from operation exception or runtimeerror if there is no exception set but there is an error_code set for the operation in case of an operation taking longer than timeout seconds to complete a concurrent futures timeouterror will be raised result operation result timeout timeout if operation error_code print f error during verbose_name code operation error_code operation error_message file sys stderr flush true print f operation id operation name file sys stderr flush true raise operation exception or runtimeerror operation error_message if operation warnings print f warnings during verbose_name n file sys stderr flush true for warning in operation warnings print f warning code warning message file sys stderr flush true return result def create_compute_shared_reservation project_id str zone str us central1 a reservation_name your reservation name shared_project_id str shared project id compute_v1 reservation creates a compute reservation in gcp args project_id str the id of the google cloud project zone str the zone to create the reservation reservation_name str the name of the reservation to create shared_project_id str the id of the project that the reservation is shared with returns reservation object that represents the new reservation instance_properties compute_v1 allocationspecificskuallocationreservedinstanceproperties machine_type n1 standard 1 optional specifies amount of local ssd to reserve with each instance local_ssds compute_v1 allocationspecificskuallocationallocatedinstancepropertiesreserveddisk disk_size_gb 375 interface nvme reservation compute_v1 reservation name reservation_name specific_reservation compute_v1 allocationspecificskureservation count 3 number of resources that are allocated if you use source_instance_template you must exclude the instance_properties field it can be a full or partial url source_instance_template projects project_id global instancetemplates my instance template instance_properties instance_properties share_settings compute_v1 sharesettings share_type specific_projects project_map shared_project_id compute_v1 sharesettingsprojectconfig project_id shared_project_id create a client client compute_v1 reservationsclient operation client insert project project_id zone zone reservation_resource reservation wait_for_extended_operation operation reservation creation reservation client get project project_id zone zone reservation reservation_name shared_project next iter reservation share_settings project_map values print name reservation name print status reservation status print shared project shared_project example response name your reservation name status ready shared project project_id 123456789012 return reservation rest to create a shared reservation make a post request to the reservations insert method in the request body include the following the projectmap field the sharetype field set to specific_projects for example to create a shared reservation by specifying an instance template without including any optional fields and share the reservation with two consumer projects make the following post request post https compute googleapis com compute v1 projects project_id zones zone reservations name reservation_name sharesettings sharetype specific_projects projectmap consumer_project_id_1 projectid consumer_project_id_1 consumer_project_id_2 projectid consumer_project_id_2 specificreservation count number_of_vms sourceinstancetemplate instance_template_url replace the following project_id the id of the project where you want to reserve resources and where the instance template exists zone the zone in which to reserve resources reservation_name the name of the reservation to create consumer_project_id_1 and consumer_project_id_2 the ids of projects that can consume this reservation you can include up to 100 consumer projects these projects must be in the same organization as the owner project don t include the owner project by default it is already allowed to consume the reservation number_of_vms the number of vms to reserve instance_template_url the url of an existing instance template which must exist in your project specify one of the following values for a regional instance template projects project_id regions region instancetemplates instance_template_name for a global instance template instance_template_name for example to create a reservation for ten vms in zone us central1 a by specifying a global instance template and share the reservation with projects project 1 and project 2 make the following post request post https compute googleapis com compute v1 projects example project zones us central1 a reservations name my reservation sharesettings sharetype specific_projects projectmap project 1 projectid project 1 project 2 projectid project 2 specificreservation count 10 sourceinstancetemplate example instance template optionally you can do one or more of the following to specify that only vms that specifically target this reservation can consume it include the specificreservationrequired field in the request body and set the field to true for example to create a specific reservation by specifying an instance template and share the reservation with two consumer projects make a request as follows post https compute googleapis com compute v1 projects project_id zones zone reservations name reservation_name sharesettings sharetype specific_projects projectmap consumer_project_id_1 projectid consumer_project_id_1 consumer_project_id_2 projectid consumer_project_id_2 specificreservation count number_of_vms sourceinstancetemplate instance_template_url specificreservationrequired true to let custom training jobs or prediction jobs in vertex ai consume a reservation of gpu vms include the servicesharetype field and set it to allow_all post https compute googleapis com compute v1 projects project_id zones zone reservations name reservation_name reservationsharingpolicy servicesharetype allow_all sharesettings sharetype specific_projects projectmap consumer_project_id_1 projectid consumer_project_id_1 consumer_project_id_2 projectid consumer_project_id_2 specificreservation count number_of_vms sourceinstancetemplate instance_template_url to enable compute engine to automatically delete the reservation select one of the following methods preview the deleteattime and deleteafterduration fields this feature is subject to the pre ga offerings terms in the general service terms section of the service specific terms pre ga features are available as is and might have limited support for more information see the launch stage descriptions to delete the reservation at a specific date and time make a post request to the beta reservations insert method in the request body include the deleteattime field for example to create a reservation by specifying an instance template auto delete the reservation at a specific date and time and share the reservation with two consumer projects make a request as follows post https compute googleapis com compute beta projects project_id zones zone reservations deleteattime delete_at_time name reservation_name sharesettings sharetype specific_projects projectmap consumer_project_id_1 projectid consumer_project_id_1 consumer_project_id_2 projectid consumer_project_id_2 specificreservation count number_of_vms sourceinstancetemplate instance_template_url replace delete_at_time with a date and time formatted as an rfc 3339 timestamp which must be as follows yyyy mm dd t hh mm ss offset replace the following yyyy mm dd a date formatted as a 4 digit year 2 digit month and a 2 digit day of the month separated by hyphens hh mm ss a time formatted as a 2 digit hour using a 24 hour time 2 digit minutes and 2 digit seconds separated by colons offset the time zone formatted as an offset of coordinated universal time utc for example to use the pacific standard time pst specify 08 00 alternatively to use no offset specify z to delete the reservation after a specific duration make a post request to the beta reservations insert method in the request body include the deleteafterduration field for example to create a reservation by specifying an instance template auto delete the reservation after a specific duration and share the reservation with two consumer projects make a request as follows post https compute googleapis com compute beta projects project_id zones zone reservations deleteafterduration seconds delete_after_duration name reservation_name sharesettings sharetype specific_projects projectmap consumer_project_id_1 projectid consumer_project_id_1 consumer_project_id_2 projectid consumer_project_id_2 specificreservation count number_of_vms sourceinstancetemplate instance_template_url replace delete_after_duration with a duration in seconds for example specify 86400 for 86 400 seconds 1 day specify an existing vm you can only create a shared reservation based on an existing vm in the same project and zone as the vm after creating the reservation you can consume it by creating vms with properties that match the reference vm you can do this by doing one of the following create and use an instance template as follows create an instance template based on the reference vm without overriding the reference vm s properties note you can t create an instance template based on the reference vm outside of the vm s project for the projects that the reservation is shared with you must create similar instance templates in those projects create vms using the newly created template by doing one or both of the following create a single vm create a zonal managed instance group mig create a vm with properties that exactly match the reference vm as follows in the owner project create a vm based on the reference vm without changing the properties of the vm that you re creating in the consumer projects create a vm while manually ensuring that its properties...
|