// =================================================================
//
// * WARNING *
//
// This file is generated!
//
// Changes made to this file will be overwritten. If changes are
// required to the generated code, the service_crategen project
// must be updated to generate the changes.
//
// =================================================================
use std::error::Error;
use std::fmt;
use async_trait::async_trait;
use rusoto_core::credential::ProvideAwsCredentials;
use rusoto_core::region;
use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
use rusoto_core::{Client, RusotoError};
use rusoto_core::param::{Params, ServiceParams};
use rusoto_core::proto::xml::error::*;
use rusoto_core::proto::xml::util::{
self as xml_util, deserialize_elements, find_start_element, skip_tree,
};
use rusoto_core::proto::xml::util::{Next, Peek, XmlParseError, XmlResponse};
use rusoto_core::request::HttpResponse;
use rusoto_core::signature::SignedRequest;
#[cfg(feature = "deserialize_structs")]
use serde::Deserialize;
#[cfg(feature = "serialize_structs")]
use serde::Serialize;
use serde_urlencoded;
use std::str::FromStr;
use xml::EventReader;
impl RedshiftClient {
fn new_params(&self, operation_name: &str) -> Params {
let mut params = Params::new();
params.put("Action", operation_name);
params.put("Version", "2012-12-01");
params
}
async fn sign_and_dispatch(
&self,
request: SignedRequest,
from_response: fn(BufferedHttpResponse) -> RusotoError,
) -> Result> {
let mut response = self.client.sign_and_dispatch(request).await?;
if !response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
return Err(from_response(response));
}
Ok(response)
}
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct AcceptReservedNodeExchangeInputMessage {
/// A string representing the node identifier of the DC1 Reserved Node to be exchanged.
pub reserved_node_id: String,
/// The unique identifier of the DC2 Reserved Node offering to be used for the exchange. You can obtain the value for the parameter by calling GetReservedNodeExchangeOfferings
pub target_reserved_node_offering_id: String,
}
/// Serialize `AcceptReservedNodeExchangeInputMessage` contents to a `SignedRequest`.
struct AcceptReservedNodeExchangeInputMessageSerializer;
impl AcceptReservedNodeExchangeInputMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &AcceptReservedNodeExchangeInputMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ReservedNodeId"),
&obj.reserved_node_id,
);
params.put(
&format!("{}{}", prefix, "TargetReservedNodeOfferingId"),
&obj.target_reserved_node_offering_id,
);
}
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
pub struct AcceptReservedNodeExchangeOutputMessage {
///
pub exchanged_reserved_node: Option,
}
#[allow(dead_code)]
struct AcceptReservedNodeExchangeOutputMessageDeserializer;
impl AcceptReservedNodeExchangeOutputMessageDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result {
deserialize_elements::<_, AcceptReservedNodeExchangeOutputMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ExchangedReservedNode" => {
obj.exchanged_reserved_node = Some(ReservedNodeDeserializer::deserialize(
"ExchangedReservedNode",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
/// A name value pair that describes an aspect of an account.
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
pub struct AccountAttribute {
/// The name of the attribute.
pub attribute_name: Option,
/// A list of attribute values.
pub attribute_values: Option>,
}
#[allow(dead_code)]
struct AccountAttributeDeserializer;
impl AccountAttributeDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result {
deserialize_elements::<_, AccountAttribute, _>(tag_name, stack, |name, stack, obj| {
match name {
"AttributeName" => {
obj.attribute_name =
Some(StringDeserializer::deserialize("AttributeName", stack)?);
}
"AttributeValues" => {
obj.attribute_values.get_or_insert(vec![]).extend(
AttributeValueListDeserializer::deserialize("AttributeValues", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
pub struct AccountAttributeList {
/// A list of attributes assigned to an account.
pub account_attributes: Option>,
}
#[allow(dead_code)]
struct AccountAttributeListDeserializer;
impl AccountAttributeListDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result {
deserialize_elements::<_, AccountAttributeList, _>(tag_name, stack, |name, stack, obj| {
match name {
"AccountAttributes" => {
obj.account_attributes.get_or_insert(vec![]).extend(
AttributeListDeserializer::deserialize("AccountAttributes", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
/// Describes an AWS customer account authorized to restore a snapshot.
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
pub struct AccountWithRestoreAccess {
/// The identifier of an AWS support account authorized to restore a snapshot. For AWS support, the identifier is amazon-redshift-support
.
pub account_alias: Option,
/// The identifier of an AWS customer account authorized to restore a snapshot.
pub account_id: Option,
}
#[allow(dead_code)]
struct AccountWithRestoreAccessDeserializer;
impl AccountWithRestoreAccessDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result {
deserialize_elements::<_, AccountWithRestoreAccess, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"AccountAlias" => {
obj.account_alias =
Some(StringDeserializer::deserialize("AccountAlias", stack)?);
}
"AccountId" => {
obj.account_id = Some(StringDeserializer::deserialize("AccountId", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[allow(dead_code)]
struct AccountsWithRestoreAccessListDeserializer;
impl AccountsWithRestoreAccessListDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "AccountWithRestoreAccess" {
obj.push(AccountWithRestoreAccessDeserializer::deserialize(
"AccountWithRestoreAccess",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[allow(dead_code)]
struct AssociatedClusterListDeserializer;
impl AssociatedClusterListDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "ClusterAssociatedToSchedule" {
obj.push(ClusterAssociatedToScheduleDeserializer::deserialize(
"ClusterAssociatedToSchedule",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[allow(dead_code)]
struct AttributeListDeserializer;
impl AttributeListDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "AccountAttribute" {
obj.push(AccountAttributeDeserializer::deserialize(
"AccountAttribute",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
/// Serialize `AttributeNameList` contents to a `SignedRequest`.
struct AttributeNameListSerializer;
impl AttributeNameListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
params.put(&key, &obj);
}
}
}
#[allow(dead_code)]
struct AttributeValueListDeserializer;
impl AttributeValueListDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "AttributeValueTarget" {
obj.push(AttributeValueTargetDeserializer::deserialize(
"AttributeValueTarget",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
/// Describes an attribute value.
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
pub struct AttributeValueTarget {
/// The value of the attribute.
pub attribute_value: Option,
}
#[allow(dead_code)]
struct AttributeValueTargetDeserializer;
impl AttributeValueTargetDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result {
deserialize_elements::<_, AttributeValueTarget, _>(tag_name, stack, |name, stack, obj| {
match name {
"AttributeValue" => {
obj.attribute_value =
Some(StringDeserializer::deserialize("AttributeValue", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
///
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct AuthorizeClusterSecurityGroupIngressMessage {
/// The IP range to be added the Amazon Redshift security group.
pub cidrip: Option,
/// The name of the security group to which the ingress rule is added.
pub cluster_security_group_name: String,
/// The EC2 security group to be added the Amazon Redshift security group.
pub ec2_security_group_name: Option,
/// The AWS account number of the owner of the security group specified by the EC2SecurityGroupName parameter. The AWS Access Key ID is not an acceptable value.
Example: 111122223333
pub ec2_security_group_owner_id: Option,
}
/// Serialize `AuthorizeClusterSecurityGroupIngressMessage` contents to a `SignedRequest`.
struct AuthorizeClusterSecurityGroupIngressMessageSerializer;
impl AuthorizeClusterSecurityGroupIngressMessageSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &AuthorizeClusterSecurityGroupIngressMessage,
) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.cidrip {
params.put(&format!("{}{}", prefix, "CIDRIP"), &field_value);
}
params.put(
&format!("{}{}", prefix, "ClusterSecurityGroupName"),
&obj.cluster_security_group_name,
);
if let Some(ref field_value) = obj.ec2_security_group_name {
params.put(
&format!("{}{}", prefix, "EC2SecurityGroupName"),
&field_value,
);
}
if let Some(ref field_value) = obj.ec2_security_group_owner_id {
params.put(
&format!("{}{}", prefix, "EC2SecurityGroupOwnerId"),
&field_value,
);
}
}
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
pub struct AuthorizeClusterSecurityGroupIngressResult {
pub cluster_security_group: Option,
}
#[allow(dead_code)]
struct AuthorizeClusterSecurityGroupIngressResultDeserializer;
impl AuthorizeClusterSecurityGroupIngressResultDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result {
deserialize_elements::<_, AuthorizeClusterSecurityGroupIngressResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ClusterSecurityGroup" => {
obj.cluster_security_group =
Some(ClusterSecurityGroupDeserializer::deserialize(
"ClusterSecurityGroup",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
///
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct AuthorizeSnapshotAccessMessage {
/// The identifier of the AWS customer account authorized to restore the specified snapshot.
To share a snapshot with AWS support, specify amazon-redshift-support.
pub account_with_restore_access: String,
/// The identifier of the cluster the snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.
pub snapshot_cluster_identifier: Option,
/// The identifier of the snapshot the account is authorized to restore.
pub snapshot_identifier: String,
}
/// Serialize `AuthorizeSnapshotAccessMessage` contents to a `SignedRequest`.
struct AuthorizeSnapshotAccessMessageSerializer;
impl AuthorizeSnapshotAccessMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &AuthorizeSnapshotAccessMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "AccountWithRestoreAccess"),
&obj.account_with_restore_access,
);
if let Some(ref field_value) = obj.snapshot_cluster_identifier {
params.put(
&format!("{}{}", prefix, "SnapshotClusterIdentifier"),
&field_value,
);
}
params.put(
&format!("{}{}", prefix, "SnapshotIdentifier"),
&obj.snapshot_identifier,
);
}
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
pub struct AuthorizeSnapshotAccessResult {
pub snapshot: Option,
}
#[allow(dead_code)]
struct AuthorizeSnapshotAccessResultDeserializer;
impl AuthorizeSnapshotAccessResultDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result {
deserialize_elements::<_, AuthorizeSnapshotAccessResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Snapshot" => {
obj.snapshot = Some(SnapshotDeserializer::deserialize("Snapshot", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
/// Describes an availability zone.
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
pub struct AvailabilityZone {
/// The name of the availability zone.
pub name: Option,
///
pub supported_platforms: Option>,
}
#[allow(dead_code)]
struct AvailabilityZoneDeserializer;
impl AvailabilityZoneDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result {
deserialize_elements::<_, AvailabilityZone, _>(tag_name, stack, |name, stack, obj| {
match name {
"Name" => {
obj.name = Some(StringDeserializer::deserialize("Name", stack)?);
}
"SupportedPlatforms" => {
obj.supported_platforms.get_or_insert(vec![]).extend(
SupportedPlatformsListDeserializer::deserialize(
"SupportedPlatforms",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[allow(dead_code)]
struct AvailabilityZoneListDeserializer;
impl AvailabilityZoneListDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "AvailabilityZone" {
obj.push(AvailabilityZoneDeserializer::deserialize(
"AvailabilityZone",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct BatchDeleteClusterSnapshotsRequest {
/// A list of identifiers for the snapshots that you want to delete.
pub identifiers: Vec,
}
/// Serialize `BatchDeleteClusterSnapshotsRequest` contents to a `SignedRequest`.
struct BatchDeleteClusterSnapshotsRequestSerializer;
impl BatchDeleteClusterSnapshotsRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &BatchDeleteClusterSnapshotsRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
DeleteClusterSnapshotMessageListSerializer::serialize(
params,
&format!("{}{}", prefix, "DeleteClusterSnapshotMessage"),
&obj.identifiers,
);
}
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
pub struct BatchDeleteClusterSnapshotsResult {
/// A list of any errors returned.
pub errors: Option>,
/// A list of the snapshot identifiers that were deleted.
pub resources: Option>,
}
#[allow(dead_code)]
struct BatchDeleteClusterSnapshotsResultDeserializer;
impl BatchDeleteClusterSnapshotsResultDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result {
deserialize_elements::<_, BatchDeleteClusterSnapshotsResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Errors" => {
obj.errors.get_or_insert(vec![]).extend(
BatchSnapshotOperationErrorListDeserializer::deserialize(
"Errors", stack,
)?,
);
}
"Resources" => {
obj.resources.get_or_insert(vec![]).extend(
SnapshotIdentifierListDeserializer::deserialize("Resources", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct BatchModifyClusterSnapshotsMessage {
/// A boolean value indicating whether to override an exception if the retention period has passed.
pub force: Option,
/// The number of days that a manual snapshot is retained. If you specify the value -1, the manual snapshot is retained indefinitely.
The number must be either -1 or an integer between 1 and 3,653.
If you decrease the manual snapshot retention period from its current value, existing manual snapshots that fall outside of the new retention period will return an error. If you want to suppress the errors and delete the snapshots, use the force option.
pub manual_snapshot_retention_period: Option,
/// A list of snapshot identifiers you want to modify.
pub snapshot_identifier_list: Vec,
}
/// Serialize `BatchModifyClusterSnapshotsMessage` contents to a `SignedRequest`.
struct BatchModifyClusterSnapshotsMessageSerializer;
impl BatchModifyClusterSnapshotsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &BatchModifyClusterSnapshotsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.force {
params.put(&format!("{}{}", prefix, "Force"), &field_value);
}
if let Some(ref field_value) = obj.manual_snapshot_retention_period {
params.put(
&format!("{}{}", prefix, "ManualSnapshotRetentionPeriod"),
&field_value,
);
}
SnapshotIdentifierListSerializer::serialize(
params,
&format!("{}{}", prefix, "String"),
&obj.snapshot_identifier_list,
);
}
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
pub struct BatchModifyClusterSnapshotsOutputMessage {
/// A list of any errors returned.
pub errors: Option>,
/// A list of the snapshots that were modified.
pub resources: Option>,
}
#[allow(dead_code)]
struct BatchModifyClusterSnapshotsOutputMessageDeserializer;
impl BatchModifyClusterSnapshotsOutputMessageDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result {
deserialize_elements::<_, BatchModifyClusterSnapshotsOutputMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Errors" => {
obj.errors.get_or_insert(vec![]).extend(
BatchSnapshotOperationErrorsDeserializer::deserialize("Errors", stack)?,
);
}
"Resources" => {
obj.resources.get_or_insert(vec![]).extend(
SnapshotIdentifierListDeserializer::deserialize("Resources", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[allow(dead_code)]
struct BatchSnapshotOperationErrorListDeserializer;
impl BatchSnapshotOperationErrorListDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "SnapshotErrorMessage" {
obj.push(SnapshotErrorMessageDeserializer::deserialize(
"SnapshotErrorMessage",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[allow(dead_code)]
struct BatchSnapshotOperationErrorsDeserializer;
impl BatchSnapshotOperationErrorsDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "SnapshotErrorMessage" {
obj.push(SnapshotErrorMessageDeserializer::deserialize(
"SnapshotErrorMessage",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[allow(dead_code)]
struct BooleanDeserializer;
impl BooleanDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(tag_name: &str, stack: &mut T) -> Result {
xml_util::deserialize_primitive(tag_name, stack, |s| Ok(bool::from_str(&s).unwrap()))
}
}
#[allow(dead_code)]
struct BooleanOptionalDeserializer;
impl BooleanOptionalDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(tag_name: &str, stack: &mut T) -> Result {
xml_util::deserialize_primitive(tag_name, stack, |s| Ok(bool::from_str(&s).unwrap()))
}
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CancelResizeMessage {
/// The unique identifier for the cluster that you want to cancel a resize operation for.
pub cluster_identifier: String,
}
/// Serialize `CancelResizeMessage` contents to a `SignedRequest`.
struct CancelResizeMessageSerializer;
impl CancelResizeMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CancelResizeMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ClusterIdentifier"),
&obj.cluster_identifier,
);
}
}
/// Describes a cluster.
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
pub struct Cluster {
/// A boolean value that, if true
, indicates that major version upgrades will be applied automatically to the cluster during the maintenance window.
pub allow_version_upgrade: Option,
/// The number of days that automatic cluster snapshots are retained.
pub automated_snapshot_retention_period: Option,
/// The name of the Availability Zone in which the cluster is located.
pub availability_zone: Option,
/// The availability status of the cluster for queries. Possible values are the following:
-
Available - The cluster is available for queries.
-
Unavailable - The cluster is not available for queries.
-
Maintenance - The cluster is intermittently available for queries due to maintenance activities.
-
Modifying - The cluster is intermittently available for queries due to changes that modify the cluster.
-
Failed - The cluster failed and is not available for queries.
pub cluster_availability_status: Option,
/// The date and time that the cluster was created.
pub cluster_create_time: Option,
/// The unique identifier of the cluster.
pub cluster_identifier: Option,
/// The nodes in the cluster.
pub cluster_nodes: Option>,
/// The list of cluster parameter groups that are associated with this cluster. Each parameter group in the list is returned with its status.
pub cluster_parameter_groups: Option>,
/// The public key for the cluster.
pub cluster_public_key: Option,
/// The specific revision number of the database in the cluster.
pub cluster_revision_number: Option,
/// A list of cluster security group that are associated with the cluster. Each security group is represented by an element that contains ClusterSecurityGroup.Name
and ClusterSecurityGroup.Status
subelements.
Cluster security groups are used when the cluster is not created in an Amazon Virtual Private Cloud (VPC). Clusters that are created in a VPC use VPC security groups, which are listed by the VpcSecurityGroups parameter.
pub cluster_security_groups: Option>,
/// A value that returns the destination region and retention period that are configured for cross-region snapshot copy.
pub cluster_snapshot_copy_status: Option,
/// The current state of the cluster. Possible values are the following:
-
available
-
available, prep-for-resize
-
available, resize-cleanup
-
cancelling-resize
-
creating
-
deleting
-
final-snapshot
-
hardware-failure
-
incompatible-hsm
-
incompatible-network
-
incompatible-parameters
-
incompatible-restore
-
modifying
-
paused
-
rebooting
-
renaming
-
resizing
-
rotating-keys
-
storage-full
-
updating-hsm
pub cluster_status: Option,
/// The name of the subnet group that is associated with the cluster. This parameter is valid only when the cluster is in a VPC.
pub cluster_subnet_group_name: Option,
/// The version ID of the Amazon Redshift engine that is running on the cluster.
pub cluster_version: Option,
/// The name of the initial database that was created when the cluster was created. This same name is returned for the life of the cluster. If an initial database was not specified, a database named dev
dev was created by default.
pub db_name: Option,
///
pub data_transfer_progress: Option,
/// Describes a group of DeferredMaintenanceWindow
objects.
pub deferred_maintenance_windows: Option>,
/// The status of the elastic IP (EIP) address.
pub elastic_ip_status: Option,
/// The number of nodes that you can resize the cluster to with the elastic resize method.
pub elastic_resize_number_of_node_options: Option,
/// A boolean value that, if true
, indicates that data in the cluster is encrypted at rest.
pub encrypted: Option,
/// The connection endpoint.
pub endpoint: Option,
/// An option that specifies whether to create the cluster with enhanced VPC routing enabled. To create a cluster that uses enhanced VPC routing, the cluster must be in a VPC. For more information, see Enhanced VPC Routing in the Amazon Redshift Cluster Management Guide.
If this option is true
, enhanced VPC routing is enabled.
Default: false
pub enhanced_vpc_routing: Option,
/// The date and time when the next snapshot is expected to be taken for clusters with a valid snapshot schedule and backups enabled.
pub expected_next_snapshot_schedule_time: Option,
/// The status of next expected snapshot for clusters having a valid snapshot schedule and backups enabled. Possible values are the following:
pub expected_next_snapshot_schedule_time_status: Option,
/// A value that reports whether the Amazon Redshift cluster has finished applying any hardware security module (HSM) settings changes specified in a modify cluster command.
Values: active, applying
pub hsm_status: Option,
/// A list of AWS Identity and Access Management (IAM) roles that can be used by the cluster to access other AWS services.
pub iam_roles: Option>,
/// The AWS Key Management Service (AWS KMS) key ID of the encryption key used to encrypt data in the cluster.
pub kms_key_id: Option,
/// The name of the maintenance track for the cluster.
pub maintenance_track_name: Option,
/// The default number of days to retain a manual snapshot. If the value is -1, the snapshot is retained indefinitely. This setting doesn't change the retention period of existing snapshots.
The value must be either -1 or an integer between 1 and 3,653.
pub manual_snapshot_retention_period: Option,
/// The master user name for the cluster. This name is used to connect to the database that is specified in the DBName parameter.
pub master_username: Option,
/// The status of a modify operation, if any, initiated for the cluster.
pub modify_status: Option,
/// The date and time in UTC when system maintenance can begin.
pub next_maintenance_window_start_time: Option,
/// The node type for the nodes in the cluster.
pub node_type: Option,
/// The number of compute nodes in the cluster.
pub number_of_nodes: Option,
/// Cluster operations that are waiting to be started.
pub pending_actions: Option>,
/// A value that, if present, indicates that changes to the cluster are pending. Specific pending changes are identified by subelements.
pub pending_modified_values: Option,
/// The weekly time range, in Universal Coordinated Time (UTC), during which system maintenance can occur.
pub preferred_maintenance_window: Option,
/// A boolean value that, if true
, indicates that the cluster can be accessed from a public network.
pub publicly_accessible: Option,
/// Returns the following:
pub resize_info: Option,
/// A value that describes the status of a cluster restore action. This parameter returns null if the cluster was not created by restoring a snapshot.
pub restore_status: Option,
/// A unique identifier for the cluster snapshot schedule.
pub snapshot_schedule_identifier: Option,
/// The current state of the cluster snapshot schedule.
pub snapshot_schedule_state: Option,
/// The list of tags for the cluster.
pub tags: Option>,
/// The identifier of the VPC the cluster is in, if the cluster is in a VPC.
pub vpc_id: Option,
/// A list of Amazon Virtual Private Cloud (Amazon VPC) security groups that are associated with the cluster. This parameter is returned only if the cluster is in a VPC.
pub vpc_security_groups: Option>,
}
#[allow(dead_code)]
struct ClusterDeserializer;
impl ClusterDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result {
deserialize_elements::<_, Cluster, _>(tag_name, stack, |name, stack, obj| {
match name {
"AllowVersionUpgrade" => {
obj.allow_version_upgrade = Some(BooleanDeserializer::deserialize(
"AllowVersionUpgrade",
stack,
)?);
}
"AutomatedSnapshotRetentionPeriod" => {
obj.automated_snapshot_retention_period =
Some(IntegerDeserializer::deserialize(
"AutomatedSnapshotRetentionPeriod",
stack,
)?);
}
"AvailabilityZone" => {
obj.availability_zone =
Some(StringDeserializer::deserialize("AvailabilityZone", stack)?);
}
"ClusterAvailabilityStatus" => {
obj.cluster_availability_status = Some(StringDeserializer::deserialize(
"ClusterAvailabilityStatus",
stack,
)?);
}
"ClusterCreateTime" => {
obj.cluster_create_time =
Some(TStampDeserializer::deserialize("ClusterCreateTime", stack)?);
}
"ClusterIdentifier" => {
obj.cluster_identifier =
Some(StringDeserializer::deserialize("ClusterIdentifier", stack)?);
}
"ClusterNodes" => {
obj.cluster_nodes.get_or_insert(vec![]).extend(
ClusterNodesListDeserializer::deserialize("ClusterNodes", stack)?,
);
}
"ClusterParameterGroups" => {
obj.cluster_parameter_groups.get_or_insert(vec![]).extend(
ClusterParameterGroupStatusListDeserializer::deserialize(
"ClusterParameterGroups",
stack,
)?,
);
}
"ClusterPublicKey" => {
obj.cluster_public_key =
Some(StringDeserializer::deserialize("ClusterPublicKey", stack)?);
}
"ClusterRevisionNumber" => {
obj.cluster_revision_number = Some(StringDeserializer::deserialize(
"ClusterRevisionNumber",
stack,
)?);
}
"ClusterSecurityGroups" => {
obj.cluster_security_groups.get_or_insert(vec![]).extend(
ClusterSecurityGroupMembershipListDeserializer::deserialize(
"ClusterSecurityGroups",
stack,
)?,
);
}
"ClusterSnapshotCopyStatus" => {
obj.cluster_snapshot_copy_status =
Some(ClusterSnapshotCopyStatusDeserializer::deserialize(
"ClusterSnapshotCopyStatus",
stack,
)?);
}
"ClusterStatus" => {
obj.cluster_status =
Some(StringDeserializer::deserialize("ClusterStatus", stack)?);
}
"ClusterSubnetGroupName" => {
obj.cluster_subnet_group_name = Some(StringDeserializer::deserialize(
"ClusterSubnetGroupName",
stack,
)?);
}
"ClusterVersion" => {
obj.cluster_version =
Some(StringDeserializer::deserialize("ClusterVersion", stack)?);
}
"DBName" => {
obj.db_name = Some(StringDeserializer::deserialize("DBName", stack)?);
}
"DataTransferProgress" => {
obj.data_transfer_progress =
Some(DataTransferProgressDeserializer::deserialize(
"DataTransferProgress",
stack,
)?);
}
"DeferredMaintenanceWindows" => {
obj.deferred_maintenance_windows
.get_or_insert(vec![])
.extend(DeferredMaintenanceWindowsListDeserializer::deserialize(
"DeferredMaintenanceWindows",
stack,
)?);
}
"ElasticIpStatus" => {
obj.elastic_ip_status = Some(ElasticIpStatusDeserializer::deserialize(
"ElasticIpStatus",
stack,
)?);
}
"ElasticResizeNumberOfNodeOptions" => {
obj.elastic_resize_number_of_node_options = Some(
StringDeserializer::deserialize("ElasticResizeNumberOfNodeOptions", stack)?,
);
}
"Encrypted" => {
obj.encrypted = Some(BooleanDeserializer::deserialize("Encrypted", stack)?);
}
"Endpoint" => {
obj.endpoint = Some(EndpointDeserializer::deserialize("Endpoint", stack)?);
}
"EnhancedVpcRouting" => {
obj.enhanced_vpc_routing = Some(BooleanDeserializer::deserialize(
"EnhancedVpcRouting",
stack,
)?);
}
"ExpectedNextSnapshotScheduleTime" => {
obj.expected_next_snapshot_schedule_time = Some(
TStampDeserializer::deserialize("ExpectedNextSnapshotScheduleTime", stack)?,
);
}
"ExpectedNextSnapshotScheduleTimeStatus" => {
obj.expected_next_snapshot_schedule_time_status =
Some(StringDeserializer::deserialize(
"ExpectedNextSnapshotScheduleTimeStatus",
stack,
)?);
}
"HsmStatus" => {
obj.hsm_status = Some(HsmStatusDeserializer::deserialize("HsmStatus", stack)?);
}
"IamRoles" => {
obj.iam_roles.get_or_insert(vec![]).extend(
ClusterIamRoleListDeserializer::deserialize("IamRoles", stack)?,
);
}
"KmsKeyId" => {
obj.kms_key_id = Some(StringDeserializer::deserialize("KmsKeyId", stack)?);
}
"MaintenanceTrackName" => {
obj.maintenance_track_name = Some(StringDeserializer::deserialize(
"MaintenanceTrackName",
stack,
)?);
}
"ManualSnapshotRetentionPeriod" => {
obj.manual_snapshot_retention_period = Some(IntegerDeserializer::deserialize(
"ManualSnapshotRetentionPeriod",
stack,
)?);
}
"MasterUsername" => {
obj.master_username =
Some(StringDeserializer::deserialize("MasterUsername", stack)?);
}
"ModifyStatus" => {
obj.modify_status =
Some(StringDeserializer::deserialize("ModifyStatus", stack)?);
}
"NextMaintenanceWindowStartTime" => {
obj.next_maintenance_window_start_time = Some(TStampDeserializer::deserialize(
"NextMaintenanceWindowStartTime",
stack,
)?);
}
"NodeType" => {
obj.node_type = Some(StringDeserializer::deserialize("NodeType", stack)?);
}
"NumberOfNodes" => {
obj.number_of_nodes =
Some(IntegerDeserializer::deserialize("NumberOfNodes", stack)?);
}
"PendingActions" => {
obj.pending_actions.get_or_insert(vec![]).extend(
PendingActionsListDeserializer::deserialize("PendingActions", stack)?,
);
}
"PendingModifiedValues" => {
obj.pending_modified_values =
Some(PendingModifiedValuesDeserializer::deserialize(
"PendingModifiedValues",
stack,
)?);
}
"PreferredMaintenanceWindow" => {
obj.preferred_maintenance_window = Some(StringDeserializer::deserialize(
"PreferredMaintenanceWindow",
stack,
)?);
}
"PubliclyAccessible" => {
obj.publicly_accessible = Some(BooleanDeserializer::deserialize(
"PubliclyAccessible",
stack,
)?);
}
"ResizeInfo" => {
obj.resize_info =
Some(ResizeInfoDeserializer::deserialize("ResizeInfo", stack)?);
}
"RestoreStatus" => {
obj.restore_status = Some(RestoreStatusDeserializer::deserialize(
"RestoreStatus",
stack,
)?);
}
"SnapshotScheduleIdentifier" => {
obj.snapshot_schedule_identifier = Some(StringDeserializer::deserialize(
"SnapshotScheduleIdentifier",
stack,
)?);
}
"SnapshotScheduleState" => {
obj.snapshot_schedule_state = Some(ScheduleStateDeserializer::deserialize(
"SnapshotScheduleState",
stack,
)?);
}
"Tags" => {
obj.tags
.get_or_insert(vec![])
.extend(TagListDeserializer::deserialize("Tags", stack)?);
}
"VpcId" => {
obj.vpc_id = Some(StringDeserializer::deserialize("VpcId", stack)?);
}
"VpcSecurityGroups" => {
obj.vpc_security_groups.get_or_insert(vec![]).extend(
VpcSecurityGroupMembershipListDeserializer::deserialize(
"VpcSecurityGroups",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
///
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
pub struct ClusterAssociatedToSchedule {
///
pub cluster_identifier: Option,
///
pub schedule_association_state: Option,
}
#[allow(dead_code)]
struct ClusterAssociatedToScheduleDeserializer;
impl ClusterAssociatedToScheduleDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result {
deserialize_elements::<_, ClusterAssociatedToSchedule, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ClusterIdentifier" => {
obj.cluster_identifier =
Some(StringDeserializer::deserialize("ClusterIdentifier", stack)?);
}
"ScheduleAssociationState" => {
obj.schedule_association_state =
Some(ScheduleStateDeserializer::deserialize(
"ScheduleAssociationState",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
/// Temporary credentials with authorization to log on to an Amazon Redshift database.
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
pub struct ClusterCredentials {
/// A temporary password that authorizes the user name returned by DbUser
to log on to the database DbName
.
pub db_password: Option,
/// A database user name that is authorized to log on to the database DbName
using the password DbPassword
. If the specified DbUser exists in the database, the new user name has the same database privileges as the the user named in DbUser. By default, the user is added to PUBLIC. If the DbGroups
parameter is specifed, DbUser
is added to the listed groups for any sessions created using these credentials.
pub db_user: Option,
/// The date and time the password in DbPassword
expires.
pub expiration: Option,
}
#[allow(dead_code)]
struct ClusterCredentialsDeserializer;
impl ClusterCredentialsDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result {
deserialize_elements::<_, ClusterCredentials, _>(tag_name, stack, |name, stack, obj| {
match name {
"DbPassword" => {
obj.db_password = Some(SensitiveStringDeserializer::deserialize(
"DbPassword",
stack,
)?);
}
"DbUser" => {
obj.db_user = Some(StringDeserializer::deserialize("DbUser", stack)?);
}
"Expiration" => {
obj.expiration = Some(TStampDeserializer::deserialize("Expiration", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
/// Describes a ClusterDbRevision
.
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
pub struct ClusterDbRevision {
/// The unique identifier of the cluster.
pub cluster_identifier: Option,
/// A string representing the current cluster version.
pub current_database_revision: Option,
/// The date on which the database revision was released.
pub database_revision_release_date: Option,
/// A list of RevisionTarget
objects, where each object describes the database revision that a cluster can be updated to.
pub revision_targets: Option>,
}
#[allow(dead_code)]
struct ClusterDbRevisionDeserializer;
impl ClusterDbRevisionDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result {
deserialize_elements::<_, ClusterDbRevision, _>(tag_name, stack, |name, stack, obj| {
match name {
"ClusterIdentifier" => {
obj.cluster_identifier =
Some(StringDeserializer::deserialize("ClusterIdentifier", stack)?);
}
"CurrentDatabaseRevision" => {
obj.current_database_revision = Some(StringDeserializer::deserialize(
"CurrentDatabaseRevision",
stack,
)?);
}
"DatabaseRevisionReleaseDate" => {
obj.database_revision_release_date = Some(TStampDeserializer::deserialize(
"DatabaseRevisionReleaseDate",
stack,
)?);
}
"RevisionTargets" => {
obj.revision_targets.get_or_insert(vec![]).extend(
RevisionTargetsListDeserializer::deserialize("RevisionTargets", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[allow(dead_code)]
struct ClusterDbRevisionsListDeserializer;
impl ClusterDbRevisionsListDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "ClusterDbRevision" {
obj.push(ClusterDbRevisionDeserializer::deserialize(
"ClusterDbRevision",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
pub struct ClusterDbRevisionsMessage {
/// A list of revisions.
pub cluster_db_revisions: Option>,
/// A string representing the starting point for the next set of revisions. If a value is returned in a response, you can retrieve the next set of revisions by providing the value in the marker
parameter and retrying the command. If the marker
field is empty, all revisions have already been returned.
pub marker: Option,
}
#[allow(dead_code)]
struct ClusterDbRevisionsMessageDeserializer;
impl ClusterDbRevisionsMessageDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result {
deserialize_elements::<_, ClusterDbRevisionsMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ClusterDbRevisions" => {
obj.cluster_db_revisions.get_or_insert(vec![]).extend(
ClusterDbRevisionsListDeserializer::deserialize(
"ClusterDbRevisions",
stack,
)?,
);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
/// An AWS Identity and Access Management (IAM) role that can be used by the associated Amazon Redshift cluster to access other AWS services.
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
pub struct ClusterIamRole {
/// A value that describes the status of the IAM role's association with an Amazon Redshift cluster.
The following are possible statuses and descriptions.
-
in-sync
: The role is available for use by the cluster.
-
adding
: The role is in the process of being associated with the cluster.
-
removing
: The role is in the process of being disassociated with the cluster.
pub apply_status: Option,
/// The Amazon Resource Name (ARN) of the IAM role, for example, arn:aws:iam::123456789012:role/RedshiftCopyUnload
.
pub iam_role_arn: Option,
}
#[allow(dead_code)]
struct ClusterIamRoleDeserializer;
impl ClusterIamRoleDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result {
deserialize_elements::<_, ClusterIamRole, _>(tag_name, stack, |name, stack, obj| {
match name {
"ApplyStatus" => {
obj.apply_status = Some(StringDeserializer::deserialize("ApplyStatus", stack)?);
}
"IamRoleArn" => {
obj.iam_role_arn = Some(StringDeserializer::deserialize("IamRoleArn", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[allow(dead_code)]
struct ClusterIamRoleListDeserializer;
impl ClusterIamRoleListDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "ClusterIamRole" {
obj.push(ClusterIamRoleDeserializer::deserialize(
"ClusterIamRole",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[allow(dead_code)]
struct ClusterListDeserializer;
impl ClusterListDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "Cluster" {
obj.push(ClusterDeserializer::deserialize("Cluster", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
/// The identifier of a node in a cluster.
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
pub struct ClusterNode {
/// Whether the node is a leader node or a compute node.
pub node_role: Option,
/// The private IP address of a node within a cluster.
pub private_ip_address: Option,
/// The public IP address of a node within a cluster.
pub public_ip_address: Option,
}
#[allow(dead_code)]
struct ClusterNodeDeserializer;
impl ClusterNodeDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result {
deserialize_elements::<_, ClusterNode, _>(tag_name, stack, |name, stack, obj| {
match name {
"NodeRole" => {
obj.node_role = Some(StringDeserializer::deserialize("NodeRole", stack)?);
}
"PrivateIPAddress" => {
obj.private_ip_address =
Some(StringDeserializer::deserialize("PrivateIPAddress", stack)?);
}
"PublicIPAddress" => {
obj.public_ip_address =
Some(StringDeserializer::deserialize("PublicIPAddress", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[allow(dead_code)]
struct ClusterNodesListDeserializer;
impl ClusterNodesListDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(ClusterNodeDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
/// Describes a parameter group.
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
pub struct ClusterParameterGroup {
/// The description of the parameter group.
pub description: Option,
/// The name of the cluster parameter group family that this cluster parameter group is compatible with.
pub parameter_group_family: Option,
/// The name of the cluster parameter group.
pub parameter_group_name: Option,
/// The list of tags for the cluster parameter group.
pub tags: Option>,
}
#[allow(dead_code)]
struct ClusterParameterGroupDeserializer;
impl ClusterParameterGroupDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result {
deserialize_elements::<_, ClusterParameterGroup, _>(tag_name, stack, |name, stack, obj| {
match name {
"Description" => {
obj.description = Some(StringDeserializer::deserialize("Description", stack)?);
}
"ParameterGroupFamily" => {
obj.parameter_group_family = Some(StringDeserializer::deserialize(
"ParameterGroupFamily",
stack,
)?);
}
"ParameterGroupName" => {
obj.parameter_group_name = Some(StringDeserializer::deserialize(
"ParameterGroupName",
stack,
)?);
}
"Tags" => {
obj.tags
.get_or_insert(vec![])
.extend(TagListDeserializer::deserialize("Tags", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
/// Contains the output from the DescribeClusterParameters action.
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
pub struct ClusterParameterGroupDetails {
/// A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned marker value in the Marker
parameter and retrying the command. If the Marker
field is empty, all response records have been retrieved for the request.
pub marker: Option,
/// A list of Parameter instances. Each instance lists the parameters of one cluster parameter group.
pub parameters: Option>,
}
#[allow(dead_code)]
struct ClusterParameterGroupDetailsDeserializer;
impl ClusterParameterGroupDetailsDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result {
deserialize_elements::<_, ClusterParameterGroupDetails, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
"Parameters" => {
obj.parameters.get_or_insert(vec![]).extend(
ParametersListDeserializer::deserialize("Parameters", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
///
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
pub struct ClusterParameterGroupNameMessage {
/// The name of the cluster parameter group.
pub parameter_group_name: Option,
/// The status of the parameter group. For example, if you made a change to a parameter group name-value pair, then the change could be pending a reboot of an associated cluster.
pub parameter_group_status: Option,
}
#[allow(dead_code)]
struct ClusterParameterGroupNameMessageDeserializer;
impl ClusterParameterGroupNameMessageDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result {
deserialize_elements::<_, ClusterParameterGroupNameMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ParameterGroupName" => {
obj.parameter_group_name = Some(StringDeserializer::deserialize(
"ParameterGroupName",
stack,
)?);
}
"ParameterGroupStatus" => {
obj.parameter_group_status = Some(StringDeserializer::deserialize(
"ParameterGroupStatus",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
/// Describes the status of a parameter group.
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
pub struct ClusterParameterGroupStatus {
/// The list of parameter statuses.
For more information about parameters and parameter groups, go to Amazon Redshift Parameter Groups in the Amazon Redshift Cluster Management Guide.
pub cluster_parameter_status_list: Option>,
/// The status of parameter updates.
pub parameter_apply_status: Option,
/// The name of the cluster parameter group.
pub parameter_group_name: Option,
}
#[allow(dead_code)]
struct ClusterParameterGroupStatusDeserializer;
impl ClusterParameterGroupStatusDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result {
deserialize_elements::<_, ClusterParameterGroupStatus, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ClusterParameterStatusList" => {
obj.cluster_parameter_status_list
.get_or_insert(vec![])
.extend(ClusterParameterStatusListDeserializer::deserialize(
"ClusterParameterStatusList",
stack,
)?);
}
"ParameterApplyStatus" => {
obj.parameter_apply_status = Some(StringDeserializer::deserialize(
"ParameterApplyStatus",
stack,
)?);
}
"ParameterGroupName" => {
obj.parameter_group_name = Some(StringDeserializer::deserialize(
"ParameterGroupName",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[allow(dead_code)]
struct ClusterParameterGroupStatusListDeserializer;
impl ClusterParameterGroupStatusListDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "ClusterParameterGroup" {
obj.push(ClusterParameterGroupStatusDeserializer::deserialize(
"ClusterParameterGroup",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
/// Contains the output from the DescribeClusterParameterGroups action.
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
pub struct ClusterParameterGroupsMessage {
/// A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned marker value in the Marker
parameter and retrying the command. If the Marker
field is empty, all response records have been retrieved for the request.
pub marker: Option,
/// A list of ClusterParameterGroup instances. Each instance describes one cluster parameter group.
pub parameter_groups: Option>,
}
#[allow(dead_code)]
struct ClusterParameterGroupsMessageDeserializer;
impl ClusterParameterGroupsMessageDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result {
deserialize_elements::<_, ClusterParameterGroupsMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
"ParameterGroups" => {
obj.parameter_groups.get_or_insert(vec![]).extend(
ParameterGroupListDeserializer::deserialize("ParameterGroups", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
/// Describes the status of a parameter group.
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
pub struct ClusterParameterStatus {
/// The error that prevented the parameter from being applied to the database.
pub parameter_apply_error_description: Option,
/// The status of the parameter that indicates whether the parameter is in sync with the database, waiting for a cluster reboot, or encountered an error when being applied.
The following are possible statuses and descriptions.
-
in-sync
: The parameter value is in sync with the database.
-
pending-reboot
: The parameter value will be applied after the cluster reboots.
-
applying
: The parameter value is being applied to the database.
-
invalid-parameter
: Cannot apply the parameter value because it has an invalid value or syntax.
-
apply-deferred
: The parameter contains static property changes. The changes are deferred until the cluster reboots.
-
apply-error
: Cannot connect to the cluster. The parameter change will be applied after the cluster reboots.
-
unknown-error
: Cannot apply the parameter change right now. The change will be applied after the cluster reboots.
pub parameter_apply_status: Option,
/// The name of the parameter.
pub parameter_name: Option,
}
#[allow(dead_code)]
struct ClusterParameterStatusDeserializer;
impl ClusterParameterStatusDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result {
deserialize_elements::<_, ClusterParameterStatus, _>(tag_name, stack, |name, stack, obj| {
match name {
"ParameterApplyErrorDescription" => {
obj.parameter_apply_error_description = Some(StringDeserializer::deserialize(
"ParameterApplyErrorDescription",
stack,
)?);
}
"ParameterApplyStatus" => {
obj.parameter_apply_status = Some(StringDeserializer::deserialize(
"ParameterApplyStatus",
stack,
)?);
}
"ParameterName" => {
obj.parameter_name =
Some(StringDeserializer::deserialize("ParameterName", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[allow(dead_code)]
struct ClusterParameterStatusListDeserializer;
impl ClusterParameterStatusListDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(ClusterParameterStatusDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
/// Describes a security group.
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
pub struct ClusterSecurityGroup {
/// The name of the cluster security group to which the operation was applied.
pub cluster_security_group_name: Option,
/// A description of the security group.
pub description: Option,
/// A list of EC2 security groups that are permitted to access clusters associated with this cluster security group.
pub ec2_security_groups: Option>,
/// A list of IP ranges (CIDR blocks) that are permitted to access clusters associated with this cluster security group.
pub ip_ranges: Option>,
/// The list of tags for the cluster security group.
pub tags: Option>,
}
#[allow(dead_code)]
struct ClusterSecurityGroupDeserializer;
impl ClusterSecurityGroupDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result {
deserialize_elements::<_, ClusterSecurityGroup, _>(tag_name, stack, |name, stack, obj| {
match name {
"ClusterSecurityGroupName" => {
obj.cluster_security_group_name = Some(StringDeserializer::deserialize(
"ClusterSecurityGroupName",
stack,
)?);
}
"Description" => {
obj.description = Some(StringDeserializer::deserialize("Description", stack)?);
}
"EC2SecurityGroups" => {
obj.ec2_security_groups.get_or_insert(vec![]).extend(
EC2SecurityGroupListDeserializer::deserialize("EC2SecurityGroups", stack)?,
);
}
"IPRanges" => {
obj.ip_ranges
.get_or_insert(vec![])
.extend(IPRangeListDeserializer::deserialize("IPRanges", stack)?);
}
"Tags" => {
obj.tags
.get_or_insert(vec![])
.extend(TagListDeserializer::deserialize("Tags", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
/// Describes a cluster security group.
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
pub struct ClusterSecurityGroupMembership {
/// The name of the cluster security group.
pub cluster_security_group_name: Option,
/// The status of the cluster security group.
pub status: Option,
}
#[allow(dead_code)]
struct ClusterSecurityGroupMembershipDeserializer;
impl ClusterSecurityGroupMembershipDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result {
deserialize_elements::<_, ClusterSecurityGroupMembership, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ClusterSecurityGroupName" => {
obj.cluster_security_group_name = Some(StringDeserializer::deserialize(
"ClusterSecurityGroupName",
stack,
)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[allow(dead_code)]
struct ClusterSecurityGroupMembershipListDeserializer;
impl ClusterSecurityGroupMembershipListDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "ClusterSecurityGroup" {
obj.push(ClusterSecurityGroupMembershipDeserializer::deserialize(
"ClusterSecurityGroup",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
///
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
pub struct ClusterSecurityGroupMessage {
/// A list of ClusterSecurityGroup instances.
pub cluster_security_groups: Option>,
/// A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned marker value in the Marker
parameter and retrying the command. If the Marker
field is empty, all response records have been retrieved for the request.
pub marker: Option,
}
#[allow(dead_code)]
struct ClusterSecurityGroupMessageDeserializer;
impl ClusterSecurityGroupMessageDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result {
deserialize_elements::<_, ClusterSecurityGroupMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ClusterSecurityGroups" => {
obj.cluster_security_groups.get_or_insert(vec![]).extend(
ClusterSecurityGroupsDeserializer::deserialize(
"ClusterSecurityGroups",
stack,
)?,
);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
/// Serialize `ClusterSecurityGroupNameList` contents to a `SignedRequest`.
struct ClusterSecurityGroupNameListSerializer;
impl ClusterSecurityGroupNameListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
params.put(&key, &obj);
}
}
}
#[allow(dead_code)]
struct ClusterSecurityGroupsDeserializer;
impl ClusterSecurityGroupsDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "ClusterSecurityGroup" {
obj.push(ClusterSecurityGroupDeserializer::deserialize(
"ClusterSecurityGroup",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
/// Returns the destination region and retention period that are configured for cross-region snapshot copy.
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
pub struct ClusterSnapshotCopyStatus {
/// The destination region that snapshots are automatically copied to when cross-region snapshot copy is enabled.
pub destination_region: Option,
/// The number of days that automated snapshots are retained in the destination region after they are copied from a source region. If the value is -1, the manual snapshot is retained indefinitely.
The value must be either -1 or an integer between 1 and 3,653.
pub manual_snapshot_retention_period: Option,
/// The number of days that automated snapshots are retained in the destination region after they are copied from a source region.
pub retention_period: Option,
/// The name of the snapshot copy grant.
pub snapshot_copy_grant_name: Option,
}
#[allow(dead_code)]
struct ClusterSnapshotCopyStatusDeserializer;
impl ClusterSnapshotCopyStatusDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result {
deserialize_elements::<_, ClusterSnapshotCopyStatus, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DestinationRegion" => {
obj.destination_region =
Some(StringDeserializer::deserialize("DestinationRegion", stack)?);
}
"ManualSnapshotRetentionPeriod" => {
obj.manual_snapshot_retention_period =
Some(IntegerDeserializer::deserialize(
"ManualSnapshotRetentionPeriod",
stack,
)?);
}
"RetentionPeriod" => {
obj.retention_period =
Some(LongDeserializer::deserialize("RetentionPeriod", stack)?);
}
"SnapshotCopyGrantName" => {
obj.snapshot_copy_grant_name = Some(StringDeserializer::deserialize(
"SnapshotCopyGrantName",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
/// Describes a subnet group.
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
pub struct ClusterSubnetGroup {
/// The name of the cluster subnet group.
pub cluster_subnet_group_name: Option,
/// The description of the cluster subnet group.
pub description: Option,
/// The status of the cluster subnet group. Possible values are Complete
, Incomplete
and Invalid
.
pub subnet_group_status: Option,
/// A list of the VPC Subnet elements.
pub subnets: Option>,
/// The list of tags for the cluster subnet group.
pub tags: Option>,
/// The VPC ID of the cluster subnet group.
pub vpc_id: Option,
}
#[allow(dead_code)]
struct ClusterSubnetGroupDeserializer;
impl ClusterSubnetGroupDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result {
deserialize_elements::<_, ClusterSubnetGroup, _>(tag_name, stack, |name, stack, obj| {
match name {
"ClusterSubnetGroupName" => {
obj.cluster_subnet_group_name = Some(StringDeserializer::deserialize(
"ClusterSubnetGroupName",
stack,
)?);
}
"Description" => {
obj.description = Some(StringDeserializer::deserialize("Description", stack)?);
}
"SubnetGroupStatus" => {
obj.subnet_group_status =
Some(StringDeserializer::deserialize("SubnetGroupStatus", stack)?);
}
"Subnets" => {
obj.subnets
.get_or_insert(vec![])
.extend(SubnetListDeserializer::deserialize("Subnets", stack)?);
}
"Tags" => {
obj.tags
.get_or_insert(vec![])
.extend(TagListDeserializer::deserialize("Tags", stack)?);
}
"VpcId" => {
obj.vpc_id = Some(StringDeserializer::deserialize("VpcId", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
/// Contains the output from the DescribeClusterSubnetGroups action.
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
pub struct ClusterSubnetGroupMessage {
/// A list of ClusterSubnetGroup instances.
pub cluster_subnet_groups: Option>,
/// A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned marker value in the Marker
parameter and retrying the command. If the Marker
field is empty, all response records have been retrieved for the request.
pub marker: Option,
}
#[allow(dead_code)]
struct ClusterSubnetGroupMessageDeserializer;
impl ClusterSubnetGroupMessageDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result {
deserialize_elements::<_, ClusterSubnetGroupMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ClusterSubnetGroups" => {
obj.cluster_subnet_groups.get_or_insert(vec![]).extend(
ClusterSubnetGroupsDeserializer::deserialize(
"ClusterSubnetGroups",
stack,
)?,
);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[allow(dead_code)]
struct ClusterSubnetGroupsDeserializer;
impl ClusterSubnetGroupsDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "ClusterSubnetGroup" {
obj.push(ClusterSubnetGroupDeserializer::deserialize(
"ClusterSubnetGroup",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
/// Describes a cluster version, including the parameter group family and description of the version.
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
pub struct ClusterVersion {
/// The name of the cluster parameter group family for the cluster.
pub cluster_parameter_group_family: Option,
/// The version number used by the cluster.
pub cluster_version: Option,
/// The description of the cluster version.
pub description: Option,
}
#[allow(dead_code)]
struct ClusterVersionDeserializer;
impl ClusterVersionDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result {
deserialize_elements::<_, ClusterVersion, _>(tag_name, stack, |name, stack, obj| {
match name {
"ClusterParameterGroupFamily" => {
obj.cluster_parameter_group_family = Some(StringDeserializer::deserialize(
"ClusterParameterGroupFamily",
stack,
)?);
}
"ClusterVersion" => {
obj.cluster_version =
Some(StringDeserializer::deserialize("ClusterVersion", stack)?);
}
"Description" => {
obj.description = Some(StringDeserializer::deserialize("Description", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[allow(dead_code)]
struct ClusterVersionListDeserializer;
impl ClusterVersionListDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "ClusterVersion" {
obj.push(ClusterVersionDeserializer::deserialize(
"ClusterVersion",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
/// Contains the output from the DescribeClusterVersions action.
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
pub struct ClusterVersionsMessage {
/// A list of Version
elements.
pub cluster_versions: Option>,
/// A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned marker value in the Marker
parameter and retrying the command. If the Marker
field is empty, all response records have been retrieved for the request.
pub marker: Option,
}
#[allow(dead_code)]
struct ClusterVersionsMessageDeserializer;
impl ClusterVersionsMessageDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result {
deserialize_elements::<_, ClusterVersionsMessage, _>(tag_name, stack, |name, stack, obj| {
match name {
"ClusterVersions" => {
obj.cluster_versions.get_or_insert(vec![]).extend(
ClusterVersionListDeserializer::deserialize("ClusterVersions", stack)?,
);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
/// Contains the output from the DescribeClusters action.
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
pub struct ClustersMessage {
/// A list of Cluster
objects, where each object describes one cluster.
pub clusters: Option>,
/// A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned marker value in the Marker
parameter and retrying the command. If the Marker
field is empty, all response records have been retrieved for the request.
pub marker: Option,
}
#[allow(dead_code)]
struct ClustersMessageDeserializer;
impl ClustersMessageDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result {
deserialize_elements::<_, ClustersMessage, _>(tag_name, stack, |name, stack, obj| {
match name {
"Clusters" => {
obj.clusters
.get_or_insert(vec![])
.extend(ClusterListDeserializer::deserialize("Clusters", stack)?);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
///
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CopyClusterSnapshotMessage {
/// The number of days that a manual snapshot is retained. If the value is -1, the manual snapshot is retained indefinitely.
The value must be either -1 or an integer between 1 and 3,653.
The default value is -1.
pub manual_snapshot_retention_period: Option,
/// The identifier of the cluster the source snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.
Constraints:
pub source_snapshot_cluster_identifier: Option,
/// The identifier for the source snapshot.
Constraints:
pub source_snapshot_identifier: String,
/// The identifier given to the new manual snapshot.
Constraints:
-
Cannot be null, empty, or blank.
-
Must contain from 1 to 255 alphanumeric characters or hyphens.
-
First character must be a letter.
-
Cannot end with a hyphen or contain two consecutive hyphens.
-
Must be unique for the AWS account that is making the request.
pub target_snapshot_identifier: String,
}
/// Serialize `CopyClusterSnapshotMessage` contents to a `SignedRequest`.
struct CopyClusterSnapshotMessageSerializer;
impl CopyClusterSnapshotMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CopyClusterSnapshotMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.manual_snapshot_retention_period {
params.put(
&format!("{}{}", prefix, "ManualSnapshotRetentionPeriod"),
&field_value,
);
}
if let Some(ref field_value) = obj.source_snapshot_cluster_identifier {
params.put(
&format!("{}{}", prefix, "SourceSnapshotClusterIdentifier"),
&field_value,
);
}
params.put(
&format!("{}{}", prefix, "SourceSnapshotIdentifier"),
&obj.source_snapshot_identifier,
);
params.put(
&format!("{}{}", prefix, "TargetSnapshotIdentifier"),
&obj.target_snapshot_identifier,
);
}
}
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
pub struct CopyClusterSnapshotResult {
pub snapshot: Option,
}
#[allow(dead_code)]
struct CopyClusterSnapshotResultDeserializer;
impl CopyClusterSnapshotResultDeserializer {
#[allow(dead_code, unused_variables)]
fn deserialize(
tag_name: &str,
stack: &mut T,
) -> Result {
deserialize_elements::<_, CopyClusterSnapshotResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Snapshot" => {
obj.snapshot = Some(SnapshotDeserializer::deserialize("Snapshot", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
///
#[derive(Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateClusterMessage {
/// Reserved.
pub additional_info: Option,
/// If true
, major version upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster.
When a new major version of the Amazon Redshift engine is released, you can request that the service automatically apply upgrades during the maintenance window to the Amazon Redshift engine that is running on your cluster.
Default: true
pub allow_version_upgrade: Option,
/// The number of days that automated snapshots are retained. If the value is 0, automated snapshots are disabled. Even if automated snapshots are disabled, you can still create manual snapshots when you want with CreateClusterSnapshot.
Default: 1
Constraints: Must be a value from 0 to 35.
pub automated_snapshot_retention_period: Option,
/// The EC2 Availability Zone (AZ) in which you want Amazon Redshift to provision the cluster. For example, if you have several EC2 instances running in a specific Availability Zone, then you might want the cluster to be provisioned in the same zone in order to decrease network latency.
Default: A random, system-chosen Availability Zone in the region that is specified by the endpoint.
Example: us-east-2d
Constraint: The specified Availability Zone must be in the same region as the current endpoint.
pub availability_zone: Option,
/// A unique identifier for the cluster. You use this identifier to refer to the cluster for any subsequent cluster operations such as deleting or modifying. The identifier also appears in the Amazon Redshift console.
Constraints:
-
Must contain from 1 to 63 alphanumeric characters or hyphens.
-
Alphabetic characters must be lowercase.
-
First character must be a letter.
-
Cannot end with a hyphen or contain two consecutive hyphens.
-
Must be unique for all clusters within an AWS account.
Example: myexamplecluster
pub cluster_identifier: String,
/// The name of the parameter group to be associated with this cluster.
Default: The default Amazon Redshift cluster parameter group. For information about the default parameter group, go to Working with Amazon Redshift Parameter Groups
Constraints:
-
Must be 1 to 255 alphanumeric characters or hyphens.
-
First character must be a letter.
-
Cannot end with a hyphen or contain two consecutive hyphens.
pub cluster_parameter_group_name: Option,
/// A list of security groups to be associated with this cluster.
Default: The default cluster security group for Amazon Redshift.
pub cluster_security_groups: Option>,
/// The name of a cluster subnet group to be associated with this cluster.
If this parameter is not provided the resulting cluster will be deployed outside virtual private cloud (VPC).
pub cluster_subnet_group_name: Option,
/// The type of the cluster. When cluster type is specified as
-
single-node
, the NumberOfNodes parameter is not required.
-
multi-node
, the NumberOfNodes parameter is required.
Valid Values: multi-node
| single-node
Default: multi-node
pub cluster_type: Option,
/// The version of the Amazon Redshift engine software that you want to deploy on the cluster.
The version selected runs on all the nodes in the cluster.
Constraints: Only version 1.0 is currently available.
Example: 1.0
pub cluster_version: Option,
/// The name of the first database to be created when the cluster is created.
To create additional databases after the cluster is created, connect to the cluster with a SQL client and use SQL commands to create a database. For more information, go to Create a Database in the Amazon Redshift Database Developer Guide.
Default: dev
Constraints:
-
Must contain 1 to 64 alphanumeric characters.
-
Must contain only lowercase letters.
-
Cannot be a word that is reserved by the service. A list of reserved words can be found in Reserved Words in the Amazon Redshift Database Developer Guide.
pub db_name: Option,
/// The Elastic IP (EIP) address for the cluster.
Constraints: The cluster must be provisioned in EC2-VPC and publicly-accessible through an Internet gateway. For more information about provisioning clusters in EC2-VPC, go to Supported Platforms to Launch Your Cluster in the Amazon Redshift Cluster Management Guide.
pub elastic_ip: Option,
/// If true
, the data in the cluster is encrypted at rest.
Default: false
pub encrypted: Option,
/// An option that specifies whether to create the cluster with enhanced VPC routing enabled. To create a cluster that uses enhanced VPC routing, the cluster must be in a VPC. For more information, see Enhanced VPC Routing in the Amazon Redshift Cluster Management Guide.
If this option is true
, enhanced VPC routing is enabled.
Default: false
pub enhanced_vpc_routing: Option,
/// Specifies the name of the HSM client certificate the Amazon Redshift cluster uses to retrieve the data encryption keys stored in an HSM.
pub hsm_client_certificate_identifier: Option,
/// Specifies the name of the HSM configuration that contains the information the Amazon Redshift cluster can use to retrieve and store keys in an HSM.
pub hsm_configuration_identifier: Option,
///