You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<pclass="firstline">Advise how, where and when to create the requested amount of instances with specified accelerators, within the specified time and location limits. The method recommends creating future reservations for the requested resources.</p>
<pclass="firstline">Advice on making real-time decisions (such as choosing zone or machine types) during deployment to maximize your chances of obtaining capacity.</p>
<pre>Advice on making real-time decisions (such as choosing zone or machine types) during deployment to maximize your chances of obtaining capacity.
171
+
172
+
Args:
173
+
project: string, Project ID for this request. (required)
174
+
region: string, Name of the region for this request. (required)
175
+
size: integer, Size of requested capacity. (required)
176
+
body: object, The request body.
177
+
The object takes the form of:
178
+
179
+
{ # A request to provide Assistant Scores. These scores determine VM obtainability and preemption likelihood.
180
+
"distributionPolicy": { # Policy specifying the distribution of instances across zones within the requested region.
181
+
"targetShape": "A String", # The distribution shape to which the group converges.
182
+
"zones": [ # Zones where Capacity Advisor looks for capacity.
183
+
{
184
+
"zone": "A String", # The URL of the zone.
185
+
},
186
+
],
187
+
},
188
+
"instanceFlexibilityPolicy": { # Specification of alternative, flexible instance subsets. # Policy for instance selectors.
189
+
"instanceSelections": { # Named instance selections configure properties. The key is an arbitrary, unique RFC1035 string that identifies the instance selection.
190
+
"a_key": { # Machine specification.
191
+
"machineTypes": [ # Full machine-type names, e.g. "n1-standard-16".
192
+
"A String",
193
+
],
194
+
},
195
+
},
196
+
},
197
+
"instanceProperties": { # Instance provisining properties. # Instance properties for this request.
198
+
"scheduling": { # Defines the instance scheduling options. # Specifies the scheduling options.
199
+
"provisioningModel": "A String", # Specifies the provisioning model of the instance.
200
+
},
201
+
},
202
+
}
203
+
204
+
x__xgafv: string, V1 error format.
205
+
Allowed values
206
+
1 - v1 error format
207
+
2 - v2 error format
208
+
209
+
Returns:
210
+
An object of the form:
211
+
212
+
{ # A response contains multiple scoring recommendations.
213
+
"recommendations": [ # Initially the API will provide one recommendation which balances the individual scores according to Google's preference.
214
+
{
215
+
"scores": { # The Scores message groups information about a shard of capacity.
216
+
"obtainability": 3.14, # The obtainability score indicates the likelihood of successfully obtaining (provisioning) the requested number of VMs. The score range is 0.0 through 1.0. Higher is better.
217
+
"spotPreemption": 3.14, # The preemption score indicates the likelihood that your Spot VMs is preempted. For more information about the preemption process, see Preemption of Spot VMs. The score range is 0.0 through 1.0. Higher is better.
218
+
},
219
+
"shards": [
220
+
{ # Shards represent blocks of uniform capacity in recommendations. Each shard is for a single zone, single instance selection, and a single machine shape. Each shard defines a size expressed as the number of VMs.
221
+
"instanceCount": 42,
222
+
"machineType": "A String", # The machine type corresponds to the instance selection in the request.
223
+
"provisioningModel": "A String", # Provisioning model of the recommended capacity.
224
+
"zone": "A String", # The zone name for this shard.
0 commit comments