aws-sdk-ec2 1.222.0

AWS SDK for Amazon Elastic Compute Cloud
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ModifyRouteServerInput {
    /// <p>The ID of the route server to modify.</p>
    pub route_server_id: ::std::option::Option<::std::string::String>,
    /// <p>Specifies whether to persist routes after all BGP sessions are terminated.</p>
    /// <ul>
    /// <li>
    /// <p>enable: Routes will be persisted in FIB and RIB after all BGP sessions are terminated.</p></li>
    /// <li>
    /// <p>disable: Routes will not be persisted in FIB and RIB after all BGP sessions are terminated.</p></li>
    /// <li>
    /// <p>reset: If a route server has persisted routes due to all BGP sessions having ended, reset will withdraw all routes and reset route server to an empty FIB and RIB.</p></li>
    /// </ul>
    pub persist_routes: ::std::option::Option<crate::types::RouteServerPersistRoutesAction>,
    /// <p>The number of minutes a route server will wait after BGP is re-established to unpersist the routes in the FIB and RIB. Value must be in the range of 1-5. Required if PersistRoutes is <code>enabled</code>.</p>
    /// <p>If you set the duration to 1 minute, then when your network appliance re-establishes BGP with route server, it has 1 minute to relearn it's adjacent network and advertise those routes to route server before route server resumes normal functionality. In most cases, 1 minute is probably sufficient. If, however, you have concerns that your BGP network may not be capable of fully re-establishing and re-learning everything in 1 minute, you can increase the duration up to 5 minutes.</p>
    pub persist_routes_duration: ::std::option::Option<i64>,
    /// <p>Specifies whether to enable SNS notifications for route server events. Enabling SNS notifications persists BGP status changes to an SNS topic provisioned by Amazon Web Services.</p>
    pub sns_notifications_enabled: ::std::option::Option<bool>,
    /// <p>A check for 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 <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
    pub dry_run: ::std::option::Option<bool>,
}
impl ModifyRouteServerInput {
    /// <p>The ID of the route server to modify.</p>
    pub fn route_server_id(&self) -> ::std::option::Option<&str> {
        self.route_server_id.as_deref()
    }
    /// <p>Specifies whether to persist routes after all BGP sessions are terminated.</p>
    /// <ul>
    /// <li>
    /// <p>enable: Routes will be persisted in FIB and RIB after all BGP sessions are terminated.</p></li>
    /// <li>
    /// <p>disable: Routes will not be persisted in FIB and RIB after all BGP sessions are terminated.</p></li>
    /// <li>
    /// <p>reset: If a route server has persisted routes due to all BGP sessions having ended, reset will withdraw all routes and reset route server to an empty FIB and RIB.</p></li>
    /// </ul>
    pub fn persist_routes(&self) -> ::std::option::Option<&crate::types::RouteServerPersistRoutesAction> {
        self.persist_routes.as_ref()
    }
    /// <p>The number of minutes a route server will wait after BGP is re-established to unpersist the routes in the FIB and RIB. Value must be in the range of 1-5. Required if PersistRoutes is <code>enabled</code>.</p>
    /// <p>If you set the duration to 1 minute, then when your network appliance re-establishes BGP with route server, it has 1 minute to relearn it's adjacent network and advertise those routes to route server before route server resumes normal functionality. In most cases, 1 minute is probably sufficient. If, however, you have concerns that your BGP network may not be capable of fully re-establishing and re-learning everything in 1 minute, you can increase the duration up to 5 minutes.</p>
    pub fn persist_routes_duration(&self) -> ::std::option::Option<i64> {
        self.persist_routes_duration
    }
    /// <p>Specifies whether to enable SNS notifications for route server events. Enabling SNS notifications persists BGP status changes to an SNS topic provisioned by Amazon Web Services.</p>
    pub fn sns_notifications_enabled(&self) -> ::std::option::Option<bool> {
        self.sns_notifications_enabled
    }
    /// <p>A check for 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 <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
    pub fn dry_run(&self) -> ::std::option::Option<bool> {
        self.dry_run
    }
}
impl ModifyRouteServerInput {
    /// Creates a new builder-style object to manufacture [`ModifyRouteServerInput`](crate::operation::modify_route_server::ModifyRouteServerInput).
    pub fn builder() -> crate::operation::modify_route_server::builders::ModifyRouteServerInputBuilder {
        crate::operation::modify_route_server::builders::ModifyRouteServerInputBuilder::default()
    }
}

/// A builder for [`ModifyRouteServerInput`](crate::operation::modify_route_server::ModifyRouteServerInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ModifyRouteServerInputBuilder {
    pub(crate) route_server_id: ::std::option::Option<::std::string::String>,
    pub(crate) persist_routes: ::std::option::Option<crate::types::RouteServerPersistRoutesAction>,
    pub(crate) persist_routes_duration: ::std::option::Option<i64>,
    pub(crate) sns_notifications_enabled: ::std::option::Option<bool>,
    pub(crate) dry_run: ::std::option::Option<bool>,
}
impl ModifyRouteServerInputBuilder {
    /// <p>The ID of the route server to modify.</p>
    /// This field is required.
    pub fn route_server_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.route_server_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the route server to modify.</p>
    pub fn set_route_server_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.route_server_id = input;
        self
    }
    /// <p>The ID of the route server to modify.</p>
    pub fn get_route_server_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.route_server_id
    }
    /// <p>Specifies whether to persist routes after all BGP sessions are terminated.</p>
    /// <ul>
    /// <li>
    /// <p>enable: Routes will be persisted in FIB and RIB after all BGP sessions are terminated.</p></li>
    /// <li>
    /// <p>disable: Routes will not be persisted in FIB and RIB after all BGP sessions are terminated.</p></li>
    /// <li>
    /// <p>reset: If a route server has persisted routes due to all BGP sessions having ended, reset will withdraw all routes and reset route server to an empty FIB and RIB.</p></li>
    /// </ul>
    pub fn persist_routes(mut self, input: crate::types::RouteServerPersistRoutesAction) -> Self {
        self.persist_routes = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies whether to persist routes after all BGP sessions are terminated.</p>
    /// <ul>
    /// <li>
    /// <p>enable: Routes will be persisted in FIB and RIB after all BGP sessions are terminated.</p></li>
    /// <li>
    /// <p>disable: Routes will not be persisted in FIB and RIB after all BGP sessions are terminated.</p></li>
    /// <li>
    /// <p>reset: If a route server has persisted routes due to all BGP sessions having ended, reset will withdraw all routes and reset route server to an empty FIB and RIB.</p></li>
    /// </ul>
    pub fn set_persist_routes(mut self, input: ::std::option::Option<crate::types::RouteServerPersistRoutesAction>) -> Self {
        self.persist_routes = input;
        self
    }
    /// <p>Specifies whether to persist routes after all BGP sessions are terminated.</p>
    /// <ul>
    /// <li>
    /// <p>enable: Routes will be persisted in FIB and RIB after all BGP sessions are terminated.</p></li>
    /// <li>
    /// <p>disable: Routes will not be persisted in FIB and RIB after all BGP sessions are terminated.</p></li>
    /// <li>
    /// <p>reset: If a route server has persisted routes due to all BGP sessions having ended, reset will withdraw all routes and reset route server to an empty FIB and RIB.</p></li>
    /// </ul>
    pub fn get_persist_routes(&self) -> &::std::option::Option<crate::types::RouteServerPersistRoutesAction> {
        &self.persist_routes
    }
    /// <p>The number of minutes a route server will wait after BGP is re-established to unpersist the routes in the FIB and RIB. Value must be in the range of 1-5. Required if PersistRoutes is <code>enabled</code>.</p>
    /// <p>If you set the duration to 1 minute, then when your network appliance re-establishes BGP with route server, it has 1 minute to relearn it's adjacent network and advertise those routes to route server before route server resumes normal functionality. In most cases, 1 minute is probably sufficient. If, however, you have concerns that your BGP network may not be capable of fully re-establishing and re-learning everything in 1 minute, you can increase the duration up to 5 minutes.</p>
    pub fn persist_routes_duration(mut self, input: i64) -> Self {
        self.persist_routes_duration = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of minutes a route server will wait after BGP is re-established to unpersist the routes in the FIB and RIB. Value must be in the range of 1-5. Required if PersistRoutes is <code>enabled</code>.</p>
    /// <p>If you set the duration to 1 minute, then when your network appliance re-establishes BGP with route server, it has 1 minute to relearn it's adjacent network and advertise those routes to route server before route server resumes normal functionality. In most cases, 1 minute is probably sufficient. If, however, you have concerns that your BGP network may not be capable of fully re-establishing and re-learning everything in 1 minute, you can increase the duration up to 5 minutes.</p>
    pub fn set_persist_routes_duration(mut self, input: ::std::option::Option<i64>) -> Self {
        self.persist_routes_duration = input;
        self
    }
    /// <p>The number of minutes a route server will wait after BGP is re-established to unpersist the routes in the FIB and RIB. Value must be in the range of 1-5. Required if PersistRoutes is <code>enabled</code>.</p>
    /// <p>If you set the duration to 1 minute, then when your network appliance re-establishes BGP with route server, it has 1 minute to relearn it's adjacent network and advertise those routes to route server before route server resumes normal functionality. In most cases, 1 minute is probably sufficient. If, however, you have concerns that your BGP network may not be capable of fully re-establishing and re-learning everything in 1 minute, you can increase the duration up to 5 minutes.</p>
    pub fn get_persist_routes_duration(&self) -> &::std::option::Option<i64> {
        &self.persist_routes_duration
    }
    /// <p>Specifies whether to enable SNS notifications for route server events. Enabling SNS notifications persists BGP status changes to an SNS topic provisioned by Amazon Web Services.</p>
    pub fn sns_notifications_enabled(mut self, input: bool) -> Self {
        self.sns_notifications_enabled = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies whether to enable SNS notifications for route server events. Enabling SNS notifications persists BGP status changes to an SNS topic provisioned by Amazon Web Services.</p>
    pub fn set_sns_notifications_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
        self.sns_notifications_enabled = input;
        self
    }
    /// <p>Specifies whether to enable SNS notifications for route server events. Enabling SNS notifications persists BGP status changes to an SNS topic provisioned by Amazon Web Services.</p>
    pub fn get_sns_notifications_enabled(&self) -> &::std::option::Option<bool> {
        &self.sns_notifications_enabled
    }
    /// <p>A check for 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 <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
    pub fn dry_run(mut self, input: bool) -> Self {
        self.dry_run = ::std::option::Option::Some(input);
        self
    }
    /// <p>A check for 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 <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
        self.dry_run = input;
        self
    }
    /// <p>A check for 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 <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
        &self.dry_run
    }
    /// Consumes the builder and constructs a [`ModifyRouteServerInput`](crate::operation::modify_route_server::ModifyRouteServerInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::modify_route_server::ModifyRouteServerInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::modify_route_server::ModifyRouteServerInput {
            route_server_id: self.route_server_id,
            persist_routes: self.persist_routes,
            persist_routes_duration: self.persist_routes_duration,
            sns_notifications_enabled: self.sns_notifications_enabled,
            dry_run: self.dry_run,
        })
    }
}