Struct aws_sdk_emr::model::ec2_instance_attributes::Builder
source · pub struct Builder { /* private fields */ }Expand description
A builder for Ec2InstanceAttributes.
Implementations§
source§impl Builder
impl Builder
sourcepub fn ec2_key_name(self, input: impl Into<String>) -> Self
pub fn ec2_key_name(self, input: impl Into<String>) -> Self
The name of the Amazon EC2 key pair to use when connecting with SSH into the master node as a user named "hadoop".
sourcepub fn set_ec2_key_name(self, input: Option<String>) -> Self
pub fn set_ec2_key_name(self, input: Option<String>) -> Self
The name of the Amazon EC2 key pair to use when connecting with SSH into the master node as a user named "hadoop".
Examples found in repository?
3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125
pub(crate) fn deser_structure_crate_model_ec2_instance_attributes<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::Ec2InstanceAttributes>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::ec2_instance_attributes::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"Ec2KeyName" => {
builder = builder.set_ec2_key_name(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"Ec2SubnetId" => {
builder = builder.set_ec2_subnet_id(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"RequestedEc2SubnetIds" => {
builder = builder.set_requested_ec2_subnet_ids(
crate::json_deser::deser_list_com_amazonaws_emr_xml_string_max_len256_list(tokens)?
);
}
"Ec2AvailabilityZone" => {
builder = builder.set_ec2_availability_zone(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"RequestedEc2AvailabilityZones" => {
builder = builder.set_requested_ec2_availability_zones(
crate::json_deser::deser_list_com_amazonaws_emr_xml_string_max_len256_list(tokens)?
);
}
"IamInstanceProfile" => {
builder = builder.set_iam_instance_profile(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"EmrManagedMasterSecurityGroup" => {
builder = builder.set_emr_managed_master_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"EmrManagedSlaveSecurityGroup" => {
builder = builder.set_emr_managed_slave_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"ServiceAccessSecurityGroup" => {
builder = builder.set_service_access_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"AdditionalMasterSecurityGroups" => {
builder = builder.set_additional_master_security_groups(
crate::json_deser::deser_list_com_amazonaws_emr_string_list(
tokens,
)?,
);
}
"AdditionalSlaveSecurityGroups" => {
builder = builder.set_additional_slave_security_groups(
crate::json_deser::deser_list_com_amazonaws_emr_string_list(
tokens,
)?,
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}sourcepub fn ec2_subnet_id(self, input: impl Into<String>) -> Self
pub fn ec2_subnet_id(self, input: impl Into<String>) -> Self
Set this parameter to the identifier of the Amazon VPC subnet where you want the cluster to launch. If you do not specify this value, and your account supports EC2-Classic, the cluster launches in EC2-Classic.
sourcepub fn set_ec2_subnet_id(self, input: Option<String>) -> Self
pub fn set_ec2_subnet_id(self, input: Option<String>) -> Self
Set this parameter to the identifier of the Amazon VPC subnet where you want the cluster to launch. If you do not specify this value, and your account supports EC2-Classic, the cluster launches in EC2-Classic.
Examples found in repository?
3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125
pub(crate) fn deser_structure_crate_model_ec2_instance_attributes<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::Ec2InstanceAttributes>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::ec2_instance_attributes::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"Ec2KeyName" => {
builder = builder.set_ec2_key_name(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"Ec2SubnetId" => {
builder = builder.set_ec2_subnet_id(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"RequestedEc2SubnetIds" => {
builder = builder.set_requested_ec2_subnet_ids(
crate::json_deser::deser_list_com_amazonaws_emr_xml_string_max_len256_list(tokens)?
);
}
"Ec2AvailabilityZone" => {
builder = builder.set_ec2_availability_zone(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"RequestedEc2AvailabilityZones" => {
builder = builder.set_requested_ec2_availability_zones(
crate::json_deser::deser_list_com_amazonaws_emr_xml_string_max_len256_list(tokens)?
);
}
"IamInstanceProfile" => {
builder = builder.set_iam_instance_profile(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"EmrManagedMasterSecurityGroup" => {
builder = builder.set_emr_managed_master_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"EmrManagedSlaveSecurityGroup" => {
builder = builder.set_emr_managed_slave_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"ServiceAccessSecurityGroup" => {
builder = builder.set_service_access_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"AdditionalMasterSecurityGroups" => {
builder = builder.set_additional_master_security_groups(
crate::json_deser::deser_list_com_amazonaws_emr_string_list(
tokens,
)?,
);
}
"AdditionalSlaveSecurityGroups" => {
builder = builder.set_additional_slave_security_groups(
crate::json_deser::deser_list_com_amazonaws_emr_string_list(
tokens,
)?,
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}sourcepub fn requested_ec2_subnet_ids(self, input: impl Into<String>) -> Self
pub fn requested_ec2_subnet_ids(self, input: impl Into<String>) -> Self
Appends an item to requested_ec2_subnet_ids.
To override the contents of this collection use set_requested_ec2_subnet_ids.
Applies to clusters configured with the instance fleets option. Specifies the unique identifier of one or more Amazon EC2 subnets in which to launch EC2 cluster instances. Subnets must exist within the same VPC. Amazon EMR chooses the EC2 subnet with the best fit from among the list of RequestedEc2SubnetIds, and then launches all cluster instances within that Subnet. If this value is not specified, and the account and Region support EC2-Classic networks, the cluster launches instances in the EC2-Classic network and uses RequestedEc2AvailabilityZones instead of this setting. If EC2-Classic is not supported, and no Subnet is specified, Amazon EMR chooses the subnet for you. RequestedEc2SubnetIDs and RequestedEc2AvailabilityZones cannot be specified together.
sourcepub fn set_requested_ec2_subnet_ids(self, input: Option<Vec<String>>) -> Self
pub fn set_requested_ec2_subnet_ids(self, input: Option<Vec<String>>) -> Self
Applies to clusters configured with the instance fleets option. Specifies the unique identifier of one or more Amazon EC2 subnets in which to launch EC2 cluster instances. Subnets must exist within the same VPC. Amazon EMR chooses the EC2 subnet with the best fit from among the list of RequestedEc2SubnetIds, and then launches all cluster instances within that Subnet. If this value is not specified, and the account and Region support EC2-Classic networks, the cluster launches instances in the EC2-Classic network and uses RequestedEc2AvailabilityZones instead of this setting. If EC2-Classic is not supported, and no Subnet is specified, Amazon EMR chooses the subnet for you. RequestedEc2SubnetIDs and RequestedEc2AvailabilityZones cannot be specified together.
Examples found in repository?
3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125
pub(crate) fn deser_structure_crate_model_ec2_instance_attributes<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::Ec2InstanceAttributes>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::ec2_instance_attributes::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"Ec2KeyName" => {
builder = builder.set_ec2_key_name(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"Ec2SubnetId" => {
builder = builder.set_ec2_subnet_id(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"RequestedEc2SubnetIds" => {
builder = builder.set_requested_ec2_subnet_ids(
crate::json_deser::deser_list_com_amazonaws_emr_xml_string_max_len256_list(tokens)?
);
}
"Ec2AvailabilityZone" => {
builder = builder.set_ec2_availability_zone(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"RequestedEc2AvailabilityZones" => {
builder = builder.set_requested_ec2_availability_zones(
crate::json_deser::deser_list_com_amazonaws_emr_xml_string_max_len256_list(tokens)?
);
}
"IamInstanceProfile" => {
builder = builder.set_iam_instance_profile(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"EmrManagedMasterSecurityGroup" => {
builder = builder.set_emr_managed_master_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"EmrManagedSlaveSecurityGroup" => {
builder = builder.set_emr_managed_slave_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"ServiceAccessSecurityGroup" => {
builder = builder.set_service_access_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"AdditionalMasterSecurityGroups" => {
builder = builder.set_additional_master_security_groups(
crate::json_deser::deser_list_com_amazonaws_emr_string_list(
tokens,
)?,
);
}
"AdditionalSlaveSecurityGroups" => {
builder = builder.set_additional_slave_security_groups(
crate::json_deser::deser_list_com_amazonaws_emr_string_list(
tokens,
)?,
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}sourcepub fn ec2_availability_zone(self, input: impl Into<String>) -> Self
pub fn ec2_availability_zone(self, input: impl Into<String>) -> Self
The Availability Zone in which the cluster will run.
sourcepub fn set_ec2_availability_zone(self, input: Option<String>) -> Self
pub fn set_ec2_availability_zone(self, input: Option<String>) -> Self
The Availability Zone in which the cluster will run.
Examples found in repository?
3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125
pub(crate) fn deser_structure_crate_model_ec2_instance_attributes<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::Ec2InstanceAttributes>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::ec2_instance_attributes::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"Ec2KeyName" => {
builder = builder.set_ec2_key_name(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"Ec2SubnetId" => {
builder = builder.set_ec2_subnet_id(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"RequestedEc2SubnetIds" => {
builder = builder.set_requested_ec2_subnet_ids(
crate::json_deser::deser_list_com_amazonaws_emr_xml_string_max_len256_list(tokens)?
);
}
"Ec2AvailabilityZone" => {
builder = builder.set_ec2_availability_zone(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"RequestedEc2AvailabilityZones" => {
builder = builder.set_requested_ec2_availability_zones(
crate::json_deser::deser_list_com_amazonaws_emr_xml_string_max_len256_list(tokens)?
);
}
"IamInstanceProfile" => {
builder = builder.set_iam_instance_profile(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"EmrManagedMasterSecurityGroup" => {
builder = builder.set_emr_managed_master_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"EmrManagedSlaveSecurityGroup" => {
builder = builder.set_emr_managed_slave_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"ServiceAccessSecurityGroup" => {
builder = builder.set_service_access_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"AdditionalMasterSecurityGroups" => {
builder = builder.set_additional_master_security_groups(
crate::json_deser::deser_list_com_amazonaws_emr_string_list(
tokens,
)?,
);
}
"AdditionalSlaveSecurityGroups" => {
builder = builder.set_additional_slave_security_groups(
crate::json_deser::deser_list_com_amazonaws_emr_string_list(
tokens,
)?,
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}sourcepub fn requested_ec2_availability_zones(self, input: impl Into<String>) -> Self
pub fn requested_ec2_availability_zones(self, input: impl Into<String>) -> Self
Appends an item to requested_ec2_availability_zones.
To override the contents of this collection use set_requested_ec2_availability_zones.
Applies to clusters configured with the instance fleets option. Specifies one or more Availability Zones in which to launch EC2 cluster instances when the EC2-Classic network configuration is supported. Amazon EMR chooses the Availability Zone with the best fit from among the list of RequestedEc2AvailabilityZones, and then launches all cluster instances within that Availability Zone. If you do not specify this value, Amazon EMR chooses the Availability Zone for you. RequestedEc2SubnetIDs and RequestedEc2AvailabilityZones cannot be specified together.
sourcepub fn set_requested_ec2_availability_zones(
self,
input: Option<Vec<String>>
) -> Self
pub fn set_requested_ec2_availability_zones(
self,
input: Option<Vec<String>>
) -> Self
Applies to clusters configured with the instance fleets option. Specifies one or more Availability Zones in which to launch EC2 cluster instances when the EC2-Classic network configuration is supported. Amazon EMR chooses the Availability Zone with the best fit from among the list of RequestedEc2AvailabilityZones, and then launches all cluster instances within that Availability Zone. If you do not specify this value, Amazon EMR chooses the Availability Zone for you. RequestedEc2SubnetIDs and RequestedEc2AvailabilityZones cannot be specified together.
Examples found in repository?
3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125
pub(crate) fn deser_structure_crate_model_ec2_instance_attributes<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::Ec2InstanceAttributes>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::ec2_instance_attributes::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"Ec2KeyName" => {
builder = builder.set_ec2_key_name(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"Ec2SubnetId" => {
builder = builder.set_ec2_subnet_id(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"RequestedEc2SubnetIds" => {
builder = builder.set_requested_ec2_subnet_ids(
crate::json_deser::deser_list_com_amazonaws_emr_xml_string_max_len256_list(tokens)?
);
}
"Ec2AvailabilityZone" => {
builder = builder.set_ec2_availability_zone(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"RequestedEc2AvailabilityZones" => {
builder = builder.set_requested_ec2_availability_zones(
crate::json_deser::deser_list_com_amazonaws_emr_xml_string_max_len256_list(tokens)?
);
}
"IamInstanceProfile" => {
builder = builder.set_iam_instance_profile(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"EmrManagedMasterSecurityGroup" => {
builder = builder.set_emr_managed_master_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"EmrManagedSlaveSecurityGroup" => {
builder = builder.set_emr_managed_slave_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"ServiceAccessSecurityGroup" => {
builder = builder.set_service_access_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"AdditionalMasterSecurityGroups" => {
builder = builder.set_additional_master_security_groups(
crate::json_deser::deser_list_com_amazonaws_emr_string_list(
tokens,
)?,
);
}
"AdditionalSlaveSecurityGroups" => {
builder = builder.set_additional_slave_security_groups(
crate::json_deser::deser_list_com_amazonaws_emr_string_list(
tokens,
)?,
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}sourcepub fn iam_instance_profile(self, input: impl Into<String>) -> Self
pub fn iam_instance_profile(self, input: impl Into<String>) -> Self
The IAM role that was specified when the cluster was launched. The EC2 instances of the cluster assume this role.
sourcepub fn set_iam_instance_profile(self, input: Option<String>) -> Self
pub fn set_iam_instance_profile(self, input: Option<String>) -> Self
The IAM role that was specified when the cluster was launched. The EC2 instances of the cluster assume this role.
Examples found in repository?
3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125
pub(crate) fn deser_structure_crate_model_ec2_instance_attributes<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::Ec2InstanceAttributes>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::ec2_instance_attributes::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"Ec2KeyName" => {
builder = builder.set_ec2_key_name(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"Ec2SubnetId" => {
builder = builder.set_ec2_subnet_id(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"RequestedEc2SubnetIds" => {
builder = builder.set_requested_ec2_subnet_ids(
crate::json_deser::deser_list_com_amazonaws_emr_xml_string_max_len256_list(tokens)?
);
}
"Ec2AvailabilityZone" => {
builder = builder.set_ec2_availability_zone(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"RequestedEc2AvailabilityZones" => {
builder = builder.set_requested_ec2_availability_zones(
crate::json_deser::deser_list_com_amazonaws_emr_xml_string_max_len256_list(tokens)?
);
}
"IamInstanceProfile" => {
builder = builder.set_iam_instance_profile(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"EmrManagedMasterSecurityGroup" => {
builder = builder.set_emr_managed_master_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"EmrManagedSlaveSecurityGroup" => {
builder = builder.set_emr_managed_slave_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"ServiceAccessSecurityGroup" => {
builder = builder.set_service_access_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"AdditionalMasterSecurityGroups" => {
builder = builder.set_additional_master_security_groups(
crate::json_deser::deser_list_com_amazonaws_emr_string_list(
tokens,
)?,
);
}
"AdditionalSlaveSecurityGroups" => {
builder = builder.set_additional_slave_security_groups(
crate::json_deser::deser_list_com_amazonaws_emr_string_list(
tokens,
)?,
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}sourcepub fn emr_managed_master_security_group(self, input: impl Into<String>) -> Self
pub fn emr_managed_master_security_group(self, input: impl Into<String>) -> Self
The identifier of the Amazon EC2 security group for the master node.
sourcepub fn set_emr_managed_master_security_group(self, input: Option<String>) -> Self
pub fn set_emr_managed_master_security_group(self, input: Option<String>) -> Self
The identifier of the Amazon EC2 security group for the master node.
Examples found in repository?
3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125
pub(crate) fn deser_structure_crate_model_ec2_instance_attributes<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::Ec2InstanceAttributes>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::ec2_instance_attributes::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"Ec2KeyName" => {
builder = builder.set_ec2_key_name(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"Ec2SubnetId" => {
builder = builder.set_ec2_subnet_id(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"RequestedEc2SubnetIds" => {
builder = builder.set_requested_ec2_subnet_ids(
crate::json_deser::deser_list_com_amazonaws_emr_xml_string_max_len256_list(tokens)?
);
}
"Ec2AvailabilityZone" => {
builder = builder.set_ec2_availability_zone(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"RequestedEc2AvailabilityZones" => {
builder = builder.set_requested_ec2_availability_zones(
crate::json_deser::deser_list_com_amazonaws_emr_xml_string_max_len256_list(tokens)?
);
}
"IamInstanceProfile" => {
builder = builder.set_iam_instance_profile(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"EmrManagedMasterSecurityGroup" => {
builder = builder.set_emr_managed_master_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"EmrManagedSlaveSecurityGroup" => {
builder = builder.set_emr_managed_slave_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"ServiceAccessSecurityGroup" => {
builder = builder.set_service_access_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"AdditionalMasterSecurityGroups" => {
builder = builder.set_additional_master_security_groups(
crate::json_deser::deser_list_com_amazonaws_emr_string_list(
tokens,
)?,
);
}
"AdditionalSlaveSecurityGroups" => {
builder = builder.set_additional_slave_security_groups(
crate::json_deser::deser_list_com_amazonaws_emr_string_list(
tokens,
)?,
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}sourcepub fn emr_managed_slave_security_group(self, input: impl Into<String>) -> Self
pub fn emr_managed_slave_security_group(self, input: impl Into<String>) -> Self
The identifier of the Amazon EC2 security group for the core and task nodes.
sourcepub fn set_emr_managed_slave_security_group(self, input: Option<String>) -> Self
pub fn set_emr_managed_slave_security_group(self, input: Option<String>) -> Self
The identifier of the Amazon EC2 security group for the core and task nodes.
Examples found in repository?
3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125
pub(crate) fn deser_structure_crate_model_ec2_instance_attributes<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::Ec2InstanceAttributes>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::ec2_instance_attributes::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"Ec2KeyName" => {
builder = builder.set_ec2_key_name(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"Ec2SubnetId" => {
builder = builder.set_ec2_subnet_id(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"RequestedEc2SubnetIds" => {
builder = builder.set_requested_ec2_subnet_ids(
crate::json_deser::deser_list_com_amazonaws_emr_xml_string_max_len256_list(tokens)?
);
}
"Ec2AvailabilityZone" => {
builder = builder.set_ec2_availability_zone(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"RequestedEc2AvailabilityZones" => {
builder = builder.set_requested_ec2_availability_zones(
crate::json_deser::deser_list_com_amazonaws_emr_xml_string_max_len256_list(tokens)?
);
}
"IamInstanceProfile" => {
builder = builder.set_iam_instance_profile(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"EmrManagedMasterSecurityGroup" => {
builder = builder.set_emr_managed_master_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"EmrManagedSlaveSecurityGroup" => {
builder = builder.set_emr_managed_slave_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"ServiceAccessSecurityGroup" => {
builder = builder.set_service_access_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"AdditionalMasterSecurityGroups" => {
builder = builder.set_additional_master_security_groups(
crate::json_deser::deser_list_com_amazonaws_emr_string_list(
tokens,
)?,
);
}
"AdditionalSlaveSecurityGroups" => {
builder = builder.set_additional_slave_security_groups(
crate::json_deser::deser_list_com_amazonaws_emr_string_list(
tokens,
)?,
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}sourcepub fn service_access_security_group(self, input: impl Into<String>) -> Self
pub fn service_access_security_group(self, input: impl Into<String>) -> Self
The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.
sourcepub fn set_service_access_security_group(self, input: Option<String>) -> Self
pub fn set_service_access_security_group(self, input: Option<String>) -> Self
The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.
Examples found in repository?
3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125
pub(crate) fn deser_structure_crate_model_ec2_instance_attributes<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::Ec2InstanceAttributes>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::ec2_instance_attributes::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"Ec2KeyName" => {
builder = builder.set_ec2_key_name(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"Ec2SubnetId" => {
builder = builder.set_ec2_subnet_id(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"RequestedEc2SubnetIds" => {
builder = builder.set_requested_ec2_subnet_ids(
crate::json_deser::deser_list_com_amazonaws_emr_xml_string_max_len256_list(tokens)?
);
}
"Ec2AvailabilityZone" => {
builder = builder.set_ec2_availability_zone(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"RequestedEc2AvailabilityZones" => {
builder = builder.set_requested_ec2_availability_zones(
crate::json_deser::deser_list_com_amazonaws_emr_xml_string_max_len256_list(tokens)?
);
}
"IamInstanceProfile" => {
builder = builder.set_iam_instance_profile(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"EmrManagedMasterSecurityGroup" => {
builder = builder.set_emr_managed_master_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"EmrManagedSlaveSecurityGroup" => {
builder = builder.set_emr_managed_slave_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"ServiceAccessSecurityGroup" => {
builder = builder.set_service_access_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"AdditionalMasterSecurityGroups" => {
builder = builder.set_additional_master_security_groups(
crate::json_deser::deser_list_com_amazonaws_emr_string_list(
tokens,
)?,
);
}
"AdditionalSlaveSecurityGroups" => {
builder = builder.set_additional_slave_security_groups(
crate::json_deser::deser_list_com_amazonaws_emr_string_list(
tokens,
)?,
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}sourcepub fn additional_master_security_groups(self, input: impl Into<String>) -> Self
pub fn additional_master_security_groups(self, input: impl Into<String>) -> Self
Appends an item to additional_master_security_groups.
To override the contents of this collection use set_additional_master_security_groups.
A list of additional Amazon EC2 security group IDs for the master node.
sourcepub fn set_additional_master_security_groups(
self,
input: Option<Vec<String>>
) -> Self
pub fn set_additional_master_security_groups(
self,
input: Option<Vec<String>>
) -> Self
A list of additional Amazon EC2 security group IDs for the master node.
Examples found in repository?
3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125
pub(crate) fn deser_structure_crate_model_ec2_instance_attributes<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::Ec2InstanceAttributes>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::ec2_instance_attributes::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"Ec2KeyName" => {
builder = builder.set_ec2_key_name(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"Ec2SubnetId" => {
builder = builder.set_ec2_subnet_id(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"RequestedEc2SubnetIds" => {
builder = builder.set_requested_ec2_subnet_ids(
crate::json_deser::deser_list_com_amazonaws_emr_xml_string_max_len256_list(tokens)?
);
}
"Ec2AvailabilityZone" => {
builder = builder.set_ec2_availability_zone(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"RequestedEc2AvailabilityZones" => {
builder = builder.set_requested_ec2_availability_zones(
crate::json_deser::deser_list_com_amazonaws_emr_xml_string_max_len256_list(tokens)?
);
}
"IamInstanceProfile" => {
builder = builder.set_iam_instance_profile(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"EmrManagedMasterSecurityGroup" => {
builder = builder.set_emr_managed_master_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"EmrManagedSlaveSecurityGroup" => {
builder = builder.set_emr_managed_slave_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"ServiceAccessSecurityGroup" => {
builder = builder.set_service_access_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"AdditionalMasterSecurityGroups" => {
builder = builder.set_additional_master_security_groups(
crate::json_deser::deser_list_com_amazonaws_emr_string_list(
tokens,
)?,
);
}
"AdditionalSlaveSecurityGroups" => {
builder = builder.set_additional_slave_security_groups(
crate::json_deser::deser_list_com_amazonaws_emr_string_list(
tokens,
)?,
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}sourcepub fn additional_slave_security_groups(self, input: impl Into<String>) -> Self
pub fn additional_slave_security_groups(self, input: impl Into<String>) -> Self
Appends an item to additional_slave_security_groups.
To override the contents of this collection use set_additional_slave_security_groups.
A list of additional Amazon EC2 security group IDs for the core and task nodes.
sourcepub fn set_additional_slave_security_groups(
self,
input: Option<Vec<String>>
) -> Self
pub fn set_additional_slave_security_groups(
self,
input: Option<Vec<String>>
) -> Self
A list of additional Amazon EC2 security group IDs for the core and task nodes.
Examples found in repository?
3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125
pub(crate) fn deser_structure_crate_model_ec2_instance_attributes<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::Ec2InstanceAttributes>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::ec2_instance_attributes::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"Ec2KeyName" => {
builder = builder.set_ec2_key_name(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"Ec2SubnetId" => {
builder = builder.set_ec2_subnet_id(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"RequestedEc2SubnetIds" => {
builder = builder.set_requested_ec2_subnet_ids(
crate::json_deser::deser_list_com_amazonaws_emr_xml_string_max_len256_list(tokens)?
);
}
"Ec2AvailabilityZone" => {
builder = builder.set_ec2_availability_zone(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"RequestedEc2AvailabilityZones" => {
builder = builder.set_requested_ec2_availability_zones(
crate::json_deser::deser_list_com_amazonaws_emr_xml_string_max_len256_list(tokens)?
);
}
"IamInstanceProfile" => {
builder = builder.set_iam_instance_profile(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"EmrManagedMasterSecurityGroup" => {
builder = builder.set_emr_managed_master_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"EmrManagedSlaveSecurityGroup" => {
builder = builder.set_emr_managed_slave_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"ServiceAccessSecurityGroup" => {
builder = builder.set_service_access_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"AdditionalMasterSecurityGroups" => {
builder = builder.set_additional_master_security_groups(
crate::json_deser::deser_list_com_amazonaws_emr_string_list(
tokens,
)?,
);
}
"AdditionalSlaveSecurityGroups" => {
builder = builder.set_additional_slave_security_groups(
crate::json_deser::deser_list_com_amazonaws_emr_string_list(
tokens,
)?,
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}sourcepub fn build(self) -> Ec2InstanceAttributes
pub fn build(self) -> Ec2InstanceAttributes
Consumes the builder and constructs a Ec2InstanceAttributes.
Examples found in repository?
3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125
pub(crate) fn deser_structure_crate_model_ec2_instance_attributes<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::Ec2InstanceAttributes>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::ec2_instance_attributes::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"Ec2KeyName" => {
builder = builder.set_ec2_key_name(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"Ec2SubnetId" => {
builder = builder.set_ec2_subnet_id(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"RequestedEc2SubnetIds" => {
builder = builder.set_requested_ec2_subnet_ids(
crate::json_deser::deser_list_com_amazonaws_emr_xml_string_max_len256_list(tokens)?
);
}
"Ec2AvailabilityZone" => {
builder = builder.set_ec2_availability_zone(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"RequestedEc2AvailabilityZones" => {
builder = builder.set_requested_ec2_availability_zones(
crate::json_deser::deser_list_com_amazonaws_emr_xml_string_max_len256_list(tokens)?
);
}
"IamInstanceProfile" => {
builder = builder.set_iam_instance_profile(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"EmrManagedMasterSecurityGroup" => {
builder = builder.set_emr_managed_master_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"EmrManagedSlaveSecurityGroup" => {
builder = builder.set_emr_managed_slave_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"ServiceAccessSecurityGroup" => {
builder = builder.set_service_access_security_group(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"AdditionalMasterSecurityGroups" => {
builder = builder.set_additional_master_security_groups(
crate::json_deser::deser_list_com_amazonaws_emr_string_list(
tokens,
)?,
);
}
"AdditionalSlaveSecurityGroups" => {
builder = builder.set_additional_slave_security_groups(
crate::json_deser::deser_list_com_amazonaws_emr_string_list(
tokens,
)?,
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}