pub struct Builder { /* private fields */ }
Expand description

Implementations§

The ID of the Capacity Reservation.

Examples found in repository?
src/client.rs (line 63011)
63010
63011
63012
63013
        pub fn capacity_reservation_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.capacity_reservation_id(input.into());
            self
        }

The ID of the Capacity Reservation.

Examples found in repository?
src/client.rs (line 63019)
63015
63016
63017
63018
63019
63020
63021
        pub fn set_capacity_reservation_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_capacity_reservation_id(input);
            self
        }

The number of instances for which to reserve capacity. The number of instances can't be increased or decreased by more than 1000 in a single request.

Examples found in repository?
src/client.rs (line 63024)
63023
63024
63025
63026
        pub fn instance_count(mut self, input: i32) -> Self {
            self.inner = self.inner.instance_count(input);
            self
        }

The number of instances for which to reserve capacity. The number of instances can't be increased or decreased by more than 1000 in a single request.

Examples found in repository?
src/client.rs (line 63029)
63028
63029
63030
63031
        pub fn set_instance_count(mut self, input: std::option::Option<i32>) -> Self {
            self.inner = self.inner.set_instance_count(input);
            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.

The Capacity Reservation is cancelled within an hour from the specified time. For example, if you specify 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to end between 13:30:55 and 14:30:55 on 5/31/2019.

You must provide an EndDate value if EndDateType is limited. Omit EndDate if EndDateType is unlimited.

Examples found in repository?
src/client.rs (line 63036)
63035
63036
63037
63038
        pub fn end_date(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.inner = self.inner.end_date(input);
            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.

The Capacity Reservation is cancelled within an hour from the specified time. For example, if you specify 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to end between 13:30:55 and 14:30:55 on 5/31/2019.

You must provide an EndDate value if EndDateType is limited. Omit EndDate if EndDateType is unlimited.

Examples found in repository?
src/client.rs (line 63046)
63042
63043
63044
63045
63046
63047
63048
        pub fn set_end_date(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.inner = self.inner.set_end_date(input);
            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. Do not provide an EndDate value if EndDateType is unlimited.

  • limited - The Capacity Reservation expires automatically at a specified date and time. You must provide an EndDate value if EndDateType is limited.

Examples found in repository?
src/client.rs (line 63055)
63054
63055
63056
63057
        pub fn end_date_type(mut self, input: crate::model::EndDateType) -> Self {
            self.inner = self.inner.end_date_type(input);
            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. Do not provide an EndDate value if EndDateType is unlimited.

  • limited - The Capacity Reservation expires automatically at a specified date and time. You must provide an EndDate value if EndDateType is limited.

Examples found in repository?
src/client.rs (line 63067)
63063
63064
63065
63066
63067
63068
63069
        pub fn set_end_date_type(
            mut self,
            input: std::option::Option<crate::model::EndDateType>,
        ) -> Self {
            self.inner = self.inner.set_end_date_type(input);
            self
        }

Reserved. Capacity Reservations you have created are accepted by default.

Examples found in repository?
src/client.rs (line 63072)
63071
63072
63073
63074
        pub fn accept(mut self, input: bool) -> Self {
            self.inner = self.inner.accept(input);
            self
        }

Reserved. Capacity Reservations you have created are accepted by default.

Examples found in repository?
src/client.rs (line 63077)
63076
63077
63078
63079
        pub fn set_accept(mut self, input: std::option::Option<bool>) -> Self {
            self.inner = self.inner.set_accept(input);
            self
        }

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Examples found in repository?
src/client.rs (line 63082)
63081
63082
63083
63084
        pub fn dry_run(mut self, input: bool) -> Self {
            self.inner = self.inner.dry_run(input);
            self
        }

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Examples found in repository?
src/client.rs (line 63087)
63086
63087
63088
63089
        pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
            self.inner = self.inner.set_dry_run(input);
            self
        }

Reserved for future use.

Examples found in repository?
src/client.rs (line 63092)
63091
63092
63093
63094
        pub fn additional_info(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.additional_info(input.into());
            self
        }

Reserved for future use.

Examples found in repository?
src/client.rs (line 63100)
63096
63097
63098
63099
63100
63101
63102
        pub fn set_additional_info(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_additional_info(input);
            self
        }

Consumes the builder and constructs a ModifyCapacityReservationInput.

Examples found in repository?
src/client.rs (line 62978)
62966
62967
62968
62969
62970
62971
62972
62973
62974
62975
62976
62977
62978
62979
62980
62981
62982
62983
62984
62985
62986
62987
62988
62989
62990
62991
62992
62993
62994
62995
62996
62997
62998
62999
63000
63001
63002
63003
63004
63005
63006
63007
63008
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::ModifyCapacityReservation,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::ModifyCapacityReservationError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::ModifyCapacityReservationOutput,
            aws_smithy_http::result::SdkError<crate::error::ModifyCapacityReservationError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

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

Calls U::from(self).

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

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more