class documentation
class InstanceSpec(pb_classes.Message): (source)
Constructor: InstanceSpec(initial_message, service_account_id, resources, gpu_cluster, ...)
Undocumented
| Method | __dir__ |
Undocumented |
| Method | __init__ |
Create a wrapper around a protobuf message instance. |
| Method | boot |
Undocumented |
| Method | cloud |
Undocumented |
| Method | filesystems |
Undocumented |
| Method | gpu |
Undocumented |
| Method | network |
Undocumented |
| Method | recovery |
Undocumented |
| Method | resources |
Undocumented |
| Method | secondary |
Undocumented |
| Method | service |
Undocumented |
| Method | stopped |
Undocumented |
| Constant | __PB2 |
Undocumented |
| Constant | __PY |
Undocumented |
| Class Variable | __mask |
Undocumented |
| Property | boot |
Undocumented |
| Property | cloud |
Undocumented |
| Property | filesystems |
Undocumented |
| Property | gpu |
Undocumented |
| Property | network |
Undocumented |
| Property | recovery |
Recovery policy defines how the instance will be treated in case of a failure. Common source of failure is a host failure, but it can be any other failure. Instance undergoing a guest shutdown (poweroff, etc... |
| Property | resources |
Undocumented |
| Property | secondary |
Undocumented |
| Property | service |
Undocumented |
| Property | stopped |
Undocumented |
Inherited from Message:
| Class Method | get |
Return the protobuf descriptor for this message class. |
| Class Method | is |
Return True if the field contains credentials. |
| Class Method | is |
Return True if the field is marked as sensitive. |
| Method | __repr__ |
Return a human-readable representation of the message, sanitizing sensitive fields. |
| Method | check |
Check explicit presence for a field in the protobuf message. |
| Method | get |
Build a reset mask for a full update of this message. |
| Method | get |
Return the tracked reset mask. |
| Method | is |
Return True if a field equals its default value. |
| Method | set |
Replace the tracked reset mask. |
| Method | which |
Return the set field name for a given oneof. |
| Instance Variable | __PB2 |
Protobuf message class associated with this wrapper. |
| Instance Variable | __pb2 |
Underlying protobuf message instance. |
| Method | _clear |
Clear a field and record it in the reset mask. |
| Method | _get |
Return a field value with optional wrapping and presence handling. |
| Method | _set |
Set a field value and update the reset mask. |
| Class Variable | __credentials |
Undocumented |
| Class Variable | __default |
Undocumented |
| Class Variable | __sensitive |
Undocumented |
| Instance Variable | __recorded |
Mask tracking fields cleared or set to default. |
def __init__(self, initial_message:
message_1.Message | None = None, *, service_account_id: builtins.str | None | unset.UnsetType = unset.Unset, resources: ResourcesSpec | instance_pb2.ResourcesSpec | None | unset.UnsetType = unset.Unset, gpu_cluster: InstanceGpuClusterSpec | instance_pb2.InstanceGpuClusterSpec | None | unset.UnsetType = unset.Unset, network_interfaces: abc.Iterable[ v1alpha1_2.NetworkInterfaceSpec] | None | unset.UnsetType = unset.Unset, boot_disk: AttachedDiskSpec | instance_pb2.AttachedDiskSpec | None | unset.UnsetType = unset.Unset, secondary_disks: abc.Iterable[ AttachedDiskSpec] | None | unset.UnsetType = unset.Unset, filesystems: abc.Iterable[ AttachedFilesystemSpec] | None | unset.UnsetType = unset.Unset, cloud_init_user_data: builtins.str | None | unset.UnsetType = unset.Unset, stopped: builtins.bool | None | unset.UnsetType = unset.Unset, recovery_policy: InstanceRecoveryPolicy | instance_pb2.InstanceRecoveryPolicy | None | unset.UnsetType = unset.Unset):
(source)
¶
Create a wrapper around a protobuf message instance.
| Raises | |
AttributeError | If the wrapper is missing required class metadata. |
@boot_disk.setter
def boot_disk(self, value:
def boot_disk(self, value:
AttachedDiskSpec | instance_pb2.AttachedDiskSpec | None):
(source)
¶
Undocumented
@filesystems.setter
def filesystems(self, value:
def filesystems(self, value:
abc.Iterable[ AttachedFilesystemSpec] | None):
(source)
¶
Undocumented
@gpu_cluster.setter
def gpu_cluster(self, value:
def gpu_cluster(self, value:
InstanceGpuClusterSpec | instance_pb2.InstanceGpuClusterSpec | None):
(source)
¶
Undocumented
@network_interfaces.setter
def network_interfaces(self, value:
def network_interfaces(self, value:
abc.Iterable[ v1alpha1_2.NetworkInterfaceSpec] | None):
(source)
¶
Undocumented
@recovery_policy.setter
def recovery_policy(self, value:
def recovery_policy(self, value:
InstanceRecoveryPolicy | instance_pb2.InstanceRecoveryPolicy | None):
(source)
¶
Undocumented
@resources.setter
def resources(self, value:
def resources(self, value:
ResourcesSpec | instance_pb2.ResourcesSpec | None):
(source)
¶
Undocumented
@secondary_disks.setter
def secondary_disks(self, value:
def secondary_disks(self, value:
abc.Iterable[ AttachedDiskSpec] | None):
(source)
¶
Undocumented
Undocumented
| Value |
|
Undocumented
| Value |
|
@builtins.property
network_interfaces:
network_interfaces:
abc.MutableSequence[ v1alpha1_2.NetworkInterfaceSpec] =
(source)
¶
Undocumented
Recovery policy defines how the instance will be treated in case of a failure. Common source of failure is a host failure, but it can be any other failure. Instance undergoing a guest shutdown (poweroff, etc.) will be subject to recovery policy, meaning that it could be restarted and billed accordingly. Stop instance via API or UI to stop it to avoid recovering.
- If set to RECOVER, instance will be restarted, if possible. It could be restarted on the same host or on another host.
- If set to FAIL, instance will be stopped and not restarted.