@@ -3993,14 +3993,16 @@ def create_instance_by_spec(self, spec, image_id, root_disk_size_in_gb=0, root_d
39933993 is_open_ipv6 = None , tags = None , key_pair_id = None , auto_renew_time_unit = None ,
39943994 auto_renew_time = 0 , cds_auto_renew = None , asp_id = None , bid_model = None , bid_price = None ,
39953995 dedicate_host_id = None , deploy_id = None , deploy_id_list = None , enable_jumbo_frame = None ,
3996- cpu_thread_config = None , numa_config = None , eni_ids = None ,
3997- client_token = None , config = None ):
3996+ cpu_thread_config = None , numa_config = None , eni_ids = None , client_token = None , config = None ,
3997+ user_data = None , spec_id = None , deletion_protection = None , is_open_hosteye = None ,
3998+ hosteye_type = None , res_group_id = None , enable_ht = None , data_partition_type = None ,
3999+ root_partition_type = None , file_systems = None , disable_root_disk_serial = None ,
4000+ internal_ips = None , network_purchase_type = None ):
39984001 """
39994002 Create a bcc Instance with the specified options.
40004003 You must fill the field of clientToken,which is especially for keeping idempotent.
40014004 This is an asynchronous interface,
40024005 you can get the latest status by BccClient.get_instance.
4003-
40044006 :param spec:
40054007 The specification of the BBC package.
40064008 :type spec: string
@@ -4211,6 +4213,53 @@ def create_instance_by_spec(self, spec, image_id, root_disk_size_in_gb=0, root_d
42114213 The enis must in the same vpc and available zone with instance.
42124214 :type eni_ids: list<string>
42134215
4216+ :param user_data:
4217+ :type user_data: string
4218+
4219+ :param is_open_hosteye:
4220+ :type is_open_hosteye: boolean
4221+
4222+ :param hosteye_type:
4223+ :type hosteye_type: string
4224+
4225+ :param res_group_id:
4226+ The optional parameter to specify the resGroupId of the instance
4227+ :type res_group_id: string
4228+
4229+ :param enable_ht:
4230+ Whether to enable HT (used by EBC). Default: true
4231+ :type enable_ht: bool
4232+
4233+ :param data_partition_type:
4234+ Data disk file system format.Available values: xfs, ext4.
4235+ :type data_partition_type: bool
4236+
4237+ :param root_partition_type:
4238+ System disk file system format.Available values: xfs, ext4.
4239+ :type root_partition_type: bool
4240+
4241+ :param deletion_protection:
4242+ :type deletion_protection: int
4243+
4244+ :param spec_id:
4245+ Identify of the spec.
4246+
4247+ :param file_systems:
4248+ This parameter is obsolete.
4249+ :type file_systems:list<bcc_model.FileSystemModel>
4250+
4251+ :param disable_root_disk_serial:
4252+ Whether to hide the system disk SN during instance creation. Default: false
4253+ :type disable_root_disk_serial: bool
4254+
4255+ :param internal_ips:
4256+ The parameter to specify the internal ips.
4257+ :type internal_ips: list<string>
4258+
4259+ :param network_purchase_type:
4260+ EIP line type, including Standard BGP (BGP) and Enhanced BGP (BGP_S).The default value is Standard BGP.
4261+ :type network_purchase_type: string
4262+
42144263 :return:
42154264 :rtype baidubce.bce_response.BceResponse
42164265 """
@@ -4305,6 +4354,33 @@ def create_instance_by_spec(self, spec, image_id, root_disk_size_in_gb=0, root_d
43054354 if eni_ids is not None :
43064355 body ['eniIds' ] = eni_ids
43074356 body ['cdsAutoRenew' ] = cds_auto_renew
4357+ if user_data is not None :
4358+ body ['userData' ] = user_data
4359+ if spec_id is not None :
4360+ body ['specId' ] = spec_id
4361+ if is_open_hosteye is not None :
4362+ body ['isOpenHosteye' ] = is_open_hosteye
4363+ if deletion_protection is not None :
4364+ body ['deletionProtection' ] = deletion_protection
4365+ if hosteye_type is not None :
4366+ body ['hosteyeType' ] = hosteye_type
4367+ if res_group_id is not None :
4368+ body ['resGroupId' ] = res_group_id
4369+ if enable_ht is not None :
4370+ body ['enableHt' ] = enable_ht
4371+ if data_partition_type is not None :
4372+ body ['dataPartitionType' ] = data_partition_type
4373+ if root_partition_type is not None :
4374+ body ['rootPartitionType' ] = root_partition_type
4375+ if file_systems is not None :
4376+ file_system_list = [file_system .__dict__ for file_system in file_systems ]
4377+ body ['fileSystems' ] = file_system_list
4378+ if disable_root_disk_serial is not None :
4379+ body ['disableRootDiskSerial' ] = disable_root_disk_serial
4380+ if internal_ips is not None :
4381+ body ['internalIps' ] = internal_ips
4382+ if network_purchase_type is not None :
4383+ body ['networkPurchaseType' ] = network_purchase_type
43084384
43094385 return self ._send_request (http_methods .POST , path , json .dumps (body ),
43104386 params = params , config = config )
0 commit comments