SchedulingResponse constructor

const SchedulingResponse({
  1. required Input<bool> automaticRestart,
  2. required Input<int> availabilityDomain,
  3. required Input<int> currentCpus,
  4. required Input<String> currentMemoryMb,
  5. required Input<SchedulingGracefulShutdownResponse> gracefulShutdown,
  6. required Input<int> hostErrorTimeoutSeconds,
  7. required Input<String> instanceTerminationAction,
  8. required Input<bool> latencyTolerant,
  9. required Input<DurationResponse> localSsdRecoveryTimeout,
  10. required Input<String> locationHint,
  11. required Input<int> maintenanceFreezeDurationHours,
  12. required Input<String> maintenanceInterval,
  13. required Input<DurationResponse> maxRunDuration,
  14. required Input<int> minNodeCpus,
  15. required Input<List<SchedulingNodeAffinityResponse>> nodeAffinities,
  16. required Input<String> onHostMaintenance,
  17. required Input<bool> preemptible,
  18. required Input<String> provisioningModel,
  19. required Input<String> terminationTime,
})

Creates a new SchedulingResponse. automaticRestart Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted. By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine. availabilityDomain Specifies the availability domain (AD), which this instance should be scheduled on. The AD belongs to the spread GroupPlacementPolicy resource policy that has been assigned to the instance. Specify a value between 1-max count of availability domains in your GroupPlacementPolicy. See go/placement-policy-extension for more details. currentCpus Current number of vCPUs available for VM. 0 or unset means default vCPUs of the current machine type. currentMemoryMb Current amount of memory (in MB) available for VM. 0 or unset means default amount of memory of the current machine type. gracefulShutdown Required. hostErrorTimeoutSeconds Specify the time in seconds for host error detection, the value must be within the range of 90, 330 with the increment of 30, if unset, the default behavior of host error recovery will be used. instanceTerminationAction Specifies the termination action for the instance. latencyTolerant Defines whether the instance is tolerant of higher cpu latency. This can only be set during instance creation, or when the instance is not currently running. It must not be set if the preemptible option is also set. localSsdRecoveryTimeout Specifies the maximum amount of time a Local Ssd Vm should wait while recovery of the Local Ssd state is attempted. Its value should be in between 0 and 168 hours with hour granularity and the default value being 1 hour. locationHint An opaque location hint used to place the instance close to other resources. This field is for use by internal tools that use the public API. maintenanceFreezeDurationHours Specifies the number of hours after VM instance creation where the VM won't be scheduled for maintenance. maintenanceInterval Specifies the frequency of planned maintenance events. The accepted values are: PERIODIC. maxRunDuration Specifies the max run duration for the given instance. If specified, the instance termination action will be performed at the end of the run duration. minNodeCpus The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node. nodeAffinities A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity. onHostMaintenance Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Set VM host maintenance policy. preemptible Defines whether the instance is preemptible. This can only be set during instance creation or while the instance is stopped and therefore, in a TERMINATED state. See Instance Life Cycle for more information on the possible instance states. provisioningModel Specifies the provisioning model of the instance. terminationTime Specifies the timestamp, when the instance will be terminated, in RFC3339 text format. If specified, the instance termination action will be performed at the termination time.

Implementation

const SchedulingResponse({
  required this.automaticRestart,
  required this.availabilityDomain,
  required this.currentCpus,
  required this.currentMemoryMb,
  required this.gracefulShutdown,
  required this.hostErrorTimeoutSeconds,
  required this.instanceTerminationAction,
  required this.latencyTolerant,
  required this.localSsdRecoveryTimeout,
  required this.locationHint,
  required this.maintenanceFreezeDurationHours,
  required this.maintenanceInterval,
  required this.maxRunDuration,
  required this.minNodeCpus,
  required this.nodeAffinities,
  required this.onHostMaintenance,
  required this.preemptible,
  required this.provisioningModel,
  required this.terminationTime,
});