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
Create a new Instance of the specified commercial type in the specified zone. Pay attention to the volumes parameter, which takes an object which can be used in different ways to achieve different behaviors.
535
536
Get more information in the [Technical Information](#technical-information) section of the introduction.
536
-
:param commercial_type: Define the Instance commercial type (i.e. GP1-S).
537
537
:param zone: Zone to target. If none is passed will use default zone from the config.
538
+
:param commercial_type: Define the Instance commercial type (i.e. GP1-S).
538
539
:param name: Instance name.
539
540
:param dynamic_ip_required: Define if a dynamic IPv4 is required for the Instance.
540
541
:param routed_ip_enabled: If true, configure the Instance so it uses the new routed IP mode.
541
542
:param image: Instance image ID or label.
542
543
:param volumes: Volumes attached to the server.
543
544
:param enable_ipv6: True if IPv6 is enabled on the server (deprecated and always `False` when `routed_ip_enabled` is `True`).
545
+
:param protected: True to activate server protection option.
544
546
:param public_ip: ID of the reserved IP to attach to the Instance.
545
547
:param public_ips: A list of reserved IP IDs to attach to the Instance.
546
548
:param boot_type: Boot type to use.
@@ -559,6 +561,7 @@ async def _create_server(
559
561
560
562
result = await api._create_server(
561
563
commercial_type="example",
564
+
protected=False,
562
565
)
563
566
"""
564
567
@@ -569,14 +572,15 @@ async def _create_server(
569
572
f"/instance/v1/zones/{param_zone}/servers",
570
573
body=marshal_CreateServerRequest(
571
574
CreateServerRequest(
572
-
commercial_type=commercial_type,
573
575
zone=zone,
576
+
commercial_type=commercial_type,
574
577
name=nameorrandom_name(prefix="srv"),
575
578
dynamic_ip_required=dynamic_ip_required,
576
579
routed_ip_enabled=routed_ip_enabled,
577
580
image=image,
578
581
volumes=volumes,
579
582
enable_ipv6=enable_ipv6,
583
+
protected=protected,
580
584
public_ip=public_ip,
581
585
public_ips=public_ips,
582
586
boot_type=boot_type,
@@ -819,7 +823,7 @@ async def _update_server(
819
823
:param routed_ip_enabled: True to configure the instance so it uses the new routed IP mode (once this is set to True you cannot set it back to False).
820
824
:param public_ips: A list of reserved IP IDs to attach to the Instance.
821
825
:param enable_ipv6:
822
-
:param protected:
826
+
:param protected: True to activate server protection option.
823
827
:param security_group:
824
828
:param placement_group: Placement group ID if Instance must be part of a placement group.
Create a new Instance of the specified commercial type in the specified zone. Pay attention to the volumes parameter, which takes an object which can be used in different ways to achieve different behaviors.
535
536
Get more information in the [Technical Information](#technical-information) section of the introduction.
536
-
:param commercial_type: Define the Instance commercial type (i.e. GP1-S).
537
537
:param zone: Zone to target. If none is passed will use default zone from the config.
538
+
:param commercial_type: Define the Instance commercial type (i.e. GP1-S).
538
539
:param name: Instance name.
539
540
:param dynamic_ip_required: Define if a dynamic IPv4 is required for the Instance.
540
541
:param routed_ip_enabled: If true, configure the Instance so it uses the new routed IP mode.
541
542
:param image: Instance image ID or label.
542
543
:param volumes: Volumes attached to the server.
543
544
:param enable_ipv6: True if IPv6 is enabled on the server (deprecated and always `False` when `routed_ip_enabled` is `True`).
545
+
:param protected: True to activate server protection option.
544
546
:param public_ip: ID of the reserved IP to attach to the Instance.
545
547
:param public_ips: A list of reserved IP IDs to attach to the Instance.
546
548
:param boot_type: Boot type to use.
@@ -559,6 +561,7 @@ def _create_server(
559
561
560
562
result = api._create_server(
561
563
commercial_type="example",
564
+
protected=False,
562
565
)
563
566
"""
564
567
@@ -569,14 +572,15 @@ def _create_server(
569
572
f"/instance/v1/zones/{param_zone}/servers",
570
573
body=marshal_CreateServerRequest(
571
574
CreateServerRequest(
572
-
commercial_type=commercial_type,
573
575
zone=zone,
576
+
commercial_type=commercial_type,
574
577
name=nameorrandom_name(prefix="srv"),
575
578
dynamic_ip_required=dynamic_ip_required,
576
579
routed_ip_enabled=routed_ip_enabled,
577
580
image=image,
578
581
volumes=volumes,
579
582
enable_ipv6=enable_ipv6,
583
+
protected=protected,
580
584
public_ip=public_ip,
581
585
public_ips=public_ips,
582
586
boot_type=boot_type,
@@ -819,7 +823,7 @@ def _update_server(
819
823
:param routed_ip_enabled: True to configure the instance so it uses the new routed IP mode (once this is set to True you cannot set it back to False).
820
824
:param public_ips: A list of reserved IP IDs to attach to the Instance.
821
825
:param enable_ipv6:
822
-
:param protected:
826
+
:param protected: True to activate server protection option.
823
827
:param security_group:
824
828
:param placement_group: Placement group ID if Instance must be part of a placement group.
0 commit comments