aws-sdk-redshiftserverless 1.106.0

AWS SDK for Redshift Serverless
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 UpdateWorkgroupInput {
    /// <p>The name of the workgroup to update. You can't update the name of a workgroup once it is created.</p>
    pub workgroup_name: ::std::option::Option<::std::string::String>,
    /// <p>The new base data warehouse capacity in Redshift Processing Units (RPUs).</p>
    pub base_capacity: ::std::option::Option<i32>,
    /// <p>The value that specifies whether to turn on enhanced virtual private cloud (VPC) routing, which forces Amazon Redshift Serverless to route traffic through your VPC.</p>
    pub enhanced_vpc_routing: ::std::option::Option<bool>,
    /// <p>An array of parameters to set for advanced control over a database. The options are <code>auto_mv</code>, <code>datestyle</code>, <code>enable_case_sensitive_identifier</code>, <code>enable_user_activity_logging</code>, <code>query_group</code>, <code>search_path</code>, <code>require_ssl</code>, <code>use_fips_ssl</code>, and either <code>wlm_json_configuration</code> or query monitoring metrics that let you define performance boundaries. You can either specify individual query monitoring metrics (such as <code>max_scan_row_count</code>, <code>max_query_execution_time</code>) or use <code>wlm_json_configuration</code> to define query queues with rules, but not both. If you're using <code>wlm_json_configuration</code>, the maximum size of <code>parameterValue</code> is 8000 characters. For more information about query monitoring rules and available metrics, see <a href="https://docs.aws.amazon.com/redshift/latest/dg/cm-c-wlm-query-monitoring-rules.html#cm-c-wlm-query-monitoring-metrics-serverless"> Query monitoring metrics for Amazon Redshift Serverless</a>.</p>
    pub config_parameters: ::std::option::Option<::std::vec::Vec<crate::types::ConfigParameter>>,
    /// <p>A value that specifies whether the workgroup can be accessible from a public network.</p>
    pub publicly_accessible: ::std::option::Option<bool>,
    /// <p>An array of VPC subnet IDs to associate with the workgroup.</p>
    pub subnet_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>An array of security group IDs to associate with the workgroup.</p>
    pub security_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The custom port to use when connecting to a workgroup. Valid port ranges are 5431-5455 and 8191-8215. The default is 5439.</p>
    pub port: ::std::option::Option<i32>,
    /// <p>The maximum data-warehouse capacity Amazon Redshift Serverless uses to serve queries. The max capacity is specified in RPUs.</p>
    pub max_capacity: ::std::option::Option<i32>,
    /// <p>The IP address type that the workgroup supports. Possible values are <code>ipv4</code> and <code>dualstack</code>.</p>
    pub ip_address_type: ::std::option::Option<::std::string::String>,
    /// <p>An object that represents the price performance target settings for the workgroup.</p>
    pub price_performance_target: ::std::option::Option<crate::types::PerformanceTarget>,
    /// <p>An optional parameter for the name of the track for the workgroup. If you don't provide a track name, the workgroup is assigned to the <code>current</code> track.</p>
    pub track_name: ::std::option::Option<::std::string::String>,
    /// <p>If <code>true</code>, allocates additional compute resources for running automatic optimization operations.</p>
    /// <p>Default: false</p>
    pub extra_compute_for_automatic_optimization: ::std::option::Option<bool>,
}
impl UpdateWorkgroupInput {
    /// <p>The name of the workgroup to update. You can't update the name of a workgroup once it is created.</p>
    pub fn workgroup_name(&self) -> ::std::option::Option<&str> {
        self.workgroup_name.as_deref()
    }
    /// <p>The new base data warehouse capacity in Redshift Processing Units (RPUs).</p>
    pub fn base_capacity(&self) -> ::std::option::Option<i32> {
        self.base_capacity
    }
    /// <p>The value that specifies whether to turn on enhanced virtual private cloud (VPC) routing, which forces Amazon Redshift Serverless to route traffic through your VPC.</p>
    pub fn enhanced_vpc_routing(&self) -> ::std::option::Option<bool> {
        self.enhanced_vpc_routing
    }
    /// <p>An array of parameters to set for advanced control over a database. The options are <code>auto_mv</code>, <code>datestyle</code>, <code>enable_case_sensitive_identifier</code>, <code>enable_user_activity_logging</code>, <code>query_group</code>, <code>search_path</code>, <code>require_ssl</code>, <code>use_fips_ssl</code>, and either <code>wlm_json_configuration</code> or query monitoring metrics that let you define performance boundaries. You can either specify individual query monitoring metrics (such as <code>max_scan_row_count</code>, <code>max_query_execution_time</code>) or use <code>wlm_json_configuration</code> to define query queues with rules, but not both. If you're using <code>wlm_json_configuration</code>, the maximum size of <code>parameterValue</code> is 8000 characters. For more information about query monitoring rules and available metrics, see <a href="https://docs.aws.amazon.com/redshift/latest/dg/cm-c-wlm-query-monitoring-rules.html#cm-c-wlm-query-monitoring-metrics-serverless"> Query monitoring metrics for Amazon Redshift Serverless</a>.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.config_parameters.is_none()`.
    pub fn config_parameters(&self) -> &[crate::types::ConfigParameter] {
        self.config_parameters.as_deref().unwrap_or_default()
    }
    /// <p>A value that specifies whether the workgroup can be accessible from a public network.</p>
    pub fn publicly_accessible(&self) -> ::std::option::Option<bool> {
        self.publicly_accessible
    }
    /// <p>An array of VPC subnet IDs to associate with the workgroup.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.subnet_ids.is_none()`.
    pub fn subnet_ids(&self) -> &[::std::string::String] {
        self.subnet_ids.as_deref().unwrap_or_default()
    }
    /// <p>An array of security group IDs to associate with the workgroup.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.security_group_ids.is_none()`.
    pub fn security_group_ids(&self) -> &[::std::string::String] {
        self.security_group_ids.as_deref().unwrap_or_default()
    }
    /// <p>The custom port to use when connecting to a workgroup. Valid port ranges are 5431-5455 and 8191-8215. The default is 5439.</p>
    pub fn port(&self) -> ::std::option::Option<i32> {
        self.port
    }
    /// <p>The maximum data-warehouse capacity Amazon Redshift Serverless uses to serve queries. The max capacity is specified in RPUs.</p>
    pub fn max_capacity(&self) -> ::std::option::Option<i32> {
        self.max_capacity
    }
    /// <p>The IP address type that the workgroup supports. Possible values are <code>ipv4</code> and <code>dualstack</code>.</p>
    pub fn ip_address_type(&self) -> ::std::option::Option<&str> {
        self.ip_address_type.as_deref()
    }
    /// <p>An object that represents the price performance target settings for the workgroup.</p>
    pub fn price_performance_target(&self) -> ::std::option::Option<&crate::types::PerformanceTarget> {
        self.price_performance_target.as_ref()
    }
    /// <p>An optional parameter for the name of the track for the workgroup. If you don't provide a track name, the workgroup is assigned to the <code>current</code> track.</p>
    pub fn track_name(&self) -> ::std::option::Option<&str> {
        self.track_name.as_deref()
    }
    /// <p>If <code>true</code>, allocates additional compute resources for running automatic optimization operations.</p>
    /// <p>Default: false</p>
    pub fn extra_compute_for_automatic_optimization(&self) -> ::std::option::Option<bool> {
        self.extra_compute_for_automatic_optimization
    }
}
impl UpdateWorkgroupInput {
    /// Creates a new builder-style object to manufacture [`UpdateWorkgroupInput`](crate::operation::update_workgroup::UpdateWorkgroupInput).
    pub fn builder() -> crate::operation::update_workgroup::builders::UpdateWorkgroupInputBuilder {
        crate::operation::update_workgroup::builders::UpdateWorkgroupInputBuilder::default()
    }
}

/// A builder for [`UpdateWorkgroupInput`](crate::operation::update_workgroup::UpdateWorkgroupInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateWorkgroupInputBuilder {
    pub(crate) workgroup_name: ::std::option::Option<::std::string::String>,
    pub(crate) base_capacity: ::std::option::Option<i32>,
    pub(crate) enhanced_vpc_routing: ::std::option::Option<bool>,
    pub(crate) config_parameters: ::std::option::Option<::std::vec::Vec<crate::types::ConfigParameter>>,
    pub(crate) publicly_accessible: ::std::option::Option<bool>,
    pub(crate) subnet_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) security_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) port: ::std::option::Option<i32>,
    pub(crate) max_capacity: ::std::option::Option<i32>,
    pub(crate) ip_address_type: ::std::option::Option<::std::string::String>,
    pub(crate) price_performance_target: ::std::option::Option<crate::types::PerformanceTarget>,
    pub(crate) track_name: ::std::option::Option<::std::string::String>,
    pub(crate) extra_compute_for_automatic_optimization: ::std::option::Option<bool>,
}
impl UpdateWorkgroupInputBuilder {
    /// <p>The name of the workgroup to update. You can't update the name of a workgroup once it is created.</p>
    /// This field is required.
    pub fn workgroup_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.workgroup_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the workgroup to update. You can't update the name of a workgroup once it is created.</p>
    pub fn set_workgroup_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.workgroup_name = input;
        self
    }
    /// <p>The name of the workgroup to update. You can't update the name of a workgroup once it is created.</p>
    pub fn get_workgroup_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.workgroup_name
    }
    /// <p>The new base data warehouse capacity in Redshift Processing Units (RPUs).</p>
    pub fn base_capacity(mut self, input: i32) -> Self {
        self.base_capacity = ::std::option::Option::Some(input);
        self
    }
    /// <p>The new base data warehouse capacity in Redshift Processing Units (RPUs).</p>
    pub fn set_base_capacity(mut self, input: ::std::option::Option<i32>) -> Self {
        self.base_capacity = input;
        self
    }
    /// <p>The new base data warehouse capacity in Redshift Processing Units (RPUs).</p>
    pub fn get_base_capacity(&self) -> &::std::option::Option<i32> {
        &self.base_capacity
    }
    /// <p>The value that specifies whether to turn on enhanced virtual private cloud (VPC) routing, which forces Amazon Redshift Serverless to route traffic through your VPC.</p>
    pub fn enhanced_vpc_routing(mut self, input: bool) -> Self {
        self.enhanced_vpc_routing = ::std::option::Option::Some(input);
        self
    }
    /// <p>The value that specifies whether to turn on enhanced virtual private cloud (VPC) routing, which forces Amazon Redshift Serverless to route traffic through your VPC.</p>
    pub fn set_enhanced_vpc_routing(mut self, input: ::std::option::Option<bool>) -> Self {
        self.enhanced_vpc_routing = input;
        self
    }
    /// <p>The value that specifies whether to turn on enhanced virtual private cloud (VPC) routing, which forces Amazon Redshift Serverless to route traffic through your VPC.</p>
    pub fn get_enhanced_vpc_routing(&self) -> &::std::option::Option<bool> {
        &self.enhanced_vpc_routing
    }
    /// Appends an item to `config_parameters`.
    ///
    /// To override the contents of this collection use [`set_config_parameters`](Self::set_config_parameters).
    ///
    /// <p>An array of parameters to set for advanced control over a database. The options are <code>auto_mv</code>, <code>datestyle</code>, <code>enable_case_sensitive_identifier</code>, <code>enable_user_activity_logging</code>, <code>query_group</code>, <code>search_path</code>, <code>require_ssl</code>, <code>use_fips_ssl</code>, and either <code>wlm_json_configuration</code> or query monitoring metrics that let you define performance boundaries. You can either specify individual query monitoring metrics (such as <code>max_scan_row_count</code>, <code>max_query_execution_time</code>) or use <code>wlm_json_configuration</code> to define query queues with rules, but not both. If you're using <code>wlm_json_configuration</code>, the maximum size of <code>parameterValue</code> is 8000 characters. For more information about query monitoring rules and available metrics, see <a href="https://docs.aws.amazon.com/redshift/latest/dg/cm-c-wlm-query-monitoring-rules.html#cm-c-wlm-query-monitoring-metrics-serverless"> Query monitoring metrics for Amazon Redshift Serverless</a>.</p>
    pub fn config_parameters(mut self, input: crate::types::ConfigParameter) -> Self {
        let mut v = self.config_parameters.unwrap_or_default();
        v.push(input);
        self.config_parameters = ::std::option::Option::Some(v);
        self
    }
    /// <p>An array of parameters to set for advanced control over a database. The options are <code>auto_mv</code>, <code>datestyle</code>, <code>enable_case_sensitive_identifier</code>, <code>enable_user_activity_logging</code>, <code>query_group</code>, <code>search_path</code>, <code>require_ssl</code>, <code>use_fips_ssl</code>, and either <code>wlm_json_configuration</code> or query monitoring metrics that let you define performance boundaries. You can either specify individual query monitoring metrics (such as <code>max_scan_row_count</code>, <code>max_query_execution_time</code>) or use <code>wlm_json_configuration</code> to define query queues with rules, but not both. If you're using <code>wlm_json_configuration</code>, the maximum size of <code>parameterValue</code> is 8000 characters. For more information about query monitoring rules and available metrics, see <a href="https://docs.aws.amazon.com/redshift/latest/dg/cm-c-wlm-query-monitoring-rules.html#cm-c-wlm-query-monitoring-metrics-serverless"> Query monitoring metrics for Amazon Redshift Serverless</a>.</p>
    pub fn set_config_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ConfigParameter>>) -> Self {
        self.config_parameters = input;
        self
    }
    /// <p>An array of parameters to set for advanced control over a database. The options are <code>auto_mv</code>, <code>datestyle</code>, <code>enable_case_sensitive_identifier</code>, <code>enable_user_activity_logging</code>, <code>query_group</code>, <code>search_path</code>, <code>require_ssl</code>, <code>use_fips_ssl</code>, and either <code>wlm_json_configuration</code> or query monitoring metrics that let you define performance boundaries. You can either specify individual query monitoring metrics (such as <code>max_scan_row_count</code>, <code>max_query_execution_time</code>) or use <code>wlm_json_configuration</code> to define query queues with rules, but not both. If you're using <code>wlm_json_configuration</code>, the maximum size of <code>parameterValue</code> is 8000 characters. For more information about query monitoring rules and available metrics, see <a href="https://docs.aws.amazon.com/redshift/latest/dg/cm-c-wlm-query-monitoring-rules.html#cm-c-wlm-query-monitoring-metrics-serverless"> Query monitoring metrics for Amazon Redshift Serverless</a>.</p>
    pub fn get_config_parameters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ConfigParameter>> {
        &self.config_parameters
    }
    /// <p>A value that specifies whether the workgroup can be accessible from a public network.</p>
    pub fn publicly_accessible(mut self, input: bool) -> Self {
        self.publicly_accessible = ::std::option::Option::Some(input);
        self
    }
    /// <p>A value that specifies whether the workgroup can be accessible from a public network.</p>
    pub fn set_publicly_accessible(mut self, input: ::std::option::Option<bool>) -> Self {
        self.publicly_accessible = input;
        self
    }
    /// <p>A value that specifies whether the workgroup can be accessible from a public network.</p>
    pub fn get_publicly_accessible(&self) -> &::std::option::Option<bool> {
        &self.publicly_accessible
    }
    /// Appends an item to `subnet_ids`.
    ///
    /// To override the contents of this collection use [`set_subnet_ids`](Self::set_subnet_ids).
    ///
    /// <p>An array of VPC subnet IDs to associate with the workgroup.</p>
    pub fn subnet_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.subnet_ids.unwrap_or_default();
        v.push(input.into());
        self.subnet_ids = ::std::option::Option::Some(v);
        self
    }
    /// <p>An array of VPC subnet IDs to associate with the workgroup.</p>
    pub fn set_subnet_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.subnet_ids = input;
        self
    }
    /// <p>An array of VPC subnet IDs to associate with the workgroup.</p>
    pub fn get_subnet_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.subnet_ids
    }
    /// Appends an item to `security_group_ids`.
    ///
    /// To override the contents of this collection use [`set_security_group_ids`](Self::set_security_group_ids).
    ///
    /// <p>An array of security group IDs to associate with the workgroup.</p>
    pub fn security_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.security_group_ids.unwrap_or_default();
        v.push(input.into());
        self.security_group_ids = ::std::option::Option::Some(v);
        self
    }
    /// <p>An array of security group IDs to associate with the workgroup.</p>
    pub fn set_security_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.security_group_ids = input;
        self
    }
    /// <p>An array of security group IDs to associate with the workgroup.</p>
    pub fn get_security_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.security_group_ids
    }
    /// <p>The custom port to use when connecting to a workgroup. Valid port ranges are 5431-5455 and 8191-8215. The default is 5439.</p>
    pub fn port(mut self, input: i32) -> Self {
        self.port = ::std::option::Option::Some(input);
        self
    }
    /// <p>The custom port to use when connecting to a workgroup. Valid port ranges are 5431-5455 and 8191-8215. The default is 5439.</p>
    pub fn set_port(mut self, input: ::std::option::Option<i32>) -> Self {
        self.port = input;
        self
    }
    /// <p>The custom port to use when connecting to a workgroup. Valid port ranges are 5431-5455 and 8191-8215. The default is 5439.</p>
    pub fn get_port(&self) -> &::std::option::Option<i32> {
        &self.port
    }
    /// <p>The maximum data-warehouse capacity Amazon Redshift Serverless uses to serve queries. The max capacity is specified in RPUs.</p>
    pub fn max_capacity(mut self, input: i32) -> Self {
        self.max_capacity = ::std::option::Option::Some(input);
        self
    }
    /// <p>The maximum data-warehouse capacity Amazon Redshift Serverless uses to serve queries. The max capacity is specified in RPUs.</p>
    pub fn set_max_capacity(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_capacity = input;
        self
    }
    /// <p>The maximum data-warehouse capacity Amazon Redshift Serverless uses to serve queries. The max capacity is specified in RPUs.</p>
    pub fn get_max_capacity(&self) -> &::std::option::Option<i32> {
        &self.max_capacity
    }
    /// <p>The IP address type that the workgroup supports. Possible values are <code>ipv4</code> and <code>dualstack</code>.</p>
    pub fn ip_address_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.ip_address_type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The IP address type that the workgroup supports. Possible values are <code>ipv4</code> and <code>dualstack</code>.</p>
    pub fn set_ip_address_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.ip_address_type = input;
        self
    }
    /// <p>The IP address type that the workgroup supports. Possible values are <code>ipv4</code> and <code>dualstack</code>.</p>
    pub fn get_ip_address_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.ip_address_type
    }
    /// <p>An object that represents the price performance target settings for the workgroup.</p>
    pub fn price_performance_target(mut self, input: crate::types::PerformanceTarget) -> Self {
        self.price_performance_target = ::std::option::Option::Some(input);
        self
    }
    /// <p>An object that represents the price performance target settings for the workgroup.</p>
    pub fn set_price_performance_target(mut self, input: ::std::option::Option<crate::types::PerformanceTarget>) -> Self {
        self.price_performance_target = input;
        self
    }
    /// <p>An object that represents the price performance target settings for the workgroup.</p>
    pub fn get_price_performance_target(&self) -> &::std::option::Option<crate::types::PerformanceTarget> {
        &self.price_performance_target
    }
    /// <p>An optional parameter for the name of the track for the workgroup. If you don't provide a track name, the workgroup is assigned to the <code>current</code> track.</p>
    pub fn track_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.track_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>An optional parameter for the name of the track for the workgroup. If you don't provide a track name, the workgroup is assigned to the <code>current</code> track.</p>
    pub fn set_track_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.track_name = input;
        self
    }
    /// <p>An optional parameter for the name of the track for the workgroup. If you don't provide a track name, the workgroup is assigned to the <code>current</code> track.</p>
    pub fn get_track_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.track_name
    }
    /// <p>If <code>true</code>, allocates additional compute resources for running automatic optimization operations.</p>
    /// <p>Default: false</p>
    pub fn extra_compute_for_automatic_optimization(mut self, input: bool) -> Self {
        self.extra_compute_for_automatic_optimization = ::std::option::Option::Some(input);
        self
    }
    /// <p>If <code>true</code>, allocates additional compute resources for running automatic optimization operations.</p>
    /// <p>Default: false</p>
    pub fn set_extra_compute_for_automatic_optimization(mut self, input: ::std::option::Option<bool>) -> Self {
        self.extra_compute_for_automatic_optimization = input;
        self
    }
    /// <p>If <code>true</code>, allocates additional compute resources for running automatic optimization operations.</p>
    /// <p>Default: false</p>
    pub fn get_extra_compute_for_automatic_optimization(&self) -> &::std::option::Option<bool> {
        &self.extra_compute_for_automatic_optimization
    }
    /// Consumes the builder and constructs a [`UpdateWorkgroupInput`](crate::operation::update_workgroup::UpdateWorkgroupInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_workgroup::UpdateWorkgroupInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_workgroup::UpdateWorkgroupInput {
            workgroup_name: self.workgroup_name,
            base_capacity: self.base_capacity,
            enhanced_vpc_routing: self.enhanced_vpc_routing,
            config_parameters: self.config_parameters,
            publicly_accessible: self.publicly_accessible,
            subnet_ids: self.subnet_ids,
            security_group_ids: self.security_group_ids,
            port: self.port,
            max_capacity: self.max_capacity,
            ip_address_type: self.ip_address_type,
            price_performance_target: self.price_performance_target,
            track_name: self.track_name,
            extra_compute_for_automatic_optimization: self.extra_compute_for_automatic_optimization,
        })
    }
}