Compute Cloud Instance Groups API, REST: InstanceGroup.RollingRestart
- HTTP request
- Path parameters
- Body parameters
- Response
- RollingRestartMetadata
- Status
- InstanceGroup
- InstanceTemplate
- ResourcesSpec
- AttachedDiskSpec
- DiskSpec
- NetworkInterfaceSpec
- PrimaryAddressSpec
- OneToOneNatSpec
- DnsRecordSpec
- SchedulingPolicy
- NetworkSettings
- PlacementPolicy
- HostAffinityRule
- AttachedFilesystemSpec
- MetadataOptions
- ScalePolicy
- FixedScale
- AutoScale
- CpuUtilizationRule
- CustomRule
- DeployPolicy
- AllocationPolicy
- Zone
- LoadBalancerState
- ManagedInstancesState
- LoadBalancerSpec
- TargetGroupSpec
- HealthChecksSpec
- HealthCheckSpec
- TcpOptions
- HttpOptions
- Variable
- ApplicationLoadBalancerSpec
- ApplicationTargetGroupSpec
- ApplicationLoadBalancerState
- AutoHealingPolicy
- DisableZoneStatus
Performs rolling restart of specified instances for the specified instance group.
Rolling restart does restart of instances respecting all group policies.
HTTP request
POST https://compute.api.cloud.yandex.net/compute/v1/instanceGroups/{instanceGroupId}:rollingRestart
Path parameters
|
Field |
Description |
|
instanceGroupId |
string Required field. ID of the instance group to restart instances in. The maximum string length in characters is 50. |
Body parameters
{
"managedInstanceIds": [
"string"
]
}
|
Field |
Description |
|
managedInstanceIds[] |
string IDs of managed instances in the group to restart |
Response
HTTP Code: 200 - OK
{
"id": "string",
"description": "string",
"createdAt": "string",
"createdBy": "string",
"modifiedAt": "string",
"done": "boolean",
"metadata": {
"instanceGroupId": "string"
},
// Includes only one of the fields `error`, `response`
"error": {
"code": "integer",
"message": "string",
"details": [
"object"
]
},
"response": {
"id": "string",
"folderId": "string",
"createdAt": "string",
"name": "string",
"description": "string",
"labels": "object",
"instanceTemplate": {
"description": "string",
"labels": "object",
"platformId": "string",
"resourcesSpec": {
"memory": "string",
"cores": "string",
"coreFraction": "string",
"gpus": "string"
},
"metadata": "object",
"bootDiskSpec": {
"mode": "string",
"deviceName": "string",
"diskSpec": {
"description": "string",
"typeId": "string",
"size": "string",
// Includes only one of the fields `imageId`, `snapshotId`
"imageId": "string",
"snapshotId": "string",
// end of the list of possible fields
"preserveAfterInstanceDelete": "boolean"
},
"diskId": "string",
"name": "string"
},
"secondaryDiskSpecs": [
{
"mode": "string",
"deviceName": "string",
"diskSpec": {
"description": "string",
"typeId": "string",
"size": "string",
// Includes only one of the fields `imageId`, `snapshotId`
"imageId": "string",
"snapshotId": "string",
// end of the list of possible fields
"preserveAfterInstanceDelete": "boolean"
},
"diskId": "string",
"name": "string"
}
],
"networkInterfaceSpecs": [
{
"networkId": "string",
"subnetIds": [
"string"
],
"primaryV4AddressSpec": {
"oneToOneNatSpec": {
"ipVersion": "string",
"address": "string",
"dnsRecordSpecs": [
{
"fqdn": "string",
"dnsZoneId": "string",
"ttl": "string",
"ptr": "boolean"
}
]
},
"dnsRecordSpecs": [
{
"fqdn": "string",
"dnsZoneId": "string",
"ttl": "string",
"ptr": "boolean"
}
],
"address": "string"
},
"primaryV6AddressSpec": {
"oneToOneNatSpec": {
"ipVersion": "string",
"address": "string",
"dnsRecordSpecs": [
{
"fqdn": "string",
"dnsZoneId": "string",
"ttl": "string",
"ptr": "boolean"
}
]
},
"dnsRecordSpecs": [
{
"fqdn": "string",
"dnsZoneId": "string",
"ttl": "string",
"ptr": "boolean"
}
],
"address": "string"
},
"securityGroupIds": [
"string"
]
}
],
"schedulingPolicy": {
"preemptible": "boolean"
},
"serviceAccountId": "string",
"networkSettings": {
"type": "string"
},
"name": "string",
"hostname": "string",
"placementPolicy": {
"placementGroupId": "string",
"hostAffinityRules": [
{
"key": "string",
"op": "string",
"values": [
"string"
]
}
]
},
"filesystemSpecs": [
{
"mode": "string",
"deviceName": "string",
"filesystemId": "string"
}
],
"metadataOptions": {
"gceHttpEndpoint": "string",
"awsV1HttpEndpoint": "string",
"gceHttpToken": "string",
"awsV1HttpToken": "string"
},
"reservedInstancePoolId": "string"
},
"scalePolicy": {
// Includes only one of the fields `fixedScale`, `autoScale`
"fixedScale": {
"size": "string"
},
"autoScale": {
"minZoneSize": "string",
"maxSize": "string",
"measurementDuration": "string",
"warmupDuration": "string",
"stabilizationDuration": "string",
"initialSize": "string",
"cpuUtilizationRule": {
"utilizationTarget": "string"
},
"customRules": [
{
"ruleType": "string",
"metricType": "string",
"metricName": "string",
"labels": "object",
"target": "string",
"folderId": "string",
"service": "string"
}
],
"autoScaleType": "string"
},
// end of the list of possible fields
"testAutoScale": {
"minZoneSize": "string",
"maxSize": "string",
"measurementDuration": "string",
"warmupDuration": "string",
"stabilizationDuration": "string",
"initialSize": "string",
"cpuUtilizationRule": {
"utilizationTarget": "string"
},
"customRules": [
{
"ruleType": "string",
"metricType": "string",
"metricName": "string",
"labels": "object",
"target": "string",
"folderId": "string",
"service": "string"
}
],
"autoScaleType": "string"
}
},
"deployPolicy": {
"maxUnavailable": "string",
"maxDeleting": "string",
"maxCreating": "string",
"maxExpansion": "string",
"startupDuration": "string",
"strategy": "string",
"minimalAction": "string"
},
"allocationPolicy": {
"zones": [
{
"zoneId": "string",
"instanceTagsPool": [
"string"
]
}
]
},
"loadBalancerState": {
"targetGroupId": "string",
"statusMessage": "string"
},
"managedInstancesState": {
"targetSize": "string",
"runningActualCount": "string",
"runningOutdatedCount": "string",
"processingCount": "string"
},
"loadBalancerSpec": {
"targetGroupSpec": {
"name": "string",
"description": "string",
"labels": "object"
},
"maxOpeningTrafficDuration": "string",
"ignoreHealthChecks": "boolean"
},
"healthChecksSpec": {
"healthCheckSpecs": [
{
"interval": "string",
"timeout": "string",
"unhealthyThreshold": "string",
"healthyThreshold": "string",
// Includes only one of the fields `tcpOptions`, `httpOptions`
"tcpOptions": {
"port": "string"
},
"httpOptions": {
"port": "string",
"path": "string"
}
// end of the list of possible fields
}
],
"maxCheckingHealthDuration": "string"
},
"serviceAccountId": "string",
"status": "string",
"variables": [
{
"key": "string",
"value": "string"
}
],
"deletionProtection": "boolean",
"applicationLoadBalancerSpec": {
"targetGroupSpec": {
"name": "string",
"description": "string",
"labels": "object"
},
"maxOpeningTrafficDuration": "string",
"ignoreHealthChecks": "boolean"
},
"applicationLoadBalancerState": {
"targetGroupId": "string",
"statusMessage": "string"
},
"autoHealingPolicy": {
"autoHealingAction": "string"
},
"disableZoneStatuses": [
{
"zoneId": "string",
"disabledUntil": "string"
}
]
}
// end of the list of possible fields
}
An Operation resource. For more information, see Operation.
|
Field |
Description |
|
id |
string ID of the operation. |
|
description |
string Description of the operation. 0-256 characters long. |
|
createdAt |
string (date-time) Creation timestamp. String in RFC3339 To work with values in this field, use the APIs described in the |
|
createdBy |
string ID of the user or service account who initiated the operation. |
|
modifiedAt |
string (date-time) The time when the Operation resource was last modified. String in RFC3339 To work with values in this field, use the APIs described in the |
|
done |
boolean If the value is |
|
metadata |
Service-specific metadata associated with the operation. |
|
error |
The error result of the operation in case of failure or cancellation. Includes only one of the fields The operation result. |
|
response |
The normal response of the operation in case of success. Includes only one of the fields The operation result. |
RollingRestartMetadata
|
Field |
Description |
|
instanceGroupId |
string ID of the InstanceGroup resource that is being rolling restarted. |
Status
The error result of the operation in case of failure or cancellation.
|
Field |
Description |
|
code |
integer (int32) Error code. An enum value of google.rpc.Code |
|
message |
string An error message. |
|
details[] |
object A list of messages that carry the error details. |
InstanceGroup
|
Field |
Description |
|
id |
string ID of the instance group. |
|
folderId |
string ID of the folder that the instance group belongs to. |
|
createdAt |
string (date-time) Creation timestamp in RFC3339 String in RFC3339 To work with values in this field, use the APIs described in the |
|
name |
string Name of the instance group. |
|
description |
string Description of the instance group. |
|
labels |
object (map<string, string>) Resource labels as |
|
instanceTemplate |
Instance template for creating the instance group. |
|
scalePolicy |
Scaling policy of the instance group. |
|
deployPolicy |
Deployment policy of the instance group. |
|
allocationPolicy |
Allocation policy of the instance group by zones and regions. |
|
loadBalancerState |
Status of the Network Load Balancer target group attributed to the instance group. |
|
managedInstancesState |
States of instances for this instance group. |
|
loadBalancerSpec |
Settings for balancing load between instances via Network Load Balancer |
|
healthChecksSpec |
Health checking specification. For more information, see Health check. |
|
serviceAccountId |
string ID of the service account. The service account will be used for all API calls |
|
status |
enum (Status) Status of the instance group.
|
|
variables[] |
|
|
deletionProtection |
boolean Flag prohibiting deletion of the instance group. Allowed values:- The default is |
|
applicationLoadBalancerSpec |
Settings for balancing load between instances via Application Load Balancer |
|
applicationLoadBalancerState |
Status of the Application Load Balancer target group attributed to the instance group. Returned if there is a working load balancer that the target group is connected to. |
|
autoHealingPolicy |
AutoHealingPolicy policy of the instance group. |
|
disableZoneStatuses[] |
List of disabled zones for the instance group. |
InstanceTemplate
|
Field |
Description |
|
description |
string Description of the instance template. The maximum string length in characters is 256. |
|
labels |
object (map<string, string>) Resource labels as No more than 64 per resource. The maximum string length in characters for each value is 128. The string length in characters for each key must be 1-63. Each key must match the regular expression |
|
platformId |
string Required field. ID of the hardware platform configuration for the instance. |
|
resourcesSpec |
Required field. Computing resources of the instance such as the amount of memory and number of cores. |
|
metadata |
object (map<string, string>) The metadata Metadata values may contain one of the supported placeholders: For example, you may use the metadata in order to provide your public SSH key to the instance. No more than 128 per resource. The maximum string length in characters for each value is 262144. The string length in characters for each key must be 1-63. Each key must match the regular expression |
|
bootDiskSpec |
Required field. Boot disk specification that will be attached to the instance. |
|
secondaryDiskSpecs[] |
Array of secondary disks that will be attached to the instance. The maximum number of elements is 3. |
|
networkInterfaceSpecs[] |
Required field. Array of network interfaces that will be attached to the instance. |
|
schedulingPolicy |
Scheduling policy for the instance. |
|
serviceAccountId |
string Service account ID for the instance. |
|
networkSettings |
Network settings for the instance. |
|
name |
string Name of the instance. The maximum string length in characters is 128. |
|
hostname |
string Host name for the instance. In order to be unique it must contain at least on of instance unique placeholders: The maximum string length in characters is 128. |
|
placementPolicy |
Placement Group |
|
filesystemSpecs[] |
Array of filesystems to attach to the instance. The filesystems must reside in the same availability zone as the instance. To use the instance with an attached filesystem, the latter must be mounted. |
|
metadataOptions |
Metadata options for the instance |
|
reservedInstancePoolId |
string ID of the reserved instance pool that the instance should belong to. |
ResourcesSpec
|
Field |
Description |
|
memory |
string (int64) The amount of memory available to the instance, specified in bytes. The maximum value is 824633720832. |
|
cores |
string (int64) The number of cores available to the instance. |
|
coreFraction |
string (int64) Baseline level of CPU performance with the ability to burst performance above that baseline level. |
|
gpus |
string (int64) The number of GPUs available to the instance. |
AttachedDiskSpec
|
Field |
Description |
|
mode |
enum (Mode) Required field. Access mode to the Disk resource.
|
|
deviceName |
string Serial number that is reflected in the /dev/disk/by-id/ tree This value can be used to reference the device for mounting, resizing, and so on, from within the instance. Value must match the regular expression |
|
diskSpec |
Required field. oneof disk_spec or disk_id |
|
diskId |
string Set to use an existing disk. To set use variables. The maximum string length in characters is 128. Value must match the regular expression |
|
name |
string When set can be later used to change DiskSpec of actual disk. The maximum string length in characters is 128. |
DiskSpec
|
Field |
Description |
|
description |
string Description of the disk. The maximum string length in characters is 256. |
|
typeId |
string Required field. ID of the disk type. |
|
size |
string (int64) Size of the disk, specified in bytes. Acceptable values are 4194304 to 28587302322176, inclusive. |
|
imageId |
string ID of the image that will be used for disk creation. The maximum string length in characters is 50. Includes only one of the fields |
|
snapshotId |
string ID of the snapshot that will be used for disk creation. The maximum string length in characters is 50. Includes only one of the fields |
|
preserveAfterInstanceDelete |
boolean When set to true, disk will not be deleted even after managed instance is deleted. |
NetworkInterfaceSpec
|
Field |
Description |
|
networkId |
string ID of the network. |
|
subnetIds[] |
string IDs of the subnets. |
|
primaryV4AddressSpec |
Primary IPv4 address that is assigned to the instance for this network interface. |
|
primaryV6AddressSpec |
Primary IPv6 address that is assigned to the instance for this network interface. IPv6 not available yet. |
|
securityGroupIds[] |
string IDs of security groups. |
PrimaryAddressSpec
|
Field |
Description |
|
oneToOneNatSpec |
An external IP address configuration. |
|
dnsRecordSpecs[] |
Internal DNS configuration |
|
address |
string Optional. Manual set static internal IP. To set use variables. |
OneToOneNatSpec
|
Field |
Description |
|
ipVersion |
enum (IpVersion) IP version for the public IP address.
|
|
address |
string Manual set static public IP. To set use variables. (optional) |
|
dnsRecordSpecs[] |
External DNS configuration |
DnsRecordSpec
|
Field |
Description |
|
fqdn |
string Required field. FQDN (required) |
|
dnsZoneId |
string DNS zone id (optional, if not set, private zone used) |
|
ttl |
string (int64) DNS record ttl, values in 0-86400 (optional) Acceptable values are 0 to 86400, inclusive. |
|
ptr |
boolean When set to true, also create PTR DNS record (optional) |
SchedulingPolicy
|
Field |
Description |
|
preemptible |
boolean Preemptible instances are stopped at least once every 24 hours, and can be stopped at any time |
NetworkSettings
|
Field |
Description |
|
type |
enum (Type) Type of instance network.
|
PlacementPolicy
|
Field |
Description |
|
placementGroupId |
string Identifier of placement group |
|
hostAffinityRules[] |
List of affinity rules. Scheduler will attempt to allocate instances according to order of rules. |
HostAffinityRule
Affinity definition
|
Field |
Description |
|
key |
string Affinity label or one of reserved values - 'yc.hostId', 'yc.hostGroupId' |
|
op |
enum (Operator) Include or exclude action
|
|
values[] |
string Affinity value or host ID or host group ID |
AttachedFilesystemSpec
|
Field |
Description |
|
mode |
enum (Mode) Mode of access to the filesystem that should be attached.
|
|
deviceName |
string Name of the device representing the filesystem on the instance. The name should be used for referencing the filesystem from within the instance If not specified, a random value will be generated. Value must match the regular expression |
|
filesystemId |
string ID of the filesystem that should be attached. The maximum string length in characters is 128. Value must match the regular expression |
MetadataOptions
|
Field |
Description |
|
gceHttpEndpoint |
enum (MetadataOption) Enabled access to GCE flavored metadata
|
|
awsV1HttpEndpoint |
enum (MetadataOption) Enabled access to AWS flavored metadata (IMDSv1)
|
|
gceHttpToken |
enum (MetadataOption) Enabled access to IAM credentials with GCE flavored metadata
|
|
awsV1HttpToken |
enum (MetadataOption) Enabled access to IAM credentials with AWS flavored metadata (IMDSv1)
|
ScalePolicy
|
Field |
Description |
|
fixedScale |
Manual scaling policy of the instance group. Includes only one of the fields |
|
autoScale |
Automatic scaling policy of the instance group. Includes only one of the fields |
|
testAutoScale |
Test spec for automatic scaling policy of the instance group. |
FixedScale
|
Field |
Description |
|
size |
string (int64) Number of instances in the instance group. Acceptable values are 1 to 100, inclusive. |
AutoScale
|
Field |
Description |
|
minZoneSize |
string (int64) Lower limit for instance count in each zone. Acceptable values are 0 to 100, inclusive. |
|
maxSize |
string (int64) Upper limit for total instance count (across all zones). Acceptable values are 0 to 100, inclusive. |
|
measurementDuration |
string (duration) Time in seconds allotted for averaging metrics. |
|
warmupDuration |
string (duration) The warmup time of the instance in seconds. During this time, |
|
stabilizationDuration |
string (duration) Minimum amount of time in seconds allotted for monitoring before |
|
initialSize |
string (int64) Target group size. The minimum value is 1. |
|
cpuUtilizationRule |
Defines an autoscaling rule based on the average CPU utilization of the instance group. If more than one rule is specified, e.g. CPU utilization and one or more Monitoring metrics ( |
|
customRules[] |
Defines an autoscaling rule based on a custom metric from Monitoring. If more than one rule is specified, e.g. CPU utilization ( The maximum number of elements is 3. |
|
autoScaleType |
enum (AutoScaleType) Autoscaling type.
|
CpuUtilizationRule
|
Field |
Description |
|
utilizationTarget |
string Target CPU utilization level. Instance Groups maintains this level for each availability zone. Acceptable values are 10 to 100, inclusive. |
CustomRule
|
Field |
Description |
|
ruleType |
enum (RuleType) Required field. Custom metric rule type. This field affects which label from
|
|
metricType |
enum (MetricType) Required field. Type of custom metric. This field affects how Instance Groups calculates the average metric value.
|
|
metricName |
string Required field. Name of custom metric in Monitoring that should be used for scaling. Value must match the regular expression |
|
labels |
object (map<string, string>) Labels of custom metric in Monitoring that should be used for scaling. Each value must match the regular expression |
|
target |
string Target value for the custom metric. Instance Groups maintains this level for each availability zone. Value must be greater than 0. |
|
folderId |
string Folder id of custom metric in Monitoring that should be used for scaling. The maximum string length in characters is 50. |
|
service |
string Service of custom metric in Monitoring that should be used for scaling. The maximum string length in characters is 200. |
DeployPolicy
|
Field |
Description |
|
maxUnavailable |
string (int64) The maximum number of running instances that can be taken offline (i.e., stopped or deleted) at the same time Acceptable values are 0 to 100, inclusive. |
|
maxDeleting |
string (int64) The maximum number of instances that can be deleted at the same time. The value 0 is any number of virtual machines within the allowed values. Acceptable values are 0 to 100, inclusive. |
|
maxCreating |
string (int64) The maximum number of instances that can be created at the same time. The value 0 is any number of virtual machines within the allowed values. Acceptable values are 0 to 100, inclusive. |
|
maxExpansion |
string (int64) The maximum number of instances that can be temporarily allocated above the group's target size Acceptable values are 0 to 100, inclusive. |
|
startupDuration |
string (duration) Instance startup duration. |
|
strategy |
enum (Strategy) Affects the lifecycle of the instance during deployment.
|
|
minimalAction |
enum (MinimalAction) If instance update requires a less disruptive action than
|
AllocationPolicy
|
Field |
Description |
|
zones[] |
List of availability zones. The minimum number of elements is 1. |
Zone
|
Field |
Description |
|
zoneId |
string Required field. ID of the availability zone where the instance resides. |
|
instanceTagsPool[] |
string Each instance in a zone will be associated with exactly one of a tag from a pool below. The string length in characters for each value must be 3-50. |
LoadBalancerState
|
Field |
Description |
|
targetGroupId |
string ID of the Network Load Balancer target group attributed to the instance group. |
|
statusMessage |
string Status message of the target group. |
ManagedInstancesState
|
Field |
Description |
|
targetSize |
string (int64) Target number of instances for this instance group. |
|
runningActualCount |
string (int64) The number of running instances that match the current instance template. For more information, see ManagedInstance.Status.RUNNING_ACTUAL. |
|
runningOutdatedCount |
string (int64) The number of running instances that does not match the current instance template. For more information, see ManagedInstance.Status.RUNNING_OUTDATED. |
|
processingCount |
string (int64) The number of instances in flight (for example, updating, starting, deleting). For more information, see ManagedInstance.Status. |
LoadBalancerSpec
|
Field |
Description |
|
targetGroupSpec |
Specification of the target group that the instance group will be added to. For more information, see Target groups and resources. |
|
maxOpeningTrafficDuration |
string (duration) Timeout for waiting for the VM to be checked by the load balancer. If the timeout is exceeded, |
|
ignoreHealthChecks |
boolean Do not wait load balancer health checks. |
TargetGroupSpec
|
Field |
Description |
|
name |
string Name of the target group. Value must match the regular expression |
|
description |
string Description of the target group. The maximum string length in characters is 256. |
|
labels |
object (map<string, string>) Resource labels as No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression |
HealthChecksSpec
|
Field |
Description |
|
healthCheckSpecs[] |
Health checking specification. For more information, see Health check. The minimum number of elements is 1. |
|
maxCheckingHealthDuration |
string (duration) Timeout for waiting for the VM to become healthy. If the timeout is exceeded, |
HealthCheckSpec
|
Field |
Description |
|
interval |
string (duration) The interval between health checks. The default is 2 seconds. |
|
timeout |
string (duration) Timeout for the managed instance to return a response for the health check. The default is 1 second. |
|
unhealthyThreshold |
string (int64) The number of failed health checks for the managed instance to be considered unhealthy. The default (0) is 2. |
|
healthyThreshold |
string (int64) The number of successful health checks required in order for the managed instance to be considered healthy. The default (0) is 2. |
|
tcpOptions |
Configuration options for a TCP health check. Includes only one of the fields |
|
httpOptions |
Configuration options for an HTTP health check. Includes only one of the fields |
TcpOptions
|
Field |
Description |
|
port |
string (int64) Port to use for TCP health checks. Acceptable values are 1 to 65535, inclusive. |
HttpOptions
|
Field |
Description |
|
port |
string (int64) Port to use for HTTP health checks. Acceptable values are 1 to 65535, inclusive. |
|
path |
string URL path to set for health checking requests. |
Variable
|
Field |
Description |
|
key |
string The string length in characters must be 1-128. Value must match the regular expression |
|
value |
string The maximum string length in characters is 128. |
ApplicationLoadBalancerSpec
|
Field |
Description |
|
targetGroupSpec |
Required field. Basic properties of the Application Load Balancer target group attributed to the instance group. |
|
maxOpeningTrafficDuration |
string (duration) Timeout for waiting for the VM to be checked by the load balancer. If the timeout is exceeded, |
|
ignoreHealthChecks |
boolean Do not wait load balancer health checks. |
ApplicationTargetGroupSpec
|
Field |
Description |
|
name |
string Name of the target group. |
|
description |
string Description of the target group. |
|
labels |
object (map<string, string>) Resource labels as |
ApplicationLoadBalancerState
|
Field |
Description |
|
targetGroupId |
string ID of the Application Load Balancer target group attributed to the instance group. |
|
statusMessage |
string Status message of the target group. |
AutoHealingPolicy
|
Field |
Description |
|
autoHealingAction |
enum (AutoHealingAction) Instance Groups performs
|
DisableZoneStatus
Status of the disabled zone.
|
Field |
Description |
|
zoneId |
string ID of zone. |
|
disabledUntil |
string (date-time) Timestamp until which the zone will be disabled. String in RFC3339 To work with values in this field, use the APIs described in the |