Debian Codegraph @

docs/dyn/compute_v1.advice.html

raw
1 <html><body>
2 <style>
3
4 body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13 }
14
15 body {
16 font-size: 13px;
17 padding: 1em;
18 }
19
20 h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23 }
24
25 h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28 }
29
30 h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34 }
35
36 pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39 }
40
41 pre {
42 margin-top: 0.5em;
43 }
44
45 h1, h2, h3, p {
46 font-family: Arial, sans serif;
47 }
48
49 h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51 }
52
53 .toc_element {
54 margin-top: 0.5em;
55 }
56
57 .firstline {
58 margin-left: 2 em;
59 }
60
61 .method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66 }
67
68 .details {
69 font-weight: bold;
70 font-size: 14px;
71 }
72
73 </style>
74
75 <h1><a href="compute_v1.html">Compute Engine API</a> . <a href="compute_v1.advice.html">advice</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="#calendarMode">calendarMode(project, region, body=None, x__xgafv=None)</a></code></p>
79 <p class="firstline">Advise how, where and when to create the requested amount of instances</p>
80 <p class="toc_element">
81 <code><a href="#close">close()</a></code></p>
82 <p class="firstline">Close httplib2 connections.</p>
83 <h3>Method Details</h3>
84 <div class="method">
85 <code class="details" id="calendarMode">calendarMode(project, region, body=None, x__xgafv=None)</code>
86 <pre>Advise how, where and when to create the requested amount of instances
87 with specified accelerators, within the specified time and location limits.
88 The method recommends creating future reservations for the requested
89 resources.
90
91 Args:
92 project: string, Project ID for this request. (required)
93 region: string, Name of the region for this request. (required)
94 body: object, The request body.
95 The object takes the form of:
96
97 { # A request to recommend the best way to consume the specified resources in the
98 # future.
99 &quot;futureResourcesSpecs&quot;: { # Specification of resources to create in the future.
100 # The key of the map is an arbitrary string specified by the caller.
101 # Value of the map is a specification of required resources and their
102 # constraints. Currently only one value is allowed in this map.
103 &quot;a_key&quot;: { # Specification of resources to be created at some time in the future within an
104 # optionally specified set of locations, and within the specified time range.
105 &quot;deploymentType&quot;: &quot;A String&quot;, # Indicates if the reservation allocation strategy is static (DENSE) or
106 # dynamic (STANDARD). Defaults to DENSE.
107 &quot;locationPolicy&quot;: { # Specification of locations to create resources in. # Optional location policy allowing to exclude some zone(s) in which
108 # the resources must not be created.
109 &quot;locations&quot;: { # Preferences for specified locations.
110 # Keys of the map are locations - zones, in format of &#x27;zones/&#x27;.
111 # Values are preferences for the zones.
112 # If a zone is not specified in this map, it is ALLOWed.
113 &quot;a_key&quot;: { # Preference for a single specified location.
114 &quot;preference&quot;: &quot;A String&quot;, # Preference for this location.
115 },
116 },
117 },
118 &quot;targetResources&quot;: { # Specification of reserved resources. # Specification of the reserved resources.
119 &quot;aggregateResources&quot;: {
120 &quot;acceleratorCount&quot;: &quot;A String&quot;, # Size of the request, in accelerator (chip) count.
121 &quot;vmFamily&quot;: &quot;A String&quot;, # The VM family that all instances scheduled against this reservation
122 # must belong to. Use for TPU reservations.
123 &quot;workloadType&quot;: &quot;A String&quot;, # Workload type. Use for TPU reservations.
124 },
125 &quot;specificSkuResources&quot;: {
126 &quot;instanceCount&quot;: &quot;A String&quot;, # Size of the request, in instance count.
127 &quot;localSsdPartitions&quot;: [ # Local SSD partitions. You do not have to include SSD partitions that
128 # are built in the machine type.
129 {
130 &quot;diskInterface&quot;: &quot;A String&quot;, # Disk interface. Defaults to SCSI.
131 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
132 },
133 ],
134 &quot;machineType&quot;: &quot;A String&quot;, # The machine type to use for instances that will use the reservation.
135 # This field only accepts machine type names. e.g. n2-standard-4
136 # and does not accept machine type full or partial url. e.g.
137 # projects/my-l7ilb-project/zones/us-central1-a/machineTypes/n2-standard-4.
138 # Use for GPU reservations.
139 },
140 },
141 &quot;timeRangeSpec&quot;: { # Specifies a flexible time range with flexible start time and duration. # Specification of a time range in which the resources may be created.
142 # The time range specifies start of resource use and planned end of resource
143 # use.
144 #
145 # It is possible to specify a contradictory time range that cannot be matched
146 # by any Interval. This causes a validation error.
147 &quot;maxDuration&quot;: &quot;A String&quot;,
148 &quot;minDuration&quot;: &quot;A String&quot;,
149 &quot;startTimeNotEarlierThan&quot;: &quot;A String&quot;,
150 &quot;startTimeNotLaterThan&quot;: &quot;A String&quot;,
151 },
152 },
153 },
154 }
155
156 x__xgafv: string, V1 error format.
157 Allowed values
158 1 - v1 error format
159 2 - v2 error format
160
161 Returns:
162 An object of the form:
163
164 { # A response containing the recommended way of creating the specified resources
165 # in the future. It contains (will contain) multiple recommendations that can
166 # be analyzed by the customer and the best one can be picked.
167 &quot;recommendations&quot;: [ # Recommendations where, how and when to create the requested resources
168 # in order to maximize their obtainability and minimize cost.
169 { # A single recommendation to create requested resources. Contains detailed
170 # recommendations for every future resources specification specified in
171 # CalendarModeAdviceRequest.
172 &quot;recommendationsPerSpec&quot;: { # Recommendations for every future resource specification passed in
173 # CalendarModeAdviceRequest. Keys of the map correspond to keys
174 # specified in the request.
175 &quot;a_key&quot;: { # Recommendation for single resources specification, to be created in the
176 # future.
177 &quot;endTime&quot;: &quot;A String&quot;,
178 &quot;location&quot;: &quot;A String&quot;, # The advised location for resource usage. When a zone, in format
179 # &#x27;zones/&#x27;.
180 # If not set, it means that no location is recommended - see
181 # other_locations for details.
182 &quot;otherLocations&quot;: { # List of locations in the request scope that were not
183 # recommended. Keys of the map are zones, in format &#x27;zones/&#x27;.
184 # The values are status information indicating the recommendation status.
185 &quot;a_key&quot;: { # Information about recommendation status for locations
186 # that were allowed but not used by the response.
187 &quot;details&quot;: &quot;A String&quot;, # Details (human readable) describing the situation.
188 # For example, if status is CONDITION_NOT_MET, then
189 # details contain information about the parameters of the time window
190 # that did not meet the required conditions.
191 &quot;status&quot;: &quot;A String&quot;, # Status of recommendation in this location.
192 },
193 },
194 &quot;recommendationId&quot;: &quot;A String&quot;, # Unique id of the recommendation, a UUID string generated by the API.
195 &quot;recommendationType&quot;: &quot;A String&quot;, # Type of recommendation. Currently only FUTURE_RESERVATION is supported.
196 &quot;startTime&quot;: &quot;A String&quot;,
197 },
198 },
199 },
200 ],
201 }</pre>
202 </div>
203
204 <div class="method">
205 <code class="details" id="close">close()</code>
206 <pre>Close httplib2 connections.</pre>
207 </div>
208
209 </body></html>