Struct RunInstancesRequest

Source
pub struct RunInstancesRequest {
Show 18 fields pub Placement: Option<Placement>, pub ImageId: Option<String>, pub InstanceChargeType: Option<InstanceChargeType>, pub InstanceChargePrepaid: Option<InstanceChargePrepaid>, pub InstanceType: Option<String>, pub SystemDisk: Option<SystemDisk>, pub DataDisks: Option<Vec<DataDisk>>, pub VirtualPrivateCloud: Option<VirtualPrivateCloud>, pub InternetAccessible: Option<InternetAccessible>, pub InstanceCount: Option<i32>, pub InstanceName: Option<String>, pub LoginSettings: Option<LoginSettings>, pub SecurityGroupIds: Option<Vec<String>>, pub EnhancedService: Option<EnhancedService>, pub ClientToken: Option<String>, pub HostName: Option<String>, pub TagSpecification: Option<Vec<TagSpecification>>, pub ProjectId: Option<i32>,
}
Expand description

创建实例的请求参数

Fields§

§Placement: Option<Placement>

实例所在的位置。通过该参数可以指定实例所属可用区,所属项目,所属宿主机(在专用宿主机上创建子机时指定)等属性。

§ImageId: Option<String>

指定有效的镜像ID,格式形如img-xxx。镜像类型分为四种: 公共镜像 自定义镜像 共享镜像 服务市场镜像

§InstanceChargeType: Option<InstanceChargeType>

实例计费类型。

§InstanceChargePrepaid: Option<InstanceChargePrepaid>

预付费模式,即包年包月相关参数设置。通过该参数可以指定包年包月实例的购买时长、是否设置自动续费等属性。 若指定实例的付费模式为预付费则该参数必传。

§InstanceType: Option<String>

实例机型。不同实例机型指定了不同的资源规格。

§SystemDisk: Option<SystemDisk>

实例系统盘配置信息。若不指定该参数,则按照系统默认值进行分配。

§DataDisks: Option<Vec<DataDisk>>

实例数据盘配置信息。若不指定该参数,则默认不购买数据盘。

§VirtualPrivateCloud: Option<VirtualPrivateCloud>

私有网络相关信息配置。通过该参数可以指定私有网络的ID,子网ID等信息。

§InternetAccessible: Option<InternetAccessible>

公网带宽相关信息设置。若不指定该参数,则默认公网带宽为0Mbps。

§InstanceCount: Option<i32>

购买实例数量。包年包月实例取值范围:[1,500],按量计费实例取值范围:[1,500]。默认取值:1。

§InstanceName: Option<String>

实例显示名称。不指定实例显示名称则默认显示’未命名’。

§LoginSettings: Option<LoginSettings>

实例登录设置。通过该参数可以设置实例的登录方式密码、密钥或保持镜像的原始登录设置。默认情况下会随机生成密码,并以站内信方式知会到用户。

§SecurityGroupIds: Option<Vec<String>>

实例所属安全组。该参数可以通过调用 DescribeSecurityGroups 的返回值中的sgId字段来获取。若不指定该参数,则绑定默认安全组。

§EnhancedService: Option<EnhancedService>

增强服务。通过该参数可以指定是否开启云安全、云监控等服务。若不指定该参数,则默认公共镜像开启云监控、云安全服务;自定义镜像与镜像市场镜像默认不开启云监控,云安全服务,而使用镜像里保留的服务。

§ClientToken: Option<String>

用于保证请求幂等性的字符串。该字符串由客户生成,需保证不同请求之间唯一,最大值不超过64个ASCII字符。若不指定该参数,则无法保证请求的幂等性。

§HostName: Option<String>

实例主机名。

§TagSpecification: Option<Vec<TagSpecification>>

标签描述列表。通过指定该参数可以同时绑定标签到相应的云服务器、云硬盘实例。

§ProjectId: Option<i32>

实例所属项目ID。该参数可以通过调用 DescribeProjects 的返回值中的 projectId 字段来获取。不填为默认项目。

Trait Implementations§

Source§

impl Clone for RunInstancesRequest

Source§

fn clone(&self) -> RunInstancesRequest

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RunInstancesRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Serialize for RunInstancesRequest

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T