Struct aws_sdk_ec2::model::capacity_reservation::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for CapacityReservation
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn capacity_reservation_id(self, input: impl Into<String>) -> Self
pub fn capacity_reservation_id(self, input: impl Into<String>) -> Self
The ID of the Capacity Reservation.
sourcepub fn set_capacity_reservation_id(self, input: Option<String>) -> Self
pub fn set_capacity_reservation_id(self, input: Option<String>) -> Self
The ID of the Capacity Reservation.
Examples found in repository?
25629 25630 25631 25632 25633 25634 25635 25636 25637 25638 25639 25640 25641 25642 25643 25644 25645 25646 25647 25648 25649 25650 25651 25652 25653 25654 25655 25656 25657 25658 25659 25660 25661 25662 25663 25664 25665 25666 25667 25668 25669 25670 25671 25672 25673 25674 25675 25676 25677 25678 25679 25680 25681 25682 25683 25684 25685 25686 25687 25688 25689 25690 25691 25692 25693 25694 25695 25696 25697 25698 25699 25700 25701 25702 25703 25704 25705 25706 25707 25708 25709 25710 25711 25712 25713 25714 25715 25716 25717 25718 25719 25720 25721 25722 25723 25724 25725 25726 25727 25728 25729 25730 25731 25732 25733 25734 25735 25736 25737 25738 25739 25740 25741 25742 25743 25744 25745 25746 25747 25748 25749 25750 25751 25752 25753 25754 25755 25756 25757 25758 25759 25760 25761 25762 25763 25764 25765 25766 25767 25768 25769 25770 25771 25772 25773 25774 25775 25776 25777 25778 25779 25780 25781 25782 25783 25784 25785 25786 25787 25788 25789 25790 25791 25792 25793 25794 25795 25796 25797 25798 25799 25800 25801 25802 25803 25804 25805 25806 25807 25808 25809 25810 25811 25812 25813 25814 25815 25816 25817 25818 25819 25820 25821 25822 25823 25824 25825 25826 25827 25828 25829 25830 25831 25832 25833 25834 25835 25836 25837 25838 25839 25840 25841 25842 25843 25844 25845 25846 25847 25848 25849 25850 25851 25852 25853 25854 25855 25856 25857 25858 25859 25860 25861 25862 25863 25864 25865 25866 25867 25868 25869 25870 25871 25872 25873 25874 25875 25876 25877 25878 25879 25880 25881 25882 25883 25884 25885 25886 25887 25888 25889 25890 25891 25892 25893 25894 25895 25896 25897 25898 25899 25900 25901 25902 25903 25904 25905 25906 25907 25908 25909 25910 25911 25912 25913 25914 25915 25916 25917 25918 25919 25920 25921 25922 25923 25924 25925 25926 25927 25928 25929 25930 25931 25932 25933 25934 25935 25936 25937 25938 25939 25940 25941 25942 25943 25944 25945 25946 25947 25948 25949
pub fn deser_structure_crate_model_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#CapacityReservation$CapacityReservationId */ => {
let var_992 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_id(var_992);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#CapacityReservation$OwnerId */ => {
let var_993 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_993);
}
,
s if s.matches("capacityReservationArn") /* CapacityReservationArn com.amazonaws.ec2#CapacityReservation$CapacityReservationArn */ => {
let var_994 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_arn(var_994);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#CapacityReservation$AvailabilityZoneId */ => {
let var_995 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone_id(var_995);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#CapacityReservation$InstanceType */ => {
let var_996 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_type(var_996);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#CapacityReservation$InstancePlatform */ => {
let var_997 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_997);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#CapacityReservation$AvailabilityZone */ => {
let var_998 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_998);
}
,
s if s.matches("tenancy") /* Tenancy com.amazonaws.ec2#CapacityReservation$Tenancy */ => {
let var_999 =
Some(
Result::<crate::model::CapacityReservationTenancy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationTenancy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_tenancy(var_999);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#CapacityReservation$TotalInstanceCount */ => {
let var_1000 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_total_instance_count(var_1000);
}
,
s if s.matches("availableInstanceCount") /* AvailableInstanceCount com.amazonaws.ec2#CapacityReservation$AvailableInstanceCount */ => {
let var_1001 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_available_instance_count(var_1001);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#CapacityReservation$EbsOptimized */ => {
let var_1002 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1002);
}
,
s if s.matches("ephemeralStorage") /* EphemeralStorage com.amazonaws.ec2#CapacityReservation$EphemeralStorage */ => {
let var_1003 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ephemeral_storage(var_1003);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#CapacityReservation$State */ => {
let var_1004 =
Some(
Result::<crate::model::CapacityReservationState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1004);
}
,
s if s.matches("startDate") /* StartDate com.amazonaws.ec2#CapacityReservation$StartDate */ => {
let var_1005 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_start_date(var_1005);
}
,
s if s.matches("endDate") /* EndDate com.amazonaws.ec2#CapacityReservation$EndDate */ => {
let var_1006 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_end_date(var_1006);
}
,
s if s.matches("endDateType") /* EndDateType com.amazonaws.ec2#CapacityReservation$EndDateType */ => {
let var_1007 =
Some(
Result::<crate::model::EndDateType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EndDateType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_end_date_type(var_1007);
}
,
s if s.matches("instanceMatchCriteria") /* InstanceMatchCriteria com.amazonaws.ec2#CapacityReservation$InstanceMatchCriteria */ => {
let var_1008 =
Some(
Result::<crate::model::InstanceMatchCriteria, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceMatchCriteria::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_match_criteria(var_1008);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#CapacityReservation$CreateDate */ => {
let var_1009 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_1009);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#CapacityReservation$Tags */ => {
let var_1010 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1010);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#CapacityReservation$OutpostArn */ => {
let var_1011 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_1011);
}
,
s if s.matches("capacityReservationFleetId") /* CapacityReservationFleetId com.amazonaws.ec2#CapacityReservation$CapacityReservationFleetId */ => {
let var_1012 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_fleet_id(var_1012);
}
,
s if s.matches("placementGroupArn") /* PlacementGroupArn com.amazonaws.ec2#CapacityReservation$PlacementGroupArn */ => {
let var_1013 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_placement_group_arn(var_1013);
}
,
s if s.matches("capacityAllocationSet") /* CapacityAllocations com.amazonaws.ec2#CapacityReservation$CapacityAllocations */ => {
let var_1014 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_capacity_allocations(&mut tag)
?
)
;
builder = builder.set_capacity_allocations(var_1014);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn owner_id(self, input: impl Into<String>) -> Self
pub fn owner_id(self, input: impl Into<String>) -> Self
The ID of the Amazon Web Services account that owns the Capacity Reservation.
sourcepub fn set_owner_id(self, input: Option<String>) -> Self
pub fn set_owner_id(self, input: Option<String>) -> Self
The ID of the Amazon Web Services account that owns the Capacity Reservation.
Examples found in repository?
25629 25630 25631 25632 25633 25634 25635 25636 25637 25638 25639 25640 25641 25642 25643 25644 25645 25646 25647 25648 25649 25650 25651 25652 25653 25654 25655 25656 25657 25658 25659 25660 25661 25662 25663 25664 25665 25666 25667 25668 25669 25670 25671 25672 25673 25674 25675 25676 25677 25678 25679 25680 25681 25682 25683 25684 25685 25686 25687 25688 25689 25690 25691 25692 25693 25694 25695 25696 25697 25698 25699 25700 25701 25702 25703 25704 25705 25706 25707 25708 25709 25710 25711 25712 25713 25714 25715 25716 25717 25718 25719 25720 25721 25722 25723 25724 25725 25726 25727 25728 25729 25730 25731 25732 25733 25734 25735 25736 25737 25738 25739 25740 25741 25742 25743 25744 25745 25746 25747 25748 25749 25750 25751 25752 25753 25754 25755 25756 25757 25758 25759 25760 25761 25762 25763 25764 25765 25766 25767 25768 25769 25770 25771 25772 25773 25774 25775 25776 25777 25778 25779 25780 25781 25782 25783 25784 25785 25786 25787 25788 25789 25790 25791 25792 25793 25794 25795 25796 25797 25798 25799 25800 25801 25802 25803 25804 25805 25806 25807 25808 25809 25810 25811 25812 25813 25814 25815 25816 25817 25818 25819 25820 25821 25822 25823 25824 25825 25826 25827 25828 25829 25830 25831 25832 25833 25834 25835 25836 25837 25838 25839 25840 25841 25842 25843 25844 25845 25846 25847 25848 25849 25850 25851 25852 25853 25854 25855 25856 25857 25858 25859 25860 25861 25862 25863 25864 25865 25866 25867 25868 25869 25870 25871 25872 25873 25874 25875 25876 25877 25878 25879 25880 25881 25882 25883 25884 25885 25886 25887 25888 25889 25890 25891 25892 25893 25894 25895 25896 25897 25898 25899 25900 25901 25902 25903 25904 25905 25906 25907 25908 25909 25910 25911 25912 25913 25914 25915 25916 25917 25918 25919 25920 25921 25922 25923 25924 25925 25926 25927 25928 25929 25930 25931 25932 25933 25934 25935 25936 25937 25938 25939 25940 25941 25942 25943 25944 25945 25946 25947 25948 25949
pub fn deser_structure_crate_model_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#CapacityReservation$CapacityReservationId */ => {
let var_992 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_id(var_992);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#CapacityReservation$OwnerId */ => {
let var_993 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_993);
}
,
s if s.matches("capacityReservationArn") /* CapacityReservationArn com.amazonaws.ec2#CapacityReservation$CapacityReservationArn */ => {
let var_994 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_arn(var_994);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#CapacityReservation$AvailabilityZoneId */ => {
let var_995 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone_id(var_995);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#CapacityReservation$InstanceType */ => {
let var_996 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_type(var_996);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#CapacityReservation$InstancePlatform */ => {
let var_997 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_997);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#CapacityReservation$AvailabilityZone */ => {
let var_998 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_998);
}
,
s if s.matches("tenancy") /* Tenancy com.amazonaws.ec2#CapacityReservation$Tenancy */ => {
let var_999 =
Some(
Result::<crate::model::CapacityReservationTenancy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationTenancy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_tenancy(var_999);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#CapacityReservation$TotalInstanceCount */ => {
let var_1000 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_total_instance_count(var_1000);
}
,
s if s.matches("availableInstanceCount") /* AvailableInstanceCount com.amazonaws.ec2#CapacityReservation$AvailableInstanceCount */ => {
let var_1001 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_available_instance_count(var_1001);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#CapacityReservation$EbsOptimized */ => {
let var_1002 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1002);
}
,
s if s.matches("ephemeralStorage") /* EphemeralStorage com.amazonaws.ec2#CapacityReservation$EphemeralStorage */ => {
let var_1003 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ephemeral_storage(var_1003);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#CapacityReservation$State */ => {
let var_1004 =
Some(
Result::<crate::model::CapacityReservationState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1004);
}
,
s if s.matches("startDate") /* StartDate com.amazonaws.ec2#CapacityReservation$StartDate */ => {
let var_1005 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_start_date(var_1005);
}
,
s if s.matches("endDate") /* EndDate com.amazonaws.ec2#CapacityReservation$EndDate */ => {
let var_1006 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_end_date(var_1006);
}
,
s if s.matches("endDateType") /* EndDateType com.amazonaws.ec2#CapacityReservation$EndDateType */ => {
let var_1007 =
Some(
Result::<crate::model::EndDateType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EndDateType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_end_date_type(var_1007);
}
,
s if s.matches("instanceMatchCriteria") /* InstanceMatchCriteria com.amazonaws.ec2#CapacityReservation$InstanceMatchCriteria */ => {
let var_1008 =
Some(
Result::<crate::model::InstanceMatchCriteria, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceMatchCriteria::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_match_criteria(var_1008);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#CapacityReservation$CreateDate */ => {
let var_1009 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_1009);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#CapacityReservation$Tags */ => {
let var_1010 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1010);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#CapacityReservation$OutpostArn */ => {
let var_1011 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_1011);
}
,
s if s.matches("capacityReservationFleetId") /* CapacityReservationFleetId com.amazonaws.ec2#CapacityReservation$CapacityReservationFleetId */ => {
let var_1012 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_fleet_id(var_1012);
}
,
s if s.matches("placementGroupArn") /* PlacementGroupArn com.amazonaws.ec2#CapacityReservation$PlacementGroupArn */ => {
let var_1013 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_placement_group_arn(var_1013);
}
,
s if s.matches("capacityAllocationSet") /* CapacityAllocations com.amazonaws.ec2#CapacityReservation$CapacityAllocations */ => {
let var_1014 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_capacity_allocations(&mut tag)
?
)
;
builder = builder.set_capacity_allocations(var_1014);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn capacity_reservation_arn(self, input: impl Into<String>) -> Self
pub fn capacity_reservation_arn(self, input: impl Into<String>) -> Self
The Amazon Resource Name (ARN) of the Capacity Reservation.
sourcepub fn set_capacity_reservation_arn(self, input: Option<String>) -> Self
pub fn set_capacity_reservation_arn(self, input: Option<String>) -> Self
The Amazon Resource Name (ARN) of the Capacity Reservation.
Examples found in repository?
25629 25630 25631 25632 25633 25634 25635 25636 25637 25638 25639 25640 25641 25642 25643 25644 25645 25646 25647 25648 25649 25650 25651 25652 25653 25654 25655 25656 25657 25658 25659 25660 25661 25662 25663 25664 25665 25666 25667 25668 25669 25670 25671 25672 25673 25674 25675 25676 25677 25678 25679 25680 25681 25682 25683 25684 25685 25686 25687 25688 25689 25690 25691 25692 25693 25694 25695 25696 25697 25698 25699 25700 25701 25702 25703 25704 25705 25706 25707 25708 25709 25710 25711 25712 25713 25714 25715 25716 25717 25718 25719 25720 25721 25722 25723 25724 25725 25726 25727 25728 25729 25730 25731 25732 25733 25734 25735 25736 25737 25738 25739 25740 25741 25742 25743 25744 25745 25746 25747 25748 25749 25750 25751 25752 25753 25754 25755 25756 25757 25758 25759 25760 25761 25762 25763 25764 25765 25766 25767 25768 25769 25770 25771 25772 25773 25774 25775 25776 25777 25778 25779 25780 25781 25782 25783 25784 25785 25786 25787 25788 25789 25790 25791 25792 25793 25794 25795 25796 25797 25798 25799 25800 25801 25802 25803 25804 25805 25806 25807 25808 25809 25810 25811 25812 25813 25814 25815 25816 25817 25818 25819 25820 25821 25822 25823 25824 25825 25826 25827 25828 25829 25830 25831 25832 25833 25834 25835 25836 25837 25838 25839 25840 25841 25842 25843 25844 25845 25846 25847 25848 25849 25850 25851 25852 25853 25854 25855 25856 25857 25858 25859 25860 25861 25862 25863 25864 25865 25866 25867 25868 25869 25870 25871 25872 25873 25874 25875 25876 25877 25878 25879 25880 25881 25882 25883 25884 25885 25886 25887 25888 25889 25890 25891 25892 25893 25894 25895 25896 25897 25898 25899 25900 25901 25902 25903 25904 25905 25906 25907 25908 25909 25910 25911 25912 25913 25914 25915 25916 25917 25918 25919 25920 25921 25922 25923 25924 25925 25926 25927 25928 25929 25930 25931 25932 25933 25934 25935 25936 25937 25938 25939 25940 25941 25942 25943 25944 25945 25946 25947 25948 25949
pub fn deser_structure_crate_model_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#CapacityReservation$CapacityReservationId */ => {
let var_992 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_id(var_992);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#CapacityReservation$OwnerId */ => {
let var_993 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_993);
}
,
s if s.matches("capacityReservationArn") /* CapacityReservationArn com.amazonaws.ec2#CapacityReservation$CapacityReservationArn */ => {
let var_994 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_arn(var_994);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#CapacityReservation$AvailabilityZoneId */ => {
let var_995 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone_id(var_995);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#CapacityReservation$InstanceType */ => {
let var_996 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_type(var_996);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#CapacityReservation$InstancePlatform */ => {
let var_997 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_997);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#CapacityReservation$AvailabilityZone */ => {
let var_998 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_998);
}
,
s if s.matches("tenancy") /* Tenancy com.amazonaws.ec2#CapacityReservation$Tenancy */ => {
let var_999 =
Some(
Result::<crate::model::CapacityReservationTenancy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationTenancy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_tenancy(var_999);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#CapacityReservation$TotalInstanceCount */ => {
let var_1000 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_total_instance_count(var_1000);
}
,
s if s.matches("availableInstanceCount") /* AvailableInstanceCount com.amazonaws.ec2#CapacityReservation$AvailableInstanceCount */ => {
let var_1001 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_available_instance_count(var_1001);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#CapacityReservation$EbsOptimized */ => {
let var_1002 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1002);
}
,
s if s.matches("ephemeralStorage") /* EphemeralStorage com.amazonaws.ec2#CapacityReservation$EphemeralStorage */ => {
let var_1003 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ephemeral_storage(var_1003);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#CapacityReservation$State */ => {
let var_1004 =
Some(
Result::<crate::model::CapacityReservationState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1004);
}
,
s if s.matches("startDate") /* StartDate com.amazonaws.ec2#CapacityReservation$StartDate */ => {
let var_1005 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_start_date(var_1005);
}
,
s if s.matches("endDate") /* EndDate com.amazonaws.ec2#CapacityReservation$EndDate */ => {
let var_1006 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_end_date(var_1006);
}
,
s if s.matches("endDateType") /* EndDateType com.amazonaws.ec2#CapacityReservation$EndDateType */ => {
let var_1007 =
Some(
Result::<crate::model::EndDateType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EndDateType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_end_date_type(var_1007);
}
,
s if s.matches("instanceMatchCriteria") /* InstanceMatchCriteria com.amazonaws.ec2#CapacityReservation$InstanceMatchCriteria */ => {
let var_1008 =
Some(
Result::<crate::model::InstanceMatchCriteria, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceMatchCriteria::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_match_criteria(var_1008);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#CapacityReservation$CreateDate */ => {
let var_1009 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_1009);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#CapacityReservation$Tags */ => {
let var_1010 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1010);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#CapacityReservation$OutpostArn */ => {
let var_1011 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_1011);
}
,
s if s.matches("capacityReservationFleetId") /* CapacityReservationFleetId com.amazonaws.ec2#CapacityReservation$CapacityReservationFleetId */ => {
let var_1012 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_fleet_id(var_1012);
}
,
s if s.matches("placementGroupArn") /* PlacementGroupArn com.amazonaws.ec2#CapacityReservation$PlacementGroupArn */ => {
let var_1013 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_placement_group_arn(var_1013);
}
,
s if s.matches("capacityAllocationSet") /* CapacityAllocations com.amazonaws.ec2#CapacityReservation$CapacityAllocations */ => {
let var_1014 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_capacity_allocations(&mut tag)
?
)
;
builder = builder.set_capacity_allocations(var_1014);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn availability_zone_id(self, input: impl Into<String>) -> Self
pub fn availability_zone_id(self, input: impl Into<String>) -> Self
The Availability Zone ID of the Capacity Reservation.
sourcepub fn set_availability_zone_id(self, input: Option<String>) -> Self
pub fn set_availability_zone_id(self, input: Option<String>) -> Self
The Availability Zone ID of the Capacity Reservation.
Examples found in repository?
25629 25630 25631 25632 25633 25634 25635 25636 25637 25638 25639 25640 25641 25642 25643 25644 25645 25646 25647 25648 25649 25650 25651 25652 25653 25654 25655 25656 25657 25658 25659 25660 25661 25662 25663 25664 25665 25666 25667 25668 25669 25670 25671 25672 25673 25674 25675 25676 25677 25678 25679 25680 25681 25682 25683 25684 25685 25686 25687 25688 25689 25690 25691 25692 25693 25694 25695 25696 25697 25698 25699 25700 25701 25702 25703 25704 25705 25706 25707 25708 25709 25710 25711 25712 25713 25714 25715 25716 25717 25718 25719 25720 25721 25722 25723 25724 25725 25726 25727 25728 25729 25730 25731 25732 25733 25734 25735 25736 25737 25738 25739 25740 25741 25742 25743 25744 25745 25746 25747 25748 25749 25750 25751 25752 25753 25754 25755 25756 25757 25758 25759 25760 25761 25762 25763 25764 25765 25766 25767 25768 25769 25770 25771 25772 25773 25774 25775 25776 25777 25778 25779 25780 25781 25782 25783 25784 25785 25786 25787 25788 25789 25790 25791 25792 25793 25794 25795 25796 25797 25798 25799 25800 25801 25802 25803 25804 25805 25806 25807 25808 25809 25810 25811 25812 25813 25814 25815 25816 25817 25818 25819 25820 25821 25822 25823 25824 25825 25826 25827 25828 25829 25830 25831 25832 25833 25834 25835 25836 25837 25838 25839 25840 25841 25842 25843 25844 25845 25846 25847 25848 25849 25850 25851 25852 25853 25854 25855 25856 25857 25858 25859 25860 25861 25862 25863 25864 25865 25866 25867 25868 25869 25870 25871 25872 25873 25874 25875 25876 25877 25878 25879 25880 25881 25882 25883 25884 25885 25886 25887 25888 25889 25890 25891 25892 25893 25894 25895 25896 25897 25898 25899 25900 25901 25902 25903 25904 25905 25906 25907 25908 25909 25910 25911 25912 25913 25914 25915 25916 25917 25918 25919 25920 25921 25922 25923 25924 25925 25926 25927 25928 25929 25930 25931 25932 25933 25934 25935 25936 25937 25938 25939 25940 25941 25942 25943 25944 25945 25946 25947 25948 25949
pub fn deser_structure_crate_model_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#CapacityReservation$CapacityReservationId */ => {
let var_992 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_id(var_992);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#CapacityReservation$OwnerId */ => {
let var_993 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_993);
}
,
s if s.matches("capacityReservationArn") /* CapacityReservationArn com.amazonaws.ec2#CapacityReservation$CapacityReservationArn */ => {
let var_994 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_arn(var_994);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#CapacityReservation$AvailabilityZoneId */ => {
let var_995 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone_id(var_995);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#CapacityReservation$InstanceType */ => {
let var_996 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_type(var_996);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#CapacityReservation$InstancePlatform */ => {
let var_997 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_997);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#CapacityReservation$AvailabilityZone */ => {
let var_998 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_998);
}
,
s if s.matches("tenancy") /* Tenancy com.amazonaws.ec2#CapacityReservation$Tenancy */ => {
let var_999 =
Some(
Result::<crate::model::CapacityReservationTenancy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationTenancy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_tenancy(var_999);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#CapacityReservation$TotalInstanceCount */ => {
let var_1000 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_total_instance_count(var_1000);
}
,
s if s.matches("availableInstanceCount") /* AvailableInstanceCount com.amazonaws.ec2#CapacityReservation$AvailableInstanceCount */ => {
let var_1001 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_available_instance_count(var_1001);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#CapacityReservation$EbsOptimized */ => {
let var_1002 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1002);
}
,
s if s.matches("ephemeralStorage") /* EphemeralStorage com.amazonaws.ec2#CapacityReservation$EphemeralStorage */ => {
let var_1003 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ephemeral_storage(var_1003);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#CapacityReservation$State */ => {
let var_1004 =
Some(
Result::<crate::model::CapacityReservationState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1004);
}
,
s if s.matches("startDate") /* StartDate com.amazonaws.ec2#CapacityReservation$StartDate */ => {
let var_1005 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_start_date(var_1005);
}
,
s if s.matches("endDate") /* EndDate com.amazonaws.ec2#CapacityReservation$EndDate */ => {
let var_1006 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_end_date(var_1006);
}
,
s if s.matches("endDateType") /* EndDateType com.amazonaws.ec2#CapacityReservation$EndDateType */ => {
let var_1007 =
Some(
Result::<crate::model::EndDateType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EndDateType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_end_date_type(var_1007);
}
,
s if s.matches("instanceMatchCriteria") /* InstanceMatchCriteria com.amazonaws.ec2#CapacityReservation$InstanceMatchCriteria */ => {
let var_1008 =
Some(
Result::<crate::model::InstanceMatchCriteria, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceMatchCriteria::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_match_criteria(var_1008);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#CapacityReservation$CreateDate */ => {
let var_1009 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_1009);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#CapacityReservation$Tags */ => {
let var_1010 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1010);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#CapacityReservation$OutpostArn */ => {
let var_1011 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_1011);
}
,
s if s.matches("capacityReservationFleetId") /* CapacityReservationFleetId com.amazonaws.ec2#CapacityReservation$CapacityReservationFleetId */ => {
let var_1012 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_fleet_id(var_1012);
}
,
s if s.matches("placementGroupArn") /* PlacementGroupArn com.amazonaws.ec2#CapacityReservation$PlacementGroupArn */ => {
let var_1013 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_placement_group_arn(var_1013);
}
,
s if s.matches("capacityAllocationSet") /* CapacityAllocations com.amazonaws.ec2#CapacityReservation$CapacityAllocations */ => {
let var_1014 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_capacity_allocations(&mut tag)
?
)
;
builder = builder.set_capacity_allocations(var_1014);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn instance_type(self, input: impl Into<String>) -> Self
pub fn instance_type(self, input: impl Into<String>) -> Self
The type of instance for which the Capacity Reservation reserves capacity.
sourcepub fn set_instance_type(self, input: Option<String>) -> Self
pub fn set_instance_type(self, input: Option<String>) -> Self
The type of instance for which the Capacity Reservation reserves capacity.
Examples found in repository?
25629 25630 25631 25632 25633 25634 25635 25636 25637 25638 25639 25640 25641 25642 25643 25644 25645 25646 25647 25648 25649 25650 25651 25652 25653 25654 25655 25656 25657 25658 25659 25660 25661 25662 25663 25664 25665 25666 25667 25668 25669 25670 25671 25672 25673 25674 25675 25676 25677 25678 25679 25680 25681 25682 25683 25684 25685 25686 25687 25688 25689 25690 25691 25692 25693 25694 25695 25696 25697 25698 25699 25700 25701 25702 25703 25704 25705 25706 25707 25708 25709 25710 25711 25712 25713 25714 25715 25716 25717 25718 25719 25720 25721 25722 25723 25724 25725 25726 25727 25728 25729 25730 25731 25732 25733 25734 25735 25736 25737 25738 25739 25740 25741 25742 25743 25744 25745 25746 25747 25748 25749 25750 25751 25752 25753 25754 25755 25756 25757 25758 25759 25760 25761 25762 25763 25764 25765 25766 25767 25768 25769 25770 25771 25772 25773 25774 25775 25776 25777 25778 25779 25780 25781 25782 25783 25784 25785 25786 25787 25788 25789 25790 25791 25792 25793 25794 25795 25796 25797 25798 25799 25800 25801 25802 25803 25804 25805 25806 25807 25808 25809 25810 25811 25812 25813 25814 25815 25816 25817 25818 25819 25820 25821 25822 25823 25824 25825 25826 25827 25828 25829 25830 25831 25832 25833 25834 25835 25836 25837 25838 25839 25840 25841 25842 25843 25844 25845 25846 25847 25848 25849 25850 25851 25852 25853 25854 25855 25856 25857 25858 25859 25860 25861 25862 25863 25864 25865 25866 25867 25868 25869 25870 25871 25872 25873 25874 25875 25876 25877 25878 25879 25880 25881 25882 25883 25884 25885 25886 25887 25888 25889 25890 25891 25892 25893 25894 25895 25896 25897 25898 25899 25900 25901 25902 25903 25904 25905 25906 25907 25908 25909 25910 25911 25912 25913 25914 25915 25916 25917 25918 25919 25920 25921 25922 25923 25924 25925 25926 25927 25928 25929 25930 25931 25932 25933 25934 25935 25936 25937 25938 25939 25940 25941 25942 25943 25944 25945 25946 25947 25948 25949
pub fn deser_structure_crate_model_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#CapacityReservation$CapacityReservationId */ => {
let var_992 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_id(var_992);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#CapacityReservation$OwnerId */ => {
let var_993 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_993);
}
,
s if s.matches("capacityReservationArn") /* CapacityReservationArn com.amazonaws.ec2#CapacityReservation$CapacityReservationArn */ => {
let var_994 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_arn(var_994);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#CapacityReservation$AvailabilityZoneId */ => {
let var_995 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone_id(var_995);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#CapacityReservation$InstanceType */ => {
let var_996 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_type(var_996);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#CapacityReservation$InstancePlatform */ => {
let var_997 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_997);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#CapacityReservation$AvailabilityZone */ => {
let var_998 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_998);
}
,
s if s.matches("tenancy") /* Tenancy com.amazonaws.ec2#CapacityReservation$Tenancy */ => {
let var_999 =
Some(
Result::<crate::model::CapacityReservationTenancy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationTenancy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_tenancy(var_999);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#CapacityReservation$TotalInstanceCount */ => {
let var_1000 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_total_instance_count(var_1000);
}
,
s if s.matches("availableInstanceCount") /* AvailableInstanceCount com.amazonaws.ec2#CapacityReservation$AvailableInstanceCount */ => {
let var_1001 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_available_instance_count(var_1001);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#CapacityReservation$EbsOptimized */ => {
let var_1002 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1002);
}
,
s if s.matches("ephemeralStorage") /* EphemeralStorage com.amazonaws.ec2#CapacityReservation$EphemeralStorage */ => {
let var_1003 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ephemeral_storage(var_1003);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#CapacityReservation$State */ => {
let var_1004 =
Some(
Result::<crate::model::CapacityReservationState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1004);
}
,
s if s.matches("startDate") /* StartDate com.amazonaws.ec2#CapacityReservation$StartDate */ => {
let var_1005 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_start_date(var_1005);
}
,
s if s.matches("endDate") /* EndDate com.amazonaws.ec2#CapacityReservation$EndDate */ => {
let var_1006 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_end_date(var_1006);
}
,
s if s.matches("endDateType") /* EndDateType com.amazonaws.ec2#CapacityReservation$EndDateType */ => {
let var_1007 =
Some(
Result::<crate::model::EndDateType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EndDateType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_end_date_type(var_1007);
}
,
s if s.matches("instanceMatchCriteria") /* InstanceMatchCriteria com.amazonaws.ec2#CapacityReservation$InstanceMatchCriteria */ => {
let var_1008 =
Some(
Result::<crate::model::InstanceMatchCriteria, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceMatchCriteria::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_match_criteria(var_1008);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#CapacityReservation$CreateDate */ => {
let var_1009 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_1009);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#CapacityReservation$Tags */ => {
let var_1010 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1010);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#CapacityReservation$OutpostArn */ => {
let var_1011 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_1011);
}
,
s if s.matches("capacityReservationFleetId") /* CapacityReservationFleetId com.amazonaws.ec2#CapacityReservation$CapacityReservationFleetId */ => {
let var_1012 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_fleet_id(var_1012);
}
,
s if s.matches("placementGroupArn") /* PlacementGroupArn com.amazonaws.ec2#CapacityReservation$PlacementGroupArn */ => {
let var_1013 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_placement_group_arn(var_1013);
}
,
s if s.matches("capacityAllocationSet") /* CapacityAllocations com.amazonaws.ec2#CapacityReservation$CapacityAllocations */ => {
let var_1014 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_capacity_allocations(&mut tag)
?
)
;
builder = builder.set_capacity_allocations(var_1014);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn instance_platform(
self,
input: CapacityReservationInstancePlatform
) -> Self
pub fn instance_platform(
self,
input: CapacityReservationInstancePlatform
) -> Self
The type of operating system for which the Capacity Reservation reserves capacity.
sourcepub fn set_instance_platform(
self,
input: Option<CapacityReservationInstancePlatform>
) -> Self
pub fn set_instance_platform(
self,
input: Option<CapacityReservationInstancePlatform>
) -> Self
The type of operating system for which the Capacity Reservation reserves capacity.
Examples found in repository?
25629 25630 25631 25632 25633 25634 25635 25636 25637 25638 25639 25640 25641 25642 25643 25644 25645 25646 25647 25648 25649 25650 25651 25652 25653 25654 25655 25656 25657 25658 25659 25660 25661 25662 25663 25664 25665 25666 25667 25668 25669 25670 25671 25672 25673 25674 25675 25676 25677 25678 25679 25680 25681 25682 25683 25684 25685 25686 25687 25688 25689 25690 25691 25692 25693 25694 25695 25696 25697 25698 25699 25700 25701 25702 25703 25704 25705 25706 25707 25708 25709 25710 25711 25712 25713 25714 25715 25716 25717 25718 25719 25720 25721 25722 25723 25724 25725 25726 25727 25728 25729 25730 25731 25732 25733 25734 25735 25736 25737 25738 25739 25740 25741 25742 25743 25744 25745 25746 25747 25748 25749 25750 25751 25752 25753 25754 25755 25756 25757 25758 25759 25760 25761 25762 25763 25764 25765 25766 25767 25768 25769 25770 25771 25772 25773 25774 25775 25776 25777 25778 25779 25780 25781 25782 25783 25784 25785 25786 25787 25788 25789 25790 25791 25792 25793 25794 25795 25796 25797 25798 25799 25800 25801 25802 25803 25804 25805 25806 25807 25808 25809 25810 25811 25812 25813 25814 25815 25816 25817 25818 25819 25820 25821 25822 25823 25824 25825 25826 25827 25828 25829 25830 25831 25832 25833 25834 25835 25836 25837 25838 25839 25840 25841 25842 25843 25844 25845 25846 25847 25848 25849 25850 25851 25852 25853 25854 25855 25856 25857 25858 25859 25860 25861 25862 25863 25864 25865 25866 25867 25868 25869 25870 25871 25872 25873 25874 25875 25876 25877 25878 25879 25880 25881 25882 25883 25884 25885 25886 25887 25888 25889 25890 25891 25892 25893 25894 25895 25896 25897 25898 25899 25900 25901 25902 25903 25904 25905 25906 25907 25908 25909 25910 25911 25912 25913 25914 25915 25916 25917 25918 25919 25920 25921 25922 25923 25924 25925 25926 25927 25928 25929 25930 25931 25932 25933 25934 25935 25936 25937 25938 25939 25940 25941 25942 25943 25944 25945 25946 25947 25948 25949
pub fn deser_structure_crate_model_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#CapacityReservation$CapacityReservationId */ => {
let var_992 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_id(var_992);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#CapacityReservation$OwnerId */ => {
let var_993 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_993);
}
,
s if s.matches("capacityReservationArn") /* CapacityReservationArn com.amazonaws.ec2#CapacityReservation$CapacityReservationArn */ => {
let var_994 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_arn(var_994);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#CapacityReservation$AvailabilityZoneId */ => {
let var_995 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone_id(var_995);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#CapacityReservation$InstanceType */ => {
let var_996 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_type(var_996);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#CapacityReservation$InstancePlatform */ => {
let var_997 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_997);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#CapacityReservation$AvailabilityZone */ => {
let var_998 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_998);
}
,
s if s.matches("tenancy") /* Tenancy com.amazonaws.ec2#CapacityReservation$Tenancy */ => {
let var_999 =
Some(
Result::<crate::model::CapacityReservationTenancy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationTenancy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_tenancy(var_999);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#CapacityReservation$TotalInstanceCount */ => {
let var_1000 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_total_instance_count(var_1000);
}
,
s if s.matches("availableInstanceCount") /* AvailableInstanceCount com.amazonaws.ec2#CapacityReservation$AvailableInstanceCount */ => {
let var_1001 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_available_instance_count(var_1001);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#CapacityReservation$EbsOptimized */ => {
let var_1002 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1002);
}
,
s if s.matches("ephemeralStorage") /* EphemeralStorage com.amazonaws.ec2#CapacityReservation$EphemeralStorage */ => {
let var_1003 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ephemeral_storage(var_1003);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#CapacityReservation$State */ => {
let var_1004 =
Some(
Result::<crate::model::CapacityReservationState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1004);
}
,
s if s.matches("startDate") /* StartDate com.amazonaws.ec2#CapacityReservation$StartDate */ => {
let var_1005 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_start_date(var_1005);
}
,
s if s.matches("endDate") /* EndDate com.amazonaws.ec2#CapacityReservation$EndDate */ => {
let var_1006 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_end_date(var_1006);
}
,
s if s.matches("endDateType") /* EndDateType com.amazonaws.ec2#CapacityReservation$EndDateType */ => {
let var_1007 =
Some(
Result::<crate::model::EndDateType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EndDateType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_end_date_type(var_1007);
}
,
s if s.matches("instanceMatchCriteria") /* InstanceMatchCriteria com.amazonaws.ec2#CapacityReservation$InstanceMatchCriteria */ => {
let var_1008 =
Some(
Result::<crate::model::InstanceMatchCriteria, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceMatchCriteria::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_match_criteria(var_1008);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#CapacityReservation$CreateDate */ => {
let var_1009 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_1009);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#CapacityReservation$Tags */ => {
let var_1010 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1010);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#CapacityReservation$OutpostArn */ => {
let var_1011 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_1011);
}
,
s if s.matches("capacityReservationFleetId") /* CapacityReservationFleetId com.amazonaws.ec2#CapacityReservation$CapacityReservationFleetId */ => {
let var_1012 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_fleet_id(var_1012);
}
,
s if s.matches("placementGroupArn") /* PlacementGroupArn com.amazonaws.ec2#CapacityReservation$PlacementGroupArn */ => {
let var_1013 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_placement_group_arn(var_1013);
}
,
s if s.matches("capacityAllocationSet") /* CapacityAllocations com.amazonaws.ec2#CapacityReservation$CapacityAllocations */ => {
let var_1014 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_capacity_allocations(&mut tag)
?
)
;
builder = builder.set_capacity_allocations(var_1014);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn availability_zone(self, input: impl Into<String>) -> Self
pub fn availability_zone(self, input: impl Into<String>) -> Self
The Availability Zone in which the capacity is reserved.
sourcepub fn set_availability_zone(self, input: Option<String>) -> Self
pub fn set_availability_zone(self, input: Option<String>) -> Self
The Availability Zone in which the capacity is reserved.
Examples found in repository?
25629 25630 25631 25632 25633 25634 25635 25636 25637 25638 25639 25640 25641 25642 25643 25644 25645 25646 25647 25648 25649 25650 25651 25652 25653 25654 25655 25656 25657 25658 25659 25660 25661 25662 25663 25664 25665 25666 25667 25668 25669 25670 25671 25672 25673 25674 25675 25676 25677 25678 25679 25680 25681 25682 25683 25684 25685 25686 25687 25688 25689 25690 25691 25692 25693 25694 25695 25696 25697 25698 25699 25700 25701 25702 25703 25704 25705 25706 25707 25708 25709 25710 25711 25712 25713 25714 25715 25716 25717 25718 25719 25720 25721 25722 25723 25724 25725 25726 25727 25728 25729 25730 25731 25732 25733 25734 25735 25736 25737 25738 25739 25740 25741 25742 25743 25744 25745 25746 25747 25748 25749 25750 25751 25752 25753 25754 25755 25756 25757 25758 25759 25760 25761 25762 25763 25764 25765 25766 25767 25768 25769 25770 25771 25772 25773 25774 25775 25776 25777 25778 25779 25780 25781 25782 25783 25784 25785 25786 25787 25788 25789 25790 25791 25792 25793 25794 25795 25796 25797 25798 25799 25800 25801 25802 25803 25804 25805 25806 25807 25808 25809 25810 25811 25812 25813 25814 25815 25816 25817 25818 25819 25820 25821 25822 25823 25824 25825 25826 25827 25828 25829 25830 25831 25832 25833 25834 25835 25836 25837 25838 25839 25840 25841 25842 25843 25844 25845 25846 25847 25848 25849 25850 25851 25852 25853 25854 25855 25856 25857 25858 25859 25860 25861 25862 25863 25864 25865 25866 25867 25868 25869 25870 25871 25872 25873 25874 25875 25876 25877 25878 25879 25880 25881 25882 25883 25884 25885 25886 25887 25888 25889 25890 25891 25892 25893 25894 25895 25896 25897 25898 25899 25900 25901 25902 25903 25904 25905 25906 25907 25908 25909 25910 25911 25912 25913 25914 25915 25916 25917 25918 25919 25920 25921 25922 25923 25924 25925 25926 25927 25928 25929 25930 25931 25932 25933 25934 25935 25936 25937 25938 25939 25940 25941 25942 25943 25944 25945 25946 25947 25948 25949
pub fn deser_structure_crate_model_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#CapacityReservation$CapacityReservationId */ => {
let var_992 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_id(var_992);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#CapacityReservation$OwnerId */ => {
let var_993 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_993);
}
,
s if s.matches("capacityReservationArn") /* CapacityReservationArn com.amazonaws.ec2#CapacityReservation$CapacityReservationArn */ => {
let var_994 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_arn(var_994);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#CapacityReservation$AvailabilityZoneId */ => {
let var_995 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone_id(var_995);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#CapacityReservation$InstanceType */ => {
let var_996 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_type(var_996);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#CapacityReservation$InstancePlatform */ => {
let var_997 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_997);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#CapacityReservation$AvailabilityZone */ => {
let var_998 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_998);
}
,
s if s.matches("tenancy") /* Tenancy com.amazonaws.ec2#CapacityReservation$Tenancy */ => {
let var_999 =
Some(
Result::<crate::model::CapacityReservationTenancy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationTenancy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_tenancy(var_999);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#CapacityReservation$TotalInstanceCount */ => {
let var_1000 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_total_instance_count(var_1000);
}
,
s if s.matches("availableInstanceCount") /* AvailableInstanceCount com.amazonaws.ec2#CapacityReservation$AvailableInstanceCount */ => {
let var_1001 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_available_instance_count(var_1001);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#CapacityReservation$EbsOptimized */ => {
let var_1002 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1002);
}
,
s if s.matches("ephemeralStorage") /* EphemeralStorage com.amazonaws.ec2#CapacityReservation$EphemeralStorage */ => {
let var_1003 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ephemeral_storage(var_1003);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#CapacityReservation$State */ => {
let var_1004 =
Some(
Result::<crate::model::CapacityReservationState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1004);
}
,
s if s.matches("startDate") /* StartDate com.amazonaws.ec2#CapacityReservation$StartDate */ => {
let var_1005 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_start_date(var_1005);
}
,
s if s.matches("endDate") /* EndDate com.amazonaws.ec2#CapacityReservation$EndDate */ => {
let var_1006 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_end_date(var_1006);
}
,
s if s.matches("endDateType") /* EndDateType com.amazonaws.ec2#CapacityReservation$EndDateType */ => {
let var_1007 =
Some(
Result::<crate::model::EndDateType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EndDateType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_end_date_type(var_1007);
}
,
s if s.matches("instanceMatchCriteria") /* InstanceMatchCriteria com.amazonaws.ec2#CapacityReservation$InstanceMatchCriteria */ => {
let var_1008 =
Some(
Result::<crate::model::InstanceMatchCriteria, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceMatchCriteria::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_match_criteria(var_1008);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#CapacityReservation$CreateDate */ => {
let var_1009 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_1009);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#CapacityReservation$Tags */ => {
let var_1010 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1010);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#CapacityReservation$OutpostArn */ => {
let var_1011 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_1011);
}
,
s if s.matches("capacityReservationFleetId") /* CapacityReservationFleetId com.amazonaws.ec2#CapacityReservation$CapacityReservationFleetId */ => {
let var_1012 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_fleet_id(var_1012);
}
,
s if s.matches("placementGroupArn") /* PlacementGroupArn com.amazonaws.ec2#CapacityReservation$PlacementGroupArn */ => {
let var_1013 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_placement_group_arn(var_1013);
}
,
s if s.matches("capacityAllocationSet") /* CapacityAllocations com.amazonaws.ec2#CapacityReservation$CapacityAllocations */ => {
let var_1014 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_capacity_allocations(&mut tag)
?
)
;
builder = builder.set_capacity_allocations(var_1014);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn tenancy(self, input: CapacityReservationTenancy) -> Self
pub fn tenancy(self, input: CapacityReservationTenancy) -> Self
Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:
-
default
- The Capacity Reservation is created on hardware that is shared with other Amazon Web Services accounts. -
dedicated
- The Capacity Reservation is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.
sourcepub fn set_tenancy(self, input: Option<CapacityReservationTenancy>) -> Self
pub fn set_tenancy(self, input: Option<CapacityReservationTenancy>) -> Self
Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:
-
default
- The Capacity Reservation is created on hardware that is shared with other Amazon Web Services accounts. -
dedicated
- The Capacity Reservation is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.
Examples found in repository?
25629 25630 25631 25632 25633 25634 25635 25636 25637 25638 25639 25640 25641 25642 25643 25644 25645 25646 25647 25648 25649 25650 25651 25652 25653 25654 25655 25656 25657 25658 25659 25660 25661 25662 25663 25664 25665 25666 25667 25668 25669 25670 25671 25672 25673 25674 25675 25676 25677 25678 25679 25680 25681 25682 25683 25684 25685 25686 25687 25688 25689 25690 25691 25692 25693 25694 25695 25696 25697 25698 25699 25700 25701 25702 25703 25704 25705 25706 25707 25708 25709 25710 25711 25712 25713 25714 25715 25716 25717 25718 25719 25720 25721 25722 25723 25724 25725 25726 25727 25728 25729 25730 25731 25732 25733 25734 25735 25736 25737 25738 25739 25740 25741 25742 25743 25744 25745 25746 25747 25748 25749 25750 25751 25752 25753 25754 25755 25756 25757 25758 25759 25760 25761 25762 25763 25764 25765 25766 25767 25768 25769 25770 25771 25772 25773 25774 25775 25776 25777 25778 25779 25780 25781 25782 25783 25784 25785 25786 25787 25788 25789 25790 25791 25792 25793 25794 25795 25796 25797 25798 25799 25800 25801 25802 25803 25804 25805 25806 25807 25808 25809 25810 25811 25812 25813 25814 25815 25816 25817 25818 25819 25820 25821 25822 25823 25824 25825 25826 25827 25828 25829 25830 25831 25832 25833 25834 25835 25836 25837 25838 25839 25840 25841 25842 25843 25844 25845 25846 25847 25848 25849 25850 25851 25852 25853 25854 25855 25856 25857 25858 25859 25860 25861 25862 25863 25864 25865 25866 25867 25868 25869 25870 25871 25872 25873 25874 25875 25876 25877 25878 25879 25880 25881 25882 25883 25884 25885 25886 25887 25888 25889 25890 25891 25892 25893 25894 25895 25896 25897 25898 25899 25900 25901 25902 25903 25904 25905 25906 25907 25908 25909 25910 25911 25912 25913 25914 25915 25916 25917 25918 25919 25920 25921 25922 25923 25924 25925 25926 25927 25928 25929 25930 25931 25932 25933 25934 25935 25936 25937 25938 25939 25940 25941 25942 25943 25944 25945 25946 25947 25948 25949
pub fn deser_structure_crate_model_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#CapacityReservation$CapacityReservationId */ => {
let var_992 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_id(var_992);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#CapacityReservation$OwnerId */ => {
let var_993 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_993);
}
,
s if s.matches("capacityReservationArn") /* CapacityReservationArn com.amazonaws.ec2#CapacityReservation$CapacityReservationArn */ => {
let var_994 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_arn(var_994);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#CapacityReservation$AvailabilityZoneId */ => {
let var_995 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone_id(var_995);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#CapacityReservation$InstanceType */ => {
let var_996 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_type(var_996);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#CapacityReservation$InstancePlatform */ => {
let var_997 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_997);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#CapacityReservation$AvailabilityZone */ => {
let var_998 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_998);
}
,
s if s.matches("tenancy") /* Tenancy com.amazonaws.ec2#CapacityReservation$Tenancy */ => {
let var_999 =
Some(
Result::<crate::model::CapacityReservationTenancy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationTenancy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_tenancy(var_999);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#CapacityReservation$TotalInstanceCount */ => {
let var_1000 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_total_instance_count(var_1000);
}
,
s if s.matches("availableInstanceCount") /* AvailableInstanceCount com.amazonaws.ec2#CapacityReservation$AvailableInstanceCount */ => {
let var_1001 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_available_instance_count(var_1001);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#CapacityReservation$EbsOptimized */ => {
let var_1002 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1002);
}
,
s if s.matches("ephemeralStorage") /* EphemeralStorage com.amazonaws.ec2#CapacityReservation$EphemeralStorage */ => {
let var_1003 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ephemeral_storage(var_1003);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#CapacityReservation$State */ => {
let var_1004 =
Some(
Result::<crate::model::CapacityReservationState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1004);
}
,
s if s.matches("startDate") /* StartDate com.amazonaws.ec2#CapacityReservation$StartDate */ => {
let var_1005 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_start_date(var_1005);
}
,
s if s.matches("endDate") /* EndDate com.amazonaws.ec2#CapacityReservation$EndDate */ => {
let var_1006 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_end_date(var_1006);
}
,
s if s.matches("endDateType") /* EndDateType com.amazonaws.ec2#CapacityReservation$EndDateType */ => {
let var_1007 =
Some(
Result::<crate::model::EndDateType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EndDateType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_end_date_type(var_1007);
}
,
s if s.matches("instanceMatchCriteria") /* InstanceMatchCriteria com.amazonaws.ec2#CapacityReservation$InstanceMatchCriteria */ => {
let var_1008 =
Some(
Result::<crate::model::InstanceMatchCriteria, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceMatchCriteria::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_match_criteria(var_1008);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#CapacityReservation$CreateDate */ => {
let var_1009 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_1009);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#CapacityReservation$Tags */ => {
let var_1010 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1010);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#CapacityReservation$OutpostArn */ => {
let var_1011 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_1011);
}
,
s if s.matches("capacityReservationFleetId") /* CapacityReservationFleetId com.amazonaws.ec2#CapacityReservation$CapacityReservationFleetId */ => {
let var_1012 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_fleet_id(var_1012);
}
,
s if s.matches("placementGroupArn") /* PlacementGroupArn com.amazonaws.ec2#CapacityReservation$PlacementGroupArn */ => {
let var_1013 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_placement_group_arn(var_1013);
}
,
s if s.matches("capacityAllocationSet") /* CapacityAllocations com.amazonaws.ec2#CapacityReservation$CapacityAllocations */ => {
let var_1014 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_capacity_allocations(&mut tag)
?
)
;
builder = builder.set_capacity_allocations(var_1014);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn total_instance_count(self, input: i32) -> Self
pub fn total_instance_count(self, input: i32) -> Self
The total number of instances for which the Capacity Reservation reserves capacity.
sourcepub fn set_total_instance_count(self, input: Option<i32>) -> Self
pub fn set_total_instance_count(self, input: Option<i32>) -> Self
The total number of instances for which the Capacity Reservation reserves capacity.
Examples found in repository?
25629 25630 25631 25632 25633 25634 25635 25636 25637 25638 25639 25640 25641 25642 25643 25644 25645 25646 25647 25648 25649 25650 25651 25652 25653 25654 25655 25656 25657 25658 25659 25660 25661 25662 25663 25664 25665 25666 25667 25668 25669 25670 25671 25672 25673 25674 25675 25676 25677 25678 25679 25680 25681 25682 25683 25684 25685 25686 25687 25688 25689 25690 25691 25692 25693 25694 25695 25696 25697 25698 25699 25700 25701 25702 25703 25704 25705 25706 25707 25708 25709 25710 25711 25712 25713 25714 25715 25716 25717 25718 25719 25720 25721 25722 25723 25724 25725 25726 25727 25728 25729 25730 25731 25732 25733 25734 25735 25736 25737 25738 25739 25740 25741 25742 25743 25744 25745 25746 25747 25748 25749 25750 25751 25752 25753 25754 25755 25756 25757 25758 25759 25760 25761 25762 25763 25764 25765 25766 25767 25768 25769 25770 25771 25772 25773 25774 25775 25776 25777 25778 25779 25780 25781 25782 25783 25784 25785 25786 25787 25788 25789 25790 25791 25792 25793 25794 25795 25796 25797 25798 25799 25800 25801 25802 25803 25804 25805 25806 25807 25808 25809 25810 25811 25812 25813 25814 25815 25816 25817 25818 25819 25820 25821 25822 25823 25824 25825 25826 25827 25828 25829 25830 25831 25832 25833 25834 25835 25836 25837 25838 25839 25840 25841 25842 25843 25844 25845 25846 25847 25848 25849 25850 25851 25852 25853 25854 25855 25856 25857 25858 25859 25860 25861 25862 25863 25864 25865 25866 25867 25868 25869 25870 25871 25872 25873 25874 25875 25876 25877 25878 25879 25880 25881 25882 25883 25884 25885 25886 25887 25888 25889 25890 25891 25892 25893 25894 25895 25896 25897 25898 25899 25900 25901 25902 25903 25904 25905 25906 25907 25908 25909 25910 25911 25912 25913 25914 25915 25916 25917 25918 25919 25920 25921 25922 25923 25924 25925 25926 25927 25928 25929 25930 25931 25932 25933 25934 25935 25936 25937 25938 25939 25940 25941 25942 25943 25944 25945 25946 25947 25948 25949
pub fn deser_structure_crate_model_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#CapacityReservation$CapacityReservationId */ => {
let var_992 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_id(var_992);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#CapacityReservation$OwnerId */ => {
let var_993 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_993);
}
,
s if s.matches("capacityReservationArn") /* CapacityReservationArn com.amazonaws.ec2#CapacityReservation$CapacityReservationArn */ => {
let var_994 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_arn(var_994);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#CapacityReservation$AvailabilityZoneId */ => {
let var_995 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone_id(var_995);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#CapacityReservation$InstanceType */ => {
let var_996 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_type(var_996);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#CapacityReservation$InstancePlatform */ => {
let var_997 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_997);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#CapacityReservation$AvailabilityZone */ => {
let var_998 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_998);
}
,
s if s.matches("tenancy") /* Tenancy com.amazonaws.ec2#CapacityReservation$Tenancy */ => {
let var_999 =
Some(
Result::<crate::model::CapacityReservationTenancy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationTenancy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_tenancy(var_999);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#CapacityReservation$TotalInstanceCount */ => {
let var_1000 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_total_instance_count(var_1000);
}
,
s if s.matches("availableInstanceCount") /* AvailableInstanceCount com.amazonaws.ec2#CapacityReservation$AvailableInstanceCount */ => {
let var_1001 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_available_instance_count(var_1001);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#CapacityReservation$EbsOptimized */ => {
let var_1002 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1002);
}
,
s if s.matches("ephemeralStorage") /* EphemeralStorage com.amazonaws.ec2#CapacityReservation$EphemeralStorage */ => {
let var_1003 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ephemeral_storage(var_1003);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#CapacityReservation$State */ => {
let var_1004 =
Some(
Result::<crate::model::CapacityReservationState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1004);
}
,
s if s.matches("startDate") /* StartDate com.amazonaws.ec2#CapacityReservation$StartDate */ => {
let var_1005 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_start_date(var_1005);
}
,
s if s.matches("endDate") /* EndDate com.amazonaws.ec2#CapacityReservation$EndDate */ => {
let var_1006 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_end_date(var_1006);
}
,
s if s.matches("endDateType") /* EndDateType com.amazonaws.ec2#CapacityReservation$EndDateType */ => {
let var_1007 =
Some(
Result::<crate::model::EndDateType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EndDateType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_end_date_type(var_1007);
}
,
s if s.matches("instanceMatchCriteria") /* InstanceMatchCriteria com.amazonaws.ec2#CapacityReservation$InstanceMatchCriteria */ => {
let var_1008 =
Some(
Result::<crate::model::InstanceMatchCriteria, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceMatchCriteria::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_match_criteria(var_1008);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#CapacityReservation$CreateDate */ => {
let var_1009 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_1009);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#CapacityReservation$Tags */ => {
let var_1010 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1010);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#CapacityReservation$OutpostArn */ => {
let var_1011 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_1011);
}
,
s if s.matches("capacityReservationFleetId") /* CapacityReservationFleetId com.amazonaws.ec2#CapacityReservation$CapacityReservationFleetId */ => {
let var_1012 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_fleet_id(var_1012);
}
,
s if s.matches("placementGroupArn") /* PlacementGroupArn com.amazonaws.ec2#CapacityReservation$PlacementGroupArn */ => {
let var_1013 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_placement_group_arn(var_1013);
}
,
s if s.matches("capacityAllocationSet") /* CapacityAllocations com.amazonaws.ec2#CapacityReservation$CapacityAllocations */ => {
let var_1014 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_capacity_allocations(&mut tag)
?
)
;
builder = builder.set_capacity_allocations(var_1014);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn available_instance_count(self, input: i32) -> Self
pub fn available_instance_count(self, input: i32) -> Self
The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation.
sourcepub fn set_available_instance_count(self, input: Option<i32>) -> Self
pub fn set_available_instance_count(self, input: Option<i32>) -> Self
The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation.
Examples found in repository?
25629 25630 25631 25632 25633 25634 25635 25636 25637 25638 25639 25640 25641 25642 25643 25644 25645 25646 25647 25648 25649 25650 25651 25652 25653 25654 25655 25656 25657 25658 25659 25660 25661 25662 25663 25664 25665 25666 25667 25668 25669 25670 25671 25672 25673 25674 25675 25676 25677 25678 25679 25680 25681 25682 25683 25684 25685 25686 25687 25688 25689 25690 25691 25692 25693 25694 25695 25696 25697 25698 25699 25700 25701 25702 25703 25704 25705 25706 25707 25708 25709 25710 25711 25712 25713 25714 25715 25716 25717 25718 25719 25720 25721 25722 25723 25724 25725 25726 25727 25728 25729 25730 25731 25732 25733 25734 25735 25736 25737 25738 25739 25740 25741 25742 25743 25744 25745 25746 25747 25748 25749 25750 25751 25752 25753 25754 25755 25756 25757 25758 25759 25760 25761 25762 25763 25764 25765 25766 25767 25768 25769 25770 25771 25772 25773 25774 25775 25776 25777 25778 25779 25780 25781 25782 25783 25784 25785 25786 25787 25788 25789 25790 25791 25792 25793 25794 25795 25796 25797 25798 25799 25800 25801 25802 25803 25804 25805 25806 25807 25808 25809 25810 25811 25812 25813 25814 25815 25816 25817 25818 25819 25820 25821 25822 25823 25824 25825 25826 25827 25828 25829 25830 25831 25832 25833 25834 25835 25836 25837 25838 25839 25840 25841 25842 25843 25844 25845 25846 25847 25848 25849 25850 25851 25852 25853 25854 25855 25856 25857 25858 25859 25860 25861 25862 25863 25864 25865 25866 25867 25868 25869 25870 25871 25872 25873 25874 25875 25876 25877 25878 25879 25880 25881 25882 25883 25884 25885 25886 25887 25888 25889 25890 25891 25892 25893 25894 25895 25896 25897 25898 25899 25900 25901 25902 25903 25904 25905 25906 25907 25908 25909 25910 25911 25912 25913 25914 25915 25916 25917 25918 25919 25920 25921 25922 25923 25924 25925 25926 25927 25928 25929 25930 25931 25932 25933 25934 25935 25936 25937 25938 25939 25940 25941 25942 25943 25944 25945 25946 25947 25948 25949
pub fn deser_structure_crate_model_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#CapacityReservation$CapacityReservationId */ => {
let var_992 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_id(var_992);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#CapacityReservation$OwnerId */ => {
let var_993 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_993);
}
,
s if s.matches("capacityReservationArn") /* CapacityReservationArn com.amazonaws.ec2#CapacityReservation$CapacityReservationArn */ => {
let var_994 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_arn(var_994);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#CapacityReservation$AvailabilityZoneId */ => {
let var_995 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone_id(var_995);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#CapacityReservation$InstanceType */ => {
let var_996 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_type(var_996);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#CapacityReservation$InstancePlatform */ => {
let var_997 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_997);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#CapacityReservation$AvailabilityZone */ => {
let var_998 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_998);
}
,
s if s.matches("tenancy") /* Tenancy com.amazonaws.ec2#CapacityReservation$Tenancy */ => {
let var_999 =
Some(
Result::<crate::model::CapacityReservationTenancy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationTenancy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_tenancy(var_999);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#CapacityReservation$TotalInstanceCount */ => {
let var_1000 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_total_instance_count(var_1000);
}
,
s if s.matches("availableInstanceCount") /* AvailableInstanceCount com.amazonaws.ec2#CapacityReservation$AvailableInstanceCount */ => {
let var_1001 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_available_instance_count(var_1001);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#CapacityReservation$EbsOptimized */ => {
let var_1002 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1002);
}
,
s if s.matches("ephemeralStorage") /* EphemeralStorage com.amazonaws.ec2#CapacityReservation$EphemeralStorage */ => {
let var_1003 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ephemeral_storage(var_1003);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#CapacityReservation$State */ => {
let var_1004 =
Some(
Result::<crate::model::CapacityReservationState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1004);
}
,
s if s.matches("startDate") /* StartDate com.amazonaws.ec2#CapacityReservation$StartDate */ => {
let var_1005 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_start_date(var_1005);
}
,
s if s.matches("endDate") /* EndDate com.amazonaws.ec2#CapacityReservation$EndDate */ => {
let var_1006 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_end_date(var_1006);
}
,
s if s.matches("endDateType") /* EndDateType com.amazonaws.ec2#CapacityReservation$EndDateType */ => {
let var_1007 =
Some(
Result::<crate::model::EndDateType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EndDateType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_end_date_type(var_1007);
}
,
s if s.matches("instanceMatchCriteria") /* InstanceMatchCriteria com.amazonaws.ec2#CapacityReservation$InstanceMatchCriteria */ => {
let var_1008 =
Some(
Result::<crate::model::InstanceMatchCriteria, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceMatchCriteria::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_match_criteria(var_1008);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#CapacityReservation$CreateDate */ => {
let var_1009 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_1009);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#CapacityReservation$Tags */ => {
let var_1010 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1010);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#CapacityReservation$OutpostArn */ => {
let var_1011 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_1011);
}
,
s if s.matches("capacityReservationFleetId") /* CapacityReservationFleetId com.amazonaws.ec2#CapacityReservation$CapacityReservationFleetId */ => {
let var_1012 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_fleet_id(var_1012);
}
,
s if s.matches("placementGroupArn") /* PlacementGroupArn com.amazonaws.ec2#CapacityReservation$PlacementGroupArn */ => {
let var_1013 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_placement_group_arn(var_1013);
}
,
s if s.matches("capacityAllocationSet") /* CapacityAllocations com.amazonaws.ec2#CapacityReservation$CapacityAllocations */ => {
let var_1014 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_capacity_allocations(&mut tag)
?
)
;
builder = builder.set_capacity_allocations(var_1014);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn ebs_optimized(self, input: bool) -> Self
pub fn ebs_optimized(self, input: bool) -> Self
Indicates whether the Capacity Reservation supports EBS-optimized instances. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS- optimized instance.
sourcepub fn set_ebs_optimized(self, input: Option<bool>) -> Self
pub fn set_ebs_optimized(self, input: Option<bool>) -> Self
Indicates whether the Capacity Reservation supports EBS-optimized instances. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS- optimized instance.
Examples found in repository?
25629 25630 25631 25632 25633 25634 25635 25636 25637 25638 25639 25640 25641 25642 25643 25644 25645 25646 25647 25648 25649 25650 25651 25652 25653 25654 25655 25656 25657 25658 25659 25660 25661 25662 25663 25664 25665 25666 25667 25668 25669 25670 25671 25672 25673 25674 25675 25676 25677 25678 25679 25680 25681 25682 25683 25684 25685 25686 25687 25688 25689 25690 25691 25692 25693 25694 25695 25696 25697 25698 25699 25700 25701 25702 25703 25704 25705 25706 25707 25708 25709 25710 25711 25712 25713 25714 25715 25716 25717 25718 25719 25720 25721 25722 25723 25724 25725 25726 25727 25728 25729 25730 25731 25732 25733 25734 25735 25736 25737 25738 25739 25740 25741 25742 25743 25744 25745 25746 25747 25748 25749 25750 25751 25752 25753 25754 25755 25756 25757 25758 25759 25760 25761 25762 25763 25764 25765 25766 25767 25768 25769 25770 25771 25772 25773 25774 25775 25776 25777 25778 25779 25780 25781 25782 25783 25784 25785 25786 25787 25788 25789 25790 25791 25792 25793 25794 25795 25796 25797 25798 25799 25800 25801 25802 25803 25804 25805 25806 25807 25808 25809 25810 25811 25812 25813 25814 25815 25816 25817 25818 25819 25820 25821 25822 25823 25824 25825 25826 25827 25828 25829 25830 25831 25832 25833 25834 25835 25836 25837 25838 25839 25840 25841 25842 25843 25844 25845 25846 25847 25848 25849 25850 25851 25852 25853 25854 25855 25856 25857 25858 25859 25860 25861 25862 25863 25864 25865 25866 25867 25868 25869 25870 25871 25872 25873 25874 25875 25876 25877 25878 25879 25880 25881 25882 25883 25884 25885 25886 25887 25888 25889 25890 25891 25892 25893 25894 25895 25896 25897 25898 25899 25900 25901 25902 25903 25904 25905 25906 25907 25908 25909 25910 25911 25912 25913 25914 25915 25916 25917 25918 25919 25920 25921 25922 25923 25924 25925 25926 25927 25928 25929 25930 25931 25932 25933 25934 25935 25936 25937 25938 25939 25940 25941 25942 25943 25944 25945 25946 25947 25948 25949
pub fn deser_structure_crate_model_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#CapacityReservation$CapacityReservationId */ => {
let var_992 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_id(var_992);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#CapacityReservation$OwnerId */ => {
let var_993 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_993);
}
,
s if s.matches("capacityReservationArn") /* CapacityReservationArn com.amazonaws.ec2#CapacityReservation$CapacityReservationArn */ => {
let var_994 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_arn(var_994);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#CapacityReservation$AvailabilityZoneId */ => {
let var_995 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone_id(var_995);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#CapacityReservation$InstanceType */ => {
let var_996 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_type(var_996);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#CapacityReservation$InstancePlatform */ => {
let var_997 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_997);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#CapacityReservation$AvailabilityZone */ => {
let var_998 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_998);
}
,
s if s.matches("tenancy") /* Tenancy com.amazonaws.ec2#CapacityReservation$Tenancy */ => {
let var_999 =
Some(
Result::<crate::model::CapacityReservationTenancy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationTenancy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_tenancy(var_999);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#CapacityReservation$TotalInstanceCount */ => {
let var_1000 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_total_instance_count(var_1000);
}
,
s if s.matches("availableInstanceCount") /* AvailableInstanceCount com.amazonaws.ec2#CapacityReservation$AvailableInstanceCount */ => {
let var_1001 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_available_instance_count(var_1001);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#CapacityReservation$EbsOptimized */ => {
let var_1002 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1002);
}
,
s if s.matches("ephemeralStorage") /* EphemeralStorage com.amazonaws.ec2#CapacityReservation$EphemeralStorage */ => {
let var_1003 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ephemeral_storage(var_1003);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#CapacityReservation$State */ => {
let var_1004 =
Some(
Result::<crate::model::CapacityReservationState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1004);
}
,
s if s.matches("startDate") /* StartDate com.amazonaws.ec2#CapacityReservation$StartDate */ => {
let var_1005 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_start_date(var_1005);
}
,
s if s.matches("endDate") /* EndDate com.amazonaws.ec2#CapacityReservation$EndDate */ => {
let var_1006 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_end_date(var_1006);
}
,
s if s.matches("endDateType") /* EndDateType com.amazonaws.ec2#CapacityReservation$EndDateType */ => {
let var_1007 =
Some(
Result::<crate::model::EndDateType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EndDateType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_end_date_type(var_1007);
}
,
s if s.matches("instanceMatchCriteria") /* InstanceMatchCriteria com.amazonaws.ec2#CapacityReservation$InstanceMatchCriteria */ => {
let var_1008 =
Some(
Result::<crate::model::InstanceMatchCriteria, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceMatchCriteria::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_match_criteria(var_1008);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#CapacityReservation$CreateDate */ => {
let var_1009 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_1009);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#CapacityReservation$Tags */ => {
let var_1010 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1010);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#CapacityReservation$OutpostArn */ => {
let var_1011 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_1011);
}
,
s if s.matches("capacityReservationFleetId") /* CapacityReservationFleetId com.amazonaws.ec2#CapacityReservation$CapacityReservationFleetId */ => {
let var_1012 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_fleet_id(var_1012);
}
,
s if s.matches("placementGroupArn") /* PlacementGroupArn com.amazonaws.ec2#CapacityReservation$PlacementGroupArn */ => {
let var_1013 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_placement_group_arn(var_1013);
}
,
s if s.matches("capacityAllocationSet") /* CapacityAllocations com.amazonaws.ec2#CapacityReservation$CapacityAllocations */ => {
let var_1014 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_capacity_allocations(&mut tag)
?
)
;
builder = builder.set_capacity_allocations(var_1014);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn ephemeral_storage(self, input: bool) -> Self
pub fn ephemeral_storage(self, input: bool) -> Self
Deprecated.
sourcepub fn set_ephemeral_storage(self, input: Option<bool>) -> Self
pub fn set_ephemeral_storage(self, input: Option<bool>) -> Self
Deprecated.
Examples found in repository?
25629 25630 25631 25632 25633 25634 25635 25636 25637 25638 25639 25640 25641 25642 25643 25644 25645 25646 25647 25648 25649 25650 25651 25652 25653 25654 25655 25656 25657 25658 25659 25660 25661 25662 25663 25664 25665 25666 25667 25668 25669 25670 25671 25672 25673 25674 25675 25676 25677 25678 25679 25680 25681 25682 25683 25684 25685 25686 25687 25688 25689 25690 25691 25692 25693 25694 25695 25696 25697 25698 25699 25700 25701 25702 25703 25704 25705 25706 25707 25708 25709 25710 25711 25712 25713 25714 25715 25716 25717 25718 25719 25720 25721 25722 25723 25724 25725 25726 25727 25728 25729 25730 25731 25732 25733 25734 25735 25736 25737 25738 25739 25740 25741 25742 25743 25744 25745 25746 25747 25748 25749 25750 25751 25752 25753 25754 25755 25756 25757 25758 25759 25760 25761 25762 25763 25764 25765 25766 25767 25768 25769 25770 25771 25772 25773 25774 25775 25776 25777 25778 25779 25780 25781 25782 25783 25784 25785 25786 25787 25788 25789 25790 25791 25792 25793 25794 25795 25796 25797 25798 25799 25800 25801 25802 25803 25804 25805 25806 25807 25808 25809 25810 25811 25812 25813 25814 25815 25816 25817 25818 25819 25820 25821 25822 25823 25824 25825 25826 25827 25828 25829 25830 25831 25832 25833 25834 25835 25836 25837 25838 25839 25840 25841 25842 25843 25844 25845 25846 25847 25848 25849 25850 25851 25852 25853 25854 25855 25856 25857 25858 25859 25860 25861 25862 25863 25864 25865 25866 25867 25868 25869 25870 25871 25872 25873 25874 25875 25876 25877 25878 25879 25880 25881 25882 25883 25884 25885 25886 25887 25888 25889 25890 25891 25892 25893 25894 25895 25896 25897 25898 25899 25900 25901 25902 25903 25904 25905 25906 25907 25908 25909 25910 25911 25912 25913 25914 25915 25916 25917 25918 25919 25920 25921 25922 25923 25924 25925 25926 25927 25928 25929 25930 25931 25932 25933 25934 25935 25936 25937 25938 25939 25940 25941 25942 25943 25944 25945 25946 25947 25948 25949
pub fn deser_structure_crate_model_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#CapacityReservation$CapacityReservationId */ => {
let var_992 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_id(var_992);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#CapacityReservation$OwnerId */ => {
let var_993 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_993);
}
,
s if s.matches("capacityReservationArn") /* CapacityReservationArn com.amazonaws.ec2#CapacityReservation$CapacityReservationArn */ => {
let var_994 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_arn(var_994);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#CapacityReservation$AvailabilityZoneId */ => {
let var_995 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone_id(var_995);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#CapacityReservation$InstanceType */ => {
let var_996 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_type(var_996);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#CapacityReservation$InstancePlatform */ => {
let var_997 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_997);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#CapacityReservation$AvailabilityZone */ => {
let var_998 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_998);
}
,
s if s.matches("tenancy") /* Tenancy com.amazonaws.ec2#CapacityReservation$Tenancy */ => {
let var_999 =
Some(
Result::<crate::model::CapacityReservationTenancy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationTenancy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_tenancy(var_999);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#CapacityReservation$TotalInstanceCount */ => {
let var_1000 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_total_instance_count(var_1000);
}
,
s if s.matches("availableInstanceCount") /* AvailableInstanceCount com.amazonaws.ec2#CapacityReservation$AvailableInstanceCount */ => {
let var_1001 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_available_instance_count(var_1001);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#CapacityReservation$EbsOptimized */ => {
let var_1002 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1002);
}
,
s if s.matches("ephemeralStorage") /* EphemeralStorage com.amazonaws.ec2#CapacityReservation$EphemeralStorage */ => {
let var_1003 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ephemeral_storage(var_1003);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#CapacityReservation$State */ => {
let var_1004 =
Some(
Result::<crate::model::CapacityReservationState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1004);
}
,
s if s.matches("startDate") /* StartDate com.amazonaws.ec2#CapacityReservation$StartDate */ => {
let var_1005 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_start_date(var_1005);
}
,
s if s.matches("endDate") /* EndDate com.amazonaws.ec2#CapacityReservation$EndDate */ => {
let var_1006 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_end_date(var_1006);
}
,
s if s.matches("endDateType") /* EndDateType com.amazonaws.ec2#CapacityReservation$EndDateType */ => {
let var_1007 =
Some(
Result::<crate::model::EndDateType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EndDateType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_end_date_type(var_1007);
}
,
s if s.matches("instanceMatchCriteria") /* InstanceMatchCriteria com.amazonaws.ec2#CapacityReservation$InstanceMatchCriteria */ => {
let var_1008 =
Some(
Result::<crate::model::InstanceMatchCriteria, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceMatchCriteria::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_match_criteria(var_1008);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#CapacityReservation$CreateDate */ => {
let var_1009 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_1009);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#CapacityReservation$Tags */ => {
let var_1010 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1010);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#CapacityReservation$OutpostArn */ => {
let var_1011 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_1011);
}
,
s if s.matches("capacityReservationFleetId") /* CapacityReservationFleetId com.amazonaws.ec2#CapacityReservation$CapacityReservationFleetId */ => {
let var_1012 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_fleet_id(var_1012);
}
,
s if s.matches("placementGroupArn") /* PlacementGroupArn com.amazonaws.ec2#CapacityReservation$PlacementGroupArn */ => {
let var_1013 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_placement_group_arn(var_1013);
}
,
s if s.matches("capacityAllocationSet") /* CapacityAllocations com.amazonaws.ec2#CapacityReservation$CapacityAllocations */ => {
let var_1014 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_capacity_allocations(&mut tag)
?
)
;
builder = builder.set_capacity_allocations(var_1014);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn state(self, input: CapacityReservationState) -> Self
pub fn state(self, input: CapacityReservationState) -> Self
The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:
-
active
- The Capacity Reservation is active and the capacity is available for your use. -
expired
- The Capacity Reservation expired automatically at the date and time specified in your request. The reserved capacity is no longer available for your use. -
cancelled
- The Capacity Reservation was cancelled. The reserved capacity is no longer available for your use. -
pending
- The Capacity Reservation request was successful but the capacity provisioning is still pending. -
failed
- The Capacity Reservation request has failed. A request might fail due to invalid request parameters, capacity constraints, or instance limit constraints. Failed requests are retained for 60 minutes.
sourcepub fn set_state(self, input: Option<CapacityReservationState>) -> Self
pub fn set_state(self, input: Option<CapacityReservationState>) -> Self
The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:
-
active
- The Capacity Reservation is active and the capacity is available for your use. -
expired
- The Capacity Reservation expired automatically at the date and time specified in your request. The reserved capacity is no longer available for your use. -
cancelled
- The Capacity Reservation was cancelled. The reserved capacity is no longer available for your use. -
pending
- The Capacity Reservation request was successful but the capacity provisioning is still pending. -
failed
- The Capacity Reservation request has failed. A request might fail due to invalid request parameters, capacity constraints, or instance limit constraints. Failed requests are retained for 60 minutes.
Examples found in repository?
25629 25630 25631 25632 25633 25634 25635 25636 25637 25638 25639 25640 25641 25642 25643 25644 25645 25646 25647 25648 25649 25650 25651 25652 25653 25654 25655 25656 25657 25658 25659 25660 25661 25662 25663 25664 25665 25666 25667 25668 25669 25670 25671 25672 25673 25674 25675 25676 25677 25678 25679 25680 25681 25682 25683 25684 25685 25686 25687 25688 25689 25690 25691 25692 25693 25694 25695 25696 25697 25698 25699 25700 25701 25702 25703 25704 25705 25706 25707 25708 25709 25710 25711 25712 25713 25714 25715 25716 25717 25718 25719 25720 25721 25722 25723 25724 25725 25726 25727 25728 25729 25730 25731 25732 25733 25734 25735 25736 25737 25738 25739 25740 25741 25742 25743 25744 25745 25746 25747 25748 25749 25750 25751 25752 25753 25754 25755 25756 25757 25758 25759 25760 25761 25762 25763 25764 25765 25766 25767 25768 25769 25770 25771 25772 25773 25774 25775 25776 25777 25778 25779 25780 25781 25782 25783 25784 25785 25786 25787 25788 25789 25790 25791 25792 25793 25794 25795 25796 25797 25798 25799 25800 25801 25802 25803 25804 25805 25806 25807 25808 25809 25810 25811 25812 25813 25814 25815 25816 25817 25818 25819 25820 25821 25822 25823 25824 25825 25826 25827 25828 25829 25830 25831 25832 25833 25834 25835 25836 25837 25838 25839 25840 25841 25842 25843 25844 25845 25846 25847 25848 25849 25850 25851 25852 25853 25854 25855 25856 25857 25858 25859 25860 25861 25862 25863 25864 25865 25866 25867 25868 25869 25870 25871 25872 25873 25874 25875 25876 25877 25878 25879 25880 25881 25882 25883 25884 25885 25886 25887 25888 25889 25890 25891 25892 25893 25894 25895 25896 25897 25898 25899 25900 25901 25902 25903 25904 25905 25906 25907 25908 25909 25910 25911 25912 25913 25914 25915 25916 25917 25918 25919 25920 25921 25922 25923 25924 25925 25926 25927 25928 25929 25930 25931 25932 25933 25934 25935 25936 25937 25938 25939 25940 25941 25942 25943 25944 25945 25946 25947 25948 25949
pub fn deser_structure_crate_model_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#CapacityReservation$CapacityReservationId */ => {
let var_992 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_id(var_992);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#CapacityReservation$OwnerId */ => {
let var_993 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_993);
}
,
s if s.matches("capacityReservationArn") /* CapacityReservationArn com.amazonaws.ec2#CapacityReservation$CapacityReservationArn */ => {
let var_994 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_arn(var_994);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#CapacityReservation$AvailabilityZoneId */ => {
let var_995 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone_id(var_995);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#CapacityReservation$InstanceType */ => {
let var_996 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_type(var_996);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#CapacityReservation$InstancePlatform */ => {
let var_997 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_997);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#CapacityReservation$AvailabilityZone */ => {
let var_998 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_998);
}
,
s if s.matches("tenancy") /* Tenancy com.amazonaws.ec2#CapacityReservation$Tenancy */ => {
let var_999 =
Some(
Result::<crate::model::CapacityReservationTenancy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationTenancy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_tenancy(var_999);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#CapacityReservation$TotalInstanceCount */ => {
let var_1000 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_total_instance_count(var_1000);
}
,
s if s.matches("availableInstanceCount") /* AvailableInstanceCount com.amazonaws.ec2#CapacityReservation$AvailableInstanceCount */ => {
let var_1001 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_available_instance_count(var_1001);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#CapacityReservation$EbsOptimized */ => {
let var_1002 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1002);
}
,
s if s.matches("ephemeralStorage") /* EphemeralStorage com.amazonaws.ec2#CapacityReservation$EphemeralStorage */ => {
let var_1003 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ephemeral_storage(var_1003);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#CapacityReservation$State */ => {
let var_1004 =
Some(
Result::<crate::model::CapacityReservationState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1004);
}
,
s if s.matches("startDate") /* StartDate com.amazonaws.ec2#CapacityReservation$StartDate */ => {
let var_1005 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_start_date(var_1005);
}
,
s if s.matches("endDate") /* EndDate com.amazonaws.ec2#CapacityReservation$EndDate */ => {
let var_1006 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_end_date(var_1006);
}
,
s if s.matches("endDateType") /* EndDateType com.amazonaws.ec2#CapacityReservation$EndDateType */ => {
let var_1007 =
Some(
Result::<crate::model::EndDateType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EndDateType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_end_date_type(var_1007);
}
,
s if s.matches("instanceMatchCriteria") /* InstanceMatchCriteria com.amazonaws.ec2#CapacityReservation$InstanceMatchCriteria */ => {
let var_1008 =
Some(
Result::<crate::model::InstanceMatchCriteria, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceMatchCriteria::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_match_criteria(var_1008);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#CapacityReservation$CreateDate */ => {
let var_1009 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_1009);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#CapacityReservation$Tags */ => {
let var_1010 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1010);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#CapacityReservation$OutpostArn */ => {
let var_1011 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_1011);
}
,
s if s.matches("capacityReservationFleetId") /* CapacityReservationFleetId com.amazonaws.ec2#CapacityReservation$CapacityReservationFleetId */ => {
let var_1012 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_fleet_id(var_1012);
}
,
s if s.matches("placementGroupArn") /* PlacementGroupArn com.amazonaws.ec2#CapacityReservation$PlacementGroupArn */ => {
let var_1013 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_placement_group_arn(var_1013);
}
,
s if s.matches("capacityAllocationSet") /* CapacityAllocations com.amazonaws.ec2#CapacityReservation$CapacityAllocations */ => {
let var_1014 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_capacity_allocations(&mut tag)
?
)
;
builder = builder.set_capacity_allocations(var_1014);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn start_date(self, input: DateTime) -> Self
pub fn start_date(self, input: DateTime) -> Self
The date and time at which the Capacity Reservation was started.
sourcepub fn set_start_date(self, input: Option<DateTime>) -> Self
pub fn set_start_date(self, input: Option<DateTime>) -> Self
The date and time at which the Capacity Reservation was started.
Examples found in repository?
25629 25630 25631 25632 25633 25634 25635 25636 25637 25638 25639 25640 25641 25642 25643 25644 25645 25646 25647 25648 25649 25650 25651 25652 25653 25654 25655 25656 25657 25658 25659 25660 25661 25662 25663 25664 25665 25666 25667 25668 25669 25670 25671 25672 25673 25674 25675 25676 25677 25678 25679 25680 25681 25682 25683 25684 25685 25686 25687 25688 25689 25690 25691 25692 25693 25694 25695 25696 25697 25698 25699 25700 25701 25702 25703 25704 25705 25706 25707 25708 25709 25710 25711 25712 25713 25714 25715 25716 25717 25718 25719 25720 25721 25722 25723 25724 25725 25726 25727 25728 25729 25730 25731 25732 25733 25734 25735 25736 25737 25738 25739 25740 25741 25742 25743 25744 25745 25746 25747 25748 25749 25750 25751 25752 25753 25754 25755 25756 25757 25758 25759 25760 25761 25762 25763 25764 25765 25766 25767 25768 25769 25770 25771 25772 25773 25774 25775 25776 25777 25778 25779 25780 25781 25782 25783 25784 25785 25786 25787 25788 25789 25790 25791 25792 25793 25794 25795 25796 25797 25798 25799 25800 25801 25802 25803 25804 25805 25806 25807 25808 25809 25810 25811 25812 25813 25814 25815 25816 25817 25818 25819 25820 25821 25822 25823 25824 25825 25826 25827 25828 25829 25830 25831 25832 25833 25834 25835 25836 25837 25838 25839 25840 25841 25842 25843 25844 25845 25846 25847 25848 25849 25850 25851 25852 25853 25854 25855 25856 25857 25858 25859 25860 25861 25862 25863 25864 25865 25866 25867 25868 25869 25870 25871 25872 25873 25874 25875 25876 25877 25878 25879 25880 25881 25882 25883 25884 25885 25886 25887 25888 25889 25890 25891 25892 25893 25894 25895 25896 25897 25898 25899 25900 25901 25902 25903 25904 25905 25906 25907 25908 25909 25910 25911 25912 25913 25914 25915 25916 25917 25918 25919 25920 25921 25922 25923 25924 25925 25926 25927 25928 25929 25930 25931 25932 25933 25934 25935 25936 25937 25938 25939 25940 25941 25942 25943 25944 25945 25946 25947 25948 25949
pub fn deser_structure_crate_model_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#CapacityReservation$CapacityReservationId */ => {
let var_992 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_id(var_992);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#CapacityReservation$OwnerId */ => {
let var_993 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_993);
}
,
s if s.matches("capacityReservationArn") /* CapacityReservationArn com.amazonaws.ec2#CapacityReservation$CapacityReservationArn */ => {
let var_994 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_arn(var_994);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#CapacityReservation$AvailabilityZoneId */ => {
let var_995 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone_id(var_995);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#CapacityReservation$InstanceType */ => {
let var_996 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_type(var_996);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#CapacityReservation$InstancePlatform */ => {
let var_997 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_997);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#CapacityReservation$AvailabilityZone */ => {
let var_998 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_998);
}
,
s if s.matches("tenancy") /* Tenancy com.amazonaws.ec2#CapacityReservation$Tenancy */ => {
let var_999 =
Some(
Result::<crate::model::CapacityReservationTenancy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationTenancy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_tenancy(var_999);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#CapacityReservation$TotalInstanceCount */ => {
let var_1000 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_total_instance_count(var_1000);
}
,
s if s.matches("availableInstanceCount") /* AvailableInstanceCount com.amazonaws.ec2#CapacityReservation$AvailableInstanceCount */ => {
let var_1001 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_available_instance_count(var_1001);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#CapacityReservation$EbsOptimized */ => {
let var_1002 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1002);
}
,
s if s.matches("ephemeralStorage") /* EphemeralStorage com.amazonaws.ec2#CapacityReservation$EphemeralStorage */ => {
let var_1003 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ephemeral_storage(var_1003);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#CapacityReservation$State */ => {
let var_1004 =
Some(
Result::<crate::model::CapacityReservationState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1004);
}
,
s if s.matches("startDate") /* StartDate com.amazonaws.ec2#CapacityReservation$StartDate */ => {
let var_1005 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_start_date(var_1005);
}
,
s if s.matches("endDate") /* EndDate com.amazonaws.ec2#CapacityReservation$EndDate */ => {
let var_1006 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_end_date(var_1006);
}
,
s if s.matches("endDateType") /* EndDateType com.amazonaws.ec2#CapacityReservation$EndDateType */ => {
let var_1007 =
Some(
Result::<crate::model::EndDateType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EndDateType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_end_date_type(var_1007);
}
,
s if s.matches("instanceMatchCriteria") /* InstanceMatchCriteria com.amazonaws.ec2#CapacityReservation$InstanceMatchCriteria */ => {
let var_1008 =
Some(
Result::<crate::model::InstanceMatchCriteria, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceMatchCriteria::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_match_criteria(var_1008);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#CapacityReservation$CreateDate */ => {
let var_1009 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_1009);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#CapacityReservation$Tags */ => {
let var_1010 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1010);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#CapacityReservation$OutpostArn */ => {
let var_1011 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_1011);
}
,
s if s.matches("capacityReservationFleetId") /* CapacityReservationFleetId com.amazonaws.ec2#CapacityReservation$CapacityReservationFleetId */ => {
let var_1012 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_fleet_id(var_1012);
}
,
s if s.matches("placementGroupArn") /* PlacementGroupArn com.amazonaws.ec2#CapacityReservation$PlacementGroupArn */ => {
let var_1013 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_placement_group_arn(var_1013);
}
,
s if s.matches("capacityAllocationSet") /* CapacityAllocations com.amazonaws.ec2#CapacityReservation$CapacityAllocations */ => {
let var_1014 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_capacity_allocations(&mut tag)
?
)
;
builder = builder.set_capacity_allocations(var_1014);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn end_date(self, input: DateTime) -> Self
pub fn end_date(self, input: DateTime) -> Self
The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation's state changes to expired
when it reaches its end date and time.
sourcepub fn set_end_date(self, input: Option<DateTime>) -> Self
pub fn set_end_date(self, input: Option<DateTime>) -> Self
The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation's state changes to expired
when it reaches its end date and time.
Examples found in repository?
25629 25630 25631 25632 25633 25634 25635 25636 25637 25638 25639 25640 25641 25642 25643 25644 25645 25646 25647 25648 25649 25650 25651 25652 25653 25654 25655 25656 25657 25658 25659 25660 25661 25662 25663 25664 25665 25666 25667 25668 25669 25670 25671 25672 25673 25674 25675 25676 25677 25678 25679 25680 25681 25682 25683 25684 25685 25686 25687 25688 25689 25690 25691 25692 25693 25694 25695 25696 25697 25698 25699 25700 25701 25702 25703 25704 25705 25706 25707 25708 25709 25710 25711 25712 25713 25714 25715 25716 25717 25718 25719 25720 25721 25722 25723 25724 25725 25726 25727 25728 25729 25730 25731 25732 25733 25734 25735 25736 25737 25738 25739 25740 25741 25742 25743 25744 25745 25746 25747 25748 25749 25750 25751 25752 25753 25754 25755 25756 25757 25758 25759 25760 25761 25762 25763 25764 25765 25766 25767 25768 25769 25770 25771 25772 25773 25774 25775 25776 25777 25778 25779 25780 25781 25782 25783 25784 25785 25786 25787 25788 25789 25790 25791 25792 25793 25794 25795 25796 25797 25798 25799 25800 25801 25802 25803 25804 25805 25806 25807 25808 25809 25810 25811 25812 25813 25814 25815 25816 25817 25818 25819 25820 25821 25822 25823 25824 25825 25826 25827 25828 25829 25830 25831 25832 25833 25834 25835 25836 25837 25838 25839 25840 25841 25842 25843 25844 25845 25846 25847 25848 25849 25850 25851 25852 25853 25854 25855 25856 25857 25858 25859 25860 25861 25862 25863 25864 25865 25866 25867 25868 25869 25870 25871 25872 25873 25874 25875 25876 25877 25878 25879 25880 25881 25882 25883 25884 25885 25886 25887 25888 25889 25890 25891 25892 25893 25894 25895 25896 25897 25898 25899 25900 25901 25902 25903 25904 25905 25906 25907 25908 25909 25910 25911 25912 25913 25914 25915 25916 25917 25918 25919 25920 25921 25922 25923 25924 25925 25926 25927 25928 25929 25930 25931 25932 25933 25934 25935 25936 25937 25938 25939 25940 25941 25942 25943 25944 25945 25946 25947 25948 25949
pub fn deser_structure_crate_model_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#CapacityReservation$CapacityReservationId */ => {
let var_992 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_id(var_992);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#CapacityReservation$OwnerId */ => {
let var_993 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_993);
}
,
s if s.matches("capacityReservationArn") /* CapacityReservationArn com.amazonaws.ec2#CapacityReservation$CapacityReservationArn */ => {
let var_994 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_arn(var_994);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#CapacityReservation$AvailabilityZoneId */ => {
let var_995 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone_id(var_995);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#CapacityReservation$InstanceType */ => {
let var_996 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_type(var_996);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#CapacityReservation$InstancePlatform */ => {
let var_997 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_997);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#CapacityReservation$AvailabilityZone */ => {
let var_998 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_998);
}
,
s if s.matches("tenancy") /* Tenancy com.amazonaws.ec2#CapacityReservation$Tenancy */ => {
let var_999 =
Some(
Result::<crate::model::CapacityReservationTenancy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationTenancy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_tenancy(var_999);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#CapacityReservation$TotalInstanceCount */ => {
let var_1000 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_total_instance_count(var_1000);
}
,
s if s.matches("availableInstanceCount") /* AvailableInstanceCount com.amazonaws.ec2#CapacityReservation$AvailableInstanceCount */ => {
let var_1001 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_available_instance_count(var_1001);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#CapacityReservation$EbsOptimized */ => {
let var_1002 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1002);
}
,
s if s.matches("ephemeralStorage") /* EphemeralStorage com.amazonaws.ec2#CapacityReservation$EphemeralStorage */ => {
let var_1003 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ephemeral_storage(var_1003);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#CapacityReservation$State */ => {
let var_1004 =
Some(
Result::<crate::model::CapacityReservationState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1004);
}
,
s if s.matches("startDate") /* StartDate com.amazonaws.ec2#CapacityReservation$StartDate */ => {
let var_1005 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_start_date(var_1005);
}
,
s if s.matches("endDate") /* EndDate com.amazonaws.ec2#CapacityReservation$EndDate */ => {
let var_1006 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_end_date(var_1006);
}
,
s if s.matches("endDateType") /* EndDateType com.amazonaws.ec2#CapacityReservation$EndDateType */ => {
let var_1007 =
Some(
Result::<crate::model::EndDateType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EndDateType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_end_date_type(var_1007);
}
,
s if s.matches("instanceMatchCriteria") /* InstanceMatchCriteria com.amazonaws.ec2#CapacityReservation$InstanceMatchCriteria */ => {
let var_1008 =
Some(
Result::<crate::model::InstanceMatchCriteria, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceMatchCriteria::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_match_criteria(var_1008);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#CapacityReservation$CreateDate */ => {
let var_1009 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_1009);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#CapacityReservation$Tags */ => {
let var_1010 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1010);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#CapacityReservation$OutpostArn */ => {
let var_1011 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_1011);
}
,
s if s.matches("capacityReservationFleetId") /* CapacityReservationFleetId com.amazonaws.ec2#CapacityReservation$CapacityReservationFleetId */ => {
let var_1012 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_fleet_id(var_1012);
}
,
s if s.matches("placementGroupArn") /* PlacementGroupArn com.amazonaws.ec2#CapacityReservation$PlacementGroupArn */ => {
let var_1013 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_placement_group_arn(var_1013);
}
,
s if s.matches("capacityAllocationSet") /* CapacityAllocations com.amazonaws.ec2#CapacityReservation$CapacityAllocations */ => {
let var_1014 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_capacity_allocations(&mut tag)
?
)
;
builder = builder.set_capacity_allocations(var_1014);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn end_date_type(self, input: EndDateType) -> Self
pub fn end_date_type(self, input: EndDateType) -> Self
Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:
-
unlimited
- The Capacity Reservation remains active until you explicitly cancel it. -
limited
- The Capacity Reservation expires automatically at a specified date and time.
sourcepub fn set_end_date_type(self, input: Option<EndDateType>) -> Self
pub fn set_end_date_type(self, input: Option<EndDateType>) -> Self
Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:
-
unlimited
- The Capacity Reservation remains active until you explicitly cancel it. -
limited
- The Capacity Reservation expires automatically at a specified date and time.
Examples found in repository?
25629 25630 25631 25632 25633 25634 25635 25636 25637 25638 25639 25640 25641 25642 25643 25644 25645 25646 25647 25648 25649 25650 25651 25652 25653 25654 25655 25656 25657 25658 25659 25660 25661 25662 25663 25664 25665 25666 25667 25668 25669 25670 25671 25672 25673 25674 25675 25676 25677 25678 25679 25680 25681 25682 25683 25684 25685 25686 25687 25688 25689 25690 25691 25692 25693 25694 25695 25696 25697 25698 25699 25700 25701 25702 25703 25704 25705 25706 25707 25708 25709 25710 25711 25712 25713 25714 25715 25716 25717 25718 25719 25720 25721 25722 25723 25724 25725 25726 25727 25728 25729 25730 25731 25732 25733 25734 25735 25736 25737 25738 25739 25740 25741 25742 25743 25744 25745 25746 25747 25748 25749 25750 25751 25752 25753 25754 25755 25756 25757 25758 25759 25760 25761 25762 25763 25764 25765 25766 25767 25768 25769 25770 25771 25772 25773 25774 25775 25776 25777 25778 25779 25780 25781 25782 25783 25784 25785 25786 25787 25788 25789 25790 25791 25792 25793 25794 25795 25796 25797 25798 25799 25800 25801 25802 25803 25804 25805 25806 25807 25808 25809 25810 25811 25812 25813 25814 25815 25816 25817 25818 25819 25820 25821 25822 25823 25824 25825 25826 25827 25828 25829 25830 25831 25832 25833 25834 25835 25836 25837 25838 25839 25840 25841 25842 25843 25844 25845 25846 25847 25848 25849 25850 25851 25852 25853 25854 25855 25856 25857 25858 25859 25860 25861 25862 25863 25864 25865 25866 25867 25868 25869 25870 25871 25872 25873 25874 25875 25876 25877 25878 25879 25880 25881 25882 25883 25884 25885 25886 25887 25888 25889 25890 25891 25892 25893 25894 25895 25896 25897 25898 25899 25900 25901 25902 25903 25904 25905 25906 25907 25908 25909 25910 25911 25912 25913 25914 25915 25916 25917 25918 25919 25920 25921 25922 25923 25924 25925 25926 25927 25928 25929 25930 25931 25932 25933 25934 25935 25936 25937 25938 25939 25940 25941 25942 25943 25944 25945 25946 25947 25948 25949
pub fn deser_structure_crate_model_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#CapacityReservation$CapacityReservationId */ => {
let var_992 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_id(var_992);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#CapacityReservation$OwnerId */ => {
let var_993 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_993);
}
,
s if s.matches("capacityReservationArn") /* CapacityReservationArn com.amazonaws.ec2#CapacityReservation$CapacityReservationArn */ => {
let var_994 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_arn(var_994);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#CapacityReservation$AvailabilityZoneId */ => {
let var_995 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone_id(var_995);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#CapacityReservation$InstanceType */ => {
let var_996 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_type(var_996);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#CapacityReservation$InstancePlatform */ => {
let var_997 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_997);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#CapacityReservation$AvailabilityZone */ => {
let var_998 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_998);
}
,
s if s.matches("tenancy") /* Tenancy com.amazonaws.ec2#CapacityReservation$Tenancy */ => {
let var_999 =
Some(
Result::<crate::model::CapacityReservationTenancy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationTenancy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_tenancy(var_999);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#CapacityReservation$TotalInstanceCount */ => {
let var_1000 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_total_instance_count(var_1000);
}
,
s if s.matches("availableInstanceCount") /* AvailableInstanceCount com.amazonaws.ec2#CapacityReservation$AvailableInstanceCount */ => {
let var_1001 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_available_instance_count(var_1001);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#CapacityReservation$EbsOptimized */ => {
let var_1002 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1002);
}
,
s if s.matches("ephemeralStorage") /* EphemeralStorage com.amazonaws.ec2#CapacityReservation$EphemeralStorage */ => {
let var_1003 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ephemeral_storage(var_1003);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#CapacityReservation$State */ => {
let var_1004 =
Some(
Result::<crate::model::CapacityReservationState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1004);
}
,
s if s.matches("startDate") /* StartDate com.amazonaws.ec2#CapacityReservation$StartDate */ => {
let var_1005 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_start_date(var_1005);
}
,
s if s.matches("endDate") /* EndDate com.amazonaws.ec2#CapacityReservation$EndDate */ => {
let var_1006 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_end_date(var_1006);
}
,
s if s.matches("endDateType") /* EndDateType com.amazonaws.ec2#CapacityReservation$EndDateType */ => {
let var_1007 =
Some(
Result::<crate::model::EndDateType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EndDateType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_end_date_type(var_1007);
}
,
s if s.matches("instanceMatchCriteria") /* InstanceMatchCriteria com.amazonaws.ec2#CapacityReservation$InstanceMatchCriteria */ => {
let var_1008 =
Some(
Result::<crate::model::InstanceMatchCriteria, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceMatchCriteria::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_match_criteria(var_1008);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#CapacityReservation$CreateDate */ => {
let var_1009 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_1009);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#CapacityReservation$Tags */ => {
let var_1010 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1010);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#CapacityReservation$OutpostArn */ => {
let var_1011 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_1011);
}
,
s if s.matches("capacityReservationFleetId") /* CapacityReservationFleetId com.amazonaws.ec2#CapacityReservation$CapacityReservationFleetId */ => {
let var_1012 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_fleet_id(var_1012);
}
,
s if s.matches("placementGroupArn") /* PlacementGroupArn com.amazonaws.ec2#CapacityReservation$PlacementGroupArn */ => {
let var_1013 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_placement_group_arn(var_1013);
}
,
s if s.matches("capacityAllocationSet") /* CapacityAllocations com.amazonaws.ec2#CapacityReservation$CapacityAllocations */ => {
let var_1014 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_capacity_allocations(&mut tag)
?
)
;
builder = builder.set_capacity_allocations(var_1014);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn instance_match_criteria(self, input: InstanceMatchCriteria) -> Self
pub fn instance_match_criteria(self, input: InstanceMatchCriteria) -> Self
Indicates the type of instance launches that the Capacity Reservation accepts. The options include:
-
open
- The Capacity Reservation accepts all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes launch into the Capacity Reservation automatically without specifying any additional parameters. -
targeted
- The Capacity Reservation only accepts instances that have matching attributes (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only permitted instances can use the reserved capacity.
sourcepub fn set_instance_match_criteria(
self,
input: Option<InstanceMatchCriteria>
) -> Self
pub fn set_instance_match_criteria(
self,
input: Option<InstanceMatchCriteria>
) -> Self
Indicates the type of instance launches that the Capacity Reservation accepts. The options include:
-
open
- The Capacity Reservation accepts all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes launch into the Capacity Reservation automatically without specifying any additional parameters. -
targeted
- The Capacity Reservation only accepts instances that have matching attributes (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only permitted instances can use the reserved capacity.
Examples found in repository?
25629 25630 25631 25632 25633 25634 25635 25636 25637 25638 25639 25640 25641 25642 25643 25644 25645 25646 25647 25648 25649 25650 25651 25652 25653 25654 25655 25656 25657 25658 25659 25660 25661 25662 25663 25664 25665 25666 25667 25668 25669 25670 25671 25672 25673 25674 25675 25676 25677 25678 25679 25680 25681 25682 25683 25684 25685 25686 25687 25688 25689 25690 25691 25692 25693 25694 25695 25696 25697 25698 25699 25700 25701 25702 25703 25704 25705 25706 25707 25708 25709 25710 25711 25712 25713 25714 25715 25716 25717 25718 25719 25720 25721 25722 25723 25724 25725 25726 25727 25728 25729 25730 25731 25732 25733 25734 25735 25736 25737 25738 25739 25740 25741 25742 25743 25744 25745 25746 25747 25748 25749 25750 25751 25752 25753 25754 25755 25756 25757 25758 25759 25760 25761 25762 25763 25764 25765 25766 25767 25768 25769 25770 25771 25772 25773 25774 25775 25776 25777 25778 25779 25780 25781 25782 25783 25784 25785 25786 25787 25788 25789 25790 25791 25792 25793 25794 25795 25796 25797 25798 25799 25800 25801 25802 25803 25804 25805 25806 25807 25808 25809 25810 25811 25812 25813 25814 25815 25816 25817 25818 25819 25820 25821 25822 25823 25824 25825 25826 25827 25828 25829 25830 25831 25832 25833 25834 25835 25836 25837 25838 25839 25840 25841 25842 25843 25844 25845 25846 25847 25848 25849 25850 25851 25852 25853 25854 25855 25856 25857 25858 25859 25860 25861 25862 25863 25864 25865 25866 25867 25868 25869 25870 25871 25872 25873 25874 25875 25876 25877 25878 25879 25880 25881 25882 25883 25884 25885 25886 25887 25888 25889 25890 25891 25892 25893 25894 25895 25896 25897 25898 25899 25900 25901 25902 25903 25904 25905 25906 25907 25908 25909 25910 25911 25912 25913 25914 25915 25916 25917 25918 25919 25920 25921 25922 25923 25924 25925 25926 25927 25928 25929 25930 25931 25932 25933 25934 25935 25936 25937 25938 25939 25940 25941 25942 25943 25944 25945 25946 25947 25948 25949
pub fn deser_structure_crate_model_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#CapacityReservation$CapacityReservationId */ => {
let var_992 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_id(var_992);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#CapacityReservation$OwnerId */ => {
let var_993 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_993);
}
,
s if s.matches("capacityReservationArn") /* CapacityReservationArn com.amazonaws.ec2#CapacityReservation$CapacityReservationArn */ => {
let var_994 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_arn(var_994);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#CapacityReservation$AvailabilityZoneId */ => {
let var_995 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone_id(var_995);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#CapacityReservation$InstanceType */ => {
let var_996 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_type(var_996);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#CapacityReservation$InstancePlatform */ => {
let var_997 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_997);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#CapacityReservation$AvailabilityZone */ => {
let var_998 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_998);
}
,
s if s.matches("tenancy") /* Tenancy com.amazonaws.ec2#CapacityReservation$Tenancy */ => {
let var_999 =
Some(
Result::<crate::model::CapacityReservationTenancy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationTenancy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_tenancy(var_999);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#CapacityReservation$TotalInstanceCount */ => {
let var_1000 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_total_instance_count(var_1000);
}
,
s if s.matches("availableInstanceCount") /* AvailableInstanceCount com.amazonaws.ec2#CapacityReservation$AvailableInstanceCount */ => {
let var_1001 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_available_instance_count(var_1001);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#CapacityReservation$EbsOptimized */ => {
let var_1002 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1002);
}
,
s if s.matches("ephemeralStorage") /* EphemeralStorage com.amazonaws.ec2#CapacityReservation$EphemeralStorage */ => {
let var_1003 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ephemeral_storage(var_1003);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#CapacityReservation$State */ => {
let var_1004 =
Some(
Result::<crate::model::CapacityReservationState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1004);
}
,
s if s.matches("startDate") /* StartDate com.amazonaws.ec2#CapacityReservation$StartDate */ => {
let var_1005 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_start_date(var_1005);
}
,
s if s.matches("endDate") /* EndDate com.amazonaws.ec2#CapacityReservation$EndDate */ => {
let var_1006 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_end_date(var_1006);
}
,
s if s.matches("endDateType") /* EndDateType com.amazonaws.ec2#CapacityReservation$EndDateType */ => {
let var_1007 =
Some(
Result::<crate::model::EndDateType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EndDateType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_end_date_type(var_1007);
}
,
s if s.matches("instanceMatchCriteria") /* InstanceMatchCriteria com.amazonaws.ec2#CapacityReservation$InstanceMatchCriteria */ => {
let var_1008 =
Some(
Result::<crate::model::InstanceMatchCriteria, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceMatchCriteria::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_match_criteria(var_1008);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#CapacityReservation$CreateDate */ => {
let var_1009 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_1009);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#CapacityReservation$Tags */ => {
let var_1010 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1010);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#CapacityReservation$OutpostArn */ => {
let var_1011 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_1011);
}
,
s if s.matches("capacityReservationFleetId") /* CapacityReservationFleetId com.amazonaws.ec2#CapacityReservation$CapacityReservationFleetId */ => {
let var_1012 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_fleet_id(var_1012);
}
,
s if s.matches("placementGroupArn") /* PlacementGroupArn com.amazonaws.ec2#CapacityReservation$PlacementGroupArn */ => {
let var_1013 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_placement_group_arn(var_1013);
}
,
s if s.matches("capacityAllocationSet") /* CapacityAllocations com.amazonaws.ec2#CapacityReservation$CapacityAllocations */ => {
let var_1014 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_capacity_allocations(&mut tag)
?
)
;
builder = builder.set_capacity_allocations(var_1014);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn create_date(self, input: DateTime) -> Self
pub fn create_date(self, input: DateTime) -> Self
The date and time at which the Capacity Reservation was created.
sourcepub fn set_create_date(self, input: Option<DateTime>) -> Self
pub fn set_create_date(self, input: Option<DateTime>) -> Self
The date and time at which the Capacity Reservation was created.
Examples found in repository?
25629 25630 25631 25632 25633 25634 25635 25636 25637 25638 25639 25640 25641 25642 25643 25644 25645 25646 25647 25648 25649 25650 25651 25652 25653 25654 25655 25656 25657 25658 25659 25660 25661 25662 25663 25664 25665 25666 25667 25668 25669 25670 25671 25672 25673 25674 25675 25676 25677 25678 25679 25680 25681 25682 25683 25684 25685 25686 25687 25688 25689 25690 25691 25692 25693 25694 25695 25696 25697 25698 25699 25700 25701 25702 25703 25704 25705 25706 25707 25708 25709 25710 25711 25712 25713 25714 25715 25716 25717 25718 25719 25720 25721 25722 25723 25724 25725 25726 25727 25728 25729 25730 25731 25732 25733 25734 25735 25736 25737 25738 25739 25740 25741 25742 25743 25744 25745 25746 25747 25748 25749 25750 25751 25752 25753 25754 25755 25756 25757 25758 25759 25760 25761 25762 25763 25764 25765 25766 25767 25768 25769 25770 25771 25772 25773 25774 25775 25776 25777 25778 25779 25780 25781 25782 25783 25784 25785 25786 25787 25788 25789 25790 25791 25792 25793 25794 25795 25796 25797 25798 25799 25800 25801 25802 25803 25804 25805 25806 25807 25808 25809 25810 25811 25812 25813 25814 25815 25816 25817 25818 25819 25820 25821 25822 25823 25824 25825 25826 25827 25828 25829 25830 25831 25832 25833 25834 25835 25836 25837 25838 25839 25840 25841 25842 25843 25844 25845 25846 25847 25848 25849 25850 25851 25852 25853 25854 25855 25856 25857 25858 25859 25860 25861 25862 25863 25864 25865 25866 25867 25868 25869 25870 25871 25872 25873 25874 25875 25876 25877 25878 25879 25880 25881 25882 25883 25884 25885 25886 25887 25888 25889 25890 25891 25892 25893 25894 25895 25896 25897 25898 25899 25900 25901 25902 25903 25904 25905 25906 25907 25908 25909 25910 25911 25912 25913 25914 25915 25916 25917 25918 25919 25920 25921 25922 25923 25924 25925 25926 25927 25928 25929 25930 25931 25932 25933 25934 25935 25936 25937 25938 25939 25940 25941 25942 25943 25944 25945 25946 25947 25948 25949
pub fn deser_structure_crate_model_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#CapacityReservation$CapacityReservationId */ => {
let var_992 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_id(var_992);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#CapacityReservation$OwnerId */ => {
let var_993 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_993);
}
,
s if s.matches("capacityReservationArn") /* CapacityReservationArn com.amazonaws.ec2#CapacityReservation$CapacityReservationArn */ => {
let var_994 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_arn(var_994);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#CapacityReservation$AvailabilityZoneId */ => {
let var_995 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone_id(var_995);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#CapacityReservation$InstanceType */ => {
let var_996 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_type(var_996);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#CapacityReservation$InstancePlatform */ => {
let var_997 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_997);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#CapacityReservation$AvailabilityZone */ => {
let var_998 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_998);
}
,
s if s.matches("tenancy") /* Tenancy com.amazonaws.ec2#CapacityReservation$Tenancy */ => {
let var_999 =
Some(
Result::<crate::model::CapacityReservationTenancy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationTenancy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_tenancy(var_999);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#CapacityReservation$TotalInstanceCount */ => {
let var_1000 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_total_instance_count(var_1000);
}
,
s if s.matches("availableInstanceCount") /* AvailableInstanceCount com.amazonaws.ec2#CapacityReservation$AvailableInstanceCount */ => {
let var_1001 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_available_instance_count(var_1001);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#CapacityReservation$EbsOptimized */ => {
let var_1002 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1002);
}
,
s if s.matches("ephemeralStorage") /* EphemeralStorage com.amazonaws.ec2#CapacityReservation$EphemeralStorage */ => {
let var_1003 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ephemeral_storage(var_1003);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#CapacityReservation$State */ => {
let var_1004 =
Some(
Result::<crate::model::CapacityReservationState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1004);
}
,
s if s.matches("startDate") /* StartDate com.amazonaws.ec2#CapacityReservation$StartDate */ => {
let var_1005 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_start_date(var_1005);
}
,
s if s.matches("endDate") /* EndDate com.amazonaws.ec2#CapacityReservation$EndDate */ => {
let var_1006 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_end_date(var_1006);
}
,
s if s.matches("endDateType") /* EndDateType com.amazonaws.ec2#CapacityReservation$EndDateType */ => {
let var_1007 =
Some(
Result::<crate::model::EndDateType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EndDateType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_end_date_type(var_1007);
}
,
s if s.matches("instanceMatchCriteria") /* InstanceMatchCriteria com.amazonaws.ec2#CapacityReservation$InstanceMatchCriteria */ => {
let var_1008 =
Some(
Result::<crate::model::InstanceMatchCriteria, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceMatchCriteria::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_match_criteria(var_1008);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#CapacityReservation$CreateDate */ => {
let var_1009 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_1009);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#CapacityReservation$Tags */ => {
let var_1010 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1010);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#CapacityReservation$OutpostArn */ => {
let var_1011 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_1011);
}
,
s if s.matches("capacityReservationFleetId") /* CapacityReservationFleetId com.amazonaws.ec2#CapacityReservation$CapacityReservationFleetId */ => {
let var_1012 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_fleet_id(var_1012);
}
,
s if s.matches("placementGroupArn") /* PlacementGroupArn com.amazonaws.ec2#CapacityReservation$PlacementGroupArn */ => {
let var_1013 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_placement_group_arn(var_1013);
}
,
s if s.matches("capacityAllocationSet") /* CapacityAllocations com.amazonaws.ec2#CapacityReservation$CapacityAllocations */ => {
let var_1014 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_capacity_allocations(&mut tag)
?
)
;
builder = builder.set_capacity_allocations(var_1014);
}
,
_ => {}
}
}
Ok(builder.build())
}
Appends an item to tags
.
To override the contents of this collection use set_tags
.
Any tags assigned to the Capacity Reservation.
Any tags assigned to the Capacity Reservation.
Examples found in repository?
25629 25630 25631 25632 25633 25634 25635 25636 25637 25638 25639 25640 25641 25642 25643 25644 25645 25646 25647 25648 25649 25650 25651 25652 25653 25654 25655 25656 25657 25658 25659 25660 25661 25662 25663 25664 25665 25666 25667 25668 25669 25670 25671 25672 25673 25674 25675 25676 25677 25678 25679 25680 25681 25682 25683 25684 25685 25686 25687 25688 25689 25690 25691 25692 25693 25694 25695 25696 25697 25698 25699 25700 25701 25702 25703 25704 25705 25706 25707 25708 25709 25710 25711 25712 25713 25714 25715 25716 25717 25718 25719 25720 25721 25722 25723 25724 25725 25726 25727 25728 25729 25730 25731 25732 25733 25734 25735 25736 25737 25738 25739 25740 25741 25742 25743 25744 25745 25746 25747 25748 25749 25750 25751 25752 25753 25754 25755 25756 25757 25758 25759 25760 25761 25762 25763 25764 25765 25766 25767 25768 25769 25770 25771 25772 25773 25774 25775 25776 25777 25778 25779 25780 25781 25782 25783 25784 25785 25786 25787 25788 25789 25790 25791 25792 25793 25794 25795 25796 25797 25798 25799 25800 25801 25802 25803 25804 25805 25806 25807 25808 25809 25810 25811 25812 25813 25814 25815 25816 25817 25818 25819 25820 25821 25822 25823 25824 25825 25826 25827 25828 25829 25830 25831 25832 25833 25834 25835 25836 25837 25838 25839 25840 25841 25842 25843 25844 25845 25846 25847 25848 25849 25850 25851 25852 25853 25854 25855 25856 25857 25858 25859 25860 25861 25862 25863 25864 25865 25866 25867 25868 25869 25870 25871 25872 25873 25874 25875 25876 25877 25878 25879 25880 25881 25882 25883 25884 25885 25886 25887 25888 25889 25890 25891 25892 25893 25894 25895 25896 25897 25898 25899 25900 25901 25902 25903 25904 25905 25906 25907 25908 25909 25910 25911 25912 25913 25914 25915 25916 25917 25918 25919 25920 25921 25922 25923 25924 25925 25926 25927 25928 25929 25930 25931 25932 25933 25934 25935 25936 25937 25938 25939 25940 25941 25942 25943 25944 25945 25946 25947 25948 25949
pub fn deser_structure_crate_model_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#CapacityReservation$CapacityReservationId */ => {
let var_992 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_id(var_992);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#CapacityReservation$OwnerId */ => {
let var_993 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_993);
}
,
s if s.matches("capacityReservationArn") /* CapacityReservationArn com.amazonaws.ec2#CapacityReservation$CapacityReservationArn */ => {
let var_994 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_arn(var_994);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#CapacityReservation$AvailabilityZoneId */ => {
let var_995 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone_id(var_995);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#CapacityReservation$InstanceType */ => {
let var_996 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_type(var_996);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#CapacityReservation$InstancePlatform */ => {
let var_997 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_997);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#CapacityReservation$AvailabilityZone */ => {
let var_998 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_998);
}
,
s if s.matches("tenancy") /* Tenancy com.amazonaws.ec2#CapacityReservation$Tenancy */ => {
let var_999 =
Some(
Result::<crate::model::CapacityReservationTenancy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationTenancy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_tenancy(var_999);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#CapacityReservation$TotalInstanceCount */ => {
let var_1000 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_total_instance_count(var_1000);
}
,
s if s.matches("availableInstanceCount") /* AvailableInstanceCount com.amazonaws.ec2#CapacityReservation$AvailableInstanceCount */ => {
let var_1001 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_available_instance_count(var_1001);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#CapacityReservation$EbsOptimized */ => {
let var_1002 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1002);
}
,
s if s.matches("ephemeralStorage") /* EphemeralStorage com.amazonaws.ec2#CapacityReservation$EphemeralStorage */ => {
let var_1003 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ephemeral_storage(var_1003);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#CapacityReservation$State */ => {
let var_1004 =
Some(
Result::<crate::model::CapacityReservationState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1004);
}
,
s if s.matches("startDate") /* StartDate com.amazonaws.ec2#CapacityReservation$StartDate */ => {
let var_1005 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_start_date(var_1005);
}
,
s if s.matches("endDate") /* EndDate com.amazonaws.ec2#CapacityReservation$EndDate */ => {
let var_1006 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_end_date(var_1006);
}
,
s if s.matches("endDateType") /* EndDateType com.amazonaws.ec2#CapacityReservation$EndDateType */ => {
let var_1007 =
Some(
Result::<crate::model::EndDateType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EndDateType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_end_date_type(var_1007);
}
,
s if s.matches("instanceMatchCriteria") /* InstanceMatchCriteria com.amazonaws.ec2#CapacityReservation$InstanceMatchCriteria */ => {
let var_1008 =
Some(
Result::<crate::model::InstanceMatchCriteria, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceMatchCriteria::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_match_criteria(var_1008);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#CapacityReservation$CreateDate */ => {
let var_1009 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_1009);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#CapacityReservation$Tags */ => {
let var_1010 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1010);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#CapacityReservation$OutpostArn */ => {
let var_1011 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_1011);
}
,
s if s.matches("capacityReservationFleetId") /* CapacityReservationFleetId com.amazonaws.ec2#CapacityReservation$CapacityReservationFleetId */ => {
let var_1012 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_fleet_id(var_1012);
}
,
s if s.matches("placementGroupArn") /* PlacementGroupArn com.amazonaws.ec2#CapacityReservation$PlacementGroupArn */ => {
let var_1013 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_placement_group_arn(var_1013);
}
,
s if s.matches("capacityAllocationSet") /* CapacityAllocations com.amazonaws.ec2#CapacityReservation$CapacityAllocations */ => {
let var_1014 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_capacity_allocations(&mut tag)
?
)
;
builder = builder.set_capacity_allocations(var_1014);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn outpost_arn(self, input: impl Into<String>) -> Self
pub fn outpost_arn(self, input: impl Into<String>) -> Self
The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation was created.
sourcepub fn set_outpost_arn(self, input: Option<String>) -> Self
pub fn set_outpost_arn(self, input: Option<String>) -> Self
The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation was created.
Examples found in repository?
25629 25630 25631 25632 25633 25634 25635 25636 25637 25638 25639 25640 25641 25642 25643 25644 25645 25646 25647 25648 25649 25650 25651 25652 25653 25654 25655 25656 25657 25658 25659 25660 25661 25662 25663 25664 25665 25666 25667 25668 25669 25670 25671 25672 25673 25674 25675 25676 25677 25678 25679 25680 25681 25682 25683 25684 25685 25686 25687 25688 25689 25690 25691 25692 25693 25694 25695 25696 25697 25698 25699 25700 25701 25702 25703 25704 25705 25706 25707 25708 25709 25710 25711 25712 25713 25714 25715 25716 25717 25718 25719 25720 25721 25722 25723 25724 25725 25726 25727 25728 25729 25730 25731 25732 25733 25734 25735 25736 25737 25738 25739 25740 25741 25742 25743 25744 25745 25746 25747 25748 25749 25750 25751 25752 25753 25754 25755 25756 25757 25758 25759 25760 25761 25762 25763 25764 25765 25766 25767 25768 25769 25770 25771 25772 25773 25774 25775 25776 25777 25778 25779 25780 25781 25782 25783 25784 25785 25786 25787 25788 25789 25790 25791 25792 25793 25794 25795 25796 25797 25798 25799 25800 25801 25802 25803 25804 25805 25806 25807 25808 25809 25810 25811 25812 25813 25814 25815 25816 25817 25818 25819 25820 25821 25822 25823 25824 25825 25826 25827 25828 25829 25830 25831 25832 25833 25834 25835 25836 25837 25838 25839 25840 25841 25842 25843 25844 25845 25846 25847 25848 25849 25850 25851 25852 25853 25854 25855 25856 25857 25858 25859 25860 25861 25862 25863 25864 25865 25866 25867 25868 25869 25870 25871 25872 25873 25874 25875 25876 25877 25878 25879 25880 25881 25882 25883 25884 25885 25886 25887 25888 25889 25890 25891 25892 25893 25894 25895 25896 25897 25898 25899 25900 25901 25902 25903 25904 25905 25906 25907 25908 25909 25910 25911 25912 25913 25914 25915 25916 25917 25918 25919 25920 25921 25922 25923 25924 25925 25926 25927 25928 25929 25930 25931 25932 25933 25934 25935 25936 25937 25938 25939 25940 25941 25942 25943 25944 25945 25946 25947 25948 25949
pub fn deser_structure_crate_model_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#CapacityReservation$CapacityReservationId */ => {
let var_992 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_id(var_992);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#CapacityReservation$OwnerId */ => {
let var_993 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_993);
}
,
s if s.matches("capacityReservationArn") /* CapacityReservationArn com.amazonaws.ec2#CapacityReservation$CapacityReservationArn */ => {
let var_994 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_arn(var_994);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#CapacityReservation$AvailabilityZoneId */ => {
let var_995 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone_id(var_995);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#CapacityReservation$InstanceType */ => {
let var_996 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_type(var_996);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#CapacityReservation$InstancePlatform */ => {
let var_997 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_997);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#CapacityReservation$AvailabilityZone */ => {
let var_998 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_998);
}
,
s if s.matches("tenancy") /* Tenancy com.amazonaws.ec2#CapacityReservation$Tenancy */ => {
let var_999 =
Some(
Result::<crate::model::CapacityReservationTenancy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationTenancy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_tenancy(var_999);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#CapacityReservation$TotalInstanceCount */ => {
let var_1000 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_total_instance_count(var_1000);
}
,
s if s.matches("availableInstanceCount") /* AvailableInstanceCount com.amazonaws.ec2#CapacityReservation$AvailableInstanceCount */ => {
let var_1001 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_available_instance_count(var_1001);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#CapacityReservation$EbsOptimized */ => {
let var_1002 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1002);
}
,
s if s.matches("ephemeralStorage") /* EphemeralStorage com.amazonaws.ec2#CapacityReservation$EphemeralStorage */ => {
let var_1003 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ephemeral_storage(var_1003);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#CapacityReservation$State */ => {
let var_1004 =
Some(
Result::<crate::model::CapacityReservationState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1004);
}
,
s if s.matches("startDate") /* StartDate com.amazonaws.ec2#CapacityReservation$StartDate */ => {
let var_1005 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_start_date(var_1005);
}
,
s if s.matches("endDate") /* EndDate com.amazonaws.ec2#CapacityReservation$EndDate */ => {
let var_1006 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_end_date(var_1006);
}
,
s if s.matches("endDateType") /* EndDateType com.amazonaws.ec2#CapacityReservation$EndDateType */ => {
let var_1007 =
Some(
Result::<crate::model::EndDateType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EndDateType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_end_date_type(var_1007);
}
,
s if s.matches("instanceMatchCriteria") /* InstanceMatchCriteria com.amazonaws.ec2#CapacityReservation$InstanceMatchCriteria */ => {
let var_1008 =
Some(
Result::<crate::model::InstanceMatchCriteria, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceMatchCriteria::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_match_criteria(var_1008);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#CapacityReservation$CreateDate */ => {
let var_1009 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_1009);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#CapacityReservation$Tags */ => {
let var_1010 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1010);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#CapacityReservation$OutpostArn */ => {
let var_1011 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_1011);
}
,
s if s.matches("capacityReservationFleetId") /* CapacityReservationFleetId com.amazonaws.ec2#CapacityReservation$CapacityReservationFleetId */ => {
let var_1012 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_fleet_id(var_1012);
}
,
s if s.matches("placementGroupArn") /* PlacementGroupArn com.amazonaws.ec2#CapacityReservation$PlacementGroupArn */ => {
let var_1013 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_placement_group_arn(var_1013);
}
,
s if s.matches("capacityAllocationSet") /* CapacityAllocations com.amazonaws.ec2#CapacityReservation$CapacityAllocations */ => {
let var_1014 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_capacity_allocations(&mut tag)
?
)
;
builder = builder.set_capacity_allocations(var_1014);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn capacity_reservation_fleet_id(self, input: impl Into<String>) -> Self
pub fn capacity_reservation_fleet_id(self, input: impl Into<String>) -> Self
The ID of the Capacity Reservation Fleet to which the Capacity Reservation belongs. Only valid for Capacity Reservations that were created by a Capacity Reservation Fleet.
sourcepub fn set_capacity_reservation_fleet_id(self, input: Option<String>) -> Self
pub fn set_capacity_reservation_fleet_id(self, input: Option<String>) -> Self
The ID of the Capacity Reservation Fleet to which the Capacity Reservation belongs. Only valid for Capacity Reservations that were created by a Capacity Reservation Fleet.
Examples found in repository?
25629 25630 25631 25632 25633 25634 25635 25636 25637 25638 25639 25640 25641 25642 25643 25644 25645 25646 25647 25648 25649 25650 25651 25652 25653 25654 25655 25656 25657 25658 25659 25660 25661 25662 25663 25664 25665 25666 25667 25668 25669 25670 25671 25672 25673 25674 25675 25676 25677 25678 25679 25680 25681 25682 25683 25684 25685 25686 25687 25688 25689 25690 25691 25692 25693 25694 25695 25696 25697 25698 25699 25700 25701 25702 25703 25704 25705 25706 25707 25708 25709 25710 25711 25712 25713 25714 25715 25716 25717 25718 25719 25720 25721 25722 25723 25724 25725 25726 25727 25728 25729 25730 25731 25732 25733 25734 25735 25736 25737 25738 25739 25740 25741 25742 25743 25744 25745 25746 25747 25748 25749 25750 25751 25752 25753 25754 25755 25756 25757 25758 25759 25760 25761 25762 25763 25764 25765 25766 25767 25768 25769 25770 25771 25772 25773 25774 25775 25776 25777 25778 25779 25780 25781 25782 25783 25784 25785 25786 25787 25788 25789 25790 25791 25792 25793 25794 25795 25796 25797 25798 25799 25800 25801 25802 25803 25804 25805 25806 25807 25808 25809 25810 25811 25812 25813 25814 25815 25816 25817 25818 25819 25820 25821 25822 25823 25824 25825 25826 25827 25828 25829 25830 25831 25832 25833 25834 25835 25836 25837 25838 25839 25840 25841 25842 25843 25844 25845 25846 25847 25848 25849 25850 25851 25852 25853 25854 25855 25856 25857 25858 25859 25860 25861 25862 25863 25864 25865 25866 25867 25868 25869 25870 25871 25872 25873 25874 25875 25876 25877 25878 25879 25880 25881 25882 25883 25884 25885 25886 25887 25888 25889 25890 25891 25892 25893 25894 25895 25896 25897 25898 25899 25900 25901 25902 25903 25904 25905 25906 25907 25908 25909 25910 25911 25912 25913 25914 25915 25916 25917 25918 25919 25920 25921 25922 25923 25924 25925 25926 25927 25928 25929 25930 25931 25932 25933 25934 25935 25936 25937 25938 25939 25940 25941 25942 25943 25944 25945 25946 25947 25948 25949
pub fn deser_structure_crate_model_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#CapacityReservation$CapacityReservationId */ => {
let var_992 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_id(var_992);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#CapacityReservation$OwnerId */ => {
let var_993 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_993);
}
,
s if s.matches("capacityReservationArn") /* CapacityReservationArn com.amazonaws.ec2#CapacityReservation$CapacityReservationArn */ => {
let var_994 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_arn(var_994);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#CapacityReservation$AvailabilityZoneId */ => {
let var_995 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone_id(var_995);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#CapacityReservation$InstanceType */ => {
let var_996 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_type(var_996);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#CapacityReservation$InstancePlatform */ => {
let var_997 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_997);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#CapacityReservation$AvailabilityZone */ => {
let var_998 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_998);
}
,
s if s.matches("tenancy") /* Tenancy com.amazonaws.ec2#CapacityReservation$Tenancy */ => {
let var_999 =
Some(
Result::<crate::model::CapacityReservationTenancy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationTenancy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_tenancy(var_999);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#CapacityReservation$TotalInstanceCount */ => {
let var_1000 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_total_instance_count(var_1000);
}
,
s if s.matches("availableInstanceCount") /* AvailableInstanceCount com.amazonaws.ec2#CapacityReservation$AvailableInstanceCount */ => {
let var_1001 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_available_instance_count(var_1001);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#CapacityReservation$EbsOptimized */ => {
let var_1002 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1002);
}
,
s if s.matches("ephemeralStorage") /* EphemeralStorage com.amazonaws.ec2#CapacityReservation$EphemeralStorage */ => {
let var_1003 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ephemeral_storage(var_1003);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#CapacityReservation$State */ => {
let var_1004 =
Some(
Result::<crate::model::CapacityReservationState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1004);
}
,
s if s.matches("startDate") /* StartDate com.amazonaws.ec2#CapacityReservation$StartDate */ => {
let var_1005 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_start_date(var_1005);
}
,
s if s.matches("endDate") /* EndDate com.amazonaws.ec2#CapacityReservation$EndDate */ => {
let var_1006 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_end_date(var_1006);
}
,
s if s.matches("endDateType") /* EndDateType com.amazonaws.ec2#CapacityReservation$EndDateType */ => {
let var_1007 =
Some(
Result::<crate::model::EndDateType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EndDateType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_end_date_type(var_1007);
}
,
s if s.matches("instanceMatchCriteria") /* InstanceMatchCriteria com.amazonaws.ec2#CapacityReservation$InstanceMatchCriteria */ => {
let var_1008 =
Some(
Result::<crate::model::InstanceMatchCriteria, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceMatchCriteria::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_match_criteria(var_1008);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#CapacityReservation$CreateDate */ => {
let var_1009 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_1009);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#CapacityReservation$Tags */ => {
let var_1010 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1010);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#CapacityReservation$OutpostArn */ => {
let var_1011 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_1011);
}
,
s if s.matches("capacityReservationFleetId") /* CapacityReservationFleetId com.amazonaws.ec2#CapacityReservation$CapacityReservationFleetId */ => {
let var_1012 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_fleet_id(var_1012);
}
,
s if s.matches("placementGroupArn") /* PlacementGroupArn com.amazonaws.ec2#CapacityReservation$PlacementGroupArn */ => {
let var_1013 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_placement_group_arn(var_1013);
}
,
s if s.matches("capacityAllocationSet") /* CapacityAllocations com.amazonaws.ec2#CapacityReservation$CapacityAllocations */ => {
let var_1014 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_capacity_allocations(&mut tag)
?
)
;
builder = builder.set_capacity_allocations(var_1014);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn placement_group_arn(self, input: impl Into<String>) -> Self
pub fn placement_group_arn(self, input: impl Into<String>) -> Self
The Amazon Resource Name (ARN) of the cluster placement group in which the Capacity Reservation was created. For more information, see Capacity Reservations for cluster placement groups in the Amazon EC2 User Guide.
sourcepub fn set_placement_group_arn(self, input: Option<String>) -> Self
pub fn set_placement_group_arn(self, input: Option<String>) -> Self
The Amazon Resource Name (ARN) of the cluster placement group in which the Capacity Reservation was created. For more information, see Capacity Reservations for cluster placement groups in the Amazon EC2 User Guide.
Examples found in repository?
25629 25630 25631 25632 25633 25634 25635 25636 25637 25638 25639 25640 25641 25642 25643 25644 25645 25646 25647 25648 25649 25650 25651 25652 25653 25654 25655 25656 25657 25658 25659 25660 25661 25662 25663 25664 25665 25666 25667 25668 25669 25670 25671 25672 25673 25674 25675 25676 25677 25678 25679 25680 25681 25682 25683 25684 25685 25686 25687 25688 25689 25690 25691 25692 25693 25694 25695 25696 25697 25698 25699 25700 25701 25702 25703 25704 25705 25706 25707 25708 25709 25710 25711 25712 25713 25714 25715 25716 25717 25718 25719 25720 25721 25722 25723 25724 25725 25726 25727 25728 25729 25730 25731 25732 25733 25734 25735 25736 25737 25738 25739 25740 25741 25742 25743 25744 25745 25746 25747 25748 25749 25750 25751 25752 25753 25754 25755 25756 25757 25758 25759 25760 25761 25762 25763 25764 25765 25766 25767 25768 25769 25770 25771 25772 25773 25774 25775 25776 25777 25778 25779 25780 25781 25782 25783 25784 25785 25786 25787 25788 25789 25790 25791 25792 25793 25794 25795 25796 25797 25798 25799 25800 25801 25802 25803 25804 25805 25806 25807 25808 25809 25810 25811 25812 25813 25814 25815 25816 25817 25818 25819 25820 25821 25822 25823 25824 25825 25826 25827 25828 25829 25830 25831 25832 25833 25834 25835 25836 25837 25838 25839 25840 25841 25842 25843 25844 25845 25846 25847 25848 25849 25850 25851 25852 25853 25854 25855 25856 25857 25858 25859 25860 25861 25862 25863 25864 25865 25866 25867 25868 25869 25870 25871 25872 25873 25874 25875 25876 25877 25878 25879 25880 25881 25882 25883 25884 25885 25886 25887 25888 25889 25890 25891 25892 25893 25894 25895 25896 25897 25898 25899 25900 25901 25902 25903 25904 25905 25906 25907 25908 25909 25910 25911 25912 25913 25914 25915 25916 25917 25918 25919 25920 25921 25922 25923 25924 25925 25926 25927 25928 25929 25930 25931 25932 25933 25934 25935 25936 25937 25938 25939 25940 25941 25942 25943 25944 25945 25946 25947 25948 25949
pub fn deser_structure_crate_model_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#CapacityReservation$CapacityReservationId */ => {
let var_992 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_id(var_992);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#CapacityReservation$OwnerId */ => {
let var_993 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_993);
}
,
s if s.matches("capacityReservationArn") /* CapacityReservationArn com.amazonaws.ec2#CapacityReservation$CapacityReservationArn */ => {
let var_994 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_arn(var_994);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#CapacityReservation$AvailabilityZoneId */ => {
let var_995 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone_id(var_995);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#CapacityReservation$InstanceType */ => {
let var_996 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_type(var_996);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#CapacityReservation$InstancePlatform */ => {
let var_997 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_997);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#CapacityReservation$AvailabilityZone */ => {
let var_998 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_998);
}
,
s if s.matches("tenancy") /* Tenancy com.amazonaws.ec2#CapacityReservation$Tenancy */ => {
let var_999 =
Some(
Result::<crate::model::CapacityReservationTenancy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationTenancy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_tenancy(var_999);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#CapacityReservation$TotalInstanceCount */ => {
let var_1000 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_total_instance_count(var_1000);
}
,
s if s.matches("availableInstanceCount") /* AvailableInstanceCount com.amazonaws.ec2#CapacityReservation$AvailableInstanceCount */ => {
let var_1001 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_available_instance_count(var_1001);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#CapacityReservation$EbsOptimized */ => {
let var_1002 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1002);
}
,
s if s.matches("ephemeralStorage") /* EphemeralStorage com.amazonaws.ec2#CapacityReservation$EphemeralStorage */ => {
let var_1003 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ephemeral_storage(var_1003);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#CapacityReservation$State */ => {
let var_1004 =
Some(
Result::<crate::model::CapacityReservationState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1004);
}
,
s if s.matches("startDate") /* StartDate com.amazonaws.ec2#CapacityReservation$StartDate */ => {
let var_1005 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_start_date(var_1005);
}
,
s if s.matches("endDate") /* EndDate com.amazonaws.ec2#CapacityReservation$EndDate */ => {
let var_1006 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_end_date(var_1006);
}
,
s if s.matches("endDateType") /* EndDateType com.amazonaws.ec2#CapacityReservation$EndDateType */ => {
let var_1007 =
Some(
Result::<crate::model::EndDateType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EndDateType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_end_date_type(var_1007);
}
,
s if s.matches("instanceMatchCriteria") /* InstanceMatchCriteria com.amazonaws.ec2#CapacityReservation$InstanceMatchCriteria */ => {
let var_1008 =
Some(
Result::<crate::model::InstanceMatchCriteria, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceMatchCriteria::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_match_criteria(var_1008);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#CapacityReservation$CreateDate */ => {
let var_1009 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_1009);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#CapacityReservation$Tags */ => {
let var_1010 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1010);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#CapacityReservation$OutpostArn */ => {
let var_1011 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_1011);
}
,
s if s.matches("capacityReservationFleetId") /* CapacityReservationFleetId com.amazonaws.ec2#CapacityReservation$CapacityReservationFleetId */ => {
let var_1012 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_fleet_id(var_1012);
}
,
s if s.matches("placementGroupArn") /* PlacementGroupArn com.amazonaws.ec2#CapacityReservation$PlacementGroupArn */ => {
let var_1013 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_placement_group_arn(var_1013);
}
,
s if s.matches("capacityAllocationSet") /* CapacityAllocations com.amazonaws.ec2#CapacityReservation$CapacityAllocations */ => {
let var_1014 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_capacity_allocations(&mut tag)
?
)
;
builder = builder.set_capacity_allocations(var_1014);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn capacity_allocations(self, input: CapacityAllocation) -> Self
pub fn capacity_allocations(self, input: CapacityAllocation) -> Self
Appends an item to capacity_allocations
.
To override the contents of this collection use set_capacity_allocations
.
Information about instance capacity usage.
sourcepub fn set_capacity_allocations(
self,
input: Option<Vec<CapacityAllocation>>
) -> Self
pub fn set_capacity_allocations(
self,
input: Option<Vec<CapacityAllocation>>
) -> Self
Information about instance capacity usage.
Examples found in repository?
25629 25630 25631 25632 25633 25634 25635 25636 25637 25638 25639 25640 25641 25642 25643 25644 25645 25646 25647 25648 25649 25650 25651 25652 25653 25654 25655 25656 25657 25658 25659 25660 25661 25662 25663 25664 25665 25666 25667 25668 25669 25670 25671 25672 25673 25674 25675 25676 25677 25678 25679 25680 25681 25682 25683 25684 25685 25686 25687 25688 25689 25690 25691 25692 25693 25694 25695 25696 25697 25698 25699 25700 25701 25702 25703 25704 25705 25706 25707 25708 25709 25710 25711 25712 25713 25714 25715 25716 25717 25718 25719 25720 25721 25722 25723 25724 25725 25726 25727 25728 25729 25730 25731 25732 25733 25734 25735 25736 25737 25738 25739 25740 25741 25742 25743 25744 25745 25746 25747 25748 25749 25750 25751 25752 25753 25754 25755 25756 25757 25758 25759 25760 25761 25762 25763 25764 25765 25766 25767 25768 25769 25770 25771 25772 25773 25774 25775 25776 25777 25778 25779 25780 25781 25782 25783 25784 25785 25786 25787 25788 25789 25790 25791 25792 25793 25794 25795 25796 25797 25798 25799 25800 25801 25802 25803 25804 25805 25806 25807 25808 25809 25810 25811 25812 25813 25814 25815 25816 25817 25818 25819 25820 25821 25822 25823 25824 25825 25826 25827 25828 25829 25830 25831 25832 25833 25834 25835 25836 25837 25838 25839 25840 25841 25842 25843 25844 25845 25846 25847 25848 25849 25850 25851 25852 25853 25854 25855 25856 25857 25858 25859 25860 25861 25862 25863 25864 25865 25866 25867 25868 25869 25870 25871 25872 25873 25874 25875 25876 25877 25878 25879 25880 25881 25882 25883 25884 25885 25886 25887 25888 25889 25890 25891 25892 25893 25894 25895 25896 25897 25898 25899 25900 25901 25902 25903 25904 25905 25906 25907 25908 25909 25910 25911 25912 25913 25914 25915 25916 25917 25918 25919 25920 25921 25922 25923 25924 25925 25926 25927 25928 25929 25930 25931 25932 25933 25934 25935 25936 25937 25938 25939 25940 25941 25942 25943 25944 25945 25946 25947 25948 25949
pub fn deser_structure_crate_model_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#CapacityReservation$CapacityReservationId */ => {
let var_992 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_id(var_992);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#CapacityReservation$OwnerId */ => {
let var_993 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_993);
}
,
s if s.matches("capacityReservationArn") /* CapacityReservationArn com.amazonaws.ec2#CapacityReservation$CapacityReservationArn */ => {
let var_994 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_arn(var_994);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#CapacityReservation$AvailabilityZoneId */ => {
let var_995 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone_id(var_995);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#CapacityReservation$InstanceType */ => {
let var_996 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_type(var_996);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#CapacityReservation$InstancePlatform */ => {
let var_997 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_997);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#CapacityReservation$AvailabilityZone */ => {
let var_998 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_998);
}
,
s if s.matches("tenancy") /* Tenancy com.amazonaws.ec2#CapacityReservation$Tenancy */ => {
let var_999 =
Some(
Result::<crate::model::CapacityReservationTenancy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationTenancy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_tenancy(var_999);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#CapacityReservation$TotalInstanceCount */ => {
let var_1000 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_total_instance_count(var_1000);
}
,
s if s.matches("availableInstanceCount") /* AvailableInstanceCount com.amazonaws.ec2#CapacityReservation$AvailableInstanceCount */ => {
let var_1001 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_available_instance_count(var_1001);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#CapacityReservation$EbsOptimized */ => {
let var_1002 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1002);
}
,
s if s.matches("ephemeralStorage") /* EphemeralStorage com.amazonaws.ec2#CapacityReservation$EphemeralStorage */ => {
let var_1003 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ephemeral_storage(var_1003);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#CapacityReservation$State */ => {
let var_1004 =
Some(
Result::<crate::model::CapacityReservationState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1004);
}
,
s if s.matches("startDate") /* StartDate com.amazonaws.ec2#CapacityReservation$StartDate */ => {
let var_1005 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_start_date(var_1005);
}
,
s if s.matches("endDate") /* EndDate com.amazonaws.ec2#CapacityReservation$EndDate */ => {
let var_1006 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_end_date(var_1006);
}
,
s if s.matches("endDateType") /* EndDateType com.amazonaws.ec2#CapacityReservation$EndDateType */ => {
let var_1007 =
Some(
Result::<crate::model::EndDateType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EndDateType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_end_date_type(var_1007);
}
,
s if s.matches("instanceMatchCriteria") /* InstanceMatchCriteria com.amazonaws.ec2#CapacityReservation$InstanceMatchCriteria */ => {
let var_1008 =
Some(
Result::<crate::model::InstanceMatchCriteria, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceMatchCriteria::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_match_criteria(var_1008);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#CapacityReservation$CreateDate */ => {
let var_1009 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_1009);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#CapacityReservation$Tags */ => {
let var_1010 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1010);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#CapacityReservation$OutpostArn */ => {
let var_1011 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_1011);
}
,
s if s.matches("capacityReservationFleetId") /* CapacityReservationFleetId com.amazonaws.ec2#CapacityReservation$CapacityReservationFleetId */ => {
let var_1012 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_fleet_id(var_1012);
}
,
s if s.matches("placementGroupArn") /* PlacementGroupArn com.amazonaws.ec2#CapacityReservation$PlacementGroupArn */ => {
let var_1013 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_placement_group_arn(var_1013);
}
,
s if s.matches("capacityAllocationSet") /* CapacityAllocations com.amazonaws.ec2#CapacityReservation$CapacityAllocations */ => {
let var_1014 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_capacity_allocations(&mut tag)
?
)
;
builder = builder.set_capacity_allocations(var_1014);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> CapacityReservation
pub fn build(self) -> CapacityReservation
Consumes the builder and constructs a CapacityReservation
.
Examples found in repository?
25629 25630 25631 25632 25633 25634 25635 25636 25637 25638 25639 25640 25641 25642 25643 25644 25645 25646 25647 25648 25649 25650 25651 25652 25653 25654 25655 25656 25657 25658 25659 25660 25661 25662 25663 25664 25665 25666 25667 25668 25669 25670 25671 25672 25673 25674 25675 25676 25677 25678 25679 25680 25681 25682 25683 25684 25685 25686 25687 25688 25689 25690 25691 25692 25693 25694 25695 25696 25697 25698 25699 25700 25701 25702 25703 25704 25705 25706 25707 25708 25709 25710 25711 25712 25713 25714 25715 25716 25717 25718 25719 25720 25721 25722 25723 25724 25725 25726 25727 25728 25729 25730 25731 25732 25733 25734 25735 25736 25737 25738 25739 25740 25741 25742 25743 25744 25745 25746 25747 25748 25749 25750 25751 25752 25753 25754 25755 25756 25757 25758 25759 25760 25761 25762 25763 25764 25765 25766 25767 25768 25769 25770 25771 25772 25773 25774 25775 25776 25777 25778 25779 25780 25781 25782 25783 25784 25785 25786 25787 25788 25789 25790 25791 25792 25793 25794 25795 25796 25797 25798 25799 25800 25801 25802 25803 25804 25805 25806 25807 25808 25809 25810 25811 25812 25813 25814 25815 25816 25817 25818 25819 25820 25821 25822 25823 25824 25825 25826 25827 25828 25829 25830 25831 25832 25833 25834 25835 25836 25837 25838 25839 25840 25841 25842 25843 25844 25845 25846 25847 25848 25849 25850 25851 25852 25853 25854 25855 25856 25857 25858 25859 25860 25861 25862 25863 25864 25865 25866 25867 25868 25869 25870 25871 25872 25873 25874 25875 25876 25877 25878 25879 25880 25881 25882 25883 25884 25885 25886 25887 25888 25889 25890 25891 25892 25893 25894 25895 25896 25897 25898 25899 25900 25901 25902 25903 25904 25905 25906 25907 25908 25909 25910 25911 25912 25913 25914 25915 25916 25917 25918 25919 25920 25921 25922 25923 25924 25925 25926 25927 25928 25929 25930 25931 25932 25933 25934 25935 25936 25937 25938 25939 25940 25941 25942 25943 25944 25945 25946 25947 25948 25949
pub fn deser_structure_crate_model_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#CapacityReservation$CapacityReservationId */ => {
let var_992 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_id(var_992);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#CapacityReservation$OwnerId */ => {
let var_993 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_993);
}
,
s if s.matches("capacityReservationArn") /* CapacityReservationArn com.amazonaws.ec2#CapacityReservation$CapacityReservationArn */ => {
let var_994 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_arn(var_994);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#CapacityReservation$AvailabilityZoneId */ => {
let var_995 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone_id(var_995);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#CapacityReservation$InstanceType */ => {
let var_996 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_type(var_996);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#CapacityReservation$InstancePlatform */ => {
let var_997 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_997);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#CapacityReservation$AvailabilityZone */ => {
let var_998 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_998);
}
,
s if s.matches("tenancy") /* Tenancy com.amazonaws.ec2#CapacityReservation$Tenancy */ => {
let var_999 =
Some(
Result::<crate::model::CapacityReservationTenancy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationTenancy::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_tenancy(var_999);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#CapacityReservation$TotalInstanceCount */ => {
let var_1000 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_total_instance_count(var_1000);
}
,
s if s.matches("availableInstanceCount") /* AvailableInstanceCount com.amazonaws.ec2#CapacityReservation$AvailableInstanceCount */ => {
let var_1001 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_available_instance_count(var_1001);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#CapacityReservation$EbsOptimized */ => {
let var_1002 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1002);
}
,
s if s.matches("ephemeralStorage") /* EphemeralStorage com.amazonaws.ec2#CapacityReservation$EphemeralStorage */ => {
let var_1003 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ephemeral_storage(var_1003);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#CapacityReservation$State */ => {
let var_1004 =
Some(
Result::<crate::model::CapacityReservationState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1004);
}
,
s if s.matches("startDate") /* StartDate com.amazonaws.ec2#CapacityReservation$StartDate */ => {
let var_1005 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_start_date(var_1005);
}
,
s if s.matches("endDate") /* EndDate com.amazonaws.ec2#CapacityReservation$EndDate */ => {
let var_1006 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_end_date(var_1006);
}
,
s if s.matches("endDateType") /* EndDateType com.amazonaws.ec2#CapacityReservation$EndDateType */ => {
let var_1007 =
Some(
Result::<crate::model::EndDateType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EndDateType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_end_date_type(var_1007);
}
,
s if s.matches("instanceMatchCriteria") /* InstanceMatchCriteria com.amazonaws.ec2#CapacityReservation$InstanceMatchCriteria */ => {
let var_1008 =
Some(
Result::<crate::model::InstanceMatchCriteria, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceMatchCriteria::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_match_criteria(var_1008);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#CapacityReservation$CreateDate */ => {
let var_1009 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_1009);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#CapacityReservation$Tags */ => {
let var_1010 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1010);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#CapacityReservation$OutpostArn */ => {
let var_1011 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_1011);
}
,
s if s.matches("capacityReservationFleetId") /* CapacityReservationFleetId com.amazonaws.ec2#CapacityReservation$CapacityReservationFleetId */ => {
let var_1012 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_fleet_id(var_1012);
}
,
s if s.matches("placementGroupArn") /* PlacementGroupArn com.amazonaws.ec2#CapacityReservation$PlacementGroupArn */ => {
let var_1013 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_placement_group_arn(var_1013);
}
,
s if s.matches("capacityAllocationSet") /* CapacityAllocations com.amazonaws.ec2#CapacityReservation$CapacityAllocations */ => {
let var_1014 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_capacity_allocations(&mut tag)
?
)
;
builder = builder.set_capacity_allocations(var_1014);
}
,
_ => {}
}
}
Ok(builder.build())
}