use std::error::Error;
use std::fmt;
use std::io;
#[allow(warnings)]
use futures::future;
use futures::Future;
use rusoto_core::region;
use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
use rusoto_core::{Client, RusotoFuture};
use rusoto_core::credential::{CredentialsError, ProvideAwsCredentials};
use rusoto_core::request::HttpDispatchError;
use rusoto_core::signature::SignedRequest;
use serde_json;
use serde_json::from_slice;
use serde_json::Value as SerdeJsonValue;
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Activation {
#[serde(rename = "ActivationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub activation_id: Option<String>,
#[serde(rename = "CreatedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_date: Option<f64>,
#[serde(rename = "DefaultInstanceName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_instance_name: Option<String>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "ExpirationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub expiration_date: Option<f64>,
#[serde(rename = "Expired")]
#[serde(skip_serializing_if = "Option::is_none")]
pub expired: Option<bool>,
#[serde(rename = "IamRole")]
#[serde(skip_serializing_if = "Option::is_none")]
pub iam_role: Option<String>,
#[serde(rename = "RegistrationLimit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub registration_limit: Option<i64>,
#[serde(rename = "RegistrationsCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub registrations_count: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AddTagsToResourceRequest {
#[serde(rename = "ResourceId")]
pub resource_id: String,
#[serde(rename = "ResourceType")]
pub resource_type: String,
#[serde(rename = "Tags")]
pub tags: Vec<Tag>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AddTagsToResourceResult {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Association {
#[serde(rename = "AssociationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_id: Option<String>,
#[serde(rename = "AssociationName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_name: Option<String>,
#[serde(rename = "AssociationVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_version: Option<String>,
#[serde(rename = "DocumentVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_version: Option<String>,
#[serde(rename = "InstanceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_id: Option<String>,
#[serde(rename = "LastExecutionDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_execution_date: Option<f64>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Overview")]
#[serde(skip_serializing_if = "Option::is_none")]
pub overview: Option<AssociationOverview>,
#[serde(rename = "ScheduleExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schedule_expression: Option<String>,
#[serde(rename = "Targets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub targets: Option<Vec<Target>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AssociationDescription {
#[serde(rename = "AssociationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_id: Option<String>,
#[serde(rename = "AssociationName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_name: Option<String>,
#[serde(rename = "AssociationVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_version: Option<String>,
#[serde(rename = "Date")]
#[serde(skip_serializing_if = "Option::is_none")]
pub date: Option<f64>,
#[serde(rename = "DocumentVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_version: Option<String>,
#[serde(rename = "InstanceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_id: Option<String>,
#[serde(rename = "LastExecutionDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_execution_date: Option<f64>,
#[serde(rename = "LastSuccessfulExecutionDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_successful_execution_date: Option<f64>,
#[serde(rename = "LastUpdateAssociationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_update_association_date: Option<f64>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "OutputLocation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub output_location: Option<InstanceAssociationOutputLocation>,
#[serde(rename = "Overview")]
#[serde(skip_serializing_if = "Option::is_none")]
pub overview: Option<AssociationOverview>,
#[serde(rename = "Parameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parameters: Option<::std::collections::HashMap<String, Vec<String>>>,
#[serde(rename = "ScheduleExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schedule_expression: Option<String>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<AssociationStatus>,
#[serde(rename = "Targets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub targets: Option<Vec<Target>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AssociationExecution {
#[serde(rename = "AssociationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_id: Option<String>,
#[serde(rename = "AssociationVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_version: Option<String>,
#[serde(rename = "CreatedTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_time: Option<f64>,
#[serde(rename = "DetailedStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub detailed_status: Option<String>,
#[serde(rename = "ExecutionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub execution_id: Option<String>,
#[serde(rename = "LastExecutionDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_execution_date: Option<f64>,
#[serde(rename = "ResourceCountByStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_count_by_status: Option<String>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AssociationExecutionFilter {
#[serde(rename = "Key")]
pub key: String,
#[serde(rename = "Type")]
pub type_: String,
#[serde(rename = "Value")]
pub value: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AssociationExecutionTarget {
#[serde(rename = "AssociationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_id: Option<String>,
#[serde(rename = "AssociationVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_version: Option<String>,
#[serde(rename = "DetailedStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub detailed_status: Option<String>,
#[serde(rename = "ExecutionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub execution_id: Option<String>,
#[serde(rename = "LastExecutionDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_execution_date: Option<f64>,
#[serde(rename = "OutputSource")]
#[serde(skip_serializing_if = "Option::is_none")]
pub output_source: Option<OutputSource>,
#[serde(rename = "ResourceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_id: Option<String>,
#[serde(rename = "ResourceType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_type: Option<String>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AssociationExecutionTargetsFilter {
#[serde(rename = "Key")]
pub key: String,
#[serde(rename = "Value")]
pub value: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AssociationFilter {
#[serde(rename = "key")]
pub key: String,
#[serde(rename = "value")]
pub value: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AssociationOverview {
#[serde(rename = "AssociationStatusAggregatedCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_status_aggregated_count: Option<::std::collections::HashMap<String, i64>>,
#[serde(rename = "DetailedStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub detailed_status: Option<String>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AssociationStatus {
#[serde(rename = "AdditionalInfo")]
#[serde(skip_serializing_if = "Option::is_none")]
pub additional_info: Option<String>,
#[serde(rename = "Date")]
pub date: f64,
#[serde(rename = "Message")]
pub message: String,
#[serde(rename = "Name")]
pub name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AssociationVersionInfo {
#[serde(rename = "AssociationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_id: Option<String>,
#[serde(rename = "AssociationName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_name: Option<String>,
#[serde(rename = "AssociationVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_version: Option<String>,
#[serde(rename = "CreatedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_date: Option<f64>,
#[serde(rename = "DocumentVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_version: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "OutputLocation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub output_location: Option<InstanceAssociationOutputLocation>,
#[serde(rename = "Parameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parameters: Option<::std::collections::HashMap<String, Vec<String>>>,
#[serde(rename = "ScheduleExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schedule_expression: Option<String>,
#[serde(rename = "Targets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub targets: Option<Vec<Target>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AutomationExecution {
#[serde(rename = "AutomationExecutionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub automation_execution_id: Option<String>,
#[serde(rename = "AutomationExecutionStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub automation_execution_status: Option<String>,
#[serde(rename = "CurrentAction")]
#[serde(skip_serializing_if = "Option::is_none")]
pub current_action: Option<String>,
#[serde(rename = "CurrentStepName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub current_step_name: Option<String>,
#[serde(rename = "DocumentName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_name: Option<String>,
#[serde(rename = "DocumentVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_version: Option<String>,
#[serde(rename = "ExecutedBy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub executed_by: Option<String>,
#[serde(rename = "ExecutionEndTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub execution_end_time: Option<f64>,
#[serde(rename = "ExecutionStartTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub execution_start_time: Option<f64>,
#[serde(rename = "FailureMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub failure_message: Option<String>,
#[serde(rename = "MaxConcurrency")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_concurrency: Option<String>,
#[serde(rename = "MaxErrors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_errors: Option<String>,
#[serde(rename = "Mode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mode: Option<String>,
#[serde(rename = "Outputs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub outputs: Option<::std::collections::HashMap<String, Vec<String>>>,
#[serde(rename = "Parameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parameters: Option<::std::collections::HashMap<String, Vec<String>>>,
#[serde(rename = "ParentAutomationExecutionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parent_automation_execution_id: Option<String>,
#[serde(rename = "ResolvedTargets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resolved_targets: Option<ResolvedTargets>,
#[serde(rename = "StepExecutions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub step_executions: Option<Vec<StepExecution>>,
#[serde(rename = "StepExecutionsTruncated")]
#[serde(skip_serializing_if = "Option::is_none")]
pub step_executions_truncated: Option<bool>,
#[serde(rename = "Target")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target: Option<String>,
#[serde(rename = "TargetParameterName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_parameter_name: Option<String>,
#[serde(rename = "Targets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub targets: Option<Vec<Target>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AutomationExecutionFilter {
#[serde(rename = "Key")]
pub key: String,
#[serde(rename = "Values")]
pub values: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AutomationExecutionMetadata {
#[serde(rename = "AutomationExecutionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub automation_execution_id: Option<String>,
#[serde(rename = "AutomationExecutionStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub automation_execution_status: Option<String>,
#[serde(rename = "CurrentAction")]
#[serde(skip_serializing_if = "Option::is_none")]
pub current_action: Option<String>,
#[serde(rename = "CurrentStepName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub current_step_name: Option<String>,
#[serde(rename = "DocumentName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_name: Option<String>,
#[serde(rename = "DocumentVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_version: Option<String>,
#[serde(rename = "ExecutedBy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub executed_by: Option<String>,
#[serde(rename = "ExecutionEndTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub execution_end_time: Option<f64>,
#[serde(rename = "ExecutionStartTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub execution_start_time: Option<f64>,
#[serde(rename = "FailureMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub failure_message: Option<String>,
#[serde(rename = "LogFile")]
#[serde(skip_serializing_if = "Option::is_none")]
pub log_file: Option<String>,
#[serde(rename = "MaxConcurrency")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_concurrency: Option<String>,
#[serde(rename = "MaxErrors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_errors: Option<String>,
#[serde(rename = "Mode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mode: Option<String>,
#[serde(rename = "Outputs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub outputs: Option<::std::collections::HashMap<String, Vec<String>>>,
#[serde(rename = "ParentAutomationExecutionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parent_automation_execution_id: Option<String>,
#[serde(rename = "ResolvedTargets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resolved_targets: Option<ResolvedTargets>,
#[serde(rename = "Target")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target: Option<String>,
#[serde(rename = "TargetParameterName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_parameter_name: Option<String>,
#[serde(rename = "Targets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub targets: Option<Vec<Target>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CancelCommandRequest {
#[serde(rename = "CommandId")]
pub command_id: String,
#[serde(rename = "InstanceIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_ids: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CancelCommandResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CloudWatchOutputConfig {
#[serde(rename = "CloudWatchLogGroupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cloud_watch_log_group_name: Option<String>,
#[serde(rename = "CloudWatchOutputEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cloud_watch_output_enabled: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Command {
#[serde(rename = "CloudWatchOutputConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cloud_watch_output_config: Option<CloudWatchOutputConfig>,
#[serde(rename = "CommandId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub command_id: Option<String>,
#[serde(rename = "Comment")]
#[serde(skip_serializing_if = "Option::is_none")]
pub comment: Option<String>,
#[serde(rename = "CompletedCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub completed_count: Option<i64>,
#[serde(rename = "DeliveryTimedOutCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub delivery_timed_out_count: Option<i64>,
#[serde(rename = "DocumentName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_name: Option<String>,
#[serde(rename = "DocumentVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_version: Option<String>,
#[serde(rename = "ErrorCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_count: Option<i64>,
#[serde(rename = "ExpiresAfter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub expires_after: Option<f64>,
#[serde(rename = "InstanceIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_ids: Option<Vec<String>>,
#[serde(rename = "MaxConcurrency")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_concurrency: Option<String>,
#[serde(rename = "MaxErrors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_errors: Option<String>,
#[serde(rename = "NotificationConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub notification_config: Option<NotificationConfig>,
#[serde(rename = "OutputS3BucketName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub output_s3_bucket_name: Option<String>,
#[serde(rename = "OutputS3KeyPrefix")]
#[serde(skip_serializing_if = "Option::is_none")]
pub output_s3_key_prefix: Option<String>,
#[serde(rename = "OutputS3Region")]
#[serde(skip_serializing_if = "Option::is_none")]
pub output_s3_region: Option<String>,
#[serde(rename = "Parameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parameters: Option<::std::collections::HashMap<String, Vec<String>>>,
#[serde(rename = "RequestedDateTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub requested_date_time: Option<f64>,
#[serde(rename = "ServiceRole")]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_role: Option<String>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "StatusDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status_details: Option<String>,
#[serde(rename = "TargetCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_count: Option<i64>,
#[serde(rename = "Targets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub targets: Option<Vec<Target>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CommandFilter {
#[serde(rename = "key")]
pub key: String,
#[serde(rename = "value")]
pub value: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CommandInvocation {
#[serde(rename = "CloudWatchOutputConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cloud_watch_output_config: Option<CloudWatchOutputConfig>,
#[serde(rename = "CommandId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub command_id: Option<String>,
#[serde(rename = "CommandPlugins")]
#[serde(skip_serializing_if = "Option::is_none")]
pub command_plugins: Option<Vec<CommandPlugin>>,
#[serde(rename = "Comment")]
#[serde(skip_serializing_if = "Option::is_none")]
pub comment: Option<String>,
#[serde(rename = "DocumentName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_name: Option<String>,
#[serde(rename = "DocumentVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_version: Option<String>,
#[serde(rename = "InstanceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_id: Option<String>,
#[serde(rename = "InstanceName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_name: Option<String>,
#[serde(rename = "NotificationConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub notification_config: Option<NotificationConfig>,
#[serde(rename = "RequestedDateTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub requested_date_time: Option<f64>,
#[serde(rename = "ServiceRole")]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_role: Option<String>,
#[serde(rename = "StandardErrorUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub standard_error_url: Option<String>,
#[serde(rename = "StandardOutputUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub standard_output_url: Option<String>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "StatusDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status_details: Option<String>,
#[serde(rename = "TraceOutput")]
#[serde(skip_serializing_if = "Option::is_none")]
pub trace_output: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CommandPlugin {
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Output")]
#[serde(skip_serializing_if = "Option::is_none")]
pub output: Option<String>,
#[serde(rename = "OutputS3BucketName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub output_s3_bucket_name: Option<String>,
#[serde(rename = "OutputS3KeyPrefix")]
#[serde(skip_serializing_if = "Option::is_none")]
pub output_s3_key_prefix: Option<String>,
#[serde(rename = "OutputS3Region")]
#[serde(skip_serializing_if = "Option::is_none")]
pub output_s3_region: Option<String>,
#[serde(rename = "ResponseCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub response_code: Option<i64>,
#[serde(rename = "ResponseFinishDateTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub response_finish_date_time: Option<f64>,
#[serde(rename = "ResponseStartDateTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub response_start_date_time: Option<f64>,
#[serde(rename = "StandardErrorUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub standard_error_url: Option<String>,
#[serde(rename = "StandardOutputUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub standard_output_url: Option<String>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "StatusDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status_details: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ComplianceExecutionSummary {
#[serde(rename = "ExecutionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub execution_id: Option<String>,
#[serde(rename = "ExecutionTime")]
pub execution_time: f64,
#[serde(rename = "ExecutionType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub execution_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ComplianceItem {
#[serde(rename = "ComplianceType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub compliance_type: Option<String>,
#[serde(rename = "Details")]
#[serde(skip_serializing_if = "Option::is_none")]
pub details: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "ExecutionSummary")]
#[serde(skip_serializing_if = "Option::is_none")]
pub execution_summary: Option<ComplianceExecutionSummary>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "ResourceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_id: Option<String>,
#[serde(rename = "ResourceType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_type: Option<String>,
#[serde(rename = "Severity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub severity: Option<String>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "Title")]
#[serde(skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ComplianceItemEntry {
#[serde(rename = "Details")]
#[serde(skip_serializing_if = "Option::is_none")]
pub details: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "Severity")]
pub severity: String,
#[serde(rename = "Status")]
pub status: String,
#[serde(rename = "Title")]
#[serde(skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ComplianceStringFilter {
#[serde(rename = "Key")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key: Option<String>,
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
#[serde(rename = "Values")]
#[serde(skip_serializing_if = "Option::is_none")]
pub values: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ComplianceSummaryItem {
#[serde(rename = "ComplianceType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub compliance_type: Option<String>,
#[serde(rename = "CompliantSummary")]
#[serde(skip_serializing_if = "Option::is_none")]
pub compliant_summary: Option<CompliantSummary>,
#[serde(rename = "NonCompliantSummary")]
#[serde(skip_serializing_if = "Option::is_none")]
pub non_compliant_summary: Option<NonCompliantSummary>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CompliantSummary {
#[serde(rename = "CompliantCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub compliant_count: Option<i64>,
#[serde(rename = "SeveritySummary")]
#[serde(skip_serializing_if = "Option::is_none")]
pub severity_summary: Option<SeveritySummary>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateActivationRequest {
#[serde(rename = "DefaultInstanceName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_instance_name: Option<String>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "ExpirationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub expiration_date: Option<f64>,
#[serde(rename = "IamRole")]
pub iam_role: String,
#[serde(rename = "RegistrationLimit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub registration_limit: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateActivationResult {
#[serde(rename = "ActivationCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub activation_code: Option<String>,
#[serde(rename = "ActivationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub activation_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateAssociationBatchRequest {
#[serde(rename = "Entries")]
pub entries: Vec<CreateAssociationBatchRequestEntry>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CreateAssociationBatchRequestEntry {
#[serde(rename = "AssociationName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_name: Option<String>,
#[serde(rename = "DocumentVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_version: Option<String>,
#[serde(rename = "InstanceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_id: Option<String>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "OutputLocation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub output_location: Option<InstanceAssociationOutputLocation>,
#[serde(rename = "Parameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parameters: Option<::std::collections::HashMap<String, Vec<String>>>,
#[serde(rename = "ScheduleExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schedule_expression: Option<String>,
#[serde(rename = "Targets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub targets: Option<Vec<Target>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateAssociationBatchResult {
#[serde(rename = "Failed")]
#[serde(skip_serializing_if = "Option::is_none")]
pub failed: Option<Vec<FailedCreateAssociation>>,
#[serde(rename = "Successful")]
#[serde(skip_serializing_if = "Option::is_none")]
pub successful: Option<Vec<AssociationDescription>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateAssociationRequest {
#[serde(rename = "AssociationName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_name: Option<String>,
#[serde(rename = "DocumentVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_version: Option<String>,
#[serde(rename = "InstanceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_id: Option<String>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "OutputLocation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub output_location: Option<InstanceAssociationOutputLocation>,
#[serde(rename = "Parameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parameters: Option<::std::collections::HashMap<String, Vec<String>>>,
#[serde(rename = "ScheduleExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schedule_expression: Option<String>,
#[serde(rename = "Targets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub targets: Option<Vec<Target>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateAssociationResult {
#[serde(rename = "AssociationDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_description: Option<AssociationDescription>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateDocumentRequest {
#[serde(rename = "Content")]
pub content: String,
#[serde(rename = "DocumentFormat")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_format: Option<String>,
#[serde(rename = "DocumentType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_type: Option<String>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "TargetType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateDocumentResult {
#[serde(rename = "DocumentDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_description: Option<DocumentDescription>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateMaintenanceWindowRequest {
#[serde(rename = "AllowUnassociatedTargets")]
pub allow_unassociated_targets: bool,
#[serde(rename = "ClientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_token: Option<String>,
#[serde(rename = "Cutoff")]
pub cutoff: i64,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "Duration")]
pub duration: i64,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "Schedule")]
pub schedule: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateMaintenanceWindowResult {
#[serde(rename = "WindowId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub window_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreatePatchBaselineRequest {
#[serde(rename = "ApprovalRules")]
#[serde(skip_serializing_if = "Option::is_none")]
pub approval_rules: Option<PatchRuleGroup>,
#[serde(rename = "ApprovedPatches")]
#[serde(skip_serializing_if = "Option::is_none")]
pub approved_patches: Option<Vec<String>>,
#[serde(rename = "ApprovedPatchesComplianceLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub approved_patches_compliance_level: Option<String>,
#[serde(rename = "ApprovedPatchesEnableNonSecurity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub approved_patches_enable_non_security: Option<bool>,
#[serde(rename = "ClientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_token: Option<String>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "GlobalFilters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub global_filters: Option<PatchFilterGroup>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "OperatingSystem")]
#[serde(skip_serializing_if = "Option::is_none")]
pub operating_system: Option<String>,
#[serde(rename = "RejectedPatches")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rejected_patches: Option<Vec<String>>,
#[serde(rename = "Sources")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sources: Option<Vec<PatchSource>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreatePatchBaselineResult {
#[serde(rename = "BaselineId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub baseline_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateResourceDataSyncRequest {
#[serde(rename = "S3Destination")]
pub s3_destination: ResourceDataSyncS3Destination,
#[serde(rename = "SyncName")]
pub sync_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateResourceDataSyncResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteActivationRequest {
#[serde(rename = "ActivationId")]
pub activation_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteActivationResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteAssociationRequest {
#[serde(rename = "AssociationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_id: Option<String>,
#[serde(rename = "InstanceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_id: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteAssociationResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteDocumentRequest {
#[serde(rename = "Name")]
pub name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteDocumentResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteInventoryRequest {
#[serde(rename = "ClientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_token: Option<String>,
#[serde(rename = "DryRun")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dry_run: Option<bool>,
#[serde(rename = "SchemaDeleteOption")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schema_delete_option: Option<String>,
#[serde(rename = "TypeName")]
pub type_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteInventoryResult {
#[serde(rename = "DeletionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deletion_id: Option<String>,
#[serde(rename = "DeletionSummary")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deletion_summary: Option<InventoryDeletionSummary>,
#[serde(rename = "TypeName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteMaintenanceWindowRequest {
#[serde(rename = "WindowId")]
pub window_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteMaintenanceWindowResult {
#[serde(rename = "WindowId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub window_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteParameterRequest {
#[serde(rename = "Name")]
pub name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteParameterResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteParametersRequest {
#[serde(rename = "Names")]
pub names: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteParametersResult {
#[serde(rename = "DeletedParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deleted_parameters: Option<Vec<String>>,
#[serde(rename = "InvalidParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub invalid_parameters: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeletePatchBaselineRequest {
#[serde(rename = "BaselineId")]
pub baseline_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeletePatchBaselineResult {
#[serde(rename = "BaselineId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub baseline_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteResourceDataSyncRequest {
#[serde(rename = "SyncName")]
pub sync_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteResourceDataSyncResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeregisterManagedInstanceRequest {
#[serde(rename = "InstanceId")]
pub instance_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeregisterManagedInstanceResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeregisterPatchBaselineForPatchGroupRequest {
#[serde(rename = "BaselineId")]
pub baseline_id: String,
#[serde(rename = "PatchGroup")]
pub patch_group: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeregisterPatchBaselineForPatchGroupResult {
#[serde(rename = "BaselineId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub baseline_id: Option<String>,
#[serde(rename = "PatchGroup")]
#[serde(skip_serializing_if = "Option::is_none")]
pub patch_group: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeregisterTargetFromMaintenanceWindowRequest {
#[serde(rename = "Safe")]
#[serde(skip_serializing_if = "Option::is_none")]
pub safe: Option<bool>,
#[serde(rename = "WindowId")]
pub window_id: String,
#[serde(rename = "WindowTargetId")]
pub window_target_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeregisterTargetFromMaintenanceWindowResult {
#[serde(rename = "WindowId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub window_id: Option<String>,
#[serde(rename = "WindowTargetId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub window_target_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeregisterTaskFromMaintenanceWindowRequest {
#[serde(rename = "WindowId")]
pub window_id: String,
#[serde(rename = "WindowTaskId")]
pub window_task_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeregisterTaskFromMaintenanceWindowResult {
#[serde(rename = "WindowId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub window_id: Option<String>,
#[serde(rename = "WindowTaskId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub window_task_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeActivationsFilter {
#[serde(rename = "FilterKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter_key: Option<String>,
#[serde(rename = "FilterValues")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter_values: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeActivationsRequest {
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<DescribeActivationsFilter>>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeActivationsResult {
#[serde(rename = "ActivationList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub activation_list: Option<Vec<Activation>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeAssociationExecutionTargetsRequest {
#[serde(rename = "AssociationId")]
pub association_id: String,
#[serde(rename = "ExecutionId")]
pub execution_id: String,
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<AssociationExecutionTargetsFilter>>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeAssociationExecutionTargetsResult {
#[serde(rename = "AssociationExecutionTargets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_execution_targets: Option<Vec<AssociationExecutionTarget>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeAssociationExecutionsRequest {
#[serde(rename = "AssociationId")]
pub association_id: String,
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<AssociationExecutionFilter>>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeAssociationExecutionsResult {
#[serde(rename = "AssociationExecutions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_executions: Option<Vec<AssociationExecution>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeAssociationRequest {
#[serde(rename = "AssociationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_id: Option<String>,
#[serde(rename = "AssociationVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_version: Option<String>,
#[serde(rename = "InstanceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_id: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeAssociationResult {
#[serde(rename = "AssociationDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_description: Option<AssociationDescription>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeAutomationExecutionsRequest {
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<AutomationExecutionFilter>>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeAutomationExecutionsResult {
#[serde(rename = "AutomationExecutionMetadataList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub automation_execution_metadata_list: Option<Vec<AutomationExecutionMetadata>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeAutomationStepExecutionsRequest {
#[serde(rename = "AutomationExecutionId")]
pub automation_execution_id: String,
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<StepExecutionFilter>>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "ReverseOrder")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reverse_order: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeAutomationStepExecutionsResult {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "StepExecutions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub step_executions: Option<Vec<StepExecution>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeAvailablePatchesRequest {
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<PatchOrchestratorFilter>>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeAvailablePatchesResult {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Patches")]
#[serde(skip_serializing_if = "Option::is_none")]
pub patches: Option<Vec<Patch>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeDocumentPermissionRequest {
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "PermissionType")]
pub permission_type: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeDocumentPermissionResponse {
#[serde(rename = "AccountIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account_ids: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeDocumentRequest {
#[serde(rename = "DocumentVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_version: Option<String>,
#[serde(rename = "Name")]
pub name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeDocumentResult {
#[serde(rename = "Document")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document: Option<DocumentDescription>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeEffectiveInstanceAssociationsRequest {
#[serde(rename = "InstanceId")]
pub instance_id: String,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeEffectiveInstanceAssociationsResult {
#[serde(rename = "Associations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub associations: Option<Vec<InstanceAssociation>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeEffectivePatchesForPatchBaselineRequest {
#[serde(rename = "BaselineId")]
pub baseline_id: String,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeEffectivePatchesForPatchBaselineResult {
#[serde(rename = "EffectivePatches")]
#[serde(skip_serializing_if = "Option::is_none")]
pub effective_patches: Option<Vec<EffectivePatch>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeInstanceAssociationsStatusRequest {
#[serde(rename = "InstanceId")]
pub instance_id: String,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeInstanceAssociationsStatusResult {
#[serde(rename = "InstanceAssociationStatusInfos")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_association_status_infos: Option<Vec<InstanceAssociationStatusInfo>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeInstanceInformationRequest {
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<InstanceInformationStringFilter>>,
#[serde(rename = "InstanceInformationFilterList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_information_filter_list: Option<Vec<InstanceInformationFilter>>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeInstanceInformationResult {
#[serde(rename = "InstanceInformationList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_information_list: Option<Vec<InstanceInformation>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeInstancePatchStatesForPatchGroupRequest {
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<InstancePatchStateFilter>>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "PatchGroup")]
pub patch_group: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeInstancePatchStatesForPatchGroupResult {
#[serde(rename = "InstancePatchStates")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_patch_states: Option<Vec<InstancePatchState>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeInstancePatchStatesRequest {
#[serde(rename = "InstanceIds")]
pub instance_ids: Vec<String>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeInstancePatchStatesResult {
#[serde(rename = "InstancePatchStates")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_patch_states: Option<Vec<InstancePatchState>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeInstancePatchesRequest {
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<PatchOrchestratorFilter>>,
#[serde(rename = "InstanceId")]
pub instance_id: String,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeInstancePatchesResult {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Patches")]
#[serde(skip_serializing_if = "Option::is_none")]
pub patches: Option<Vec<PatchComplianceData>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeInventoryDeletionsRequest {
#[serde(rename = "DeletionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deletion_id: Option<String>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeInventoryDeletionsResult {
#[serde(rename = "InventoryDeletions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub inventory_deletions: Option<Vec<InventoryDeletionStatusItem>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeMaintenanceWindowExecutionTaskInvocationsRequest {
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<MaintenanceWindowFilter>>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "TaskId")]
pub task_id: String,
#[serde(rename = "WindowExecutionId")]
pub window_execution_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeMaintenanceWindowExecutionTaskInvocationsResult {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "WindowExecutionTaskInvocationIdentities")]
#[serde(skip_serializing_if = "Option::is_none")]
pub window_execution_task_invocation_identities:
Option<Vec<MaintenanceWindowExecutionTaskInvocationIdentity>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeMaintenanceWindowExecutionTasksRequest {
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<MaintenanceWindowFilter>>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "WindowExecutionId")]
pub window_execution_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeMaintenanceWindowExecutionTasksResult {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "WindowExecutionTaskIdentities")]
#[serde(skip_serializing_if = "Option::is_none")]
pub window_execution_task_identities: Option<Vec<MaintenanceWindowExecutionTaskIdentity>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeMaintenanceWindowExecutionsRequest {
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<MaintenanceWindowFilter>>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "WindowId")]
pub window_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeMaintenanceWindowExecutionsResult {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "WindowExecutions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub window_executions: Option<Vec<MaintenanceWindowExecution>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeMaintenanceWindowTargetsRequest {
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<MaintenanceWindowFilter>>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "WindowId")]
pub window_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeMaintenanceWindowTargetsResult {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Targets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub targets: Option<Vec<MaintenanceWindowTarget>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeMaintenanceWindowTasksRequest {
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<MaintenanceWindowFilter>>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "WindowId")]
pub window_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeMaintenanceWindowTasksResult {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Tasks")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tasks: Option<Vec<MaintenanceWindowTask>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeMaintenanceWindowsRequest {
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<MaintenanceWindowFilter>>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeMaintenanceWindowsResult {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "WindowIdentities")]
#[serde(skip_serializing_if = "Option::is_none")]
pub window_identities: Option<Vec<MaintenanceWindowIdentity>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeParametersRequest {
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<ParametersFilter>>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "ParameterFilters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parameter_filters: Option<Vec<ParameterStringFilter>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeParametersResult {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Parameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parameters: Option<Vec<ParameterMetadata>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribePatchBaselinesRequest {
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<PatchOrchestratorFilter>>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribePatchBaselinesResult {
#[serde(rename = "BaselineIdentities")]
#[serde(skip_serializing_if = "Option::is_none")]
pub baseline_identities: Option<Vec<PatchBaselineIdentity>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribePatchGroupStateRequest {
#[serde(rename = "PatchGroup")]
pub patch_group: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribePatchGroupStateResult {
#[serde(rename = "Instances")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instances: Option<i64>,
#[serde(rename = "InstancesWithFailedPatches")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instances_with_failed_patches: Option<i64>,
#[serde(rename = "InstancesWithInstalledOtherPatches")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instances_with_installed_other_patches: Option<i64>,
#[serde(rename = "InstancesWithInstalledPatches")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instances_with_installed_patches: Option<i64>,
#[serde(rename = "InstancesWithMissingPatches")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instances_with_missing_patches: Option<i64>,
#[serde(rename = "InstancesWithNotApplicablePatches")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instances_with_not_applicable_patches: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribePatchGroupsRequest {
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<PatchOrchestratorFilter>>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribePatchGroupsResult {
#[serde(rename = "Mappings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mappings: Option<Vec<PatchGroupPatchBaselineMapping>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DocumentDefaultVersionDescription {
#[serde(rename = "DefaultVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_version: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DocumentDescription {
#[serde(rename = "CreatedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_date: Option<f64>,
#[serde(rename = "DefaultVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_version: Option<String>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "DocumentFormat")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_format: Option<String>,
#[serde(rename = "DocumentType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_type: Option<String>,
#[serde(rename = "DocumentVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_version: Option<String>,
#[serde(rename = "Hash")]
#[serde(skip_serializing_if = "Option::is_none")]
pub hash: Option<String>,
#[serde(rename = "HashType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub hash_type: Option<String>,
#[serde(rename = "LatestVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Owner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub owner: Option<String>,
#[serde(rename = "Parameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parameters: Option<Vec<DocumentParameter>>,
#[serde(rename = "PlatformTypes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub platform_types: Option<Vec<String>>,
#[serde(rename = "SchemaVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schema_version: Option<String>,
#[serde(rename = "Sha1")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sha_1: Option<String>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
#[serde(rename = "TargetType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DocumentFilter {
#[serde(rename = "key")]
pub key: String,
#[serde(rename = "value")]
pub value: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DocumentIdentifier {
#[serde(rename = "DocumentFormat")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_format: Option<String>,
#[serde(rename = "DocumentType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_type: Option<String>,
#[serde(rename = "DocumentVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_version: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Owner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub owner: Option<String>,
#[serde(rename = "PlatformTypes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub platform_types: Option<Vec<String>>,
#[serde(rename = "SchemaVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schema_version: Option<String>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
#[serde(rename = "TargetType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DocumentKeyValuesFilter {
#[serde(rename = "Key")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key: Option<String>,
#[serde(rename = "Values")]
#[serde(skip_serializing_if = "Option::is_none")]
pub values: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DocumentParameter {
#[serde(rename = "DefaultValue")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_value: Option<String>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DocumentVersionInfo {
#[serde(rename = "CreatedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_date: Option<f64>,
#[serde(rename = "DocumentFormat")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_format: Option<String>,
#[serde(rename = "DocumentVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_version: Option<String>,
#[serde(rename = "IsDefaultVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub is_default_version: Option<bool>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct EffectivePatch {
#[serde(rename = "Patch")]
#[serde(skip_serializing_if = "Option::is_none")]
pub patch: Option<Patch>,
#[serde(rename = "PatchStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub patch_status: Option<PatchStatus>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct FailedCreateAssociation {
#[serde(rename = "Entry")]
#[serde(skip_serializing_if = "Option::is_none")]
pub entry: Option<CreateAssociationBatchRequestEntry>,
#[serde(rename = "Fault")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fault: Option<String>,
#[serde(rename = "Message")]
#[serde(skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct FailureDetails {
#[serde(rename = "Details")]
#[serde(skip_serializing_if = "Option::is_none")]
pub details: Option<::std::collections::HashMap<String, Vec<String>>>,
#[serde(rename = "FailureStage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub failure_stage: Option<String>,
#[serde(rename = "FailureType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub failure_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetAutomationExecutionRequest {
#[serde(rename = "AutomationExecutionId")]
pub automation_execution_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetAutomationExecutionResult {
#[serde(rename = "AutomationExecution")]
#[serde(skip_serializing_if = "Option::is_none")]
pub automation_execution: Option<AutomationExecution>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetCommandInvocationRequest {
#[serde(rename = "CommandId")]
pub command_id: String,
#[serde(rename = "InstanceId")]
pub instance_id: String,
#[serde(rename = "PluginName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub plugin_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetCommandInvocationResult {
#[serde(rename = "CloudWatchOutputConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cloud_watch_output_config: Option<CloudWatchOutputConfig>,
#[serde(rename = "CommandId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub command_id: Option<String>,
#[serde(rename = "Comment")]
#[serde(skip_serializing_if = "Option::is_none")]
pub comment: Option<String>,
#[serde(rename = "DocumentName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_name: Option<String>,
#[serde(rename = "DocumentVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_version: Option<String>,
#[serde(rename = "ExecutionElapsedTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub execution_elapsed_time: Option<String>,
#[serde(rename = "ExecutionEndDateTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub execution_end_date_time: Option<String>,
#[serde(rename = "ExecutionStartDateTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub execution_start_date_time: Option<String>,
#[serde(rename = "InstanceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_id: Option<String>,
#[serde(rename = "PluginName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub plugin_name: Option<String>,
#[serde(rename = "ResponseCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub response_code: Option<i64>,
#[serde(rename = "StandardErrorContent")]
#[serde(skip_serializing_if = "Option::is_none")]
pub standard_error_content: Option<String>,
#[serde(rename = "StandardErrorUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub standard_error_url: Option<String>,
#[serde(rename = "StandardOutputContent")]
#[serde(skip_serializing_if = "Option::is_none")]
pub standard_output_content: Option<String>,
#[serde(rename = "StandardOutputUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub standard_output_url: Option<String>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "StatusDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status_details: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetDefaultPatchBaselineRequest {
#[serde(rename = "OperatingSystem")]
#[serde(skip_serializing_if = "Option::is_none")]
pub operating_system: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetDefaultPatchBaselineResult {
#[serde(rename = "BaselineId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub baseline_id: Option<String>,
#[serde(rename = "OperatingSystem")]
#[serde(skip_serializing_if = "Option::is_none")]
pub operating_system: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetDeployablePatchSnapshotForInstanceRequest {
#[serde(rename = "InstanceId")]
pub instance_id: String,
#[serde(rename = "SnapshotId")]
pub snapshot_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetDeployablePatchSnapshotForInstanceResult {
#[serde(rename = "InstanceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_id: Option<String>,
#[serde(rename = "Product")]
#[serde(skip_serializing_if = "Option::is_none")]
pub product: Option<String>,
#[serde(rename = "SnapshotDownloadUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub snapshot_download_url: Option<String>,
#[serde(rename = "SnapshotId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub snapshot_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetDocumentRequest {
#[serde(rename = "DocumentFormat")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_format: Option<String>,
#[serde(rename = "DocumentVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_version: Option<String>,
#[serde(rename = "Name")]
pub name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetDocumentResult {
#[serde(rename = "Content")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content: Option<String>,
#[serde(rename = "DocumentFormat")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_format: Option<String>,
#[serde(rename = "DocumentType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_type: Option<String>,
#[serde(rename = "DocumentVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_version: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetInventoryRequest {
#[serde(rename = "Aggregators")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aggregators: Option<Vec<InventoryAggregator>>,
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<InventoryFilter>>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "ResultAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub result_attributes: Option<Vec<ResultAttribute>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetInventoryResult {
#[serde(rename = "Entities")]
#[serde(skip_serializing_if = "Option::is_none")]
pub entities: Option<Vec<InventoryResultEntity>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetInventorySchemaRequest {
#[serde(rename = "Aggregator")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aggregator: Option<bool>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "SubType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sub_type: Option<bool>,
#[serde(rename = "TypeName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetInventorySchemaResult {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Schemas")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schemas: Option<Vec<InventoryItemSchema>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetMaintenanceWindowExecutionRequest {
#[serde(rename = "WindowExecutionId")]
pub window_execution_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetMaintenanceWindowExecutionResult {
#[serde(rename = "EndTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub end_time: Option<f64>,
#[serde(rename = "StartTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub start_time: Option<f64>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "StatusDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status_details: Option<String>,
#[serde(rename = "TaskIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_ids: Option<Vec<String>>,
#[serde(rename = "WindowExecutionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub window_execution_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetMaintenanceWindowExecutionTaskInvocationRequest {
#[serde(rename = "InvocationId")]
pub invocation_id: String,
#[serde(rename = "TaskId")]
pub task_id: String,
#[serde(rename = "WindowExecutionId")]
pub window_execution_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetMaintenanceWindowExecutionTaskInvocationResult {
#[serde(rename = "EndTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub end_time: Option<f64>,
#[serde(rename = "ExecutionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub execution_id: Option<String>,
#[serde(rename = "InvocationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub invocation_id: Option<String>,
#[serde(rename = "OwnerInformation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub owner_information: Option<String>,
#[serde(rename = "Parameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parameters: Option<String>,
#[serde(rename = "StartTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub start_time: Option<f64>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "StatusDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status_details: Option<String>,
#[serde(rename = "TaskExecutionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_execution_id: Option<String>,
#[serde(rename = "TaskType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_type: Option<String>,
#[serde(rename = "WindowExecutionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub window_execution_id: Option<String>,
#[serde(rename = "WindowTargetId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub window_target_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetMaintenanceWindowExecutionTaskRequest {
#[serde(rename = "TaskId")]
pub task_id: String,
#[serde(rename = "WindowExecutionId")]
pub window_execution_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetMaintenanceWindowExecutionTaskResult {
#[serde(rename = "EndTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub end_time: Option<f64>,
#[serde(rename = "MaxConcurrency")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_concurrency: Option<String>,
#[serde(rename = "MaxErrors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_errors: Option<String>,
#[serde(rename = "Priority")]
#[serde(skip_serializing_if = "Option::is_none")]
pub priority: Option<i64>,
#[serde(rename = "ServiceRole")]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_role: Option<String>,
#[serde(rename = "StartTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub start_time: Option<f64>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "StatusDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status_details: Option<String>,
#[serde(rename = "TaskArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_arn: Option<String>,
#[serde(rename = "TaskExecutionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_execution_id: Option<String>,
#[serde(rename = "TaskParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_parameters: Option<
Vec<::std::collections::HashMap<String, MaintenanceWindowTaskParameterValueExpression>>,
>,
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
#[serde(rename = "WindowExecutionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub window_execution_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetMaintenanceWindowRequest {
#[serde(rename = "WindowId")]
pub window_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetMaintenanceWindowResult {
#[serde(rename = "AllowUnassociatedTargets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub allow_unassociated_targets: Option<bool>,
#[serde(rename = "CreatedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_date: Option<f64>,
#[serde(rename = "Cutoff")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cutoff: Option<i64>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "Duration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub duration: Option<i64>,
#[serde(rename = "Enabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enabled: Option<bool>,
#[serde(rename = "ModifiedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub modified_date: Option<f64>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Schedule")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schedule: Option<String>,
#[serde(rename = "WindowId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub window_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetMaintenanceWindowTaskRequest {
#[serde(rename = "WindowId")]
pub window_id: String,
#[serde(rename = "WindowTaskId")]
pub window_task_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetMaintenanceWindowTaskResult {
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "LoggingInfo")]
#[serde(skip_serializing_if = "Option::is_none")]
pub logging_info: Option<LoggingInfo>,
#[serde(rename = "MaxConcurrency")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_concurrency: Option<String>,
#[serde(rename = "MaxErrors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_errors: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Priority")]
#[serde(skip_serializing_if = "Option::is_none")]
pub priority: Option<i64>,
#[serde(rename = "ServiceRoleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_role_arn: Option<String>,
#[serde(rename = "Targets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub targets: Option<Vec<Target>>,
#[serde(rename = "TaskArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_arn: Option<String>,
#[serde(rename = "TaskInvocationParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_invocation_parameters: Option<MaintenanceWindowTaskInvocationParameters>,
#[serde(rename = "TaskParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_parameters:
Option<::std::collections::HashMap<String, MaintenanceWindowTaskParameterValueExpression>>,
#[serde(rename = "TaskType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_type: Option<String>,
#[serde(rename = "WindowId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub window_id: Option<String>,
#[serde(rename = "WindowTaskId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub window_task_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetParameterHistoryRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "WithDecryption")]
#[serde(skip_serializing_if = "Option::is_none")]
pub with_decryption: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetParameterHistoryResult {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Parameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parameters: Option<Vec<ParameterHistory>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetParameterRequest {
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "WithDecryption")]
#[serde(skip_serializing_if = "Option::is_none")]
pub with_decryption: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetParameterResult {
#[serde(rename = "Parameter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parameter: Option<Parameter>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetParametersByPathRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "ParameterFilters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parameter_filters: Option<Vec<ParameterStringFilter>>,
#[serde(rename = "Path")]
pub path: String,
#[serde(rename = "Recursive")]
#[serde(skip_serializing_if = "Option::is_none")]
pub recursive: Option<bool>,
#[serde(rename = "WithDecryption")]
#[serde(skip_serializing_if = "Option::is_none")]
pub with_decryption: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetParametersByPathResult {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Parameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parameters: Option<Vec<Parameter>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetParametersRequest {
#[serde(rename = "Names")]
pub names: Vec<String>,
#[serde(rename = "WithDecryption")]
#[serde(skip_serializing_if = "Option::is_none")]
pub with_decryption: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetParametersResult {
#[serde(rename = "InvalidParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub invalid_parameters: Option<Vec<String>>,
#[serde(rename = "Parameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parameters: Option<Vec<Parameter>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetPatchBaselineForPatchGroupRequest {
#[serde(rename = "OperatingSystem")]
#[serde(skip_serializing_if = "Option::is_none")]
pub operating_system: Option<String>,
#[serde(rename = "PatchGroup")]
pub patch_group: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetPatchBaselineForPatchGroupResult {
#[serde(rename = "BaselineId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub baseline_id: Option<String>,
#[serde(rename = "OperatingSystem")]
#[serde(skip_serializing_if = "Option::is_none")]
pub operating_system: Option<String>,
#[serde(rename = "PatchGroup")]
#[serde(skip_serializing_if = "Option::is_none")]
pub patch_group: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetPatchBaselineRequest {
#[serde(rename = "BaselineId")]
pub baseline_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetPatchBaselineResult {
#[serde(rename = "ApprovalRules")]
#[serde(skip_serializing_if = "Option::is_none")]
pub approval_rules: Option<PatchRuleGroup>,
#[serde(rename = "ApprovedPatches")]
#[serde(skip_serializing_if = "Option::is_none")]
pub approved_patches: Option<Vec<String>>,
#[serde(rename = "ApprovedPatchesComplianceLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub approved_patches_compliance_level: Option<String>,
#[serde(rename = "ApprovedPatchesEnableNonSecurity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub approved_patches_enable_non_security: Option<bool>,
#[serde(rename = "BaselineId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub baseline_id: Option<String>,
#[serde(rename = "CreatedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_date: Option<f64>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "GlobalFilters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub global_filters: Option<PatchFilterGroup>,
#[serde(rename = "ModifiedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub modified_date: Option<f64>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "OperatingSystem")]
#[serde(skip_serializing_if = "Option::is_none")]
pub operating_system: Option<String>,
#[serde(rename = "PatchGroups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub patch_groups: Option<Vec<String>>,
#[serde(rename = "RejectedPatches")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rejected_patches: Option<Vec<String>>,
#[serde(rename = "Sources")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sources: Option<Vec<PatchSource>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct InstanceAggregatedAssociationOverview {
#[serde(rename = "DetailedStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub detailed_status: Option<String>,
#[serde(rename = "InstanceAssociationStatusAggregatedCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_association_status_aggregated_count:
Option<::std::collections::HashMap<String, i64>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct InstanceAssociation {
#[serde(rename = "AssociationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_id: Option<String>,
#[serde(rename = "AssociationVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_version: Option<String>,
#[serde(rename = "Content")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content: Option<String>,
#[serde(rename = "InstanceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct InstanceAssociationOutputLocation {
#[serde(rename = "S3Location")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s3_location: Option<S3OutputLocation>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct InstanceAssociationOutputUrl {
#[serde(rename = "S3OutputUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s3_output_url: Option<S3OutputUrl>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct InstanceAssociationStatusInfo {
#[serde(rename = "AssociationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_id: Option<String>,
#[serde(rename = "AssociationName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_name: Option<String>,
#[serde(rename = "AssociationVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_version: Option<String>,
#[serde(rename = "DetailedStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub detailed_status: Option<String>,
#[serde(rename = "DocumentVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_version: Option<String>,
#[serde(rename = "ErrorCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_code: Option<String>,
#[serde(rename = "ExecutionDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub execution_date: Option<f64>,
#[serde(rename = "ExecutionSummary")]
#[serde(skip_serializing_if = "Option::is_none")]
pub execution_summary: Option<String>,
#[serde(rename = "InstanceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_id: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "OutputUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub output_url: Option<InstanceAssociationOutputUrl>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct InstanceInformation {
#[serde(rename = "ActivationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub activation_id: Option<String>,
#[serde(rename = "AgentVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub agent_version: Option<String>,
#[serde(rename = "AssociationOverview")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_overview: Option<InstanceAggregatedAssociationOverview>,
#[serde(rename = "AssociationStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_status: Option<String>,
#[serde(rename = "ComputerName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub computer_name: Option<String>,
#[serde(rename = "IPAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ip_address: Option<String>,
#[serde(rename = "IamRole")]
#[serde(skip_serializing_if = "Option::is_none")]
pub iam_role: Option<String>,
#[serde(rename = "InstanceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_id: Option<String>,
#[serde(rename = "IsLatestVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub is_latest_version: Option<bool>,
#[serde(rename = "LastAssociationExecutionDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_association_execution_date: Option<f64>,
#[serde(rename = "LastPingDateTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_ping_date_time: Option<f64>,
#[serde(rename = "LastSuccessfulAssociationExecutionDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_successful_association_execution_date: Option<f64>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "PingStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ping_status: Option<String>,
#[serde(rename = "PlatformName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub platform_name: Option<String>,
#[serde(rename = "PlatformType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub platform_type: Option<String>,
#[serde(rename = "PlatformVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub platform_version: Option<String>,
#[serde(rename = "RegistrationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub registration_date: Option<f64>,
#[serde(rename = "ResourceType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct InstanceInformationFilter {
#[serde(rename = "key")]
pub key: String,
#[serde(rename = "valueSet")]
pub value_set: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct InstanceInformationStringFilter {
#[serde(rename = "Key")]
pub key: String,
#[serde(rename = "Values")]
pub values: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct InstancePatchState {
#[serde(rename = "BaselineId")]
pub baseline_id: String,
#[serde(rename = "FailedCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub failed_count: Option<i64>,
#[serde(rename = "InstalledCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub installed_count: Option<i64>,
#[serde(rename = "InstalledOtherCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub installed_other_count: Option<i64>,
#[serde(rename = "InstanceId")]
pub instance_id: String,
#[serde(rename = "MissingCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub missing_count: Option<i64>,
#[serde(rename = "NotApplicableCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub not_applicable_count: Option<i64>,
#[serde(rename = "Operation")]
pub operation: String,
#[serde(rename = "OperationEndTime")]
pub operation_end_time: f64,
#[serde(rename = "OperationStartTime")]
pub operation_start_time: f64,
#[serde(rename = "OwnerInformation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub owner_information: Option<String>,
#[serde(rename = "PatchGroup")]
pub patch_group: String,
#[serde(rename = "SnapshotId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub snapshot_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct InstancePatchStateFilter {
#[serde(rename = "Key")]
pub key: String,
#[serde(rename = "Type")]
pub type_: String,
#[serde(rename = "Values")]
pub values: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct InventoryAggregator {
#[serde(rename = "Aggregators")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aggregators: Option<Vec<InventoryAggregator>>,
#[serde(rename = "Expression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub expression: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct InventoryDeletionStatusItem {
#[serde(rename = "DeletionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deletion_id: Option<String>,
#[serde(rename = "DeletionStartTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deletion_start_time: Option<f64>,
#[serde(rename = "DeletionSummary")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deletion_summary: Option<InventoryDeletionSummary>,
#[serde(rename = "LastStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_status: Option<String>,
#[serde(rename = "LastStatusMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_status_message: Option<String>,
#[serde(rename = "LastStatusUpdateTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_status_update_time: Option<f64>,
#[serde(rename = "TypeName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct InventoryDeletionSummary {
#[serde(rename = "RemainingCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub remaining_count: Option<i64>,
#[serde(rename = "SummaryItems")]
#[serde(skip_serializing_if = "Option::is_none")]
pub summary_items: Option<Vec<InventoryDeletionSummaryItem>>,
#[serde(rename = "TotalCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total_count: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct InventoryDeletionSummaryItem {
#[serde(rename = "Count")]
#[serde(skip_serializing_if = "Option::is_none")]
pub count: Option<i64>,
#[serde(rename = "RemainingCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub remaining_count: Option<i64>,
#[serde(rename = "Version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct InventoryFilter {
#[serde(rename = "Key")]
pub key: String,
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
#[serde(rename = "Values")]
pub values: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct InventoryItem {
#[serde(rename = "CaptureTime")]
pub capture_time: String,
#[serde(rename = "Content")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content: Option<Vec<::std::collections::HashMap<String, String>>>,
#[serde(rename = "ContentHash")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_hash: Option<String>,
#[serde(rename = "Context")]
#[serde(skip_serializing_if = "Option::is_none")]
pub context: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "SchemaVersion")]
pub schema_version: String,
#[serde(rename = "TypeName")]
pub type_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct InventoryItemAttribute {
#[serde(rename = "DataType")]
pub data_type: String,
#[serde(rename = "Name")]
pub name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct InventoryItemSchema {
#[serde(rename = "Attributes")]
pub attributes: Vec<InventoryItemAttribute>,
#[serde(rename = "DisplayName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
#[serde(rename = "TypeName")]
pub type_name: String,
#[serde(rename = "Version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct InventoryResultEntity {
#[serde(rename = "Data")]
#[serde(skip_serializing_if = "Option::is_none")]
pub data: Option<::std::collections::HashMap<String, InventoryResultItem>>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct InventoryResultItem {
#[serde(rename = "CaptureTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub capture_time: Option<String>,
#[serde(rename = "Content")]
pub content: Vec<::std::collections::HashMap<String, String>>,
#[serde(rename = "ContentHash")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_hash: Option<String>,
#[serde(rename = "SchemaVersion")]
pub schema_version: String,
#[serde(rename = "TypeName")]
pub type_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct LabelParameterVersionRequest {
#[serde(rename = "Labels")]
pub labels: Vec<String>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "ParameterVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parameter_version: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct LabelParameterVersionResult {
#[serde(rename = "InvalidLabels")]
#[serde(skip_serializing_if = "Option::is_none")]
pub invalid_labels: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListAssociationVersionsRequest {
#[serde(rename = "AssociationId")]
pub association_id: String,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListAssociationVersionsResult {
#[serde(rename = "AssociationVersions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_versions: Option<Vec<AssociationVersionInfo>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListAssociationsRequest {
#[serde(rename = "AssociationFilterList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_filter_list: Option<Vec<AssociationFilter>>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListAssociationsResult {
#[serde(rename = "Associations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub associations: Option<Vec<Association>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListCommandInvocationsRequest {
#[serde(rename = "CommandId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub command_id: Option<String>,
#[serde(rename = "Details")]
#[serde(skip_serializing_if = "Option::is_none")]
pub details: Option<bool>,
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<CommandFilter>>,
#[serde(rename = "InstanceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_id: Option<String>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListCommandInvocationsResult {
#[serde(rename = "CommandInvocations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub command_invocations: Option<Vec<CommandInvocation>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListCommandsRequest {
#[serde(rename = "CommandId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub command_id: Option<String>,
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<CommandFilter>>,
#[serde(rename = "InstanceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_id: Option<String>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListCommandsResult {
#[serde(rename = "Commands")]
#[serde(skip_serializing_if = "Option::is_none")]
pub commands: Option<Vec<Command>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListComplianceItemsRequest {
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<ComplianceStringFilter>>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "ResourceIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_ids: Option<Vec<String>>,
#[serde(rename = "ResourceTypes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_types: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListComplianceItemsResult {
#[serde(rename = "ComplianceItems")]
#[serde(skip_serializing_if = "Option::is_none")]
pub compliance_items: Option<Vec<ComplianceItem>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListComplianceSummariesRequest {
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<ComplianceStringFilter>>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListComplianceSummariesResult {
#[serde(rename = "ComplianceSummaryItems")]
#[serde(skip_serializing_if = "Option::is_none")]
pub compliance_summary_items: Option<Vec<ComplianceSummaryItem>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListDocumentVersionsRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListDocumentVersionsResult {
#[serde(rename = "DocumentVersions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_versions: Option<Vec<DocumentVersionInfo>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListDocumentsRequest {
#[serde(rename = "DocumentFilterList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_filter_list: Option<Vec<DocumentFilter>>,
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<DocumentKeyValuesFilter>>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListDocumentsResult {
#[serde(rename = "DocumentIdentifiers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_identifiers: Option<Vec<DocumentIdentifier>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListInventoryEntriesRequest {
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<InventoryFilter>>,
#[serde(rename = "InstanceId")]
pub instance_id: String,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "TypeName")]
pub type_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListInventoryEntriesResult {
#[serde(rename = "CaptureTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub capture_time: Option<String>,
#[serde(rename = "Entries")]
#[serde(skip_serializing_if = "Option::is_none")]
pub entries: Option<Vec<::std::collections::HashMap<String, String>>>,
#[serde(rename = "InstanceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_id: Option<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "SchemaVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schema_version: Option<String>,
#[serde(rename = "TypeName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListResourceComplianceSummariesRequest {
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<ComplianceStringFilter>>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListResourceComplianceSummariesResult {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "ResourceComplianceSummaryItems")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_compliance_summary_items: Option<Vec<ResourceComplianceSummaryItem>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListResourceDataSyncRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListResourceDataSyncResult {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "ResourceDataSyncItems")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_data_sync_items: Option<Vec<ResourceDataSyncItem>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListTagsForResourceRequest {
#[serde(rename = "ResourceId")]
pub resource_id: String,
#[serde(rename = "ResourceType")]
pub resource_type: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListTagsForResourceResult {
#[serde(rename = "TagList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tag_list: Option<Vec<Tag>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct LoggingInfo {
#[serde(rename = "S3BucketName")]
pub s3_bucket_name: String,
#[serde(rename = "S3KeyPrefix")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s3_key_prefix: Option<String>,
#[serde(rename = "S3Region")]
pub s3_region: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct MaintenanceWindowAutomationParameters {
#[serde(rename = "DocumentVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_version: Option<String>,
#[serde(rename = "Parameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parameters: Option<::std::collections::HashMap<String, Vec<String>>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct MaintenanceWindowExecution {
#[serde(rename = "EndTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub end_time: Option<f64>,
#[serde(rename = "StartTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub start_time: Option<f64>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "StatusDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status_details: Option<String>,
#[serde(rename = "WindowExecutionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub window_execution_id: Option<String>,
#[serde(rename = "WindowId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub window_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct MaintenanceWindowExecutionTaskIdentity {
#[serde(rename = "EndTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub end_time: Option<f64>,
#[serde(rename = "StartTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub start_time: Option<f64>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "StatusDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status_details: Option<String>,
#[serde(rename = "TaskArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_arn: Option<String>,
#[serde(rename = "TaskExecutionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_execution_id: Option<String>,
#[serde(rename = "TaskType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_type: Option<String>,
#[serde(rename = "WindowExecutionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub window_execution_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct MaintenanceWindowExecutionTaskInvocationIdentity {
#[serde(rename = "EndTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub end_time: Option<f64>,
#[serde(rename = "ExecutionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub execution_id: Option<String>,
#[serde(rename = "InvocationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub invocation_id: Option<String>,
#[serde(rename = "OwnerInformation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub owner_information: Option<String>,
#[serde(rename = "Parameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parameters: Option<String>,
#[serde(rename = "StartTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub start_time: Option<f64>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "StatusDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status_details: Option<String>,
#[serde(rename = "TaskExecutionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_execution_id: Option<String>,
#[serde(rename = "TaskType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_type: Option<String>,
#[serde(rename = "WindowExecutionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub window_execution_id: Option<String>,
#[serde(rename = "WindowTargetId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub window_target_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct MaintenanceWindowFilter {
#[serde(rename = "Key")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key: Option<String>,
#[serde(rename = "Values")]
#[serde(skip_serializing_if = "Option::is_none")]
pub values: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct MaintenanceWindowIdentity {
#[serde(rename = "Cutoff")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cutoff: Option<i64>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "Duration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub duration: Option<i64>,
#[serde(rename = "Enabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enabled: Option<bool>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "WindowId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub window_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct MaintenanceWindowLambdaParameters {
#[serde(rename = "ClientContext")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_context: Option<String>,
#[serde(rename = "Payload")]
#[serde(
deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob",
serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob",
default
)]
#[serde(skip_serializing_if = "Option::is_none")]
pub payload: Option<Vec<u8>>,
#[serde(rename = "Qualifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub qualifier: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct MaintenanceWindowRunCommandParameters {
#[serde(rename = "Comment")]
#[serde(skip_serializing_if = "Option::is_none")]
pub comment: Option<String>,
#[serde(rename = "DocumentHash")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_hash: Option<String>,
#[serde(rename = "DocumentHashType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_hash_type: Option<String>,
#[serde(rename = "NotificationConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub notification_config: Option<NotificationConfig>,
#[serde(rename = "OutputS3BucketName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub output_s3_bucket_name: Option<String>,
#[serde(rename = "OutputS3KeyPrefix")]
#[serde(skip_serializing_if = "Option::is_none")]
pub output_s3_key_prefix: Option<String>,
#[serde(rename = "Parameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parameters: Option<::std::collections::HashMap<String, Vec<String>>>,
#[serde(rename = "ServiceRoleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_role_arn: Option<String>,
#[serde(rename = "TimeoutSeconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timeout_seconds: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct MaintenanceWindowStepFunctionsParameters {
#[serde(rename = "Input")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct MaintenanceWindowTarget {
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "OwnerInformation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub owner_information: Option<String>,
#[serde(rename = "ResourceType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_type: Option<String>,
#[serde(rename = "Targets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub targets: Option<Vec<Target>>,
#[serde(rename = "WindowId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub window_id: Option<String>,
#[serde(rename = "WindowTargetId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub window_target_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct MaintenanceWindowTask {
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "LoggingInfo")]
#[serde(skip_serializing_if = "Option::is_none")]
pub logging_info: Option<LoggingInfo>,
#[serde(rename = "MaxConcurrency")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_concurrency: Option<String>,
#[serde(rename = "MaxErrors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_errors: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Priority")]
#[serde(skip_serializing_if = "Option::is_none")]
pub priority: Option<i64>,
#[serde(rename = "ServiceRoleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_role_arn: Option<String>,
#[serde(rename = "Targets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub targets: Option<Vec<Target>>,
#[serde(rename = "TaskArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_arn: Option<String>,
#[serde(rename = "TaskParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_parameters:
Option<::std::collections::HashMap<String, MaintenanceWindowTaskParameterValueExpression>>,
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
#[serde(rename = "WindowId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub window_id: Option<String>,
#[serde(rename = "WindowTaskId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub window_task_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct MaintenanceWindowTaskInvocationParameters {
#[serde(rename = "Automation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub automation: Option<MaintenanceWindowAutomationParameters>,
#[serde(rename = "Lambda")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lambda: Option<MaintenanceWindowLambdaParameters>,
#[serde(rename = "RunCommand")]
#[serde(skip_serializing_if = "Option::is_none")]
pub run_command: Option<MaintenanceWindowRunCommandParameters>,
#[serde(rename = "StepFunctions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub step_functions: Option<MaintenanceWindowStepFunctionsParameters>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct MaintenanceWindowTaskParameterValueExpression {
#[serde(rename = "Values")]
#[serde(skip_serializing_if = "Option::is_none")]
pub values: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ModifyDocumentPermissionRequest {
#[serde(rename = "AccountIdsToAdd")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account_ids_to_add: Option<Vec<String>>,
#[serde(rename = "AccountIdsToRemove")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account_ids_to_remove: Option<Vec<String>>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "PermissionType")]
pub permission_type: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ModifyDocumentPermissionResponse {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct NonCompliantSummary {
#[serde(rename = "NonCompliantCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub non_compliant_count: Option<i64>,
#[serde(rename = "SeveritySummary")]
#[serde(skip_serializing_if = "Option::is_none")]
pub severity_summary: Option<SeveritySummary>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct NotificationConfig {
#[serde(rename = "NotificationArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub notification_arn: Option<String>,
#[serde(rename = "NotificationEvents")]
#[serde(skip_serializing_if = "Option::is_none")]
pub notification_events: Option<Vec<String>>,
#[serde(rename = "NotificationType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub notification_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct OutputSource {
#[serde(rename = "OutputSourceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub output_source_id: Option<String>,
#[serde(rename = "OutputSourceType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub output_source_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Parameter {
#[serde(rename = "ARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "LastModifiedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified_date: Option<f64>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Selector")]
#[serde(skip_serializing_if = "Option::is_none")]
pub selector: Option<String>,
#[serde(rename = "SourceResult")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_result: Option<String>,
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
#[serde(rename = "Value")]
#[serde(skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
#[serde(rename = "Version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ParameterHistory {
#[serde(rename = "AllowedPattern")]
#[serde(skip_serializing_if = "Option::is_none")]
pub allowed_pattern: Option<String>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "KeyId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key_id: Option<String>,
#[serde(rename = "Labels")]
#[serde(skip_serializing_if = "Option::is_none")]
pub labels: Option<Vec<String>>,
#[serde(rename = "LastModifiedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified_date: Option<f64>,
#[serde(rename = "LastModifiedUser")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified_user: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
#[serde(rename = "Value")]
#[serde(skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
#[serde(rename = "Version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ParameterMetadata {
#[serde(rename = "AllowedPattern")]
#[serde(skip_serializing_if = "Option::is_none")]
pub allowed_pattern: Option<String>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "KeyId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key_id: Option<String>,
#[serde(rename = "LastModifiedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified_date: Option<f64>,
#[serde(rename = "LastModifiedUser")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified_user: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
#[serde(rename = "Version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ParameterStringFilter {
#[serde(rename = "Key")]
pub key: String,
#[serde(rename = "Option")]
#[serde(skip_serializing_if = "Option::is_none")]
pub option: Option<String>,
#[serde(rename = "Values")]
#[serde(skip_serializing_if = "Option::is_none")]
pub values: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ParametersFilter {
#[serde(rename = "Key")]
pub key: String,
#[serde(rename = "Values")]
pub values: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Patch {
#[serde(rename = "Classification")]
#[serde(skip_serializing_if = "Option::is_none")]
pub classification: Option<String>,
#[serde(rename = "ContentUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_url: Option<String>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "KbNumber")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kb_number: Option<String>,
#[serde(rename = "Language")]
#[serde(skip_serializing_if = "Option::is_none")]
pub language: Option<String>,
#[serde(rename = "MsrcNumber")]
#[serde(skip_serializing_if = "Option::is_none")]
pub msrc_number: Option<String>,
#[serde(rename = "MsrcSeverity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub msrc_severity: Option<String>,
#[serde(rename = "Product")]
#[serde(skip_serializing_if = "Option::is_none")]
pub product: Option<String>,
#[serde(rename = "ProductFamily")]
#[serde(skip_serializing_if = "Option::is_none")]
pub product_family: Option<String>,
#[serde(rename = "ReleaseDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub release_date: Option<f64>,
#[serde(rename = "Title")]
#[serde(skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
#[serde(rename = "Vendor")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vendor: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PatchBaselineIdentity {
#[serde(rename = "BaselineDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub baseline_description: Option<String>,
#[serde(rename = "BaselineId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub baseline_id: Option<String>,
#[serde(rename = "BaselineName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub baseline_name: Option<String>,
#[serde(rename = "DefaultBaseline")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_baseline: Option<bool>,
#[serde(rename = "OperatingSystem")]
#[serde(skip_serializing_if = "Option::is_none")]
pub operating_system: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PatchComplianceData {
#[serde(rename = "Classification")]
pub classification: String,
#[serde(rename = "InstalledTime")]
pub installed_time: f64,
#[serde(rename = "KBId")]
pub kb_id: String,
#[serde(rename = "Severity")]
pub severity: String,
#[serde(rename = "State")]
pub state: String,
#[serde(rename = "Title")]
pub title: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct PatchFilter {
#[serde(rename = "Key")]
pub key: String,
#[serde(rename = "Values")]
pub values: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct PatchFilterGroup {
#[serde(rename = "PatchFilters")]
pub patch_filters: Vec<PatchFilter>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PatchGroupPatchBaselineMapping {
#[serde(rename = "BaselineIdentity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub baseline_identity: Option<PatchBaselineIdentity>,
#[serde(rename = "PatchGroup")]
#[serde(skip_serializing_if = "Option::is_none")]
pub patch_group: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct PatchOrchestratorFilter {
#[serde(rename = "Key")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key: Option<String>,
#[serde(rename = "Values")]
#[serde(skip_serializing_if = "Option::is_none")]
pub values: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct PatchRule {
#[serde(rename = "ApproveAfterDays")]
pub approve_after_days: i64,
#[serde(rename = "ComplianceLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub compliance_level: Option<String>,
#[serde(rename = "EnableNonSecurity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enable_non_security: Option<bool>,
#[serde(rename = "PatchFilterGroup")]
pub patch_filter_group: PatchFilterGroup,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct PatchRuleGroup {
#[serde(rename = "PatchRules")]
pub patch_rules: Vec<PatchRule>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct PatchSource {
#[serde(rename = "Configuration")]
pub configuration: String,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "Products")]
pub products: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PatchStatus {
#[serde(rename = "ApprovalDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub approval_date: Option<f64>,
#[serde(rename = "ComplianceLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub compliance_level: Option<String>,
#[serde(rename = "DeploymentStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deployment_status: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct PutComplianceItemsRequest {
#[serde(rename = "ComplianceType")]
pub compliance_type: String,
#[serde(rename = "ExecutionSummary")]
pub execution_summary: ComplianceExecutionSummary,
#[serde(rename = "ItemContentHash")]
#[serde(skip_serializing_if = "Option::is_none")]
pub item_content_hash: Option<String>,
#[serde(rename = "Items")]
pub items: Vec<ComplianceItemEntry>,
#[serde(rename = "ResourceId")]
pub resource_id: String,
#[serde(rename = "ResourceType")]
pub resource_type: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PutComplianceItemsResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct PutInventoryRequest {
#[serde(rename = "InstanceId")]
pub instance_id: String,
#[serde(rename = "Items")]
pub items: Vec<InventoryItem>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PutInventoryResult {
#[serde(rename = "Message")]
#[serde(skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct PutParameterRequest {
#[serde(rename = "AllowedPattern")]
#[serde(skip_serializing_if = "Option::is_none")]
pub allowed_pattern: Option<String>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "KeyId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key_id: Option<String>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "Overwrite")]
#[serde(skip_serializing_if = "Option::is_none")]
pub overwrite: Option<bool>,
#[serde(rename = "Type")]
pub type_: String,
#[serde(rename = "Value")]
pub value: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PutParameterResult {
#[serde(rename = "Version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RegisterDefaultPatchBaselineRequest {
#[serde(rename = "BaselineId")]
pub baseline_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RegisterDefaultPatchBaselineResult {
#[serde(rename = "BaselineId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub baseline_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RegisterPatchBaselineForPatchGroupRequest {
#[serde(rename = "BaselineId")]
pub baseline_id: String,
#[serde(rename = "PatchGroup")]
pub patch_group: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RegisterPatchBaselineForPatchGroupResult {
#[serde(rename = "BaselineId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub baseline_id: Option<String>,
#[serde(rename = "PatchGroup")]
#[serde(skip_serializing_if = "Option::is_none")]
pub patch_group: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RegisterTargetWithMaintenanceWindowRequest {
#[serde(rename = "ClientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_token: Option<String>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "OwnerInformation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub owner_information: Option<String>,
#[serde(rename = "ResourceType")]
pub resource_type: String,
#[serde(rename = "Targets")]
pub targets: Vec<Target>,
#[serde(rename = "WindowId")]
pub window_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RegisterTargetWithMaintenanceWindowResult {
#[serde(rename = "WindowTargetId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub window_target_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RegisterTaskWithMaintenanceWindowRequest {
#[serde(rename = "ClientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_token: Option<String>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "LoggingInfo")]
#[serde(skip_serializing_if = "Option::is_none")]
pub logging_info: Option<LoggingInfo>,
#[serde(rename = "MaxConcurrency")]
pub max_concurrency: String,
#[serde(rename = "MaxErrors")]
pub max_errors: String,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Priority")]
#[serde(skip_serializing_if = "Option::is_none")]
pub priority: Option<i64>,
#[serde(rename = "ServiceRoleArn")]
pub service_role_arn: String,
#[serde(rename = "Targets")]
pub targets: Vec<Target>,
#[serde(rename = "TaskArn")]
pub task_arn: String,
#[serde(rename = "TaskInvocationParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_invocation_parameters: Option<MaintenanceWindowTaskInvocationParameters>,
#[serde(rename = "TaskParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_parameters:
Option<::std::collections::HashMap<String, MaintenanceWindowTaskParameterValueExpression>>,
#[serde(rename = "TaskType")]
pub task_type: String,
#[serde(rename = "WindowId")]
pub window_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RegisterTaskWithMaintenanceWindowResult {
#[serde(rename = "WindowTaskId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub window_task_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RemoveTagsFromResourceRequest {
#[serde(rename = "ResourceId")]
pub resource_id: String,
#[serde(rename = "ResourceType")]
pub resource_type: String,
#[serde(rename = "TagKeys")]
pub tag_keys: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RemoveTagsFromResourceResult {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ResolvedTargets {
#[serde(rename = "ParameterValues")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parameter_values: Option<Vec<String>>,
#[serde(rename = "Truncated")]
#[serde(skip_serializing_if = "Option::is_none")]
pub truncated: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ResourceComplianceSummaryItem {
#[serde(rename = "ComplianceType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub compliance_type: Option<String>,
#[serde(rename = "CompliantSummary")]
#[serde(skip_serializing_if = "Option::is_none")]
pub compliant_summary: Option<CompliantSummary>,
#[serde(rename = "ExecutionSummary")]
#[serde(skip_serializing_if = "Option::is_none")]
pub execution_summary: Option<ComplianceExecutionSummary>,
#[serde(rename = "NonCompliantSummary")]
#[serde(skip_serializing_if = "Option::is_none")]
pub non_compliant_summary: Option<NonCompliantSummary>,
#[serde(rename = "OverallSeverity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub overall_severity: Option<String>,
#[serde(rename = "ResourceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_id: Option<String>,
#[serde(rename = "ResourceType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_type: Option<String>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ResourceDataSyncItem {
#[serde(rename = "LastStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_status: Option<String>,
#[serde(rename = "LastSuccessfulSyncTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_successful_sync_time: Option<f64>,
#[serde(rename = "LastSyncStatusMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_sync_status_message: Option<String>,
#[serde(rename = "LastSyncTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_sync_time: Option<f64>,
#[serde(rename = "S3Destination")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s3_destination: Option<ResourceDataSyncS3Destination>,
#[serde(rename = "SyncCreatedTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sync_created_time: Option<f64>,
#[serde(rename = "SyncName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sync_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ResourceDataSyncS3Destination {
#[serde(rename = "AWSKMSKeyARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub awskms_key_arn: Option<String>,
#[serde(rename = "BucketName")]
pub bucket_name: String,
#[serde(rename = "Prefix")]
#[serde(skip_serializing_if = "Option::is_none")]
pub prefix: Option<String>,
#[serde(rename = "Region")]
pub region: String,
#[serde(rename = "SyncFormat")]
pub sync_format: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ResultAttribute {
#[serde(rename = "TypeName")]
pub type_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct S3OutputLocation {
#[serde(rename = "OutputS3BucketName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub output_s3_bucket_name: Option<String>,
#[serde(rename = "OutputS3KeyPrefix")]
#[serde(skip_serializing_if = "Option::is_none")]
pub output_s3_key_prefix: Option<String>,
#[serde(rename = "OutputS3Region")]
#[serde(skip_serializing_if = "Option::is_none")]
pub output_s3_region: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct S3OutputUrl {
#[serde(rename = "OutputUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub output_url: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct SendAutomationSignalRequest {
#[serde(rename = "AutomationExecutionId")]
pub automation_execution_id: String,
#[serde(rename = "Payload")]
#[serde(skip_serializing_if = "Option::is_none")]
pub payload: Option<::std::collections::HashMap<String, Vec<String>>>,
#[serde(rename = "SignalType")]
pub signal_type: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SendAutomationSignalResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct SendCommandRequest {
#[serde(rename = "CloudWatchOutputConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cloud_watch_output_config: Option<CloudWatchOutputConfig>,
#[serde(rename = "Comment")]
#[serde(skip_serializing_if = "Option::is_none")]
pub comment: Option<String>,
#[serde(rename = "DocumentHash")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_hash: Option<String>,
#[serde(rename = "DocumentHashType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_hash_type: Option<String>,
#[serde(rename = "DocumentName")]
pub document_name: String,
#[serde(rename = "DocumentVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_version: Option<String>,
#[serde(rename = "InstanceIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_ids: Option<Vec<String>>,
#[serde(rename = "MaxConcurrency")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_concurrency: Option<String>,
#[serde(rename = "MaxErrors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_errors: Option<String>,
#[serde(rename = "NotificationConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub notification_config: Option<NotificationConfig>,
#[serde(rename = "OutputS3BucketName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub output_s3_bucket_name: Option<String>,
#[serde(rename = "OutputS3KeyPrefix")]
#[serde(skip_serializing_if = "Option::is_none")]
pub output_s3_key_prefix: Option<String>,
#[serde(rename = "OutputS3Region")]
#[serde(skip_serializing_if = "Option::is_none")]
pub output_s3_region: Option<String>,
#[serde(rename = "Parameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parameters: Option<::std::collections::HashMap<String, Vec<String>>>,
#[serde(rename = "ServiceRoleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_role_arn: Option<String>,
#[serde(rename = "Targets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub targets: Option<Vec<Target>>,
#[serde(rename = "TimeoutSeconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timeout_seconds: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SendCommandResult {
#[serde(rename = "Command")]
#[serde(skip_serializing_if = "Option::is_none")]
pub command: Option<Command>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SeveritySummary {
#[serde(rename = "CriticalCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub critical_count: Option<i64>,
#[serde(rename = "HighCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub high_count: Option<i64>,
#[serde(rename = "InformationalCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub informational_count: Option<i64>,
#[serde(rename = "LowCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub low_count: Option<i64>,
#[serde(rename = "MediumCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub medium_count: Option<i64>,
#[serde(rename = "UnspecifiedCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub unspecified_count: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StartAssociationsOnceRequest {
#[serde(rename = "AssociationIds")]
pub association_ids: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StartAssociationsOnceResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StartAutomationExecutionRequest {
#[serde(rename = "ClientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_token: Option<String>,
#[serde(rename = "DocumentName")]
pub document_name: String,
#[serde(rename = "DocumentVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_version: Option<String>,
#[serde(rename = "MaxConcurrency")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_concurrency: Option<String>,
#[serde(rename = "MaxErrors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_errors: Option<String>,
#[serde(rename = "Mode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mode: Option<String>,
#[serde(rename = "Parameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parameters: Option<::std::collections::HashMap<String, Vec<String>>>,
#[serde(rename = "TargetParameterName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_parameter_name: Option<String>,
#[serde(rename = "Targets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub targets: Option<Vec<Target>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StartAutomationExecutionResult {
#[serde(rename = "AutomationExecutionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub automation_execution_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StepExecution {
#[serde(rename = "Action")]
#[serde(skip_serializing_if = "Option::is_none")]
pub action: Option<String>,
#[serde(rename = "ExecutionEndTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub execution_end_time: Option<f64>,
#[serde(rename = "ExecutionStartTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub execution_start_time: Option<f64>,
#[serde(rename = "FailureDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub failure_details: Option<FailureDetails>,
#[serde(rename = "FailureMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub failure_message: Option<String>,
#[serde(rename = "Inputs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub inputs: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "IsCritical")]
#[serde(skip_serializing_if = "Option::is_none")]
pub is_critical: Option<bool>,
#[serde(rename = "IsEnd")]
#[serde(skip_serializing_if = "Option::is_none")]
pub is_end: Option<bool>,
#[serde(rename = "MaxAttempts")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_attempts: Option<i64>,
#[serde(rename = "NextStep")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_step: Option<String>,
#[serde(rename = "OnFailure")]
#[serde(skip_serializing_if = "Option::is_none")]
pub on_failure: Option<String>,
#[serde(rename = "Outputs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub outputs: Option<::std::collections::HashMap<String, Vec<String>>>,
#[serde(rename = "OverriddenParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub overridden_parameters: Option<::std::collections::HashMap<String, Vec<String>>>,
#[serde(rename = "Response")]
#[serde(skip_serializing_if = "Option::is_none")]
pub response: Option<String>,
#[serde(rename = "ResponseCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub response_code: Option<String>,
#[serde(rename = "StepExecutionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub step_execution_id: Option<String>,
#[serde(rename = "StepName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub step_name: Option<String>,
#[serde(rename = "StepStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub step_status: Option<String>,
#[serde(rename = "TimeoutSeconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timeout_seconds: Option<i64>,
#[serde(rename = "ValidNextSteps")]
#[serde(skip_serializing_if = "Option::is_none")]
pub valid_next_steps: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StepExecutionFilter {
#[serde(rename = "Key")]
pub key: String,
#[serde(rename = "Values")]
pub values: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StopAutomationExecutionRequest {
#[serde(rename = "AutomationExecutionId")]
pub automation_execution_id: String,
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StopAutomationExecutionResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Tag {
#[serde(rename = "Key")]
pub key: String,
#[serde(rename = "Value")]
pub value: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Target {
#[serde(rename = "Key")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key: Option<String>,
#[serde(rename = "Values")]
#[serde(skip_serializing_if = "Option::is_none")]
pub values: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateAssociationRequest {
#[serde(rename = "AssociationId")]
pub association_id: String,
#[serde(rename = "AssociationName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_name: Option<String>,
#[serde(rename = "AssociationVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_version: Option<String>,
#[serde(rename = "DocumentVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_version: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "OutputLocation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub output_location: Option<InstanceAssociationOutputLocation>,
#[serde(rename = "Parameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parameters: Option<::std::collections::HashMap<String, Vec<String>>>,
#[serde(rename = "ScheduleExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schedule_expression: Option<String>,
#[serde(rename = "Targets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub targets: Option<Vec<Target>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateAssociationResult {
#[serde(rename = "AssociationDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_description: Option<AssociationDescription>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateAssociationStatusRequest {
#[serde(rename = "AssociationStatus")]
pub association_status: AssociationStatus,
#[serde(rename = "InstanceId")]
pub instance_id: String,
#[serde(rename = "Name")]
pub name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateAssociationStatusResult {
#[serde(rename = "AssociationDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_description: Option<AssociationDescription>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateDocumentDefaultVersionRequest {
#[serde(rename = "DocumentVersion")]
pub document_version: String,
#[serde(rename = "Name")]
pub name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateDocumentDefaultVersionResult {
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<DocumentDefaultVersionDescription>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateDocumentRequest {
#[serde(rename = "Content")]
pub content: String,
#[serde(rename = "DocumentFormat")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_format: Option<String>,
#[serde(rename = "DocumentVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_version: Option<String>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "TargetType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateDocumentResult {
#[serde(rename = "DocumentDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_description: Option<DocumentDescription>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateMaintenanceWindowRequest {
#[serde(rename = "AllowUnassociatedTargets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub allow_unassociated_targets: Option<bool>,
#[serde(rename = "Cutoff")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cutoff: Option<i64>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "Duration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub duration: Option<i64>,
#[serde(rename = "Enabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enabled: Option<bool>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Replace")]
#[serde(skip_serializing_if = "Option::is_none")]
pub replace: Option<bool>,
#[serde(rename = "Schedule")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schedule: Option<String>,
#[serde(rename = "WindowId")]
pub window_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateMaintenanceWindowResult {
#[serde(rename = "AllowUnassociatedTargets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub allow_unassociated_targets: Option<bool>,
#[serde(rename = "Cutoff")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cutoff: Option<i64>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "Duration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub duration: Option<i64>,
#[serde(rename = "Enabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enabled: Option<bool>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Schedule")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schedule: Option<String>,
#[serde(rename = "WindowId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub window_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateMaintenanceWindowTargetRequest {
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "OwnerInformation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub owner_information: Option<String>,
#[serde(rename = "Replace")]
#[serde(skip_serializing_if = "Option::is_none")]
pub replace: Option<bool>,
#[serde(rename = "Targets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub targets: Option<Vec<Target>>,
#[serde(rename = "WindowId")]
pub window_id: String,
#[serde(rename = "WindowTargetId")]
pub window_target_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateMaintenanceWindowTargetResult {
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "OwnerInformation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub owner_information: Option<String>,
#[serde(rename = "Targets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub targets: Option<Vec<Target>>,
#[serde(rename = "WindowId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub window_id: Option<String>,
#[serde(rename = "WindowTargetId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub window_target_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateMaintenanceWindowTaskRequest {
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "LoggingInfo")]
#[serde(skip_serializing_if = "Option::is_none")]
pub logging_info: Option<LoggingInfo>,
#[serde(rename = "MaxConcurrency")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_concurrency: Option<String>,
#[serde(rename = "MaxErrors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_errors: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Priority")]
#[serde(skip_serializing_if = "Option::is_none")]
pub priority: Option<i64>,
#[serde(rename = "Replace")]
#[serde(skip_serializing_if = "Option::is_none")]
pub replace: Option<bool>,
#[serde(rename = "ServiceRoleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_role_arn: Option<String>,
#[serde(rename = "Targets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub targets: Option<Vec<Target>>,
#[serde(rename = "TaskArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_arn: Option<String>,
#[serde(rename = "TaskInvocationParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_invocation_parameters: Option<MaintenanceWindowTaskInvocationParameters>,
#[serde(rename = "TaskParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_parameters:
Option<::std::collections::HashMap<String, MaintenanceWindowTaskParameterValueExpression>>,
#[serde(rename = "WindowId")]
pub window_id: String,
#[serde(rename = "WindowTaskId")]
pub window_task_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateMaintenanceWindowTaskResult {
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "LoggingInfo")]
#[serde(skip_serializing_if = "Option::is_none")]
pub logging_info: Option<LoggingInfo>,
#[serde(rename = "MaxConcurrency")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_concurrency: Option<String>,
#[serde(rename = "MaxErrors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_errors: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Priority")]
#[serde(skip_serializing_if = "Option::is_none")]
pub priority: Option<i64>,
#[serde(rename = "ServiceRoleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_role_arn: Option<String>,
#[serde(rename = "Targets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub targets: Option<Vec<Target>>,
#[serde(rename = "TaskArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_arn: Option<String>,
#[serde(rename = "TaskInvocationParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_invocation_parameters: Option<MaintenanceWindowTaskInvocationParameters>,
#[serde(rename = "TaskParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_parameters:
Option<::std::collections::HashMap<String, MaintenanceWindowTaskParameterValueExpression>>,
#[serde(rename = "WindowId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub window_id: Option<String>,
#[serde(rename = "WindowTaskId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub window_task_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateManagedInstanceRoleRequest {
#[serde(rename = "IamRole")]
pub iam_role: String,
#[serde(rename = "InstanceId")]
pub instance_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateManagedInstanceRoleResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdatePatchBaselineRequest {
#[serde(rename = "ApprovalRules")]
#[serde(skip_serializing_if = "Option::is_none")]
pub approval_rules: Option<PatchRuleGroup>,
#[serde(rename = "ApprovedPatches")]
#[serde(skip_serializing_if = "Option::is_none")]
pub approved_patches: Option<Vec<String>>,
#[serde(rename = "ApprovedPatchesComplianceLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub approved_patches_compliance_level: Option<String>,
#[serde(rename = "ApprovedPatchesEnableNonSecurity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub approved_patches_enable_non_security: Option<bool>,
#[serde(rename = "BaselineId")]
pub baseline_id: String,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "GlobalFilters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub global_filters: Option<PatchFilterGroup>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "RejectedPatches")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rejected_patches: Option<Vec<String>>,
#[serde(rename = "Replace")]
#[serde(skip_serializing_if = "Option::is_none")]
pub replace: Option<bool>,
#[serde(rename = "Sources")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sources: Option<Vec<PatchSource>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdatePatchBaselineResult {
#[serde(rename = "ApprovalRules")]
#[serde(skip_serializing_if = "Option::is_none")]
pub approval_rules: Option<PatchRuleGroup>,
#[serde(rename = "ApprovedPatches")]
#[serde(skip_serializing_if = "Option::is_none")]
pub approved_patches: Option<Vec<String>>,
#[serde(rename = "ApprovedPatchesComplianceLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub approved_patches_compliance_level: Option<String>,
#[serde(rename = "ApprovedPatchesEnableNonSecurity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub approved_patches_enable_non_security: Option<bool>,
#[serde(rename = "BaselineId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub baseline_id: Option<String>,
#[serde(rename = "CreatedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_date: Option<f64>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "GlobalFilters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub global_filters: Option<PatchFilterGroup>,
#[serde(rename = "ModifiedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub modified_date: Option<f64>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "OperatingSystem")]
#[serde(skip_serializing_if = "Option::is_none")]
pub operating_system: Option<String>,
#[serde(rename = "RejectedPatches")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rejected_patches: Option<Vec<String>>,
#[serde(rename = "Sources")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sources: Option<Vec<PatchSource>>,
}
#[derive(Debug, PartialEq)]
pub enum AddTagsToResourceError {
InternalServerError(String),
InvalidResourceId(String),
InvalidResourceType(String),
TooManyTagsError(String),
TooManyUpdates(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl AddTagsToResourceError {
pub fn from_response(res: BufferedHttpResponse) -> AddTagsToResourceError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return AddTagsToResourceError::InternalServerError(String::from(error_message))
}
"InvalidResourceId" => {
return AddTagsToResourceError::InvalidResourceId(String::from(error_message))
}
"InvalidResourceType" => {
return AddTagsToResourceError::InvalidResourceType(String::from(error_message))
}
"TooManyTagsError" => {
return AddTagsToResourceError::TooManyTagsError(String::from(error_message))
}
"TooManyUpdates" => {
return AddTagsToResourceError::TooManyUpdates(String::from(error_message))
}
"ValidationException" => {
return AddTagsToResourceError::Validation(error_message.to_string())
}
_ => {}
}
}
return AddTagsToResourceError::Unknown(res);
}
}
impl From<serde_json::error::Error> for AddTagsToResourceError {
fn from(err: serde_json::error::Error) -> AddTagsToResourceError {
AddTagsToResourceError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for AddTagsToResourceError {
fn from(err: CredentialsError) -> AddTagsToResourceError {
AddTagsToResourceError::Credentials(err)
}
}
impl From<HttpDispatchError> for AddTagsToResourceError {
fn from(err: HttpDispatchError) -> AddTagsToResourceError {
AddTagsToResourceError::HttpDispatch(err)
}
}
impl From<io::Error> for AddTagsToResourceError {
fn from(err: io::Error) -> AddTagsToResourceError {
AddTagsToResourceError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for AddTagsToResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AddTagsToResourceError {
fn description(&self) -> &str {
match *self {
AddTagsToResourceError::InternalServerError(ref cause) => cause,
AddTagsToResourceError::InvalidResourceId(ref cause) => cause,
AddTagsToResourceError::InvalidResourceType(ref cause) => cause,
AddTagsToResourceError::TooManyTagsError(ref cause) => cause,
AddTagsToResourceError::TooManyUpdates(ref cause) => cause,
AddTagsToResourceError::Validation(ref cause) => cause,
AddTagsToResourceError::Credentials(ref err) => err.description(),
AddTagsToResourceError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
AddTagsToResourceError::ParseError(ref cause) => cause,
AddTagsToResourceError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum CancelCommandError {
DuplicateInstanceId(String),
InternalServerError(String),
InvalidCommandId(String),
InvalidInstanceId(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl CancelCommandError {
pub fn from_response(res: BufferedHttpResponse) -> CancelCommandError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"DuplicateInstanceId" => {
return CancelCommandError::DuplicateInstanceId(String::from(error_message))
}
"InternalServerError" => {
return CancelCommandError::InternalServerError(String::from(error_message))
}
"InvalidCommandId" => {
return CancelCommandError::InvalidCommandId(String::from(error_message))
}
"InvalidInstanceId" => {
return CancelCommandError::InvalidInstanceId(String::from(error_message))
}
"ValidationException" => {
return CancelCommandError::Validation(error_message.to_string())
}
_ => {}
}
}
return CancelCommandError::Unknown(res);
}
}
impl From<serde_json::error::Error> for CancelCommandError {
fn from(err: serde_json::error::Error) -> CancelCommandError {
CancelCommandError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for CancelCommandError {
fn from(err: CredentialsError) -> CancelCommandError {
CancelCommandError::Credentials(err)
}
}
impl From<HttpDispatchError> for CancelCommandError {
fn from(err: HttpDispatchError) -> CancelCommandError {
CancelCommandError::HttpDispatch(err)
}
}
impl From<io::Error> for CancelCommandError {
fn from(err: io::Error) -> CancelCommandError {
CancelCommandError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for CancelCommandError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CancelCommandError {
fn description(&self) -> &str {
match *self {
CancelCommandError::DuplicateInstanceId(ref cause) => cause,
CancelCommandError::InternalServerError(ref cause) => cause,
CancelCommandError::InvalidCommandId(ref cause) => cause,
CancelCommandError::InvalidInstanceId(ref cause) => cause,
CancelCommandError::Validation(ref cause) => cause,
CancelCommandError::Credentials(ref err) => err.description(),
CancelCommandError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
CancelCommandError::ParseError(ref cause) => cause,
CancelCommandError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateActivationError {
InternalServerError(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl CreateActivationError {
pub fn from_response(res: BufferedHttpResponse) -> CreateActivationError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return CreateActivationError::InternalServerError(String::from(error_message))
}
"ValidationException" => {
return CreateActivationError::Validation(error_message.to_string())
}
_ => {}
}
}
return CreateActivationError::Unknown(res);
}
}
impl From<serde_json::error::Error> for CreateActivationError {
fn from(err: serde_json::error::Error) -> CreateActivationError {
CreateActivationError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for CreateActivationError {
fn from(err: CredentialsError) -> CreateActivationError {
CreateActivationError::Credentials(err)
}
}
impl From<HttpDispatchError> for CreateActivationError {
fn from(err: HttpDispatchError) -> CreateActivationError {
CreateActivationError::HttpDispatch(err)
}
}
impl From<io::Error> for CreateActivationError {
fn from(err: io::Error) -> CreateActivationError {
CreateActivationError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for CreateActivationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateActivationError {
fn description(&self) -> &str {
match *self {
CreateActivationError::InternalServerError(ref cause) => cause,
CreateActivationError::Validation(ref cause) => cause,
CreateActivationError::Credentials(ref err) => err.description(),
CreateActivationError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
CreateActivationError::ParseError(ref cause) => cause,
CreateActivationError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateAssociationError {
AssociationAlreadyExists(String),
AssociationLimitExceeded(String),
InternalServerError(String),
InvalidDocument(String),
InvalidDocumentVersion(String),
InvalidInstanceId(String),
InvalidOutputLocation(String),
InvalidParameters(String),
InvalidSchedule(String),
InvalidTarget(String),
UnsupportedPlatformType(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl CreateAssociationError {
pub fn from_response(res: BufferedHttpResponse) -> CreateAssociationError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"AssociationAlreadyExists" => {
return CreateAssociationError::AssociationAlreadyExists(String::from(
error_message,
))
}
"AssociationLimitExceeded" => {
return CreateAssociationError::AssociationLimitExceeded(String::from(
error_message,
))
}
"InternalServerError" => {
return CreateAssociationError::InternalServerError(String::from(error_message))
}
"InvalidDocument" => {
return CreateAssociationError::InvalidDocument(String::from(error_message))
}
"InvalidDocumentVersion" => {
return CreateAssociationError::InvalidDocumentVersion(String::from(
error_message,
))
}
"InvalidInstanceId" => {
return CreateAssociationError::InvalidInstanceId(String::from(error_message))
}
"InvalidOutputLocation" => {
return CreateAssociationError::InvalidOutputLocation(String::from(
error_message,
))
}
"InvalidParameters" => {
return CreateAssociationError::InvalidParameters(String::from(error_message))
}
"InvalidSchedule" => {
return CreateAssociationError::InvalidSchedule(String::from(error_message))
}
"InvalidTarget" => {
return CreateAssociationError::InvalidTarget(String::from(error_message))
}
"UnsupportedPlatformType" => {
return CreateAssociationError::UnsupportedPlatformType(String::from(
error_message,
))
}
"ValidationException" => {
return CreateAssociationError::Validation(error_message.to_string())
}
_ => {}
}
}
return CreateAssociationError::Unknown(res);
}
}
impl From<serde_json::error::Error> for CreateAssociationError {
fn from(err: serde_json::error::Error) -> CreateAssociationError {
CreateAssociationError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for CreateAssociationError {
fn from(err: CredentialsError) -> CreateAssociationError {
CreateAssociationError::Credentials(err)
}
}
impl From<HttpDispatchError> for CreateAssociationError {
fn from(err: HttpDispatchError) -> CreateAssociationError {
CreateAssociationError::HttpDispatch(err)
}
}
impl From<io::Error> for CreateAssociationError {
fn from(err: io::Error) -> CreateAssociationError {
CreateAssociationError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for CreateAssociationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateAssociationError {
fn description(&self) -> &str {
match *self {
CreateAssociationError::AssociationAlreadyExists(ref cause) => cause,
CreateAssociationError::AssociationLimitExceeded(ref cause) => cause,
CreateAssociationError::InternalServerError(ref cause) => cause,
CreateAssociationError::InvalidDocument(ref cause) => cause,
CreateAssociationError::InvalidDocumentVersion(ref cause) => cause,
CreateAssociationError::InvalidInstanceId(ref cause) => cause,
CreateAssociationError::InvalidOutputLocation(ref cause) => cause,
CreateAssociationError::InvalidParameters(ref cause) => cause,
CreateAssociationError::InvalidSchedule(ref cause) => cause,
CreateAssociationError::InvalidTarget(ref cause) => cause,
CreateAssociationError::UnsupportedPlatformType(ref cause) => cause,
CreateAssociationError::Validation(ref cause) => cause,
CreateAssociationError::Credentials(ref err) => err.description(),
CreateAssociationError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
CreateAssociationError::ParseError(ref cause) => cause,
CreateAssociationError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateAssociationBatchError {
AssociationLimitExceeded(String),
DuplicateInstanceId(String),
InternalServerError(String),
InvalidDocument(String),
InvalidDocumentVersion(String),
InvalidInstanceId(String),
InvalidOutputLocation(String),
InvalidParameters(String),
InvalidSchedule(String),
InvalidTarget(String),
UnsupportedPlatformType(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl CreateAssociationBatchError {
pub fn from_response(res: BufferedHttpResponse) -> CreateAssociationBatchError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"AssociationLimitExceeded" => {
return CreateAssociationBatchError::AssociationLimitExceeded(String::from(
error_message,
))
}
"DuplicateInstanceId" => {
return CreateAssociationBatchError::DuplicateInstanceId(String::from(
error_message,
))
}
"InternalServerError" => {
return CreateAssociationBatchError::InternalServerError(String::from(
error_message,
))
}
"InvalidDocument" => {
return CreateAssociationBatchError::InvalidDocument(String::from(error_message))
}
"InvalidDocumentVersion" => {
return CreateAssociationBatchError::InvalidDocumentVersion(String::from(
error_message,
))
}
"InvalidInstanceId" => {
return CreateAssociationBatchError::InvalidInstanceId(String::from(
error_message,
))
}
"InvalidOutputLocation" => {
return CreateAssociationBatchError::InvalidOutputLocation(String::from(
error_message,
))
}
"InvalidParameters" => {
return CreateAssociationBatchError::InvalidParameters(String::from(
error_message,
))
}
"InvalidSchedule" => {
return CreateAssociationBatchError::InvalidSchedule(String::from(error_message))
}
"InvalidTarget" => {
return CreateAssociationBatchError::InvalidTarget(String::from(error_message))
}
"UnsupportedPlatformType" => {
return CreateAssociationBatchError::UnsupportedPlatformType(String::from(
error_message,
))
}
"ValidationException" => {
return CreateAssociationBatchError::Validation(error_message.to_string())
}
_ => {}
}
}
return CreateAssociationBatchError::Unknown(res);
}
}
impl From<serde_json::error::Error> for CreateAssociationBatchError {
fn from(err: serde_json::error::Error) -> CreateAssociationBatchError {
CreateAssociationBatchError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for CreateAssociationBatchError {
fn from(err: CredentialsError) -> CreateAssociationBatchError {
CreateAssociationBatchError::Credentials(err)
}
}
impl From<HttpDispatchError> for CreateAssociationBatchError {
fn from(err: HttpDispatchError) -> CreateAssociationBatchError {
CreateAssociationBatchError::HttpDispatch(err)
}
}
impl From<io::Error> for CreateAssociationBatchError {
fn from(err: io::Error) -> CreateAssociationBatchError {
CreateAssociationBatchError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for CreateAssociationBatchError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateAssociationBatchError {
fn description(&self) -> &str {
match *self {
CreateAssociationBatchError::AssociationLimitExceeded(ref cause) => cause,
CreateAssociationBatchError::DuplicateInstanceId(ref cause) => cause,
CreateAssociationBatchError::InternalServerError(ref cause) => cause,
CreateAssociationBatchError::InvalidDocument(ref cause) => cause,
CreateAssociationBatchError::InvalidDocumentVersion(ref cause) => cause,
CreateAssociationBatchError::InvalidInstanceId(ref cause) => cause,
CreateAssociationBatchError::InvalidOutputLocation(ref cause) => cause,
CreateAssociationBatchError::InvalidParameters(ref cause) => cause,
CreateAssociationBatchError::InvalidSchedule(ref cause) => cause,
CreateAssociationBatchError::InvalidTarget(ref cause) => cause,
CreateAssociationBatchError::UnsupportedPlatformType(ref cause) => cause,
CreateAssociationBatchError::Validation(ref cause) => cause,
CreateAssociationBatchError::Credentials(ref err) => err.description(),
CreateAssociationBatchError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
CreateAssociationBatchError::ParseError(ref cause) => cause,
CreateAssociationBatchError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateDocumentError {
DocumentAlreadyExists(String),
DocumentLimitExceeded(String),
InternalServerError(String),
InvalidDocumentContent(String),
InvalidDocumentSchemaVersion(String),
MaxDocumentSizeExceeded(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl CreateDocumentError {
pub fn from_response(res: BufferedHttpResponse) -> CreateDocumentError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"DocumentAlreadyExists" => {
return CreateDocumentError::DocumentAlreadyExists(String::from(error_message))
}
"DocumentLimitExceeded" => {
return CreateDocumentError::DocumentLimitExceeded(String::from(error_message))
}
"InternalServerError" => {
return CreateDocumentError::InternalServerError(String::from(error_message))
}
"InvalidDocumentContent" => {
return CreateDocumentError::InvalidDocumentContent(String::from(error_message))
}
"InvalidDocumentSchemaVersion" => {
return CreateDocumentError::InvalidDocumentSchemaVersion(String::from(
error_message,
))
}
"MaxDocumentSizeExceeded" => {
return CreateDocumentError::MaxDocumentSizeExceeded(String::from(error_message))
}
"ValidationException" => {
return CreateDocumentError::Validation(error_message.to_string())
}
_ => {}
}
}
return CreateDocumentError::Unknown(res);
}
}
impl From<serde_json::error::Error> for CreateDocumentError {
fn from(err: serde_json::error::Error) -> CreateDocumentError {
CreateDocumentError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for CreateDocumentError {
fn from(err: CredentialsError) -> CreateDocumentError {
CreateDocumentError::Credentials(err)
}
}
impl From<HttpDispatchError> for CreateDocumentError {
fn from(err: HttpDispatchError) -> CreateDocumentError {
CreateDocumentError::HttpDispatch(err)
}
}
impl From<io::Error> for CreateDocumentError {
fn from(err: io::Error) -> CreateDocumentError {
CreateDocumentError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for CreateDocumentError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateDocumentError {
fn description(&self) -> &str {
match *self {
CreateDocumentError::DocumentAlreadyExists(ref cause) => cause,
CreateDocumentError::DocumentLimitExceeded(ref cause) => cause,
CreateDocumentError::InternalServerError(ref cause) => cause,
CreateDocumentError::InvalidDocumentContent(ref cause) => cause,
CreateDocumentError::InvalidDocumentSchemaVersion(ref cause) => cause,
CreateDocumentError::MaxDocumentSizeExceeded(ref cause) => cause,
CreateDocumentError::Validation(ref cause) => cause,
CreateDocumentError::Credentials(ref err) => err.description(),
CreateDocumentError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
CreateDocumentError::ParseError(ref cause) => cause,
CreateDocumentError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateMaintenanceWindowError {
IdempotentParameterMismatch(String),
InternalServerError(String),
ResourceLimitExceeded(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl CreateMaintenanceWindowError {
pub fn from_response(res: BufferedHttpResponse) -> CreateMaintenanceWindowError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"IdempotentParameterMismatch" => {
return CreateMaintenanceWindowError::IdempotentParameterMismatch(String::from(
error_message,
))
}
"InternalServerError" => {
return CreateMaintenanceWindowError::InternalServerError(String::from(
error_message,
))
}
"ResourceLimitExceededException" => {
return CreateMaintenanceWindowError::ResourceLimitExceeded(String::from(
error_message,
))
}
"ValidationException" => {
return CreateMaintenanceWindowError::Validation(error_message.to_string())
}
_ => {}
}
}
return CreateMaintenanceWindowError::Unknown(res);
}
}
impl From<serde_json::error::Error> for CreateMaintenanceWindowError {
fn from(err: serde_json::error::Error) -> CreateMaintenanceWindowError {
CreateMaintenanceWindowError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for CreateMaintenanceWindowError {
fn from(err: CredentialsError) -> CreateMaintenanceWindowError {
CreateMaintenanceWindowError::Credentials(err)
}
}
impl From<HttpDispatchError> for CreateMaintenanceWindowError {
fn from(err: HttpDispatchError) -> CreateMaintenanceWindowError {
CreateMaintenanceWindowError::HttpDispatch(err)
}
}
impl From<io::Error> for CreateMaintenanceWindowError {
fn from(err: io::Error) -> CreateMaintenanceWindowError {
CreateMaintenanceWindowError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for CreateMaintenanceWindowError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateMaintenanceWindowError {
fn description(&self) -> &str {
match *self {
CreateMaintenanceWindowError::IdempotentParameterMismatch(ref cause) => cause,
CreateMaintenanceWindowError::InternalServerError(ref cause) => cause,
CreateMaintenanceWindowError::ResourceLimitExceeded(ref cause) => cause,
CreateMaintenanceWindowError::Validation(ref cause) => cause,
CreateMaintenanceWindowError::Credentials(ref err) => err.description(),
CreateMaintenanceWindowError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
CreateMaintenanceWindowError::ParseError(ref cause) => cause,
CreateMaintenanceWindowError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreatePatchBaselineError {
IdempotentParameterMismatch(String),
InternalServerError(String),
ResourceLimitExceeded(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl CreatePatchBaselineError {
pub fn from_response(res: BufferedHttpResponse) -> CreatePatchBaselineError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"IdempotentParameterMismatch" => {
return CreatePatchBaselineError::IdempotentParameterMismatch(String::from(
error_message,
))
}
"InternalServerError" => {
return CreatePatchBaselineError::InternalServerError(String::from(
error_message,
))
}
"ResourceLimitExceededException" => {
return CreatePatchBaselineError::ResourceLimitExceeded(String::from(
error_message,
))
}
"ValidationException" => {
return CreatePatchBaselineError::Validation(error_message.to_string())
}
_ => {}
}
}
return CreatePatchBaselineError::Unknown(res);
}
}
impl From<serde_json::error::Error> for CreatePatchBaselineError {
fn from(err: serde_json::error::Error) -> CreatePatchBaselineError {
CreatePatchBaselineError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for CreatePatchBaselineError {
fn from(err: CredentialsError) -> CreatePatchBaselineError {
CreatePatchBaselineError::Credentials(err)
}
}
impl From<HttpDispatchError> for CreatePatchBaselineError {
fn from(err: HttpDispatchError) -> CreatePatchBaselineError {
CreatePatchBaselineError::HttpDispatch(err)
}
}
impl From<io::Error> for CreatePatchBaselineError {
fn from(err: io::Error) -> CreatePatchBaselineError {
CreatePatchBaselineError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for CreatePatchBaselineError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreatePatchBaselineError {
fn description(&self) -> &str {
match *self {
CreatePatchBaselineError::IdempotentParameterMismatch(ref cause) => cause,
CreatePatchBaselineError::InternalServerError(ref cause) => cause,
CreatePatchBaselineError::ResourceLimitExceeded(ref cause) => cause,
CreatePatchBaselineError::Validation(ref cause) => cause,
CreatePatchBaselineError::Credentials(ref err) => err.description(),
CreatePatchBaselineError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
CreatePatchBaselineError::ParseError(ref cause) => cause,
CreatePatchBaselineError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateResourceDataSyncError {
InternalServerError(String),
ResourceDataSyncAlreadyExists(String),
ResourceDataSyncCountExceeded(String),
ResourceDataSyncInvalidConfiguration(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl CreateResourceDataSyncError {
pub fn from_response(res: BufferedHttpResponse) -> CreateResourceDataSyncError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return CreateResourceDataSyncError::InternalServerError(String::from(
error_message,
))
}
"ResourceDataSyncAlreadyExistsException" => {
return CreateResourceDataSyncError::ResourceDataSyncAlreadyExists(String::from(
error_message,
))
}
"ResourceDataSyncCountExceededException" => {
return CreateResourceDataSyncError::ResourceDataSyncCountExceeded(String::from(
error_message,
))
}
"ResourceDataSyncInvalidConfigurationException" => {
return CreateResourceDataSyncError::ResourceDataSyncInvalidConfiguration(
String::from(error_message),
)
}
"ValidationException" => {
return CreateResourceDataSyncError::Validation(error_message.to_string())
}
_ => {}
}
}
return CreateResourceDataSyncError::Unknown(res);
}
}
impl From<serde_json::error::Error> for CreateResourceDataSyncError {
fn from(err: serde_json::error::Error) -> CreateResourceDataSyncError {
CreateResourceDataSyncError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for CreateResourceDataSyncError {
fn from(err: CredentialsError) -> CreateResourceDataSyncError {
CreateResourceDataSyncError::Credentials(err)
}
}
impl From<HttpDispatchError> for CreateResourceDataSyncError {
fn from(err: HttpDispatchError) -> CreateResourceDataSyncError {
CreateResourceDataSyncError::HttpDispatch(err)
}
}
impl From<io::Error> for CreateResourceDataSyncError {
fn from(err: io::Error) -> CreateResourceDataSyncError {
CreateResourceDataSyncError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for CreateResourceDataSyncError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateResourceDataSyncError {
fn description(&self) -> &str {
match *self {
CreateResourceDataSyncError::InternalServerError(ref cause) => cause,
CreateResourceDataSyncError::ResourceDataSyncAlreadyExists(ref cause) => cause,
CreateResourceDataSyncError::ResourceDataSyncCountExceeded(ref cause) => cause,
CreateResourceDataSyncError::ResourceDataSyncInvalidConfiguration(ref cause) => cause,
CreateResourceDataSyncError::Validation(ref cause) => cause,
CreateResourceDataSyncError::Credentials(ref err) => err.description(),
CreateResourceDataSyncError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
CreateResourceDataSyncError::ParseError(ref cause) => cause,
CreateResourceDataSyncError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteActivationError {
InternalServerError(String),
InvalidActivation(String),
InvalidActivationId(String),
TooManyUpdates(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DeleteActivationError {
pub fn from_response(res: BufferedHttpResponse) -> DeleteActivationError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return DeleteActivationError::InternalServerError(String::from(error_message))
}
"InvalidActivation" => {
return DeleteActivationError::InvalidActivation(String::from(error_message))
}
"InvalidActivationId" => {
return DeleteActivationError::InvalidActivationId(String::from(error_message))
}
"TooManyUpdates" => {
return DeleteActivationError::TooManyUpdates(String::from(error_message))
}
"ValidationException" => {
return DeleteActivationError::Validation(error_message.to_string())
}
_ => {}
}
}
return DeleteActivationError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DeleteActivationError {
fn from(err: serde_json::error::Error) -> DeleteActivationError {
DeleteActivationError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DeleteActivationError {
fn from(err: CredentialsError) -> DeleteActivationError {
DeleteActivationError::Credentials(err)
}
}
impl From<HttpDispatchError> for DeleteActivationError {
fn from(err: HttpDispatchError) -> DeleteActivationError {
DeleteActivationError::HttpDispatch(err)
}
}
impl From<io::Error> for DeleteActivationError {
fn from(err: io::Error) -> DeleteActivationError {
DeleteActivationError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DeleteActivationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteActivationError {
fn description(&self) -> &str {
match *self {
DeleteActivationError::InternalServerError(ref cause) => cause,
DeleteActivationError::InvalidActivation(ref cause) => cause,
DeleteActivationError::InvalidActivationId(ref cause) => cause,
DeleteActivationError::TooManyUpdates(ref cause) => cause,
DeleteActivationError::Validation(ref cause) => cause,
DeleteActivationError::Credentials(ref err) => err.description(),
DeleteActivationError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
DeleteActivationError::ParseError(ref cause) => cause,
DeleteActivationError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteAssociationError {
AssociationDoesNotExist(String),
InternalServerError(String),
InvalidDocument(String),
InvalidInstanceId(String),
TooManyUpdates(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DeleteAssociationError {
pub fn from_response(res: BufferedHttpResponse) -> DeleteAssociationError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"AssociationDoesNotExist" => {
return DeleteAssociationError::AssociationDoesNotExist(String::from(
error_message,
))
}
"InternalServerError" => {
return DeleteAssociationError::InternalServerError(String::from(error_message))
}
"InvalidDocument" => {
return DeleteAssociationError::InvalidDocument(String::from(error_message))
}
"InvalidInstanceId" => {
return DeleteAssociationError::InvalidInstanceId(String::from(error_message))
}
"TooManyUpdates" => {
return DeleteAssociationError::TooManyUpdates(String::from(error_message))
}
"ValidationException" => {
return DeleteAssociationError::Validation(error_message.to_string())
}
_ => {}
}
}
return DeleteAssociationError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DeleteAssociationError {
fn from(err: serde_json::error::Error) -> DeleteAssociationError {
DeleteAssociationError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DeleteAssociationError {
fn from(err: CredentialsError) -> DeleteAssociationError {
DeleteAssociationError::Credentials(err)
}
}
impl From<HttpDispatchError> for DeleteAssociationError {
fn from(err: HttpDispatchError) -> DeleteAssociationError {
DeleteAssociationError::HttpDispatch(err)
}
}
impl From<io::Error> for DeleteAssociationError {
fn from(err: io::Error) -> DeleteAssociationError {
DeleteAssociationError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DeleteAssociationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteAssociationError {
fn description(&self) -> &str {
match *self {
DeleteAssociationError::AssociationDoesNotExist(ref cause) => cause,
DeleteAssociationError::InternalServerError(ref cause) => cause,
DeleteAssociationError::InvalidDocument(ref cause) => cause,
DeleteAssociationError::InvalidInstanceId(ref cause) => cause,
DeleteAssociationError::TooManyUpdates(ref cause) => cause,
DeleteAssociationError::Validation(ref cause) => cause,
DeleteAssociationError::Credentials(ref err) => err.description(),
DeleteAssociationError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DeleteAssociationError::ParseError(ref cause) => cause,
DeleteAssociationError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteDocumentError {
AssociatedInstances(String),
InternalServerError(String),
InvalidDocument(String),
InvalidDocumentOperation(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DeleteDocumentError {
pub fn from_response(res: BufferedHttpResponse) -> DeleteDocumentError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"AssociatedInstances" => {
return DeleteDocumentError::AssociatedInstances(String::from(error_message))
}
"InternalServerError" => {
return DeleteDocumentError::InternalServerError(String::from(error_message))
}
"InvalidDocument" => {
return DeleteDocumentError::InvalidDocument(String::from(error_message))
}
"InvalidDocumentOperation" => {
return DeleteDocumentError::InvalidDocumentOperation(String::from(
error_message,
))
}
"ValidationException" => {
return DeleteDocumentError::Validation(error_message.to_string())
}
_ => {}
}
}
return DeleteDocumentError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DeleteDocumentError {
fn from(err: serde_json::error::Error) -> DeleteDocumentError {
DeleteDocumentError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DeleteDocumentError {
fn from(err: CredentialsError) -> DeleteDocumentError {
DeleteDocumentError::Credentials(err)
}
}
impl From<HttpDispatchError> for DeleteDocumentError {
fn from(err: HttpDispatchError) -> DeleteDocumentError {
DeleteDocumentError::HttpDispatch(err)
}
}
impl From<io::Error> for DeleteDocumentError {
fn from(err: io::Error) -> DeleteDocumentError {
DeleteDocumentError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DeleteDocumentError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteDocumentError {
fn description(&self) -> &str {
match *self {
DeleteDocumentError::AssociatedInstances(ref cause) => cause,
DeleteDocumentError::InternalServerError(ref cause) => cause,
DeleteDocumentError::InvalidDocument(ref cause) => cause,
DeleteDocumentError::InvalidDocumentOperation(ref cause) => cause,
DeleteDocumentError::Validation(ref cause) => cause,
DeleteDocumentError::Credentials(ref err) => err.description(),
DeleteDocumentError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
DeleteDocumentError::ParseError(ref cause) => cause,
DeleteDocumentError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteInventoryError {
InternalServerError(String),
InvalidDeleteInventoryParameters(String),
InvalidInventoryRequest(String),
InvalidOption(String),
InvalidTypeName(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DeleteInventoryError {
pub fn from_response(res: BufferedHttpResponse) -> DeleteInventoryError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return DeleteInventoryError::InternalServerError(String::from(error_message))
}
"InvalidDeleteInventoryParametersException" => {
return DeleteInventoryError::InvalidDeleteInventoryParameters(String::from(
error_message,
))
}
"InvalidInventoryRequestException" => {
return DeleteInventoryError::InvalidInventoryRequest(String::from(
error_message,
))
}
"InvalidOptionException" => {
return DeleteInventoryError::InvalidOption(String::from(error_message))
}
"InvalidTypeNameException" => {
return DeleteInventoryError::InvalidTypeName(String::from(error_message))
}
"ValidationException" => {
return DeleteInventoryError::Validation(error_message.to_string())
}
_ => {}
}
}
return DeleteInventoryError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DeleteInventoryError {
fn from(err: serde_json::error::Error) -> DeleteInventoryError {
DeleteInventoryError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DeleteInventoryError {
fn from(err: CredentialsError) -> DeleteInventoryError {
DeleteInventoryError::Credentials(err)
}
}
impl From<HttpDispatchError> for DeleteInventoryError {
fn from(err: HttpDispatchError) -> DeleteInventoryError {
DeleteInventoryError::HttpDispatch(err)
}
}
impl From<io::Error> for DeleteInventoryError {
fn from(err: io::Error) -> DeleteInventoryError {
DeleteInventoryError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DeleteInventoryError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteInventoryError {
fn description(&self) -> &str {
match *self {
DeleteInventoryError::InternalServerError(ref cause) => cause,
DeleteInventoryError::InvalidDeleteInventoryParameters(ref cause) => cause,
DeleteInventoryError::InvalidInventoryRequest(ref cause) => cause,
DeleteInventoryError::InvalidOption(ref cause) => cause,
DeleteInventoryError::InvalidTypeName(ref cause) => cause,
DeleteInventoryError::Validation(ref cause) => cause,
DeleteInventoryError::Credentials(ref err) => err.description(),
DeleteInventoryError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
DeleteInventoryError::ParseError(ref cause) => cause,
DeleteInventoryError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteMaintenanceWindowError {
InternalServerError(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DeleteMaintenanceWindowError {
pub fn from_response(res: BufferedHttpResponse) -> DeleteMaintenanceWindowError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return DeleteMaintenanceWindowError::InternalServerError(String::from(
error_message,
))
}
"ValidationException" => {
return DeleteMaintenanceWindowError::Validation(error_message.to_string())
}
_ => {}
}
}
return DeleteMaintenanceWindowError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DeleteMaintenanceWindowError {
fn from(err: serde_json::error::Error) -> DeleteMaintenanceWindowError {
DeleteMaintenanceWindowError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DeleteMaintenanceWindowError {
fn from(err: CredentialsError) -> DeleteMaintenanceWindowError {
DeleteMaintenanceWindowError::Credentials(err)
}
}
impl From<HttpDispatchError> for DeleteMaintenanceWindowError {
fn from(err: HttpDispatchError) -> DeleteMaintenanceWindowError {
DeleteMaintenanceWindowError::HttpDispatch(err)
}
}
impl From<io::Error> for DeleteMaintenanceWindowError {
fn from(err: io::Error) -> DeleteMaintenanceWindowError {
DeleteMaintenanceWindowError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DeleteMaintenanceWindowError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteMaintenanceWindowError {
fn description(&self) -> &str {
match *self {
DeleteMaintenanceWindowError::InternalServerError(ref cause) => cause,
DeleteMaintenanceWindowError::Validation(ref cause) => cause,
DeleteMaintenanceWindowError::Credentials(ref err) => err.description(),
DeleteMaintenanceWindowError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DeleteMaintenanceWindowError::ParseError(ref cause) => cause,
DeleteMaintenanceWindowError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteParameterError {
InternalServerError(String),
ParameterNotFound(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DeleteParameterError {
pub fn from_response(res: BufferedHttpResponse) -> DeleteParameterError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return DeleteParameterError::InternalServerError(String::from(error_message))
}
"ParameterNotFound" => {
return DeleteParameterError::ParameterNotFound(String::from(error_message))
}
"ValidationException" => {
return DeleteParameterError::Validation(error_message.to_string())
}
_ => {}
}
}
return DeleteParameterError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DeleteParameterError {
fn from(err: serde_json::error::Error) -> DeleteParameterError {
DeleteParameterError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DeleteParameterError {
fn from(err: CredentialsError) -> DeleteParameterError {
DeleteParameterError::Credentials(err)
}
}
impl From<HttpDispatchError> for DeleteParameterError {
fn from(err: HttpDispatchError) -> DeleteParameterError {
DeleteParameterError::HttpDispatch(err)
}
}
impl From<io::Error> for DeleteParameterError {
fn from(err: io::Error) -> DeleteParameterError {
DeleteParameterError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DeleteParameterError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteParameterError {
fn description(&self) -> &str {
match *self {
DeleteParameterError::InternalServerError(ref cause) => cause,
DeleteParameterError::ParameterNotFound(ref cause) => cause,
DeleteParameterError::Validation(ref cause) => cause,
DeleteParameterError::Credentials(ref err) => err.description(),
DeleteParameterError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
DeleteParameterError::ParseError(ref cause) => cause,
DeleteParameterError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteParametersError {
InternalServerError(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DeleteParametersError {
pub fn from_response(res: BufferedHttpResponse) -> DeleteParametersError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return DeleteParametersError::InternalServerError(String::from(error_message))
}
"ValidationException" => {
return DeleteParametersError::Validation(error_message.to_string())
}
_ => {}
}
}
return DeleteParametersError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DeleteParametersError {
fn from(err: serde_json::error::Error) -> DeleteParametersError {
DeleteParametersError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DeleteParametersError {
fn from(err: CredentialsError) -> DeleteParametersError {
DeleteParametersError::Credentials(err)
}
}
impl From<HttpDispatchError> for DeleteParametersError {
fn from(err: HttpDispatchError) -> DeleteParametersError {
DeleteParametersError::HttpDispatch(err)
}
}
impl From<io::Error> for DeleteParametersError {
fn from(err: io::Error) -> DeleteParametersError {
DeleteParametersError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DeleteParametersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteParametersError {
fn description(&self) -> &str {
match *self {
DeleteParametersError::InternalServerError(ref cause) => cause,
DeleteParametersError::Validation(ref cause) => cause,
DeleteParametersError::Credentials(ref err) => err.description(),
DeleteParametersError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
DeleteParametersError::ParseError(ref cause) => cause,
DeleteParametersError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeletePatchBaselineError {
InternalServerError(String),
ResourceInUse(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DeletePatchBaselineError {
pub fn from_response(res: BufferedHttpResponse) -> DeletePatchBaselineError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return DeletePatchBaselineError::InternalServerError(String::from(
error_message,
))
}
"ResourceInUseException" => {
return DeletePatchBaselineError::ResourceInUse(String::from(error_message))
}
"ValidationException" => {
return DeletePatchBaselineError::Validation(error_message.to_string())
}
_ => {}
}
}
return DeletePatchBaselineError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DeletePatchBaselineError {
fn from(err: serde_json::error::Error) -> DeletePatchBaselineError {
DeletePatchBaselineError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DeletePatchBaselineError {
fn from(err: CredentialsError) -> DeletePatchBaselineError {
DeletePatchBaselineError::Credentials(err)
}
}
impl From<HttpDispatchError> for DeletePatchBaselineError {
fn from(err: HttpDispatchError) -> DeletePatchBaselineError {
DeletePatchBaselineError::HttpDispatch(err)
}
}
impl From<io::Error> for DeletePatchBaselineError {
fn from(err: io::Error) -> DeletePatchBaselineError {
DeletePatchBaselineError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DeletePatchBaselineError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeletePatchBaselineError {
fn description(&self) -> &str {
match *self {
DeletePatchBaselineError::InternalServerError(ref cause) => cause,
DeletePatchBaselineError::ResourceInUse(ref cause) => cause,
DeletePatchBaselineError::Validation(ref cause) => cause,
DeletePatchBaselineError::Credentials(ref err) => err.description(),
DeletePatchBaselineError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DeletePatchBaselineError::ParseError(ref cause) => cause,
DeletePatchBaselineError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteResourceDataSyncError {
InternalServerError(String),
ResourceDataSyncNotFound(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DeleteResourceDataSyncError {
pub fn from_response(res: BufferedHttpResponse) -> DeleteResourceDataSyncError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return DeleteResourceDataSyncError::InternalServerError(String::from(
error_message,
))
}
"ResourceDataSyncNotFoundException" => {
return DeleteResourceDataSyncError::ResourceDataSyncNotFound(String::from(
error_message,
))
}
"ValidationException" => {
return DeleteResourceDataSyncError::Validation(error_message.to_string())
}
_ => {}
}
}
return DeleteResourceDataSyncError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DeleteResourceDataSyncError {
fn from(err: serde_json::error::Error) -> DeleteResourceDataSyncError {
DeleteResourceDataSyncError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DeleteResourceDataSyncError {
fn from(err: CredentialsError) -> DeleteResourceDataSyncError {
DeleteResourceDataSyncError::Credentials(err)
}
}
impl From<HttpDispatchError> for DeleteResourceDataSyncError {
fn from(err: HttpDispatchError) -> DeleteResourceDataSyncError {
DeleteResourceDataSyncError::HttpDispatch(err)
}
}
impl From<io::Error> for DeleteResourceDataSyncError {
fn from(err: io::Error) -> DeleteResourceDataSyncError {
DeleteResourceDataSyncError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DeleteResourceDataSyncError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteResourceDataSyncError {
fn description(&self) -> &str {
match *self {
DeleteResourceDataSyncError::InternalServerError(ref cause) => cause,
DeleteResourceDataSyncError::ResourceDataSyncNotFound(ref cause) => cause,
DeleteResourceDataSyncError::Validation(ref cause) => cause,
DeleteResourceDataSyncError::Credentials(ref err) => err.description(),
DeleteResourceDataSyncError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DeleteResourceDataSyncError::ParseError(ref cause) => cause,
DeleteResourceDataSyncError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeregisterManagedInstanceError {
InternalServerError(String),
InvalidInstanceId(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DeregisterManagedInstanceError {
pub fn from_response(res: BufferedHttpResponse) -> DeregisterManagedInstanceError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return DeregisterManagedInstanceError::InternalServerError(String::from(
error_message,
))
}
"InvalidInstanceId" => {
return DeregisterManagedInstanceError::InvalidInstanceId(String::from(
error_message,
))
}
"ValidationException" => {
return DeregisterManagedInstanceError::Validation(error_message.to_string())
}
_ => {}
}
}
return DeregisterManagedInstanceError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DeregisterManagedInstanceError {
fn from(err: serde_json::error::Error) -> DeregisterManagedInstanceError {
DeregisterManagedInstanceError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DeregisterManagedInstanceError {
fn from(err: CredentialsError) -> DeregisterManagedInstanceError {
DeregisterManagedInstanceError::Credentials(err)
}
}
impl From<HttpDispatchError> for DeregisterManagedInstanceError {
fn from(err: HttpDispatchError) -> DeregisterManagedInstanceError {
DeregisterManagedInstanceError::HttpDispatch(err)
}
}
impl From<io::Error> for DeregisterManagedInstanceError {
fn from(err: io::Error) -> DeregisterManagedInstanceError {
DeregisterManagedInstanceError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DeregisterManagedInstanceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeregisterManagedInstanceError {
fn description(&self) -> &str {
match *self {
DeregisterManagedInstanceError::InternalServerError(ref cause) => cause,
DeregisterManagedInstanceError::InvalidInstanceId(ref cause) => cause,
DeregisterManagedInstanceError::Validation(ref cause) => cause,
DeregisterManagedInstanceError::Credentials(ref err) => err.description(),
DeregisterManagedInstanceError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DeregisterManagedInstanceError::ParseError(ref cause) => cause,
DeregisterManagedInstanceError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeregisterPatchBaselineForPatchGroupError {
InternalServerError(String),
InvalidResourceId(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DeregisterPatchBaselineForPatchGroupError {
pub fn from_response(res: BufferedHttpResponse) -> DeregisterPatchBaselineForPatchGroupError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return DeregisterPatchBaselineForPatchGroupError::InternalServerError(
String::from(error_message),
)
}
"InvalidResourceId" => {
return DeregisterPatchBaselineForPatchGroupError::InvalidResourceId(
String::from(error_message),
)
}
"ValidationException" => {
return DeregisterPatchBaselineForPatchGroupError::Validation(
error_message.to_string(),
)
}
_ => {}
}
}
return DeregisterPatchBaselineForPatchGroupError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DeregisterPatchBaselineForPatchGroupError {
fn from(err: serde_json::error::Error) -> DeregisterPatchBaselineForPatchGroupError {
DeregisterPatchBaselineForPatchGroupError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DeregisterPatchBaselineForPatchGroupError {
fn from(err: CredentialsError) -> DeregisterPatchBaselineForPatchGroupError {
DeregisterPatchBaselineForPatchGroupError::Credentials(err)
}
}
impl From<HttpDispatchError> for DeregisterPatchBaselineForPatchGroupError {
fn from(err: HttpDispatchError) -> DeregisterPatchBaselineForPatchGroupError {
DeregisterPatchBaselineForPatchGroupError::HttpDispatch(err)
}
}
impl From<io::Error> for DeregisterPatchBaselineForPatchGroupError {
fn from(err: io::Error) -> DeregisterPatchBaselineForPatchGroupError {
DeregisterPatchBaselineForPatchGroupError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DeregisterPatchBaselineForPatchGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeregisterPatchBaselineForPatchGroupError {
fn description(&self) -> &str {
match *self {
DeregisterPatchBaselineForPatchGroupError::InternalServerError(ref cause) => cause,
DeregisterPatchBaselineForPatchGroupError::InvalidResourceId(ref cause) => cause,
DeregisterPatchBaselineForPatchGroupError::Validation(ref cause) => cause,
DeregisterPatchBaselineForPatchGroupError::Credentials(ref err) => err.description(),
DeregisterPatchBaselineForPatchGroupError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DeregisterPatchBaselineForPatchGroupError::ParseError(ref cause) => cause,
DeregisterPatchBaselineForPatchGroupError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeregisterTargetFromMaintenanceWindowError {
DoesNotExist(String),
InternalServerError(String),
TargetInUse(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DeregisterTargetFromMaintenanceWindowError {
pub fn from_response(res: BufferedHttpResponse) -> DeregisterTargetFromMaintenanceWindowError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"DoesNotExistException" => {
return DeregisterTargetFromMaintenanceWindowError::DoesNotExist(String::from(
error_message,
))
}
"InternalServerError" => {
return DeregisterTargetFromMaintenanceWindowError::InternalServerError(
String::from(error_message),
)
}
"TargetInUseException" => {
return DeregisterTargetFromMaintenanceWindowError::TargetInUse(String::from(
error_message,
))
}
"ValidationException" => {
return DeregisterTargetFromMaintenanceWindowError::Validation(
error_message.to_string(),
)
}
_ => {}
}
}
return DeregisterTargetFromMaintenanceWindowError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DeregisterTargetFromMaintenanceWindowError {
fn from(err: serde_json::error::Error) -> DeregisterTargetFromMaintenanceWindowError {
DeregisterTargetFromMaintenanceWindowError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DeregisterTargetFromMaintenanceWindowError {
fn from(err: CredentialsError) -> DeregisterTargetFromMaintenanceWindowError {
DeregisterTargetFromMaintenanceWindowError::Credentials(err)
}
}
impl From<HttpDispatchError> for DeregisterTargetFromMaintenanceWindowError {
fn from(err: HttpDispatchError) -> DeregisterTargetFromMaintenanceWindowError {
DeregisterTargetFromMaintenanceWindowError::HttpDispatch(err)
}
}
impl From<io::Error> for DeregisterTargetFromMaintenanceWindowError {
fn from(err: io::Error) -> DeregisterTargetFromMaintenanceWindowError {
DeregisterTargetFromMaintenanceWindowError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DeregisterTargetFromMaintenanceWindowError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeregisterTargetFromMaintenanceWindowError {
fn description(&self) -> &str {
match *self {
DeregisterTargetFromMaintenanceWindowError::DoesNotExist(ref cause) => cause,
DeregisterTargetFromMaintenanceWindowError::InternalServerError(ref cause) => cause,
DeregisterTargetFromMaintenanceWindowError::TargetInUse(ref cause) => cause,
DeregisterTargetFromMaintenanceWindowError::Validation(ref cause) => cause,
DeregisterTargetFromMaintenanceWindowError::Credentials(ref err) => err.description(),
DeregisterTargetFromMaintenanceWindowError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DeregisterTargetFromMaintenanceWindowError::ParseError(ref cause) => cause,
DeregisterTargetFromMaintenanceWindowError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeregisterTaskFromMaintenanceWindowError {
DoesNotExist(String),
InternalServerError(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DeregisterTaskFromMaintenanceWindowError {
pub fn from_response(res: BufferedHttpResponse) -> DeregisterTaskFromMaintenanceWindowError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"DoesNotExistException" => {
return DeregisterTaskFromMaintenanceWindowError::DoesNotExist(String::from(
error_message,
))
}
"InternalServerError" => {
return DeregisterTaskFromMaintenanceWindowError::InternalServerError(
String::from(error_message),
)
}
"ValidationException" => {
return DeregisterTaskFromMaintenanceWindowError::Validation(
error_message.to_string(),
)
}
_ => {}
}
}
return DeregisterTaskFromMaintenanceWindowError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DeregisterTaskFromMaintenanceWindowError {
fn from(err: serde_json::error::Error) -> DeregisterTaskFromMaintenanceWindowError {
DeregisterTaskFromMaintenanceWindowError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DeregisterTaskFromMaintenanceWindowError {
fn from(err: CredentialsError) -> DeregisterTaskFromMaintenanceWindowError {
DeregisterTaskFromMaintenanceWindowError::Credentials(err)
}
}
impl From<HttpDispatchError> for DeregisterTaskFromMaintenanceWindowError {
fn from(err: HttpDispatchError) -> DeregisterTaskFromMaintenanceWindowError {
DeregisterTaskFromMaintenanceWindowError::HttpDispatch(err)
}
}
impl From<io::Error> for DeregisterTaskFromMaintenanceWindowError {
fn from(err: io::Error) -> DeregisterTaskFromMaintenanceWindowError {
DeregisterTaskFromMaintenanceWindowError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DeregisterTaskFromMaintenanceWindowError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeregisterTaskFromMaintenanceWindowError {
fn description(&self) -> &str {
match *self {
DeregisterTaskFromMaintenanceWindowError::DoesNotExist(ref cause) => cause,
DeregisterTaskFromMaintenanceWindowError::InternalServerError(ref cause) => cause,
DeregisterTaskFromMaintenanceWindowError::Validation(ref cause) => cause,
DeregisterTaskFromMaintenanceWindowError::Credentials(ref err) => err.description(),
DeregisterTaskFromMaintenanceWindowError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DeregisterTaskFromMaintenanceWindowError::ParseError(ref cause) => cause,
DeregisterTaskFromMaintenanceWindowError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeActivationsError {
InternalServerError(String),
InvalidFilter(String),
InvalidNextToken(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeActivationsError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeActivationsError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return DescribeActivationsError::InternalServerError(String::from(
error_message,
))
}
"InvalidFilter" => {
return DescribeActivationsError::InvalidFilter(String::from(error_message))
}
"InvalidNextToken" => {
return DescribeActivationsError::InvalidNextToken(String::from(error_message))
}
"ValidationException" => {
return DescribeActivationsError::Validation(error_message.to_string())
}
_ => {}
}
}
return DescribeActivationsError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DescribeActivationsError {
fn from(err: serde_json::error::Error) -> DescribeActivationsError {
DescribeActivationsError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DescribeActivationsError {
fn from(err: CredentialsError) -> DescribeActivationsError {
DescribeActivationsError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeActivationsError {
fn from(err: HttpDispatchError) -> DescribeActivationsError {
DescribeActivationsError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeActivationsError {
fn from(err: io::Error) -> DescribeActivationsError {
DescribeActivationsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeActivationsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeActivationsError {
fn description(&self) -> &str {
match *self {
DescribeActivationsError::InternalServerError(ref cause) => cause,
DescribeActivationsError::InvalidFilter(ref cause) => cause,
DescribeActivationsError::InvalidNextToken(ref cause) => cause,
DescribeActivationsError::Validation(ref cause) => cause,
DescribeActivationsError::Credentials(ref err) => err.description(),
DescribeActivationsError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeActivationsError::ParseError(ref cause) => cause,
DescribeActivationsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeAssociationError {
AssociationDoesNotExist(String),
InternalServerError(String),
InvalidAssociationVersion(String),
InvalidDocument(String),
InvalidInstanceId(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeAssociationError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeAssociationError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"AssociationDoesNotExist" => {
return DescribeAssociationError::AssociationDoesNotExist(String::from(
error_message,
))
}
"InternalServerError" => {
return DescribeAssociationError::InternalServerError(String::from(
error_message,
))
}
"InvalidAssociationVersion" => {
return DescribeAssociationError::InvalidAssociationVersion(String::from(
error_message,
))
}
"InvalidDocument" => {
return DescribeAssociationError::InvalidDocument(String::from(error_message))
}
"InvalidInstanceId" => {
return DescribeAssociationError::InvalidInstanceId(String::from(error_message))
}
"ValidationException" => {
return DescribeAssociationError::Validation(error_message.to_string())
}
_ => {}
}
}
return DescribeAssociationError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DescribeAssociationError {
fn from(err: serde_json::error::Error) -> DescribeAssociationError {
DescribeAssociationError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DescribeAssociationError {
fn from(err: CredentialsError) -> DescribeAssociationError {
DescribeAssociationError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeAssociationError {
fn from(err: HttpDispatchError) -> DescribeAssociationError {
DescribeAssociationError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeAssociationError {
fn from(err: io::Error) -> DescribeAssociationError {
DescribeAssociationError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeAssociationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeAssociationError {
fn description(&self) -> &str {
match *self {
DescribeAssociationError::AssociationDoesNotExist(ref cause) => cause,
DescribeAssociationError::InternalServerError(ref cause) => cause,
DescribeAssociationError::InvalidAssociationVersion(ref cause) => cause,
DescribeAssociationError::InvalidDocument(ref cause) => cause,
DescribeAssociationError::InvalidInstanceId(ref cause) => cause,
DescribeAssociationError::Validation(ref cause) => cause,
DescribeAssociationError::Credentials(ref err) => err.description(),
DescribeAssociationError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeAssociationError::ParseError(ref cause) => cause,
DescribeAssociationError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeAssociationExecutionTargetsError {
AssociationDoesNotExist(String),
AssociationExecutionDoesNotExist(String),
InternalServerError(String),
InvalidNextToken(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeAssociationExecutionTargetsError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeAssociationExecutionTargetsError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"AssociationDoesNotExist" => return DescribeAssociationExecutionTargetsError::AssociationDoesNotExist(String::from(error_message)),
"AssociationExecutionDoesNotExist" => return DescribeAssociationExecutionTargetsError::AssociationExecutionDoesNotExist(String::from(error_message)),
"InternalServerError" => return DescribeAssociationExecutionTargetsError::InternalServerError(String::from(error_message)),
"InvalidNextToken" => return DescribeAssociationExecutionTargetsError::InvalidNextToken(String::from(error_message)),
"ValidationException" => return DescribeAssociationExecutionTargetsError::Validation(error_message.to_string()),
_ => {}
}
}
return DescribeAssociationExecutionTargetsError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DescribeAssociationExecutionTargetsError {
fn from(err: serde_json::error::Error) -> DescribeAssociationExecutionTargetsError {
DescribeAssociationExecutionTargetsError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DescribeAssociationExecutionTargetsError {
fn from(err: CredentialsError) -> DescribeAssociationExecutionTargetsError {
DescribeAssociationExecutionTargetsError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeAssociationExecutionTargetsError {
fn from(err: HttpDispatchError) -> DescribeAssociationExecutionTargetsError {
DescribeAssociationExecutionTargetsError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeAssociationExecutionTargetsError {
fn from(err: io::Error) -> DescribeAssociationExecutionTargetsError {
DescribeAssociationExecutionTargetsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeAssociationExecutionTargetsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeAssociationExecutionTargetsError {
fn description(&self) -> &str {
match *self {
DescribeAssociationExecutionTargetsError::AssociationDoesNotExist(ref cause) => cause,
DescribeAssociationExecutionTargetsError::AssociationExecutionDoesNotExist(
ref cause,
) => cause,
DescribeAssociationExecutionTargetsError::InternalServerError(ref cause) => cause,
DescribeAssociationExecutionTargetsError::InvalidNextToken(ref cause) => cause,
DescribeAssociationExecutionTargetsError::Validation(ref cause) => cause,
DescribeAssociationExecutionTargetsError::Credentials(ref err) => err.description(),
DescribeAssociationExecutionTargetsError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeAssociationExecutionTargetsError::ParseError(ref cause) => cause,
DescribeAssociationExecutionTargetsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeAssociationExecutionsError {
AssociationDoesNotExist(String),
InternalServerError(String),
InvalidNextToken(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeAssociationExecutionsError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeAssociationExecutionsError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"AssociationDoesNotExist" => {
return DescribeAssociationExecutionsError::AssociationDoesNotExist(
String::from(error_message),
)
}
"InternalServerError" => {
return DescribeAssociationExecutionsError::InternalServerError(String::from(
error_message,
))
}
"InvalidNextToken" => {
return DescribeAssociationExecutionsError::InvalidNextToken(String::from(
error_message,
))
}
"ValidationException" => {
return DescribeAssociationExecutionsError::Validation(error_message.to_string())
}
_ => {}
}
}
return DescribeAssociationExecutionsError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DescribeAssociationExecutionsError {
fn from(err: serde_json::error::Error) -> DescribeAssociationExecutionsError {
DescribeAssociationExecutionsError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DescribeAssociationExecutionsError {
fn from(err: CredentialsError) -> DescribeAssociationExecutionsError {
DescribeAssociationExecutionsError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeAssociationExecutionsError {
fn from(err: HttpDispatchError) -> DescribeAssociationExecutionsError {
DescribeAssociationExecutionsError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeAssociationExecutionsError {
fn from(err: io::Error) -> DescribeAssociationExecutionsError {
DescribeAssociationExecutionsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeAssociationExecutionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeAssociationExecutionsError {
fn description(&self) -> &str {
match *self {
DescribeAssociationExecutionsError::AssociationDoesNotExist(ref cause) => cause,
DescribeAssociationExecutionsError::InternalServerError(ref cause) => cause,
DescribeAssociationExecutionsError::InvalidNextToken(ref cause) => cause,
DescribeAssociationExecutionsError::Validation(ref cause) => cause,
DescribeAssociationExecutionsError::Credentials(ref err) => err.description(),
DescribeAssociationExecutionsError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeAssociationExecutionsError::ParseError(ref cause) => cause,
DescribeAssociationExecutionsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeAutomationExecutionsError {
InternalServerError(String),
InvalidFilterKey(String),
InvalidFilterValue(String),
InvalidNextToken(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeAutomationExecutionsError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeAutomationExecutionsError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return DescribeAutomationExecutionsError::InternalServerError(String::from(
error_message,
))
}
"InvalidFilterKey" => {
return DescribeAutomationExecutionsError::InvalidFilterKey(String::from(
error_message,
))
}
"InvalidFilterValue" => {
return DescribeAutomationExecutionsError::InvalidFilterValue(String::from(
error_message,
))
}
"InvalidNextToken" => {
return DescribeAutomationExecutionsError::InvalidNextToken(String::from(
error_message,
))
}
"ValidationException" => {
return DescribeAutomationExecutionsError::Validation(error_message.to_string())
}
_ => {}
}
}
return DescribeAutomationExecutionsError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DescribeAutomationExecutionsError {
fn from(err: serde_json::error::Error) -> DescribeAutomationExecutionsError {
DescribeAutomationExecutionsError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DescribeAutomationExecutionsError {
fn from(err: CredentialsError) -> DescribeAutomationExecutionsError {
DescribeAutomationExecutionsError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeAutomationExecutionsError {
fn from(err: HttpDispatchError) -> DescribeAutomationExecutionsError {
DescribeAutomationExecutionsError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeAutomationExecutionsError {
fn from(err: io::Error) -> DescribeAutomationExecutionsError {
DescribeAutomationExecutionsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeAutomationExecutionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeAutomationExecutionsError {
fn description(&self) -> &str {
match *self {
DescribeAutomationExecutionsError::InternalServerError(ref cause) => cause,
DescribeAutomationExecutionsError::InvalidFilterKey(ref cause) => cause,
DescribeAutomationExecutionsError::InvalidFilterValue(ref cause) => cause,
DescribeAutomationExecutionsError::InvalidNextToken(ref cause) => cause,
DescribeAutomationExecutionsError::Validation(ref cause) => cause,
DescribeAutomationExecutionsError::Credentials(ref err) => err.description(),
DescribeAutomationExecutionsError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeAutomationExecutionsError::ParseError(ref cause) => cause,
DescribeAutomationExecutionsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeAutomationStepExecutionsError {
AutomationExecutionNotFound(String),
InternalServerError(String),
InvalidFilterKey(String),
InvalidFilterValue(String),
InvalidNextToken(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeAutomationStepExecutionsError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeAutomationStepExecutionsError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"AutomationExecutionNotFoundException" => {
return DescribeAutomationStepExecutionsError::AutomationExecutionNotFound(
String::from(error_message),
)
}
"InternalServerError" => {
return DescribeAutomationStepExecutionsError::InternalServerError(String::from(
error_message,
))
}
"InvalidFilterKey" => {
return DescribeAutomationStepExecutionsError::InvalidFilterKey(String::from(
error_message,
))
}
"InvalidFilterValue" => {
return DescribeAutomationStepExecutionsError::InvalidFilterValue(String::from(
error_message,
))
}
"InvalidNextToken" => {
return DescribeAutomationStepExecutionsError::InvalidNextToken(String::from(
error_message,
))
}
"ValidationException" => {
return DescribeAutomationStepExecutionsError::Validation(
error_message.to_string(),
)
}
_ => {}
}
}
return DescribeAutomationStepExecutionsError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DescribeAutomationStepExecutionsError {
fn from(err: serde_json::error::Error) -> DescribeAutomationStepExecutionsError {
DescribeAutomationStepExecutionsError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DescribeAutomationStepExecutionsError {
fn from(err: CredentialsError) -> DescribeAutomationStepExecutionsError {
DescribeAutomationStepExecutionsError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeAutomationStepExecutionsError {
fn from(err: HttpDispatchError) -> DescribeAutomationStepExecutionsError {
DescribeAutomationStepExecutionsError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeAutomationStepExecutionsError {
fn from(err: io::Error) -> DescribeAutomationStepExecutionsError {
DescribeAutomationStepExecutionsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeAutomationStepExecutionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeAutomationStepExecutionsError {
fn description(&self) -> &str {
match *self {
DescribeAutomationStepExecutionsError::AutomationExecutionNotFound(ref cause) => cause,
DescribeAutomationStepExecutionsError::InternalServerError(ref cause) => cause,
DescribeAutomationStepExecutionsError::InvalidFilterKey(ref cause) => cause,
DescribeAutomationStepExecutionsError::InvalidFilterValue(ref cause) => cause,
DescribeAutomationStepExecutionsError::InvalidNextToken(ref cause) => cause,
DescribeAutomationStepExecutionsError::Validation(ref cause) => cause,
DescribeAutomationStepExecutionsError::Credentials(ref err) => err.description(),
DescribeAutomationStepExecutionsError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeAutomationStepExecutionsError::ParseError(ref cause) => cause,
DescribeAutomationStepExecutionsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeAvailablePatchesError {
InternalServerError(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeAvailablePatchesError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeAvailablePatchesError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return DescribeAvailablePatchesError::InternalServerError(String::from(
error_message,
))
}
"ValidationException" => {
return DescribeAvailablePatchesError::Validation(error_message.to_string())
}
_ => {}
}
}
return DescribeAvailablePatchesError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DescribeAvailablePatchesError {
fn from(err: serde_json::error::Error) -> DescribeAvailablePatchesError {
DescribeAvailablePatchesError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DescribeAvailablePatchesError {
fn from(err: CredentialsError) -> DescribeAvailablePatchesError {
DescribeAvailablePatchesError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeAvailablePatchesError {
fn from(err: HttpDispatchError) -> DescribeAvailablePatchesError {
DescribeAvailablePatchesError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeAvailablePatchesError {
fn from(err: io::Error) -> DescribeAvailablePatchesError {
DescribeAvailablePatchesError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeAvailablePatchesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeAvailablePatchesError {
fn description(&self) -> &str {
match *self {
DescribeAvailablePatchesError::InternalServerError(ref cause) => cause,
DescribeAvailablePatchesError::Validation(ref cause) => cause,
DescribeAvailablePatchesError::Credentials(ref err) => err.description(),
DescribeAvailablePatchesError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeAvailablePatchesError::ParseError(ref cause) => cause,
DescribeAvailablePatchesError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeDocumentError {
InternalServerError(String),
InvalidDocument(String),
InvalidDocumentVersion(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeDocumentError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeDocumentError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return DescribeDocumentError::InternalServerError(String::from(error_message))
}
"InvalidDocument" => {
return DescribeDocumentError::InvalidDocument(String::from(error_message))
}
"InvalidDocumentVersion" => {
return DescribeDocumentError::InvalidDocumentVersion(String::from(
error_message,
))
}
"ValidationException" => {
return DescribeDocumentError::Validation(error_message.to_string())
}
_ => {}
}
}
return DescribeDocumentError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DescribeDocumentError {
fn from(err: serde_json::error::Error) -> DescribeDocumentError {
DescribeDocumentError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DescribeDocumentError {
fn from(err: CredentialsError) -> DescribeDocumentError {
DescribeDocumentError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeDocumentError {
fn from(err: HttpDispatchError) -> DescribeDocumentError {
DescribeDocumentError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeDocumentError {
fn from(err: io::Error) -> DescribeDocumentError {
DescribeDocumentError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeDocumentError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDocumentError {
fn description(&self) -> &str {
match *self {
DescribeDocumentError::InternalServerError(ref cause) => cause,
DescribeDocumentError::InvalidDocument(ref cause) => cause,
DescribeDocumentError::InvalidDocumentVersion(ref cause) => cause,
DescribeDocumentError::Validation(ref cause) => cause,
DescribeDocumentError::Credentials(ref err) => err.description(),
DescribeDocumentError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
DescribeDocumentError::ParseError(ref cause) => cause,
DescribeDocumentError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeDocumentPermissionError {
InternalServerError(String),
InvalidDocument(String),
InvalidPermissionType(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeDocumentPermissionError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeDocumentPermissionError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return DescribeDocumentPermissionError::InternalServerError(String::from(
error_message,
))
}
"InvalidDocument" => {
return DescribeDocumentPermissionError::InvalidDocument(String::from(
error_message,
))
}
"InvalidPermissionType" => {
return DescribeDocumentPermissionError::InvalidPermissionType(String::from(
error_message,
))
}
"ValidationException" => {
return DescribeDocumentPermissionError::Validation(error_message.to_string())
}
_ => {}
}
}
return DescribeDocumentPermissionError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DescribeDocumentPermissionError {
fn from(err: serde_json::error::Error) -> DescribeDocumentPermissionError {
DescribeDocumentPermissionError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DescribeDocumentPermissionError {
fn from(err: CredentialsError) -> DescribeDocumentPermissionError {
DescribeDocumentPermissionError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeDocumentPermissionError {
fn from(err: HttpDispatchError) -> DescribeDocumentPermissionError {
DescribeDocumentPermissionError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeDocumentPermissionError {
fn from(err: io::Error) -> DescribeDocumentPermissionError {
DescribeDocumentPermissionError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeDocumentPermissionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDocumentPermissionError {
fn description(&self) -> &str {
match *self {
DescribeDocumentPermissionError::InternalServerError(ref cause) => cause,
DescribeDocumentPermissionError::InvalidDocument(ref cause) => cause,
DescribeDocumentPermissionError::InvalidPermissionType(ref cause) => cause,
DescribeDocumentPermissionError::Validation(ref cause) => cause,
DescribeDocumentPermissionError::Credentials(ref err) => err.description(),
DescribeDocumentPermissionError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeDocumentPermissionError::ParseError(ref cause) => cause,
DescribeDocumentPermissionError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeEffectiveInstanceAssociationsError {
InternalServerError(String),
InvalidInstanceId(String),
InvalidNextToken(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeEffectiveInstanceAssociationsError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeEffectiveInstanceAssociationsError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return DescribeEffectiveInstanceAssociationsError::InternalServerError(
String::from(error_message),
)
}
"InvalidInstanceId" => {
return DescribeEffectiveInstanceAssociationsError::InvalidInstanceId(
String::from(error_message),
)
}
"InvalidNextToken" => {
return DescribeEffectiveInstanceAssociationsError::InvalidNextToken(
String::from(error_message),
)
}
"ValidationException" => {
return DescribeEffectiveInstanceAssociationsError::Validation(
error_message.to_string(),
)
}
_ => {}
}
}
return DescribeEffectiveInstanceAssociationsError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DescribeEffectiveInstanceAssociationsError {
fn from(err: serde_json::error::Error) -> DescribeEffectiveInstanceAssociationsError {
DescribeEffectiveInstanceAssociationsError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DescribeEffectiveInstanceAssociationsError {
fn from(err: CredentialsError) -> DescribeEffectiveInstanceAssociationsError {
DescribeEffectiveInstanceAssociationsError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeEffectiveInstanceAssociationsError {
fn from(err: HttpDispatchError) -> DescribeEffectiveInstanceAssociationsError {
DescribeEffectiveInstanceAssociationsError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeEffectiveInstanceAssociationsError {
fn from(err: io::Error) -> DescribeEffectiveInstanceAssociationsError {
DescribeEffectiveInstanceAssociationsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeEffectiveInstanceAssociationsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeEffectiveInstanceAssociationsError {
fn description(&self) -> &str {
match *self {
DescribeEffectiveInstanceAssociationsError::InternalServerError(ref cause) => cause,
DescribeEffectiveInstanceAssociationsError::InvalidInstanceId(ref cause) => cause,
DescribeEffectiveInstanceAssociationsError::InvalidNextToken(ref cause) => cause,
DescribeEffectiveInstanceAssociationsError::Validation(ref cause) => cause,
DescribeEffectiveInstanceAssociationsError::Credentials(ref err) => err.description(),
DescribeEffectiveInstanceAssociationsError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeEffectiveInstanceAssociationsError::ParseError(ref cause) => cause,
DescribeEffectiveInstanceAssociationsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeEffectivePatchesForPatchBaselineError {
DoesNotExist(String),
InternalServerError(String),
InvalidResourceId(String),
UnsupportedOperatingSystem(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeEffectivePatchesForPatchBaselineError {
pub fn from_response(
res: BufferedHttpResponse,
) -> DescribeEffectivePatchesForPatchBaselineError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"DoesNotExistException" => {
return DescribeEffectivePatchesForPatchBaselineError::DoesNotExist(
String::from(error_message),
)
}
"InternalServerError" => {
return DescribeEffectivePatchesForPatchBaselineError::InternalServerError(
String::from(error_message),
)
}
"InvalidResourceId" => {
return DescribeEffectivePatchesForPatchBaselineError::InvalidResourceId(
String::from(error_message),
)
}
"UnsupportedOperatingSystem" => {
return DescribeEffectivePatchesForPatchBaselineError::UnsupportedOperatingSystem(
String::from(error_message),
)
}
"ValidationException" => {
return DescribeEffectivePatchesForPatchBaselineError::Validation(
error_message.to_string(),
)
}
_ => {}
}
}
return DescribeEffectivePatchesForPatchBaselineError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DescribeEffectivePatchesForPatchBaselineError {
fn from(err: serde_json::error::Error) -> DescribeEffectivePatchesForPatchBaselineError {
DescribeEffectivePatchesForPatchBaselineError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DescribeEffectivePatchesForPatchBaselineError {
fn from(err: CredentialsError) -> DescribeEffectivePatchesForPatchBaselineError {
DescribeEffectivePatchesForPatchBaselineError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeEffectivePatchesForPatchBaselineError {
fn from(err: HttpDispatchError) -> DescribeEffectivePatchesForPatchBaselineError {
DescribeEffectivePatchesForPatchBaselineError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeEffectivePatchesForPatchBaselineError {
fn from(err: io::Error) -> DescribeEffectivePatchesForPatchBaselineError {
DescribeEffectivePatchesForPatchBaselineError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeEffectivePatchesForPatchBaselineError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeEffectivePatchesForPatchBaselineError {
fn description(&self) -> &str {
match *self {
DescribeEffectivePatchesForPatchBaselineError::DoesNotExist(ref cause) => cause,
DescribeEffectivePatchesForPatchBaselineError::InternalServerError(ref cause) => cause,
DescribeEffectivePatchesForPatchBaselineError::InvalidResourceId(ref cause) => cause,
DescribeEffectivePatchesForPatchBaselineError::UnsupportedOperatingSystem(
ref cause,
) => cause,
DescribeEffectivePatchesForPatchBaselineError::Validation(ref cause) => cause,
DescribeEffectivePatchesForPatchBaselineError::Credentials(ref err) => {
err.description()
}
DescribeEffectivePatchesForPatchBaselineError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeEffectivePatchesForPatchBaselineError::ParseError(ref cause) => cause,
DescribeEffectivePatchesForPatchBaselineError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeInstanceAssociationsStatusError {
InternalServerError(String),
InvalidInstanceId(String),
InvalidNextToken(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeInstanceAssociationsStatusError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeInstanceAssociationsStatusError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return DescribeInstanceAssociationsStatusError::InternalServerError(
String::from(error_message),
)
}
"InvalidInstanceId" => {
return DescribeInstanceAssociationsStatusError::InvalidInstanceId(String::from(
error_message,
))
}
"InvalidNextToken" => {
return DescribeInstanceAssociationsStatusError::InvalidNextToken(String::from(
error_message,
))
}
"ValidationException" => {
return DescribeInstanceAssociationsStatusError::Validation(
error_message.to_string(),
)
}
_ => {}
}
}
return DescribeInstanceAssociationsStatusError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DescribeInstanceAssociationsStatusError {
fn from(err: serde_json::error::Error) -> DescribeInstanceAssociationsStatusError {
DescribeInstanceAssociationsStatusError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DescribeInstanceAssociationsStatusError {
fn from(err: CredentialsError) -> DescribeInstanceAssociationsStatusError {
DescribeInstanceAssociationsStatusError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeInstanceAssociationsStatusError {
fn from(err: HttpDispatchError) -> DescribeInstanceAssociationsStatusError {
DescribeInstanceAssociationsStatusError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeInstanceAssociationsStatusError {
fn from(err: io::Error) -> DescribeInstanceAssociationsStatusError {
DescribeInstanceAssociationsStatusError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeInstanceAssociationsStatusError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeInstanceAssociationsStatusError {
fn description(&self) -> &str {
match *self {
DescribeInstanceAssociationsStatusError::InternalServerError(ref cause) => cause,
DescribeInstanceAssociationsStatusError::InvalidInstanceId(ref cause) => cause,
DescribeInstanceAssociationsStatusError::InvalidNextToken(ref cause) => cause,
DescribeInstanceAssociationsStatusError::Validation(ref cause) => cause,
DescribeInstanceAssociationsStatusError::Credentials(ref err) => err.description(),
DescribeInstanceAssociationsStatusError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeInstanceAssociationsStatusError::ParseError(ref cause) => cause,
DescribeInstanceAssociationsStatusError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeInstanceInformationError {
InternalServerError(String),
InvalidFilterKey(String),
InvalidInstanceId(String),
InvalidInstanceInformationFilterValue(String),
InvalidNextToken(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeInstanceInformationError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeInstanceInformationError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return DescribeInstanceInformationError::InternalServerError(String::from(
error_message,
))
}
"InvalidFilterKey" => {
return DescribeInstanceInformationError::InvalidFilterKey(String::from(
error_message,
))
}
"InvalidInstanceId" => {
return DescribeInstanceInformationError::InvalidInstanceId(String::from(
error_message,
))
}
"InvalidInstanceInformationFilterValue" => {
return DescribeInstanceInformationError::InvalidInstanceInformationFilterValue(
String::from(error_message),
)
}
"InvalidNextToken" => {
return DescribeInstanceInformationError::InvalidNextToken(String::from(
error_message,
))
}
"ValidationException" => {
return DescribeInstanceInformationError::Validation(error_message.to_string())
}
_ => {}
}
}
return DescribeInstanceInformationError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DescribeInstanceInformationError {
fn from(err: serde_json::error::Error) -> DescribeInstanceInformationError {
DescribeInstanceInformationError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DescribeInstanceInformationError {
fn from(err: CredentialsError) -> DescribeInstanceInformationError {
DescribeInstanceInformationError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeInstanceInformationError {
fn from(err: HttpDispatchError) -> DescribeInstanceInformationError {
DescribeInstanceInformationError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeInstanceInformationError {
fn from(err: io::Error) -> DescribeInstanceInformationError {
DescribeInstanceInformationError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeInstanceInformationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeInstanceInformationError {
fn description(&self) -> &str {
match *self {
DescribeInstanceInformationError::InternalServerError(ref cause) => cause,
DescribeInstanceInformationError::InvalidFilterKey(ref cause) => cause,
DescribeInstanceInformationError::InvalidInstanceId(ref cause) => cause,
DescribeInstanceInformationError::InvalidInstanceInformationFilterValue(ref cause) => {
cause
}
DescribeInstanceInformationError::InvalidNextToken(ref cause) => cause,
DescribeInstanceInformationError::Validation(ref cause) => cause,
DescribeInstanceInformationError::Credentials(ref err) => err.description(),
DescribeInstanceInformationError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeInstanceInformationError::ParseError(ref cause) => cause,
DescribeInstanceInformationError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeInstancePatchStatesError {
InternalServerError(String),
InvalidNextToken(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeInstancePatchStatesError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeInstancePatchStatesError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return DescribeInstancePatchStatesError::InternalServerError(String::from(
error_message,
))
}
"InvalidNextToken" => {
return DescribeInstancePatchStatesError::InvalidNextToken(String::from(
error_message,
))
}
"ValidationException" => {
return DescribeInstancePatchStatesError::Validation(error_message.to_string())
}
_ => {}
}
}
return DescribeInstancePatchStatesError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DescribeInstancePatchStatesError {
fn from(err: serde_json::error::Error) -> DescribeInstancePatchStatesError {
DescribeInstancePatchStatesError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DescribeInstancePatchStatesError {
fn from(err: CredentialsError) -> DescribeInstancePatchStatesError {
DescribeInstancePatchStatesError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeInstancePatchStatesError {
fn from(err: HttpDispatchError) -> DescribeInstancePatchStatesError {
DescribeInstancePatchStatesError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeInstancePatchStatesError {
fn from(err: io::Error) -> DescribeInstancePatchStatesError {
DescribeInstancePatchStatesError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeInstancePatchStatesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeInstancePatchStatesError {
fn description(&self) -> &str {
match *self {
DescribeInstancePatchStatesError::InternalServerError(ref cause) => cause,
DescribeInstancePatchStatesError::InvalidNextToken(ref cause) => cause,
DescribeInstancePatchStatesError::Validation(ref cause) => cause,
DescribeInstancePatchStatesError::Credentials(ref err) => err.description(),
DescribeInstancePatchStatesError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeInstancePatchStatesError::ParseError(ref cause) => cause,
DescribeInstancePatchStatesError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeInstancePatchStatesForPatchGroupError {
InternalServerError(String),
InvalidFilter(String),
InvalidNextToken(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeInstancePatchStatesForPatchGroupError {
pub fn from_response(
res: BufferedHttpResponse,
) -> DescribeInstancePatchStatesForPatchGroupError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return DescribeInstancePatchStatesForPatchGroupError::InternalServerError(
String::from(error_message),
)
}
"InvalidFilter" => {
return DescribeInstancePatchStatesForPatchGroupError::InvalidFilter(
String::from(error_message),
)
}
"InvalidNextToken" => {
return DescribeInstancePatchStatesForPatchGroupError::InvalidNextToken(
String::from(error_message),
)
}
"ValidationException" => {
return DescribeInstancePatchStatesForPatchGroupError::Validation(
error_message.to_string(),
)
}
_ => {}
}
}
return DescribeInstancePatchStatesForPatchGroupError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DescribeInstancePatchStatesForPatchGroupError {
fn from(err: serde_json::error::Error) -> DescribeInstancePatchStatesForPatchGroupError {
DescribeInstancePatchStatesForPatchGroupError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DescribeInstancePatchStatesForPatchGroupError {
fn from(err: CredentialsError) -> DescribeInstancePatchStatesForPatchGroupError {
DescribeInstancePatchStatesForPatchGroupError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeInstancePatchStatesForPatchGroupError {
fn from(err: HttpDispatchError) -> DescribeInstancePatchStatesForPatchGroupError {
DescribeInstancePatchStatesForPatchGroupError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeInstancePatchStatesForPatchGroupError {
fn from(err: io::Error) -> DescribeInstancePatchStatesForPatchGroupError {
DescribeInstancePatchStatesForPatchGroupError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeInstancePatchStatesForPatchGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeInstancePatchStatesForPatchGroupError {
fn description(&self) -> &str {
match *self {
DescribeInstancePatchStatesForPatchGroupError::InternalServerError(ref cause) => cause,
DescribeInstancePatchStatesForPatchGroupError::InvalidFilter(ref cause) => cause,
DescribeInstancePatchStatesForPatchGroupError::InvalidNextToken(ref cause) => cause,
DescribeInstancePatchStatesForPatchGroupError::Validation(ref cause) => cause,
DescribeInstancePatchStatesForPatchGroupError::Credentials(ref err) => {
err.description()
}
DescribeInstancePatchStatesForPatchGroupError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeInstancePatchStatesForPatchGroupError::ParseError(ref cause) => cause,
DescribeInstancePatchStatesForPatchGroupError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeInstancePatchesError {
InternalServerError(String),
InvalidFilter(String),
InvalidInstanceId(String),
InvalidNextToken(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeInstancePatchesError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeInstancePatchesError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return DescribeInstancePatchesError::InternalServerError(String::from(
error_message,
))
}
"InvalidFilter" => {
return DescribeInstancePatchesError::InvalidFilter(String::from(error_message))
}
"InvalidInstanceId" => {
return DescribeInstancePatchesError::InvalidInstanceId(String::from(
error_message,
))
}
"InvalidNextToken" => {
return DescribeInstancePatchesError::InvalidNextToken(String::from(
error_message,
))
}
"ValidationException" => {
return DescribeInstancePatchesError::Validation(error_message.to_string())
}
_ => {}
}
}
return DescribeInstancePatchesError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DescribeInstancePatchesError {
fn from(err: serde_json::error::Error) -> DescribeInstancePatchesError {
DescribeInstancePatchesError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DescribeInstancePatchesError {
fn from(err: CredentialsError) -> DescribeInstancePatchesError {
DescribeInstancePatchesError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeInstancePatchesError {
fn from(err: HttpDispatchError) -> DescribeInstancePatchesError {
DescribeInstancePatchesError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeInstancePatchesError {
fn from(err: io::Error) -> DescribeInstancePatchesError {
DescribeInstancePatchesError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeInstancePatchesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeInstancePatchesError {
fn description(&self) -> &str {
match *self {
DescribeInstancePatchesError::InternalServerError(ref cause) => cause,
DescribeInstancePatchesError::InvalidFilter(ref cause) => cause,
DescribeInstancePatchesError::InvalidInstanceId(ref cause) => cause,
DescribeInstancePatchesError::InvalidNextToken(ref cause) => cause,
DescribeInstancePatchesError::Validation(ref cause) => cause,
DescribeInstancePatchesError::Credentials(ref err) => err.description(),
DescribeInstancePatchesError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeInstancePatchesError::ParseError(ref cause) => cause,
DescribeInstancePatchesError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeInventoryDeletionsError {
InternalServerError(String),
InvalidDeletionId(String),
InvalidNextToken(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeInventoryDeletionsError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeInventoryDeletionsError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return DescribeInventoryDeletionsError::InternalServerError(String::from(
error_message,
))
}
"InvalidDeletionIdException" => {
return DescribeInventoryDeletionsError::InvalidDeletionId(String::from(
error_message,
))
}
"InvalidNextToken" => {
return DescribeInventoryDeletionsError::InvalidNextToken(String::from(
error_message,
))
}
"ValidationException" => {
return DescribeInventoryDeletionsError::Validation(error_message.to_string())
}
_ => {}
}
}
return DescribeInventoryDeletionsError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DescribeInventoryDeletionsError {
fn from(err: serde_json::error::Error) -> DescribeInventoryDeletionsError {
DescribeInventoryDeletionsError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DescribeInventoryDeletionsError {
fn from(err: CredentialsError) -> DescribeInventoryDeletionsError {
DescribeInventoryDeletionsError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeInventoryDeletionsError {
fn from(err: HttpDispatchError) -> DescribeInventoryDeletionsError {
DescribeInventoryDeletionsError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeInventoryDeletionsError {
fn from(err: io::Error) -> DescribeInventoryDeletionsError {
DescribeInventoryDeletionsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeInventoryDeletionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeInventoryDeletionsError {
fn description(&self) -> &str {
match *self {
DescribeInventoryDeletionsError::InternalServerError(ref cause) => cause,
DescribeInventoryDeletionsError::InvalidDeletionId(ref cause) => cause,
DescribeInventoryDeletionsError::InvalidNextToken(ref cause) => cause,
DescribeInventoryDeletionsError::Validation(ref cause) => cause,
DescribeInventoryDeletionsError::Credentials(ref err) => err.description(),
DescribeInventoryDeletionsError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeInventoryDeletionsError::ParseError(ref cause) => cause,
DescribeInventoryDeletionsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeMaintenanceWindowExecutionTaskInvocationsError {
DoesNotExist(String),
InternalServerError(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeMaintenanceWindowExecutionTaskInvocationsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> DescribeMaintenanceWindowExecutionTaskInvocationsError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"DoesNotExistException" => return DescribeMaintenanceWindowExecutionTaskInvocationsError::DoesNotExist(String::from(error_message)),
"InternalServerError" => return DescribeMaintenanceWindowExecutionTaskInvocationsError::InternalServerError(String::from(error_message)),
"ValidationException" => return DescribeMaintenanceWindowExecutionTaskInvocationsError::Validation(error_message.to_string()),
_ => {}
}
}
return DescribeMaintenanceWindowExecutionTaskInvocationsError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DescribeMaintenanceWindowExecutionTaskInvocationsError {
fn from(
err: serde_json::error::Error,
) -> DescribeMaintenanceWindowExecutionTaskInvocationsError {
DescribeMaintenanceWindowExecutionTaskInvocationsError::ParseError(
err.description().to_string(),
)
}
}
impl From<CredentialsError> for DescribeMaintenanceWindowExecutionTaskInvocationsError {
fn from(err: CredentialsError) -> DescribeMaintenanceWindowExecutionTaskInvocationsError {
DescribeMaintenanceWindowExecutionTaskInvocationsError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeMaintenanceWindowExecutionTaskInvocationsError {
fn from(err: HttpDispatchError) -> DescribeMaintenanceWindowExecutionTaskInvocationsError {
DescribeMaintenanceWindowExecutionTaskInvocationsError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeMaintenanceWindowExecutionTaskInvocationsError {
fn from(err: io::Error) -> DescribeMaintenanceWindowExecutionTaskInvocationsError {
DescribeMaintenanceWindowExecutionTaskInvocationsError::HttpDispatch(
HttpDispatchError::from(err),
)
}
}
impl fmt::Display for DescribeMaintenanceWindowExecutionTaskInvocationsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeMaintenanceWindowExecutionTaskInvocationsError {
fn description(&self) -> &str {
match *self {
DescribeMaintenanceWindowExecutionTaskInvocationsError::DoesNotExist(ref cause) => {
cause
}
DescribeMaintenanceWindowExecutionTaskInvocationsError::InternalServerError(
ref cause,
) => cause,
DescribeMaintenanceWindowExecutionTaskInvocationsError::Validation(ref cause) => cause,
DescribeMaintenanceWindowExecutionTaskInvocationsError::Credentials(ref err) => {
err.description()
}
DescribeMaintenanceWindowExecutionTaskInvocationsError::HttpDispatch(
ref dispatch_error,
) => dispatch_error.description(),
DescribeMaintenanceWindowExecutionTaskInvocationsError::ParseError(ref cause) => cause,
DescribeMaintenanceWindowExecutionTaskInvocationsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeMaintenanceWindowExecutionTasksError {
DoesNotExist(String),
InternalServerError(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeMaintenanceWindowExecutionTasksError {
pub fn from_response(
res: BufferedHttpResponse,
) -> DescribeMaintenanceWindowExecutionTasksError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"DoesNotExistException" => {
return DescribeMaintenanceWindowExecutionTasksError::DoesNotExist(String::from(
error_message,
))
}
"InternalServerError" => {
return DescribeMaintenanceWindowExecutionTasksError::InternalServerError(
String::from(error_message),
)
}
"ValidationException" => {
return DescribeMaintenanceWindowExecutionTasksError::Validation(
error_message.to_string(),
)
}
_ => {}
}
}
return DescribeMaintenanceWindowExecutionTasksError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DescribeMaintenanceWindowExecutionTasksError {
fn from(err: serde_json::error::Error) -> DescribeMaintenanceWindowExecutionTasksError {
DescribeMaintenanceWindowExecutionTasksError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DescribeMaintenanceWindowExecutionTasksError {
fn from(err: CredentialsError) -> DescribeMaintenanceWindowExecutionTasksError {
DescribeMaintenanceWindowExecutionTasksError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeMaintenanceWindowExecutionTasksError {
fn from(err: HttpDispatchError) -> DescribeMaintenanceWindowExecutionTasksError {
DescribeMaintenanceWindowExecutionTasksError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeMaintenanceWindowExecutionTasksError {
fn from(err: io::Error) -> DescribeMaintenanceWindowExecutionTasksError {
DescribeMaintenanceWindowExecutionTasksError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeMaintenanceWindowExecutionTasksError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeMaintenanceWindowExecutionTasksError {
fn description(&self) -> &str {
match *self {
DescribeMaintenanceWindowExecutionTasksError::DoesNotExist(ref cause) => cause,
DescribeMaintenanceWindowExecutionTasksError::InternalServerError(ref cause) => cause,
DescribeMaintenanceWindowExecutionTasksError::Validation(ref cause) => cause,
DescribeMaintenanceWindowExecutionTasksError::Credentials(ref err) => err.description(),
DescribeMaintenanceWindowExecutionTasksError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeMaintenanceWindowExecutionTasksError::ParseError(ref cause) => cause,
DescribeMaintenanceWindowExecutionTasksError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeMaintenanceWindowExecutionsError {
InternalServerError(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeMaintenanceWindowExecutionsError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeMaintenanceWindowExecutionsError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return DescribeMaintenanceWindowExecutionsError::InternalServerError(
String::from(error_message),
)
}
"ValidationException" => {
return DescribeMaintenanceWindowExecutionsError::Validation(
error_message.to_string(),
)
}
_ => {}
}
}
return DescribeMaintenanceWindowExecutionsError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DescribeMaintenanceWindowExecutionsError {
fn from(err: serde_json::error::Error) -> DescribeMaintenanceWindowExecutionsError {
DescribeMaintenanceWindowExecutionsError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DescribeMaintenanceWindowExecutionsError {
fn from(err: CredentialsError) -> DescribeMaintenanceWindowExecutionsError {
DescribeMaintenanceWindowExecutionsError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeMaintenanceWindowExecutionsError {
fn from(err: HttpDispatchError) -> DescribeMaintenanceWindowExecutionsError {
DescribeMaintenanceWindowExecutionsError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeMaintenanceWindowExecutionsError {
fn from(err: io::Error) -> DescribeMaintenanceWindowExecutionsError {
DescribeMaintenanceWindowExecutionsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeMaintenanceWindowExecutionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeMaintenanceWindowExecutionsError {
fn description(&self) -> &str {
match *self {
DescribeMaintenanceWindowExecutionsError::InternalServerError(ref cause) => cause,
DescribeMaintenanceWindowExecutionsError::Validation(ref cause) => cause,
DescribeMaintenanceWindowExecutionsError::Credentials(ref err) => err.description(),
DescribeMaintenanceWindowExecutionsError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeMaintenanceWindowExecutionsError::ParseError(ref cause) => cause,
DescribeMaintenanceWindowExecutionsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeMaintenanceWindowTargetsError {
DoesNotExist(String),
InternalServerError(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeMaintenanceWindowTargetsError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeMaintenanceWindowTargetsError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"DoesNotExistException" => {
return DescribeMaintenanceWindowTargetsError::DoesNotExist(String::from(
error_message,
))
}
"InternalServerError" => {
return DescribeMaintenanceWindowTargetsError::InternalServerError(String::from(
error_message,
))
}
"ValidationException" => {
return DescribeMaintenanceWindowTargetsError::Validation(
error_message.to_string(),
)
}
_ => {}
}
}
return DescribeMaintenanceWindowTargetsError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DescribeMaintenanceWindowTargetsError {
fn from(err: serde_json::error::Error) -> DescribeMaintenanceWindowTargetsError {
DescribeMaintenanceWindowTargetsError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DescribeMaintenanceWindowTargetsError {
fn from(err: CredentialsError) -> DescribeMaintenanceWindowTargetsError {
DescribeMaintenanceWindowTargetsError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeMaintenanceWindowTargetsError {
fn from(err: HttpDispatchError) -> DescribeMaintenanceWindowTargetsError {
DescribeMaintenanceWindowTargetsError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeMaintenanceWindowTargetsError {
fn from(err: io::Error) -> DescribeMaintenanceWindowTargetsError {
DescribeMaintenanceWindowTargetsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeMaintenanceWindowTargetsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeMaintenanceWindowTargetsError {
fn description(&self) -> &str {
match *self {
DescribeMaintenanceWindowTargetsError::DoesNotExist(ref cause) => cause,
DescribeMaintenanceWindowTargetsError::InternalServerError(ref cause) => cause,
DescribeMaintenanceWindowTargetsError::Validation(ref cause) => cause,
DescribeMaintenanceWindowTargetsError::Credentials(ref err) => err.description(),
DescribeMaintenanceWindowTargetsError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeMaintenanceWindowTargetsError::ParseError(ref cause) => cause,
DescribeMaintenanceWindowTargetsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeMaintenanceWindowTasksError {
DoesNotExist(String),
InternalServerError(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeMaintenanceWindowTasksError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeMaintenanceWindowTasksError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"DoesNotExistException" => {
return DescribeMaintenanceWindowTasksError::DoesNotExist(String::from(
error_message,
))
}
"InternalServerError" => {
return DescribeMaintenanceWindowTasksError::InternalServerError(String::from(
error_message,
))
}
"ValidationException" => {
return DescribeMaintenanceWindowTasksError::Validation(
error_message.to_string(),
)
}
_ => {}
}
}
return DescribeMaintenanceWindowTasksError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DescribeMaintenanceWindowTasksError {
fn from(err: serde_json::error::Error) -> DescribeMaintenanceWindowTasksError {
DescribeMaintenanceWindowTasksError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DescribeMaintenanceWindowTasksError {
fn from(err: CredentialsError) -> DescribeMaintenanceWindowTasksError {
DescribeMaintenanceWindowTasksError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeMaintenanceWindowTasksError {
fn from(err: HttpDispatchError) -> DescribeMaintenanceWindowTasksError {
DescribeMaintenanceWindowTasksError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeMaintenanceWindowTasksError {
fn from(err: io::Error) -> DescribeMaintenanceWindowTasksError {
DescribeMaintenanceWindowTasksError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeMaintenanceWindowTasksError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeMaintenanceWindowTasksError {
fn description(&self) -> &str {
match *self {
DescribeMaintenanceWindowTasksError::DoesNotExist(ref cause) => cause,
DescribeMaintenanceWindowTasksError::InternalServerError(ref cause) => cause,
DescribeMaintenanceWindowTasksError::Validation(ref cause) => cause,
DescribeMaintenanceWindowTasksError::Credentials(ref err) => err.description(),
DescribeMaintenanceWindowTasksError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeMaintenanceWindowTasksError::ParseError(ref cause) => cause,
DescribeMaintenanceWindowTasksError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeMaintenanceWindowsError {
InternalServerError(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeMaintenanceWindowsError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeMaintenanceWindowsError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return DescribeMaintenanceWindowsError::InternalServerError(String::from(
error_message,
))
}
"ValidationException" => {
return DescribeMaintenanceWindowsError::Validation(error_message.to_string())
}
_ => {}
}
}
return DescribeMaintenanceWindowsError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DescribeMaintenanceWindowsError {
fn from(err: serde_json::error::Error) -> DescribeMaintenanceWindowsError {
DescribeMaintenanceWindowsError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DescribeMaintenanceWindowsError {
fn from(err: CredentialsError) -> DescribeMaintenanceWindowsError {
DescribeMaintenanceWindowsError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeMaintenanceWindowsError {
fn from(err: HttpDispatchError) -> DescribeMaintenanceWindowsError {
DescribeMaintenanceWindowsError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeMaintenanceWindowsError {
fn from(err: io::Error) -> DescribeMaintenanceWindowsError {
DescribeMaintenanceWindowsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeMaintenanceWindowsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeMaintenanceWindowsError {
fn description(&self) -> &str {
match *self {
DescribeMaintenanceWindowsError::InternalServerError(ref cause) => cause,
DescribeMaintenanceWindowsError::Validation(ref cause) => cause,
DescribeMaintenanceWindowsError::Credentials(ref err) => err.description(),
DescribeMaintenanceWindowsError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeMaintenanceWindowsError::ParseError(ref cause) => cause,
DescribeMaintenanceWindowsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeParametersError {
InternalServerError(String),
InvalidFilterKey(String),
InvalidFilterOption(String),
InvalidFilterValue(String),
InvalidNextToken(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeParametersError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeParametersError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return DescribeParametersError::InternalServerError(String::from(error_message))
}
"InvalidFilterKey" => {
return DescribeParametersError::InvalidFilterKey(String::from(error_message))
}
"InvalidFilterOption" => {
return DescribeParametersError::InvalidFilterOption(String::from(error_message))
}
"InvalidFilterValue" => {
return DescribeParametersError::InvalidFilterValue(String::from(error_message))
}
"InvalidNextToken" => {
return DescribeParametersError::InvalidNextToken(String::from(error_message))
}
"ValidationException" => {
return DescribeParametersError::Validation(error_message.to_string())
}
_ => {}
}
}
return DescribeParametersError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DescribeParametersError {
fn from(err: serde_json::error::Error) -> DescribeParametersError {
DescribeParametersError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DescribeParametersError {
fn from(err: CredentialsError) -> DescribeParametersError {
DescribeParametersError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeParametersError {
fn from(err: HttpDispatchError) -> DescribeParametersError {
DescribeParametersError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeParametersError {
fn from(err: io::Error) -> DescribeParametersError {
DescribeParametersError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeParametersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeParametersError {
fn description(&self) -> &str {
match *self {
DescribeParametersError::InternalServerError(ref cause) => cause,
DescribeParametersError::InvalidFilterKey(ref cause) => cause,
DescribeParametersError::InvalidFilterOption(ref cause) => cause,
DescribeParametersError::InvalidFilterValue(ref cause) => cause,
DescribeParametersError::InvalidNextToken(ref cause) => cause,
DescribeParametersError::Validation(ref cause) => cause,
DescribeParametersError::Credentials(ref err) => err.description(),
DescribeParametersError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeParametersError::ParseError(ref cause) => cause,
DescribeParametersError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribePatchBaselinesError {
InternalServerError(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribePatchBaselinesError {
pub fn from_response(res: BufferedHttpResponse) -> DescribePatchBaselinesError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return DescribePatchBaselinesError::InternalServerError(String::from(
error_message,
))
}
"ValidationException" => {
return DescribePatchBaselinesError::Validation(error_message.to_string())
}
_ => {}
}
}
return DescribePatchBaselinesError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DescribePatchBaselinesError {
fn from(err: serde_json::error::Error) -> DescribePatchBaselinesError {
DescribePatchBaselinesError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DescribePatchBaselinesError {
fn from(err: CredentialsError) -> DescribePatchBaselinesError {
DescribePatchBaselinesError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribePatchBaselinesError {
fn from(err: HttpDispatchError) -> DescribePatchBaselinesError {
DescribePatchBaselinesError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribePatchBaselinesError {
fn from(err: io::Error) -> DescribePatchBaselinesError {
DescribePatchBaselinesError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribePatchBaselinesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribePatchBaselinesError {
fn description(&self) -> &str {
match *self {
DescribePatchBaselinesError::InternalServerError(ref cause) => cause,
DescribePatchBaselinesError::Validation(ref cause) => cause,
DescribePatchBaselinesError::Credentials(ref err) => err.description(),
DescribePatchBaselinesError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribePatchBaselinesError::ParseError(ref cause) => cause,
DescribePatchBaselinesError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribePatchGroupStateError {
InternalServerError(String),
InvalidNextToken(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribePatchGroupStateError {
pub fn from_response(res: BufferedHttpResponse) -> DescribePatchGroupStateError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return DescribePatchGroupStateError::InternalServerError(String::from(
error_message,
))
}
"InvalidNextToken" => {
return DescribePatchGroupStateError::InvalidNextToken(String::from(
error_message,
))
}
"ValidationException" => {
return DescribePatchGroupStateError::Validation(error_message.to_string())
}
_ => {}
}
}
return DescribePatchGroupStateError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DescribePatchGroupStateError {
fn from(err: serde_json::error::Error) -> DescribePatchGroupStateError {
DescribePatchGroupStateError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DescribePatchGroupStateError {
fn from(err: CredentialsError) -> DescribePatchGroupStateError {
DescribePatchGroupStateError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribePatchGroupStateError {
fn from(err: HttpDispatchError) -> DescribePatchGroupStateError {
DescribePatchGroupStateError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribePatchGroupStateError {
fn from(err: io::Error) -> DescribePatchGroupStateError {
DescribePatchGroupStateError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribePatchGroupStateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribePatchGroupStateError {
fn description(&self) -> &str {
match *self {
DescribePatchGroupStateError::InternalServerError(ref cause) => cause,
DescribePatchGroupStateError::InvalidNextToken(ref cause) => cause,
DescribePatchGroupStateError::Validation(ref cause) => cause,
DescribePatchGroupStateError::Credentials(ref err) => err.description(),
DescribePatchGroupStateError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribePatchGroupStateError::ParseError(ref cause) => cause,
DescribePatchGroupStateError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribePatchGroupsError {
InternalServerError(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribePatchGroupsError {
pub fn from_response(res: BufferedHttpResponse) -> DescribePatchGroupsError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return DescribePatchGroupsError::InternalServerError(String::from(
error_message,
))
}
"ValidationException" => {
return DescribePatchGroupsError::Validation(error_message.to_string())
}
_ => {}
}
}
return DescribePatchGroupsError::Unknown(res);
}
}
impl From<serde_json::error::Error> for DescribePatchGroupsError {
fn from(err: serde_json::error::Error) -> DescribePatchGroupsError {
DescribePatchGroupsError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for DescribePatchGroupsError {
fn from(err: CredentialsError) -> DescribePatchGroupsError {
DescribePatchGroupsError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribePatchGroupsError {
fn from(err: HttpDispatchError) -> DescribePatchGroupsError {
DescribePatchGroupsError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribePatchGroupsError {
fn from(err: io::Error) -> DescribePatchGroupsError {
DescribePatchGroupsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribePatchGroupsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribePatchGroupsError {
fn description(&self) -> &str {
match *self {
DescribePatchGroupsError::InternalServerError(ref cause) => cause,
DescribePatchGroupsError::Validation(ref cause) => cause,
DescribePatchGroupsError::Credentials(ref err) => err.description(),
DescribePatchGroupsError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribePatchGroupsError::ParseError(ref cause) => cause,
DescribePatchGroupsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetAutomationExecutionError {
AutomationExecutionNotFound(String),
InternalServerError(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl GetAutomationExecutionError {
pub fn from_response(res: BufferedHttpResponse) -> GetAutomationExecutionError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"AutomationExecutionNotFoundException" => {
return GetAutomationExecutionError::AutomationExecutionNotFound(String::from(
error_message,
))
}
"InternalServerError" => {
return GetAutomationExecutionError::InternalServerError(String::from(
error_message,
))
}
"ValidationException" => {
return GetAutomationExecutionError::Validation(error_message.to_string())
}
_ => {}
}
}
return GetAutomationExecutionError::Unknown(res);
}
}
impl From<serde_json::error::Error> for GetAutomationExecutionError {
fn from(err: serde_json::error::Error) -> GetAutomationExecutionError {
GetAutomationExecutionError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for GetAutomationExecutionError {
fn from(err: CredentialsError) -> GetAutomationExecutionError {
GetAutomationExecutionError::Credentials(err)
}
}
impl From<HttpDispatchError> for GetAutomationExecutionError {
fn from(err: HttpDispatchError) -> GetAutomationExecutionError {
GetAutomationExecutionError::HttpDispatch(err)
}
}
impl From<io::Error> for GetAutomationExecutionError {
fn from(err: io::Error) -> GetAutomationExecutionError {
GetAutomationExecutionError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for GetAutomationExecutionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetAutomationExecutionError {
fn description(&self) -> &str {
match *self {
GetAutomationExecutionError::AutomationExecutionNotFound(ref cause) => cause,
GetAutomationExecutionError::InternalServerError(ref cause) => cause,
GetAutomationExecutionError::Validation(ref cause) => cause,
GetAutomationExecutionError::Credentials(ref err) => err.description(),
GetAutomationExecutionError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
GetAutomationExecutionError::ParseError(ref cause) => cause,
GetAutomationExecutionError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetCommandInvocationError {
InternalServerError(String),
InvalidCommandId(String),
InvalidInstanceId(String),
InvalidPluginName(String),
InvocationDoesNotExist(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl GetCommandInvocationError {
pub fn from_response(res: BufferedHttpResponse) -> GetCommandInvocationError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return GetCommandInvocationError::InternalServerError(String::from(
error_message,
))
}
"InvalidCommandId" => {
return GetCommandInvocationError::InvalidCommandId(String::from(error_message))
}
"InvalidInstanceId" => {
return GetCommandInvocationError::InvalidInstanceId(String::from(error_message))
}
"InvalidPluginName" => {
return GetCommandInvocationError::InvalidPluginName(String::from(error_message))
}
"InvocationDoesNotExist" => {
return GetCommandInvocationError::InvocationDoesNotExist(String::from(
error_message,
))
}
"ValidationException" => {
return GetCommandInvocationError::Validation(error_message.to_string())
}
_ => {}
}
}
return GetCommandInvocationError::Unknown(res);
}
}
impl From<serde_json::error::Error> for GetCommandInvocationError {
fn from(err: serde_json::error::Error) -> GetCommandInvocationError {
GetCommandInvocationError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for GetCommandInvocationError {
fn from(err: CredentialsError) -> GetCommandInvocationError {
GetCommandInvocationError::Credentials(err)
}
}
impl From<HttpDispatchError> for GetCommandInvocationError {
fn from(err: HttpDispatchError) -> GetCommandInvocationError {
GetCommandInvocationError::HttpDispatch(err)
}
}
impl From<io::Error> for GetCommandInvocationError {
fn from(err: io::Error) -> GetCommandInvocationError {
GetCommandInvocationError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for GetCommandInvocationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetCommandInvocationError {
fn description(&self) -> &str {
match *self {
GetCommandInvocationError::InternalServerError(ref cause) => cause,
GetCommandInvocationError::InvalidCommandId(ref cause) => cause,
GetCommandInvocationError::InvalidInstanceId(ref cause) => cause,
GetCommandInvocationError::InvalidPluginName(ref cause) => cause,
GetCommandInvocationError::InvocationDoesNotExist(ref cause) => cause,
GetCommandInvocationError::Validation(ref cause) => cause,
GetCommandInvocationError::Credentials(ref err) => err.description(),
GetCommandInvocationError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
GetCommandInvocationError::ParseError(ref cause) => cause,
GetCommandInvocationError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetDefaultPatchBaselineError {
InternalServerError(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl GetDefaultPatchBaselineError {
pub fn from_response(res: BufferedHttpResponse) -> GetDefaultPatchBaselineError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return GetDefaultPatchBaselineError::InternalServerError(String::from(
error_message,
))
}
"ValidationException" => {
return GetDefaultPatchBaselineError::Validation(error_message.to_string())
}
_ => {}
}
}
return GetDefaultPatchBaselineError::Unknown(res);
}
}
impl From<serde_json::error::Error> for GetDefaultPatchBaselineError {
fn from(err: serde_json::error::Error) -> GetDefaultPatchBaselineError {
GetDefaultPatchBaselineError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for GetDefaultPatchBaselineError {
fn from(err: CredentialsError) -> GetDefaultPatchBaselineError {
GetDefaultPatchBaselineError::Credentials(err)
}
}
impl From<HttpDispatchError> for GetDefaultPatchBaselineError {
fn from(err: HttpDispatchError) -> GetDefaultPatchBaselineError {
GetDefaultPatchBaselineError::HttpDispatch(err)
}
}
impl From<io::Error> for GetDefaultPatchBaselineError {
fn from(err: io::Error) -> GetDefaultPatchBaselineError {
GetDefaultPatchBaselineError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for GetDefaultPatchBaselineError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetDefaultPatchBaselineError {
fn description(&self) -> &str {
match *self {
GetDefaultPatchBaselineError::InternalServerError(ref cause) => cause,
GetDefaultPatchBaselineError::Validation(ref cause) => cause,
GetDefaultPatchBaselineError::Credentials(ref err) => err.description(),
GetDefaultPatchBaselineError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
GetDefaultPatchBaselineError::ParseError(ref cause) => cause,
GetDefaultPatchBaselineError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetDeployablePatchSnapshotForInstanceError {
InternalServerError(String),
UnsupportedOperatingSystem(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl GetDeployablePatchSnapshotForInstanceError {
pub fn from_response(res: BufferedHttpResponse) -> GetDeployablePatchSnapshotForInstanceError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return GetDeployablePatchSnapshotForInstanceError::InternalServerError(
String::from(error_message),
)
}
"UnsupportedOperatingSystem" => {
return GetDeployablePatchSnapshotForInstanceError::UnsupportedOperatingSystem(
String::from(error_message),
)
}
"ValidationException" => {
return GetDeployablePatchSnapshotForInstanceError::Validation(
error_message.to_string(),
)
}
_ => {}
}
}
return GetDeployablePatchSnapshotForInstanceError::Unknown(res);
}
}
impl From<serde_json::error::Error> for GetDeployablePatchSnapshotForInstanceError {
fn from(err: serde_json::error::Error) -> GetDeployablePatchSnapshotForInstanceError {
GetDeployablePatchSnapshotForInstanceError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for GetDeployablePatchSnapshotForInstanceError {
fn from(err: CredentialsError) -> GetDeployablePatchSnapshotForInstanceError {
GetDeployablePatchSnapshotForInstanceError::Credentials(err)
}
}
impl From<HttpDispatchError> for GetDeployablePatchSnapshotForInstanceError {
fn from(err: HttpDispatchError) -> GetDeployablePatchSnapshotForInstanceError {
GetDeployablePatchSnapshotForInstanceError::HttpDispatch(err)
}
}
impl From<io::Error> for GetDeployablePatchSnapshotForInstanceError {
fn from(err: io::Error) -> GetDeployablePatchSnapshotForInstanceError {
GetDeployablePatchSnapshotForInstanceError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for GetDeployablePatchSnapshotForInstanceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetDeployablePatchSnapshotForInstanceError {
fn description(&self) -> &str {
match *self {
GetDeployablePatchSnapshotForInstanceError::InternalServerError(ref cause) => cause,
GetDeployablePatchSnapshotForInstanceError::UnsupportedOperatingSystem(ref cause) => {
cause
}
GetDeployablePatchSnapshotForInstanceError::Validation(ref cause) => cause,
GetDeployablePatchSnapshotForInstanceError::Credentials(ref err) => err.description(),
GetDeployablePatchSnapshotForInstanceError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
GetDeployablePatchSnapshotForInstanceError::ParseError(ref cause) => cause,
GetDeployablePatchSnapshotForInstanceError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetDocumentError {
InternalServerError(String),
InvalidDocument(String),
InvalidDocumentVersion(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl GetDocumentError {
pub fn from_response(res: BufferedHttpResponse) -> GetDocumentError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return GetDocumentError::InternalServerError(String::from(error_message))
}
"InvalidDocument" => {
return GetDocumentError::InvalidDocument(String::from(error_message))
}
"InvalidDocumentVersion" => {
return GetDocumentError::InvalidDocumentVersion(String::from(error_message))
}
"ValidationException" => {
return GetDocumentError::Validation(error_message.to_string())
}
_ => {}
}
}
return GetDocumentError::Unknown(res);
}
}
impl From<serde_json::error::Error> for GetDocumentError {
fn from(err: serde_json::error::Error) -> GetDocumentError {
GetDocumentError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for GetDocumentError {
fn from(err: CredentialsError) -> GetDocumentError {
GetDocumentError::Credentials(err)
}
}
impl From<HttpDispatchError> for GetDocumentError {
fn from(err: HttpDispatchError) -> GetDocumentError {
GetDocumentError::HttpDispatch(err)
}
}
impl From<io::Error> for GetDocumentError {
fn from(err: io::Error) -> GetDocumentError {
GetDocumentError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for GetDocumentError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetDocumentError {
fn description(&self) -> &str {
match *self {
GetDocumentError::InternalServerError(ref cause) => cause,
GetDocumentError::InvalidDocument(ref cause) => cause,
GetDocumentError::InvalidDocumentVersion(ref cause) => cause,
GetDocumentError::Validation(ref cause) => cause,
GetDocumentError::Credentials(ref err) => err.description(),
GetDocumentError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
GetDocumentError::ParseError(ref cause) => cause,
GetDocumentError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetInventoryError {
InternalServerError(String),
InvalidFilter(String),
InvalidNextToken(String),
InvalidResultAttribute(String),
InvalidTypeName(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl GetInventoryError {
pub fn from_response(res: BufferedHttpResponse) -> GetInventoryError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return GetInventoryError::InternalServerError(String::from(error_message))
}
"InvalidFilter" => {
return GetInventoryError::InvalidFilter(String::from(error_message))
}
"InvalidNextToken" => {
return GetInventoryError::InvalidNextToken(String::from(error_message))
}
"InvalidResultAttributeException" => {
return GetInventoryError::InvalidResultAttribute(String::from(error_message))
}
"InvalidTypeNameException" => {
return GetInventoryError::InvalidTypeName(String::from(error_message))
}
"ValidationException" => {
return GetInventoryError::Validation(error_message.to_string())
}
_ => {}
}
}
return GetInventoryError::Unknown(res);
}
}
impl From<serde_json::error::Error> for GetInventoryError {
fn from(err: serde_json::error::Error) -> GetInventoryError {
GetInventoryError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for GetInventoryError {
fn from(err: CredentialsError) -> GetInventoryError {
GetInventoryError::Credentials(err)
}
}
impl From<HttpDispatchError> for GetInventoryError {
fn from(err: HttpDispatchError) -> GetInventoryError {
GetInventoryError::HttpDispatch(err)
}
}
impl From<io::Error> for GetInventoryError {
fn from(err: io::Error) -> GetInventoryError {
GetInventoryError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for GetInventoryError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetInventoryError {
fn description(&self) -> &str {
match *self {
GetInventoryError::InternalServerError(ref cause) => cause,
GetInventoryError::InvalidFilter(ref cause) => cause,
GetInventoryError::InvalidNextToken(ref cause) => cause,
GetInventoryError::InvalidResultAttribute(ref cause) => cause,
GetInventoryError::InvalidTypeName(ref cause) => cause,
GetInventoryError::Validation(ref cause) => cause,
GetInventoryError::Credentials(ref err) => err.description(),
GetInventoryError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
GetInventoryError::ParseError(ref cause) => cause,
GetInventoryError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetInventorySchemaError {
InternalServerError(String),
InvalidNextToken(String),
InvalidTypeName(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl GetInventorySchemaError {
pub fn from_response(res: BufferedHttpResponse) -> GetInventorySchemaError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return GetInventorySchemaError::InternalServerError(String::from(error_message))
}
"InvalidNextToken" => {
return GetInventorySchemaError::InvalidNextToken(String::from(error_message))
}
"InvalidTypeNameException" => {
return GetInventorySchemaError::InvalidTypeName(String::from(error_message))
}
"ValidationException" => {
return GetInventorySchemaError::Validation(error_message.to_string())
}
_ => {}
}
}
return GetInventorySchemaError::Unknown(res);
}
}
impl From<serde_json::error::Error> for GetInventorySchemaError {
fn from(err: serde_json::error::Error) -> GetInventorySchemaError {
GetInventorySchemaError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for GetInventorySchemaError {
fn from(err: CredentialsError) -> GetInventorySchemaError {
GetInventorySchemaError::Credentials(err)
}
}
impl From<HttpDispatchError> for GetInventorySchemaError {
fn from(err: HttpDispatchError) -> GetInventorySchemaError {
GetInventorySchemaError::HttpDispatch(err)
}
}
impl From<io::Error> for GetInventorySchemaError {
fn from(err: io::Error) -> GetInventorySchemaError {
GetInventorySchemaError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for GetInventorySchemaError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetInventorySchemaError {
fn description(&self) -> &str {
match *self {
GetInventorySchemaError::InternalServerError(ref cause) => cause,
GetInventorySchemaError::InvalidNextToken(ref cause) => cause,
GetInventorySchemaError::InvalidTypeName(ref cause) => cause,
GetInventorySchemaError::Validation(ref cause) => cause,
GetInventorySchemaError::Credentials(ref err) => err.description(),
GetInventorySchemaError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
GetInventorySchemaError::ParseError(ref cause) => cause,
GetInventorySchemaError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetMaintenanceWindowError {
DoesNotExist(String),
InternalServerError(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl GetMaintenanceWindowError {
pub fn from_response(res: BufferedHttpResponse) -> GetMaintenanceWindowError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"DoesNotExistException" => {
return GetMaintenanceWindowError::DoesNotExist(String::from(error_message))
}
"InternalServerError" => {
return GetMaintenanceWindowError::InternalServerError(String::from(
error_message,
))
}
"ValidationException" => {
return GetMaintenanceWindowError::Validation(error_message.to_string())
}
_ => {}
}
}
return GetMaintenanceWindowError::Unknown(res);
}
}
impl From<serde_json::error::Error> for GetMaintenanceWindowError {
fn from(err: serde_json::error::Error) -> GetMaintenanceWindowError {
GetMaintenanceWindowError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for GetMaintenanceWindowError {
fn from(err: CredentialsError) -> GetMaintenanceWindowError {
GetMaintenanceWindowError::Credentials(err)
}
}
impl From<HttpDispatchError> for GetMaintenanceWindowError {
fn from(err: HttpDispatchError) -> GetMaintenanceWindowError {
GetMaintenanceWindowError::HttpDispatch(err)
}
}
impl From<io::Error> for GetMaintenanceWindowError {
fn from(err: io::Error) -> GetMaintenanceWindowError {
GetMaintenanceWindowError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for GetMaintenanceWindowError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetMaintenanceWindowError {
fn description(&self) -> &str {
match *self {
GetMaintenanceWindowError::DoesNotExist(ref cause) => cause,
GetMaintenanceWindowError::InternalServerError(ref cause) => cause,
GetMaintenanceWindowError::Validation(ref cause) => cause,
GetMaintenanceWindowError::Credentials(ref err) => err.description(),
GetMaintenanceWindowError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
GetMaintenanceWindowError::ParseError(ref cause) => cause,
GetMaintenanceWindowError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetMaintenanceWindowExecutionError {
DoesNotExist(String),
InternalServerError(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl GetMaintenanceWindowExecutionError {
pub fn from_response(res: BufferedHttpResponse) -> GetMaintenanceWindowExecutionError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"DoesNotExistException" => {
return GetMaintenanceWindowExecutionError::DoesNotExist(String::from(
error_message,
))
}
"InternalServerError" => {
return GetMaintenanceWindowExecutionError::InternalServerError(String::from(
error_message,
))
}
"ValidationException" => {
return GetMaintenanceWindowExecutionError::Validation(error_message.to_string())
}
_ => {}
}
}
return GetMaintenanceWindowExecutionError::Unknown(res);
}
}
impl From<serde_json::error::Error> for GetMaintenanceWindowExecutionError {
fn from(err: serde_json::error::Error) -> GetMaintenanceWindowExecutionError {
GetMaintenanceWindowExecutionError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for GetMaintenanceWindowExecutionError {
fn from(err: CredentialsError) -> GetMaintenanceWindowExecutionError {
GetMaintenanceWindowExecutionError::Credentials(err)
}
}
impl From<HttpDispatchError> for GetMaintenanceWindowExecutionError {
fn from(err: HttpDispatchError) -> GetMaintenanceWindowExecutionError {
GetMaintenanceWindowExecutionError::HttpDispatch(err)
}
}
impl From<io::Error> for GetMaintenanceWindowExecutionError {
fn from(err: io::Error) -> GetMaintenanceWindowExecutionError {
GetMaintenanceWindowExecutionError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for GetMaintenanceWindowExecutionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetMaintenanceWindowExecutionError {
fn description(&self) -> &str {
match *self {
GetMaintenanceWindowExecutionError::DoesNotExist(ref cause) => cause,
GetMaintenanceWindowExecutionError::InternalServerError(ref cause) => cause,
GetMaintenanceWindowExecutionError::Validation(ref cause) => cause,
GetMaintenanceWindowExecutionError::Credentials(ref err) => err.description(),
GetMaintenanceWindowExecutionError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
GetMaintenanceWindowExecutionError::ParseError(ref cause) => cause,
GetMaintenanceWindowExecutionError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetMaintenanceWindowExecutionTaskError {
DoesNotExist(String),
InternalServerError(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl GetMaintenanceWindowExecutionTaskError {
pub fn from_response(res: BufferedHttpResponse) -> GetMaintenanceWindowExecutionTaskError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"DoesNotExistException" => {
return GetMaintenanceWindowExecutionTaskError::DoesNotExist(String::from(
error_message,
))
}
"InternalServerError" => {
return GetMaintenanceWindowExecutionTaskError::InternalServerError(
String::from(error_message),
)
}
"ValidationException" => {
return GetMaintenanceWindowExecutionTaskError::Validation(
error_message.to_string(),
)
}
_ => {}
}
}
return GetMaintenanceWindowExecutionTaskError::Unknown(res);
}
}
impl From<serde_json::error::Error> for GetMaintenanceWindowExecutionTaskError {
fn from(err: serde_json::error::Error) -> GetMaintenanceWindowExecutionTaskError {
GetMaintenanceWindowExecutionTaskError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for GetMaintenanceWindowExecutionTaskError {
fn from(err: CredentialsError) -> GetMaintenanceWindowExecutionTaskError {
GetMaintenanceWindowExecutionTaskError::Credentials(err)
}
}
impl From<HttpDispatchError> for GetMaintenanceWindowExecutionTaskError {
fn from(err: HttpDispatchError) -> GetMaintenanceWindowExecutionTaskError {
GetMaintenanceWindowExecutionTaskError::HttpDispatch(err)
}
}
impl From<io::Error> for GetMaintenanceWindowExecutionTaskError {
fn from(err: io::Error) -> GetMaintenanceWindowExecutionTaskError {
GetMaintenanceWindowExecutionTaskError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for GetMaintenanceWindowExecutionTaskError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetMaintenanceWindowExecutionTaskError {
fn description(&self) -> &str {
match *self {
GetMaintenanceWindowExecutionTaskError::DoesNotExist(ref cause) => cause,
GetMaintenanceWindowExecutionTaskError::InternalServerError(ref cause) => cause,
GetMaintenanceWindowExecutionTaskError::Validation(ref cause) => cause,
GetMaintenanceWindowExecutionTaskError::Credentials(ref err) => err.description(),
GetMaintenanceWindowExecutionTaskError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
GetMaintenanceWindowExecutionTaskError::ParseError(ref cause) => cause,
GetMaintenanceWindowExecutionTaskError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetMaintenanceWindowExecutionTaskInvocationError {
DoesNotExist(String),
InternalServerError(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl GetMaintenanceWindowExecutionTaskInvocationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> GetMaintenanceWindowExecutionTaskInvocationError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"DoesNotExistException" => {
return GetMaintenanceWindowExecutionTaskInvocationError::DoesNotExist(
String::from(error_message),
)
}
"InternalServerError" => {
return GetMaintenanceWindowExecutionTaskInvocationError::InternalServerError(
String::from(error_message),
)
}
"ValidationException" => {
return GetMaintenanceWindowExecutionTaskInvocationError::Validation(
error_message.to_string(),
)
}
_ => {}
}
}
return GetMaintenanceWindowExecutionTaskInvocationError::Unknown(res);
}
}
impl From<serde_json::error::Error> for GetMaintenanceWindowExecutionTaskInvocationError {
fn from(err: serde_json::error::Error) -> GetMaintenanceWindowExecutionTaskInvocationError {
GetMaintenanceWindowExecutionTaskInvocationError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for GetMaintenanceWindowExecutionTaskInvocationError {
fn from(err: CredentialsError) -> GetMaintenanceWindowExecutionTaskInvocationError {
GetMaintenanceWindowExecutionTaskInvocationError::Credentials(err)
}
}
impl From<HttpDispatchError> for GetMaintenanceWindowExecutionTaskInvocationError {
fn from(err: HttpDispatchError) -> GetMaintenanceWindowExecutionTaskInvocationError {
GetMaintenanceWindowExecutionTaskInvocationError::HttpDispatch(err)
}
}
impl From<io::Error> for GetMaintenanceWindowExecutionTaskInvocationError {
fn from(err: io::Error) -> GetMaintenanceWindowExecutionTaskInvocationError {
GetMaintenanceWindowExecutionTaskInvocationError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for GetMaintenanceWindowExecutionTaskInvocationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetMaintenanceWindowExecutionTaskInvocationError {
fn description(&self) -> &str {
match *self {
GetMaintenanceWindowExecutionTaskInvocationError::DoesNotExist(ref cause) => cause,
GetMaintenanceWindowExecutionTaskInvocationError::InternalServerError(ref cause) => {
cause
}
GetMaintenanceWindowExecutionTaskInvocationError::Validation(ref cause) => cause,
GetMaintenanceWindowExecutionTaskInvocationError::Credentials(ref err) => {
err.description()
}
GetMaintenanceWindowExecutionTaskInvocationError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
GetMaintenanceWindowExecutionTaskInvocationError::ParseError(ref cause) => cause,
GetMaintenanceWindowExecutionTaskInvocationError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetMaintenanceWindowTaskError {
DoesNotExist(String),
InternalServerError(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl GetMaintenanceWindowTaskError {
pub fn from_response(res: BufferedHttpResponse) -> GetMaintenanceWindowTaskError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"DoesNotExistException" => {
return GetMaintenanceWindowTaskError::DoesNotExist(String::from(error_message))
}
"InternalServerError" => {
return GetMaintenanceWindowTaskError::InternalServerError(String::from(
error_message,
))
}
"ValidationException" => {
return GetMaintenanceWindowTaskError::Validation(error_message.to_string())
}
_ => {}
}
}
return GetMaintenanceWindowTaskError::Unknown(res);
}
}
impl From<serde_json::error::Error> for GetMaintenanceWindowTaskError {
fn from(err: serde_json::error::Error) -> GetMaintenanceWindowTaskError {
GetMaintenanceWindowTaskError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for GetMaintenanceWindowTaskError {
fn from(err: CredentialsError) -> GetMaintenanceWindowTaskError {
GetMaintenanceWindowTaskError::Credentials(err)
}
}
impl From<HttpDispatchError> for GetMaintenanceWindowTaskError {
fn from(err: HttpDispatchError) -> GetMaintenanceWindowTaskError {
GetMaintenanceWindowTaskError::HttpDispatch(err)
}
}
impl From<io::Error> for GetMaintenanceWindowTaskError {
fn from(err: io::Error) -> GetMaintenanceWindowTaskError {
GetMaintenanceWindowTaskError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for GetMaintenanceWindowTaskError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetMaintenanceWindowTaskError {
fn description(&self) -> &str {
match *self {
GetMaintenanceWindowTaskError::DoesNotExist(ref cause) => cause,
GetMaintenanceWindowTaskError::InternalServerError(ref cause) => cause,
GetMaintenanceWindowTaskError::Validation(ref cause) => cause,
GetMaintenanceWindowTaskError::Credentials(ref err) => err.description(),
GetMaintenanceWindowTaskError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
GetMaintenanceWindowTaskError::ParseError(ref cause) => cause,
GetMaintenanceWindowTaskError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetParameterError {
InternalServerError(String),
InvalidKeyId(String),
ParameterNotFound(String),
ParameterVersionNotFound(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl GetParameterError {
pub fn from_response(res: BufferedHttpResponse) -> GetParameterError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return GetParameterError::InternalServerError(String::from(error_message))
}
"InvalidKeyId" => {
return GetParameterError::InvalidKeyId(String::from(error_message))
}
"ParameterNotFound" => {
return GetParameterError::ParameterNotFound(String::from(error_message))
}
"ParameterVersionNotFound" => {
return GetParameterError::ParameterVersionNotFound(String::from(error_message))
}
"ValidationException" => {
return GetParameterError::Validation(error_message.to_string())
}
_ => {}
}
}
return GetParameterError::Unknown(res);
}
}
impl From<serde_json::error::Error> for GetParameterError {
fn from(err: serde_json::error::Error) -> GetParameterError {
GetParameterError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for GetParameterError {
fn from(err: CredentialsError) -> GetParameterError {
GetParameterError::Credentials(err)
}
}
impl From<HttpDispatchError> for GetParameterError {
fn from(err: HttpDispatchError) -> GetParameterError {
GetParameterError::HttpDispatch(err)
}
}
impl From<io::Error> for GetParameterError {
fn from(err: io::Error) -> GetParameterError {
GetParameterError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for GetParameterError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetParameterError {
fn description(&self) -> &str {
match *self {
GetParameterError::InternalServerError(ref cause) => cause,
GetParameterError::InvalidKeyId(ref cause) => cause,
GetParameterError::ParameterNotFound(ref cause) => cause,
GetParameterError::ParameterVersionNotFound(ref cause) => cause,
GetParameterError::Validation(ref cause) => cause,
GetParameterError::Credentials(ref err) => err.description(),
GetParameterError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
GetParameterError::ParseError(ref cause) => cause,
GetParameterError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetParameterHistoryError {
InternalServerError(String),
InvalidKeyId(String),
InvalidNextToken(String),
ParameterNotFound(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl GetParameterHistoryError {
pub fn from_response(res: BufferedHttpResponse) -> GetParameterHistoryError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return GetParameterHistoryError::InternalServerError(String::from(
error_message,
))
}
"InvalidKeyId" => {
return GetParameterHistoryError::InvalidKeyId(String::from(error_message))
}
"InvalidNextToken" => {
return GetParameterHistoryError::InvalidNextToken(String::from(error_message))
}
"ParameterNotFound" => {
return GetParameterHistoryError::ParameterNotFound(String::from(error_message))
}
"ValidationException" => {
return GetParameterHistoryError::Validation(error_message.to_string())
}
_ => {}
}
}
return GetParameterHistoryError::Unknown(res);
}
}
impl From<serde_json::error::Error> for GetParameterHistoryError {
fn from(err: serde_json::error::Error) -> GetParameterHistoryError {
GetParameterHistoryError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for GetParameterHistoryError {
fn from(err: CredentialsError) -> GetParameterHistoryError {
GetParameterHistoryError::Credentials(err)
}
}
impl From<HttpDispatchError> for GetParameterHistoryError {
fn from(err: HttpDispatchError) -> GetParameterHistoryError {
GetParameterHistoryError::HttpDispatch(err)
}
}
impl From<io::Error> for GetParameterHistoryError {
fn from(err: io::Error) -> GetParameterHistoryError {
GetParameterHistoryError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for GetParameterHistoryError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetParameterHistoryError {
fn description(&self) -> &str {
match *self {
GetParameterHistoryError::InternalServerError(ref cause) => cause,
GetParameterHistoryError::InvalidKeyId(ref cause) => cause,
GetParameterHistoryError::InvalidNextToken(ref cause) => cause,
GetParameterHistoryError::ParameterNotFound(ref cause) => cause,
GetParameterHistoryError::Validation(ref cause) => cause,
GetParameterHistoryError::Credentials(ref err) => err.description(),
GetParameterHistoryError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
GetParameterHistoryError::ParseError(ref cause) => cause,
GetParameterHistoryError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetParametersError {
InternalServerError(String),
InvalidKeyId(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl GetParametersError {
pub fn from_response(res: BufferedHttpResponse) -> GetParametersError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return GetParametersError::InternalServerError(String::from(error_message))
}
"InvalidKeyId" => {
return GetParametersError::InvalidKeyId(String::from(error_message))
}
"ValidationException" => {
return GetParametersError::Validation(error_message.to_string())
}
_ => {}
}
}
return GetParametersError::Unknown(res);
}
}
impl From<serde_json::error::Error> for GetParametersError {
fn from(err: serde_json::error::Error) -> GetParametersError {
GetParametersError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for GetParametersError {
fn from(err: CredentialsError) -> GetParametersError {
GetParametersError::Credentials(err)
}
}
impl From<HttpDispatchError> for GetParametersError {
fn from(err: HttpDispatchError) -> GetParametersError {
GetParametersError::HttpDispatch(err)
}
}
impl From<io::Error> for GetParametersError {
fn from(err: io::Error) -> GetParametersError {
GetParametersError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for GetParametersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetParametersError {
fn description(&self) -> &str {
match *self {
GetParametersError::InternalServerError(ref cause) => cause,
GetParametersError::InvalidKeyId(ref cause) => cause,
GetParametersError::Validation(ref cause) => cause,
GetParametersError::Credentials(ref err) => err.description(),
GetParametersError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
GetParametersError::ParseError(ref cause) => cause,
GetParametersError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetParametersByPathError {
InternalServerError(String),
InvalidFilterKey(String),
InvalidFilterOption(String),
InvalidFilterValue(String),
InvalidKeyId(String),
InvalidNextToken(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl GetParametersByPathError {
pub fn from_response(res: BufferedHttpResponse) -> GetParametersByPathError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return GetParametersByPathError::InternalServerError(String::from(
error_message,
))
}
"InvalidFilterKey" => {
return GetParametersByPathError::InvalidFilterKey(String::from(error_message))
}
"InvalidFilterOption" => {
return GetParametersByPathError::InvalidFilterOption(String::from(
error_message,
))
}
"InvalidFilterValue" => {
return GetParametersByPathError::InvalidFilterValue(String::from(error_message))
}
"InvalidKeyId" => {
return GetParametersByPathError::InvalidKeyId(String::from(error_message))
}
"InvalidNextToken" => {
return GetParametersByPathError::InvalidNextToken(String::from(error_message))
}
"ValidationException" => {
return GetParametersByPathError::Validation(error_message.to_string())
}
_ => {}
}
}
return GetParametersByPathError::Unknown(res);
}
}
impl From<serde_json::error::Error> for GetParametersByPathError {
fn from(err: serde_json::error::Error) -> GetParametersByPathError {
GetParametersByPathError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for GetParametersByPathError {
fn from(err: CredentialsError) -> GetParametersByPathError {
GetParametersByPathError::Credentials(err)
}
}
impl From<HttpDispatchError> for GetParametersByPathError {
fn from(err: HttpDispatchError) -> GetParametersByPathError {
GetParametersByPathError::HttpDispatch(err)
}
}
impl From<io::Error> for GetParametersByPathError {
fn from(err: io::Error) -> GetParametersByPathError {
GetParametersByPathError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for GetParametersByPathError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetParametersByPathError {
fn description(&self) -> &str {
match *self {
GetParametersByPathError::InternalServerError(ref cause) => cause,
GetParametersByPathError::InvalidFilterKey(ref cause) => cause,
GetParametersByPathError::InvalidFilterOption(ref cause) => cause,
GetParametersByPathError::InvalidFilterValue(ref cause) => cause,
GetParametersByPathError::InvalidKeyId(ref cause) => cause,
GetParametersByPathError::InvalidNextToken(ref cause) => cause,
GetParametersByPathError::Validation(ref cause) => cause,
GetParametersByPathError::Credentials(ref err) => err.description(),
GetParametersByPathError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
GetParametersByPathError::ParseError(ref cause) => cause,
GetParametersByPathError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetPatchBaselineError {
DoesNotExist(String),
InternalServerError(String),
InvalidResourceId(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl GetPatchBaselineError {
pub fn from_response(res: BufferedHttpResponse) -> GetPatchBaselineError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"DoesNotExistException" => {
return GetPatchBaselineError::DoesNotExist(String::from(error_message))
}
"InternalServerError" => {
return GetPatchBaselineError::InternalServerError(String::from(error_message))
}
"InvalidResourceId" => {
return GetPatchBaselineError::InvalidResourceId(String::from(error_message))
}
"ValidationException" => {
return GetPatchBaselineError::Validation(error_message.to_string())
}
_ => {}
}
}
return GetPatchBaselineError::Unknown(res);
}
}
impl From<serde_json::error::Error> for GetPatchBaselineError {
fn from(err: serde_json::error::Error) -> GetPatchBaselineError {
GetPatchBaselineError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for GetPatchBaselineError {
fn from(err: CredentialsError) -> GetPatchBaselineError {
GetPatchBaselineError::Credentials(err)
}
}
impl From<HttpDispatchError> for GetPatchBaselineError {
fn from(err: HttpDispatchError) -> GetPatchBaselineError {
GetPatchBaselineError::HttpDispatch(err)
}
}
impl From<io::Error> for GetPatchBaselineError {
fn from(err: io::Error) -> GetPatchBaselineError {
GetPatchBaselineError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for GetPatchBaselineError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetPatchBaselineError {
fn description(&self) -> &str {
match *self {
GetPatchBaselineError::DoesNotExist(ref cause) => cause,
GetPatchBaselineError::InternalServerError(ref cause) => cause,
GetPatchBaselineError::InvalidResourceId(ref cause) => cause,
GetPatchBaselineError::Validation(ref cause) => cause,
GetPatchBaselineError::Credentials(ref err) => err.description(),
GetPatchBaselineError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
GetPatchBaselineError::ParseError(ref cause) => cause,
GetPatchBaselineError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetPatchBaselineForPatchGroupError {
InternalServerError(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl GetPatchBaselineForPatchGroupError {
pub fn from_response(res: BufferedHttpResponse) -> GetPatchBaselineForPatchGroupError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return GetPatchBaselineForPatchGroupError::InternalServerError(String::from(
error_message,
))
}
"ValidationException" => {
return GetPatchBaselineForPatchGroupError::Validation(error_message.to_string())
}
_ => {}
}
}
return GetPatchBaselineForPatchGroupError::Unknown(res);
}
}
impl From<serde_json::error::Error> for GetPatchBaselineForPatchGroupError {
fn from(err: serde_json::error::Error) -> GetPatchBaselineForPatchGroupError {
GetPatchBaselineForPatchGroupError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for GetPatchBaselineForPatchGroupError {
fn from(err: CredentialsError) -> GetPatchBaselineForPatchGroupError {
GetPatchBaselineForPatchGroupError::Credentials(err)
}
}
impl From<HttpDispatchError> for GetPatchBaselineForPatchGroupError {
fn from(err: HttpDispatchError) -> GetPatchBaselineForPatchGroupError {
GetPatchBaselineForPatchGroupError::HttpDispatch(err)
}
}
impl From<io::Error> for GetPatchBaselineForPatchGroupError {
fn from(err: io::Error) -> GetPatchBaselineForPatchGroupError {
GetPatchBaselineForPatchGroupError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for GetPatchBaselineForPatchGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetPatchBaselineForPatchGroupError {
fn description(&self) -> &str {
match *self {
GetPatchBaselineForPatchGroupError::InternalServerError(ref cause) => cause,
GetPatchBaselineForPatchGroupError::Validation(ref cause) => cause,
GetPatchBaselineForPatchGroupError::Credentials(ref err) => err.description(),
GetPatchBaselineForPatchGroupError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
GetPatchBaselineForPatchGroupError::ParseError(ref cause) => cause,
GetPatchBaselineForPatchGroupError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum LabelParameterVersionError {
InternalServerError(String),
ParameterNotFound(String),
ParameterVersionLabelLimitExceeded(String),
ParameterVersionNotFound(String),
TooManyUpdates(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl LabelParameterVersionError {
pub fn from_response(res: BufferedHttpResponse) -> LabelParameterVersionError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return LabelParameterVersionError::InternalServerError(String::from(
error_message,
))
}
"ParameterNotFound" => {
return LabelParameterVersionError::ParameterNotFound(String::from(
error_message,
))
}
"ParameterVersionLabelLimitExceeded" => {
return LabelParameterVersionError::ParameterVersionLabelLimitExceeded(
String::from(error_message),
)
}
"ParameterVersionNotFound" => {
return LabelParameterVersionError::ParameterVersionNotFound(String::from(
error_message,
))
}
"TooManyUpdates" => {
return LabelParameterVersionError::TooManyUpdates(String::from(error_message))
}
"ValidationException" => {
return LabelParameterVersionError::Validation(error_message.to_string())
}
_ => {}
}
}
return LabelParameterVersionError::Unknown(res);
}
}
impl From<serde_json::error::Error> for LabelParameterVersionError {
fn from(err: serde_json::error::Error) -> LabelParameterVersionError {
LabelParameterVersionError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for LabelParameterVersionError {
fn from(err: CredentialsError) -> LabelParameterVersionError {
LabelParameterVersionError::Credentials(err)
}
}
impl From<HttpDispatchError> for LabelParameterVersionError {
fn from(err: HttpDispatchError) -> LabelParameterVersionError {
LabelParameterVersionError::HttpDispatch(err)
}
}
impl From<io::Error> for LabelParameterVersionError {
fn from(err: io::Error) -> LabelParameterVersionError {
LabelParameterVersionError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for LabelParameterVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for LabelParameterVersionError {
fn description(&self) -> &str {
match *self {
LabelParameterVersionError::InternalServerError(ref cause) => cause,
LabelParameterVersionError::ParameterNotFound(ref cause) => cause,
LabelParameterVersionError::ParameterVersionLabelLimitExceeded(ref cause) => cause,
LabelParameterVersionError::ParameterVersionNotFound(ref cause) => cause,
LabelParameterVersionError::TooManyUpdates(ref cause) => cause,
LabelParameterVersionError::Validation(ref cause) => cause,
LabelParameterVersionError::Credentials(ref err) => err.description(),
LabelParameterVersionError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
LabelParameterVersionError::ParseError(ref cause) => cause,
LabelParameterVersionError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListAssociationVersionsError {
AssociationDoesNotExist(String),
InternalServerError(String),
InvalidNextToken(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl ListAssociationVersionsError {
pub fn from_response(res: BufferedHttpResponse) -> ListAssociationVersionsError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"AssociationDoesNotExist" => {
return ListAssociationVersionsError::AssociationDoesNotExist(String::from(
error_message,
))
}
"InternalServerError" => {
return ListAssociationVersionsError::InternalServerError(String::from(
error_message,
))
}
"InvalidNextToken" => {
return ListAssociationVersionsError::InvalidNextToken(String::from(
error_message,
))
}
"ValidationException" => {
return ListAssociationVersionsError::Validation(error_message.to_string())
}
_ => {}
}
}
return ListAssociationVersionsError::Unknown(res);
}
}
impl From<serde_json::error::Error> for ListAssociationVersionsError {
fn from(err: serde_json::error::Error) -> ListAssociationVersionsError {
ListAssociationVersionsError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for ListAssociationVersionsError {
fn from(err: CredentialsError) -> ListAssociationVersionsError {
ListAssociationVersionsError::Credentials(err)
}
}
impl From<HttpDispatchError> for ListAssociationVersionsError {
fn from(err: HttpDispatchError) -> ListAssociationVersionsError {
ListAssociationVersionsError::HttpDispatch(err)
}
}
impl From<io::Error> for ListAssociationVersionsError {
fn from(err: io::Error) -> ListAssociationVersionsError {
ListAssociationVersionsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for ListAssociationVersionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListAssociationVersionsError {
fn description(&self) -> &str {
match *self {
ListAssociationVersionsError::AssociationDoesNotExist(ref cause) => cause,
ListAssociationVersionsError::InternalServerError(ref cause) => cause,
ListAssociationVersionsError::InvalidNextToken(ref cause) => cause,
ListAssociationVersionsError::Validation(ref cause) => cause,
ListAssociationVersionsError::Credentials(ref err) => err.description(),
ListAssociationVersionsError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
ListAssociationVersionsError::ParseError(ref cause) => cause,
ListAssociationVersionsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListAssociationsError {
InternalServerError(String),
InvalidNextToken(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl ListAssociationsError {
pub fn from_response(res: BufferedHttpResponse) -> ListAssociationsError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return ListAssociationsError::InternalServerError(String::from(error_message))
}
"InvalidNextToken" => {
return ListAssociationsError::InvalidNextToken(String::from(error_message))
}
"ValidationException" => {
return ListAssociationsError::Validation(error_message.to_string())
}
_ => {}
}
}
return ListAssociationsError::Unknown(res);
}
}
impl From<serde_json::error::Error> for ListAssociationsError {
fn from(err: serde_json::error::Error) -> ListAssociationsError {
ListAssociationsError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for ListAssociationsError {
fn from(err: CredentialsError) -> ListAssociationsError {
ListAssociationsError::Credentials(err)
}
}
impl From<HttpDispatchError> for ListAssociationsError {
fn from(err: HttpDispatchError) -> ListAssociationsError {
ListAssociationsError::HttpDispatch(err)
}
}
impl From<io::Error> for ListAssociationsError {
fn from(err: io::Error) -> ListAssociationsError {
ListAssociationsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for ListAssociationsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListAssociationsError {
fn description(&self) -> &str {
match *self {
ListAssociationsError::InternalServerError(ref cause) => cause,
ListAssociationsError::InvalidNextToken(ref cause) => cause,
ListAssociationsError::Validation(ref cause) => cause,
ListAssociationsError::Credentials(ref err) => err.description(),
ListAssociationsError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
ListAssociationsError::ParseError(ref cause) => cause,
ListAssociationsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListCommandInvocationsError {
InternalServerError(String),
InvalidCommandId(String),
InvalidFilterKey(String),
InvalidInstanceId(String),
InvalidNextToken(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl ListCommandInvocationsError {
pub fn from_response(res: BufferedHttpResponse) -> ListCommandInvocationsError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return ListCommandInvocationsError::InternalServerError(String::from(
error_message,
))
}
"InvalidCommandId" => {
return ListCommandInvocationsError::InvalidCommandId(String::from(
error_message,
))
}
"InvalidFilterKey" => {
return ListCommandInvocationsError::InvalidFilterKey(String::from(
error_message,
))
}
"InvalidInstanceId" => {
return ListCommandInvocationsError::InvalidInstanceId(String::from(
error_message,
))
}
"InvalidNextToken" => {
return ListCommandInvocationsError::InvalidNextToken(String::from(
error_message,
))
}
"ValidationException" => {
return ListCommandInvocationsError::Validation(error_message.to_string())
}
_ => {}
}
}
return ListCommandInvocationsError::Unknown(res);
}
}
impl From<serde_json::error::Error> for ListCommandInvocationsError {
fn from(err: serde_json::error::Error) -> ListCommandInvocationsError {
ListCommandInvocationsError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for ListCommandInvocationsError {
fn from(err: CredentialsError) -> ListCommandInvocationsError {
ListCommandInvocationsError::Credentials(err)
}
}
impl From<HttpDispatchError> for ListCommandInvocationsError {
fn from(err: HttpDispatchError) -> ListCommandInvocationsError {
ListCommandInvocationsError::HttpDispatch(err)
}
}
impl From<io::Error> for ListCommandInvocationsError {
fn from(err: io::Error) -> ListCommandInvocationsError {
ListCommandInvocationsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for ListCommandInvocationsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListCommandInvocationsError {
fn description(&self) -> &str {
match *self {
ListCommandInvocationsError::InternalServerError(ref cause) => cause,
ListCommandInvocationsError::InvalidCommandId(ref cause) => cause,
ListCommandInvocationsError::InvalidFilterKey(ref cause) => cause,
ListCommandInvocationsError::InvalidInstanceId(ref cause) => cause,
ListCommandInvocationsError::InvalidNextToken(ref cause) => cause,
ListCommandInvocationsError::Validation(ref cause) => cause,
ListCommandInvocationsError::Credentials(ref err) => err.description(),
ListCommandInvocationsError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
ListCommandInvocationsError::ParseError(ref cause) => cause,
ListCommandInvocationsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListCommandsError {
InternalServerError(String),
InvalidCommandId(String),
InvalidFilterKey(String),
InvalidInstanceId(String),
InvalidNextToken(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl ListCommandsError {
pub fn from_response(res: BufferedHttpResponse) -> ListCommandsError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return ListCommandsError::InternalServerError(String::from(error_message))
}
"InvalidCommandId" => {
return ListCommandsError::InvalidCommandId(String::from(error_message))
}
"InvalidFilterKey" => {
return ListCommandsError::InvalidFilterKey(String::from(error_message))
}
"InvalidInstanceId" => {
return ListCommandsError::InvalidInstanceId(String::from(error_message))
}
"InvalidNextToken" => {
return ListCommandsError::InvalidNextToken(String::from(error_message))
}
"ValidationException" => {
return ListCommandsError::Validation(error_message.to_string())
}
_ => {}
}
}
return ListCommandsError::Unknown(res);
}
}
impl From<serde_json::error::Error> for ListCommandsError {
fn from(err: serde_json::error::Error) -> ListCommandsError {
ListCommandsError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for ListCommandsError {
fn from(err: CredentialsError) -> ListCommandsError {
ListCommandsError::Credentials(err)
}
}
impl From<HttpDispatchError> for ListCommandsError {
fn from(err: HttpDispatchError) -> ListCommandsError {
ListCommandsError::HttpDispatch(err)
}
}
impl From<io::Error> for ListCommandsError {
fn from(err: io::Error) -> ListCommandsError {
ListCommandsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for ListCommandsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListCommandsError {
fn description(&self) -> &str {
match *self {
ListCommandsError::InternalServerError(ref cause) => cause,
ListCommandsError::InvalidCommandId(ref cause) => cause,
ListCommandsError::InvalidFilterKey(ref cause) => cause,
ListCommandsError::InvalidInstanceId(ref cause) => cause,
ListCommandsError::InvalidNextToken(ref cause) => cause,
ListCommandsError::Validation(ref cause) => cause,
ListCommandsError::Credentials(ref err) => err.description(),
ListCommandsError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
ListCommandsError::ParseError(ref cause) => cause,
ListCommandsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListComplianceItemsError {
InternalServerError(String),
InvalidFilter(String),
InvalidNextToken(String),
InvalidResourceId(String),
InvalidResourceType(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl ListComplianceItemsError {
pub fn from_response(res: BufferedHttpResponse) -> ListComplianceItemsError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return ListComplianceItemsError::InternalServerError(String::from(
error_message,
))
}
"InvalidFilter" => {
return ListComplianceItemsError::InvalidFilter(String::from(error_message))
}
"InvalidNextToken" => {
return ListComplianceItemsError::InvalidNextToken(String::from(error_message))
}
"InvalidResourceId" => {
return ListComplianceItemsError::InvalidResourceId(String::from(error_message))
}
"InvalidResourceType" => {
return ListComplianceItemsError::InvalidResourceType(String::from(
error_message,
))
}
"ValidationException" => {
return ListComplianceItemsError::Validation(error_message.to_string())
}
_ => {}
}
}
return ListComplianceItemsError::Unknown(res);
}
}
impl From<serde_json::error::Error> for ListComplianceItemsError {
fn from(err: serde_json::error::Error) -> ListComplianceItemsError {
ListComplianceItemsError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for ListComplianceItemsError {
fn from(err: CredentialsError) -> ListComplianceItemsError {
ListComplianceItemsError::Credentials(err)
}
}
impl From<HttpDispatchError> for ListComplianceItemsError {
fn from(err: HttpDispatchError) -> ListComplianceItemsError {
ListComplianceItemsError::HttpDispatch(err)
}
}
impl From<io::Error> for ListComplianceItemsError {
fn from(err: io::Error) -> ListComplianceItemsError {
ListComplianceItemsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for ListComplianceItemsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListComplianceItemsError {
fn description(&self) -> &str {
match *self {
ListComplianceItemsError::InternalServerError(ref cause) => cause,
ListComplianceItemsError::InvalidFilter(ref cause) => cause,
ListComplianceItemsError::InvalidNextToken(ref cause) => cause,
ListComplianceItemsError::InvalidResourceId(ref cause) => cause,
ListComplianceItemsError::InvalidResourceType(ref cause) => cause,
ListComplianceItemsError::Validation(ref cause) => cause,
ListComplianceItemsError::Credentials(ref err) => err.description(),
ListComplianceItemsError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
ListComplianceItemsError::ParseError(ref cause) => cause,
ListComplianceItemsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListComplianceSummariesError {
InternalServerError(String),
InvalidFilter(String),
InvalidNextToken(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl ListComplianceSummariesError {
pub fn from_response(res: BufferedHttpResponse) -> ListComplianceSummariesError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return ListComplianceSummariesError::InternalServerError(String::from(
error_message,
))
}
"InvalidFilter" => {
return ListComplianceSummariesError::InvalidFilter(String::from(error_message))
}
"InvalidNextToken" => {
return ListComplianceSummariesError::InvalidNextToken(String::from(
error_message,
))
}
"ValidationException" => {
return ListComplianceSummariesError::Validation(error_message.to_string())
}
_ => {}
}
}
return ListComplianceSummariesError::Unknown(res);
}
}
impl From<serde_json::error::Error> for ListComplianceSummariesError {
fn from(err: serde_json::error::Error) -> ListComplianceSummariesError {
ListComplianceSummariesError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for ListComplianceSummariesError {
fn from(err: CredentialsError) -> ListComplianceSummariesError {
ListComplianceSummariesError::Credentials(err)
}
}
impl From<HttpDispatchError> for ListComplianceSummariesError {
fn from(err: HttpDispatchError) -> ListComplianceSummariesError {
ListComplianceSummariesError::HttpDispatch(err)
}
}
impl From<io::Error> for ListComplianceSummariesError {
fn from(err: io::Error) -> ListComplianceSummariesError {
ListComplianceSummariesError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for ListComplianceSummariesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListComplianceSummariesError {
fn description(&self) -> &str {
match *self {
ListComplianceSummariesError::InternalServerError(ref cause) => cause,
ListComplianceSummariesError::InvalidFilter(ref cause) => cause,
ListComplianceSummariesError::InvalidNextToken(ref cause) => cause,
ListComplianceSummariesError::Validation(ref cause) => cause,
ListComplianceSummariesError::Credentials(ref err) => err.description(),
ListComplianceSummariesError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
ListComplianceSummariesError::ParseError(ref cause) => cause,
ListComplianceSummariesError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListDocumentVersionsError {
InternalServerError(String),
InvalidDocument(String),
InvalidNextToken(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl ListDocumentVersionsError {
pub fn from_response(res: BufferedHttpResponse) -> ListDocumentVersionsError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return ListDocumentVersionsError::InternalServerError(String::from(
error_message,
))
}
"InvalidDocument" => {
return ListDocumentVersionsError::InvalidDocument(String::from(error_message))
}
"InvalidNextToken" => {
return ListDocumentVersionsError::InvalidNextToken(String::from(error_message))
}
"ValidationException" => {
return ListDocumentVersionsError::Validation(error_message.to_string())
}
_ => {}
}
}
return ListDocumentVersionsError::Unknown(res);
}
}
impl From<serde_json::error::Error> for ListDocumentVersionsError {
fn from(err: serde_json::error::Error) -> ListDocumentVersionsError {
ListDocumentVersionsError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for ListDocumentVersionsError {
fn from(err: CredentialsError) -> ListDocumentVersionsError {
ListDocumentVersionsError::Credentials(err)
}
}
impl From<HttpDispatchError> for ListDocumentVersionsError {
fn from(err: HttpDispatchError) -> ListDocumentVersionsError {
ListDocumentVersionsError::HttpDispatch(err)
}
}
impl From<io::Error> for ListDocumentVersionsError {
fn from(err: io::Error) -> ListDocumentVersionsError {
ListDocumentVersionsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for ListDocumentVersionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListDocumentVersionsError {
fn description(&self) -> &str {
match *self {
ListDocumentVersionsError::InternalServerError(ref cause) => cause,
ListDocumentVersionsError::InvalidDocument(ref cause) => cause,
ListDocumentVersionsError::InvalidNextToken(ref cause) => cause,
ListDocumentVersionsError::Validation(ref cause) => cause,
ListDocumentVersionsError::Credentials(ref err) => err.description(),
ListDocumentVersionsError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
ListDocumentVersionsError::ParseError(ref cause) => cause,
ListDocumentVersionsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListDocumentsError {
InternalServerError(String),
InvalidFilterKey(String),
InvalidNextToken(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl ListDocumentsError {
pub fn from_response(res: BufferedHttpResponse) -> ListDocumentsError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return ListDocumentsError::InternalServerError(String::from(error_message))
}
"InvalidFilterKey" => {
return ListDocumentsError::InvalidFilterKey(String::from(error_message))
}
"InvalidNextToken" => {
return ListDocumentsError::InvalidNextToken(String::from(error_message))
}
"ValidationException" => {
return ListDocumentsError::Validation(error_message.to_string())
}
_ => {}
}
}
return ListDocumentsError::Unknown(res);
}
}
impl From<serde_json::error::Error> for ListDocumentsError {
fn from(err: serde_json::error::Error) -> ListDocumentsError {
ListDocumentsError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for ListDocumentsError {
fn from(err: CredentialsError) -> ListDocumentsError {
ListDocumentsError::Credentials(err)
}
}
impl From<HttpDispatchError> for ListDocumentsError {
fn from(err: HttpDispatchError) -> ListDocumentsError {
ListDocumentsError::HttpDispatch(err)
}
}
impl From<io::Error> for ListDocumentsError {
fn from(err: io::Error) -> ListDocumentsError {
ListDocumentsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for ListDocumentsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListDocumentsError {
fn description(&self) -> &str {
match *self {
ListDocumentsError::InternalServerError(ref cause) => cause,
ListDocumentsError::InvalidFilterKey(ref cause) => cause,
ListDocumentsError::InvalidNextToken(ref cause) => cause,
ListDocumentsError::Validation(ref cause) => cause,
ListDocumentsError::Credentials(ref err) => err.description(),
ListDocumentsError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
ListDocumentsError::ParseError(ref cause) => cause,
ListDocumentsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListInventoryEntriesError {
InternalServerError(String),
InvalidFilter(String),
InvalidInstanceId(String),
InvalidNextToken(String),
InvalidTypeName(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl ListInventoryEntriesError {
pub fn from_response(res: BufferedHttpResponse) -> ListInventoryEntriesError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return ListInventoryEntriesError::InternalServerError(String::from(
error_message,
))
}
"InvalidFilter" => {
return ListInventoryEntriesError::InvalidFilter(String::from(error_message))
}
"InvalidInstanceId" => {
return ListInventoryEntriesError::InvalidInstanceId(String::from(error_message))
}
"InvalidNextToken" => {
return ListInventoryEntriesError::InvalidNextToken(String::from(error_message))
}
"InvalidTypeNameException" => {
return ListInventoryEntriesError::InvalidTypeName(String::from(error_message))
}
"ValidationException" => {
return ListInventoryEntriesError::Validation(error_message.to_string())
}
_ => {}
}
}
return ListInventoryEntriesError::Unknown(res);
}
}
impl From<serde_json::error::Error> for ListInventoryEntriesError {
fn from(err: serde_json::error::Error) -> ListInventoryEntriesError {
ListInventoryEntriesError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for ListInventoryEntriesError {
fn from(err: CredentialsError) -> ListInventoryEntriesError {
ListInventoryEntriesError::Credentials(err)
}
}
impl From<HttpDispatchError> for ListInventoryEntriesError {
fn from(err: HttpDispatchError) -> ListInventoryEntriesError {
ListInventoryEntriesError::HttpDispatch(err)
}
}
impl From<io::Error> for ListInventoryEntriesError {
fn from(err: io::Error) -> ListInventoryEntriesError {
ListInventoryEntriesError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for ListInventoryEntriesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListInventoryEntriesError {
fn description(&self) -> &str {
match *self {
ListInventoryEntriesError::InternalServerError(ref cause) => cause,
ListInventoryEntriesError::InvalidFilter(ref cause) => cause,
ListInventoryEntriesError::InvalidInstanceId(ref cause) => cause,
ListInventoryEntriesError::InvalidNextToken(ref cause) => cause,
ListInventoryEntriesError::InvalidTypeName(ref cause) => cause,
ListInventoryEntriesError::Validation(ref cause) => cause,
ListInventoryEntriesError::Credentials(ref err) => err.description(),
ListInventoryEntriesError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
ListInventoryEntriesError::ParseError(ref cause) => cause,
ListInventoryEntriesError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListResourceComplianceSummariesError {
InternalServerError(String),
InvalidFilter(String),
InvalidNextToken(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl ListResourceComplianceSummariesError {
pub fn from_response(res: BufferedHttpResponse) -> ListResourceComplianceSummariesError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return ListResourceComplianceSummariesError::InternalServerError(String::from(
error_message,
))
}
"InvalidFilter" => {
return ListResourceComplianceSummariesError::InvalidFilter(String::from(
error_message,
))
}
"InvalidNextToken" => {
return ListResourceComplianceSummariesError::InvalidNextToken(String::from(
error_message,
))
}
"ValidationException" => {
return ListResourceComplianceSummariesError::Validation(
error_message.to_string(),
)
}
_ => {}
}
}
return ListResourceComplianceSummariesError::Unknown(res);
}
}
impl From<serde_json::error::Error> for ListResourceComplianceSummariesError {
fn from(err: serde_json::error::Error) -> ListResourceComplianceSummariesError {
ListResourceComplianceSummariesError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for ListResourceComplianceSummariesError {
fn from(err: CredentialsError) -> ListResourceComplianceSummariesError {
ListResourceComplianceSummariesError::Credentials(err)
}
}
impl From<HttpDispatchError> for ListResourceComplianceSummariesError {
fn from(err: HttpDispatchError) -> ListResourceComplianceSummariesError {
ListResourceComplianceSummariesError::HttpDispatch(err)
}
}
impl From<io::Error> for ListResourceComplianceSummariesError {
fn from(err: io::Error) -> ListResourceComplianceSummariesError {
ListResourceComplianceSummariesError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for ListResourceComplianceSummariesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListResourceComplianceSummariesError {
fn description(&self) -> &str {
match *self {
ListResourceComplianceSummariesError::InternalServerError(ref cause) => cause,
ListResourceComplianceSummariesError::InvalidFilter(ref cause) => cause,
ListResourceComplianceSummariesError::InvalidNextToken(ref cause) => cause,
ListResourceComplianceSummariesError::Validation(ref cause) => cause,
ListResourceComplianceSummariesError::Credentials(ref err) => err.description(),
ListResourceComplianceSummariesError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
ListResourceComplianceSummariesError::ParseError(ref cause) => cause,
ListResourceComplianceSummariesError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListResourceDataSyncError {
InternalServerError(String),
InvalidNextToken(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl ListResourceDataSyncError {
pub fn from_response(res: BufferedHttpResponse) -> ListResourceDataSyncError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return ListResourceDataSyncError::InternalServerError(String::from(
error_message,
))
}
"InvalidNextToken" => {
return ListResourceDataSyncError::InvalidNextToken(String::from(error_message))
}
"ValidationException" => {
return ListResourceDataSyncError::Validation(error_message.to_string())
}
_ => {}
}
}
return ListResourceDataSyncError::Unknown(res);
}
}
impl From<serde_json::error::Error> for ListResourceDataSyncError {
fn from(err: serde_json::error::Error) -> ListResourceDataSyncError {
ListResourceDataSyncError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for ListResourceDataSyncError {
fn from(err: CredentialsError) -> ListResourceDataSyncError {
ListResourceDataSyncError::Credentials(err)
}
}
impl From<HttpDispatchError> for ListResourceDataSyncError {
fn from(err: HttpDispatchError) -> ListResourceDataSyncError {
ListResourceDataSyncError::HttpDispatch(err)
}
}
impl From<io::Error> for ListResourceDataSyncError {
fn from(err: io::Error) -> ListResourceDataSyncError {
ListResourceDataSyncError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for ListResourceDataSyncError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListResourceDataSyncError {
fn description(&self) -> &str {
match *self {
ListResourceDataSyncError::InternalServerError(ref cause) => cause,
ListResourceDataSyncError::InvalidNextToken(ref cause) => cause,
ListResourceDataSyncError::Validation(ref cause) => cause,
ListResourceDataSyncError::Credentials(ref err) => err.description(),
ListResourceDataSyncError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
ListResourceDataSyncError::ParseError(ref cause) => cause,
ListResourceDataSyncError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListTagsForResourceError {
InternalServerError(String),
InvalidResourceId(String),
InvalidResourceType(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl ListTagsForResourceError {
pub fn from_response(res: BufferedHttpResponse) -> ListTagsForResourceError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return ListTagsForResourceError::InternalServerError(String::from(
error_message,
))
}
"InvalidResourceId" => {
return ListTagsForResourceError::InvalidResourceId(String::from(error_message))
}
"InvalidResourceType" => {
return ListTagsForResourceError::InvalidResourceType(String::from(
error_message,
))
}
"ValidationException" => {
return ListTagsForResourceError::Validation(error_message.to_string())
}
_ => {}
}
}
return ListTagsForResourceError::Unknown(res);
}
}
impl From<serde_json::error::Error> for ListTagsForResourceError {
fn from(err: serde_json::error::Error) -> ListTagsForResourceError {
ListTagsForResourceError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for ListTagsForResourceError {
fn from(err: CredentialsError) -> ListTagsForResourceError {
ListTagsForResourceError::Credentials(err)
}
}
impl From<HttpDispatchError> for ListTagsForResourceError {
fn from(err: HttpDispatchError) -> ListTagsForResourceError {
ListTagsForResourceError::HttpDispatch(err)
}
}
impl From<io::Error> for ListTagsForResourceError {
fn from(err: io::Error) -> ListTagsForResourceError {
ListTagsForResourceError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for ListTagsForResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListTagsForResourceError {
fn description(&self) -> &str {
match *self {
ListTagsForResourceError::InternalServerError(ref cause) => cause,
ListTagsForResourceError::InvalidResourceId(ref cause) => cause,
ListTagsForResourceError::InvalidResourceType(ref cause) => cause,
ListTagsForResourceError::Validation(ref cause) => cause,
ListTagsForResourceError::Credentials(ref err) => err.description(),
ListTagsForResourceError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
ListTagsForResourceError::ParseError(ref cause) => cause,
ListTagsForResourceError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifyDocumentPermissionError {
DocumentLimitExceeded(String),
DocumentPermissionLimit(String),
InternalServerError(String),
InvalidDocument(String),
InvalidPermissionType(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl ModifyDocumentPermissionError {
pub fn from_response(res: BufferedHttpResponse) -> ModifyDocumentPermissionError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"DocumentLimitExceeded" => {
return ModifyDocumentPermissionError::DocumentLimitExceeded(String::from(
error_message,
))
}
"DocumentPermissionLimit" => {
return ModifyDocumentPermissionError::DocumentPermissionLimit(String::from(
error_message,
))
}
"InternalServerError" => {
return ModifyDocumentPermissionError::InternalServerError(String::from(
error_message,
))
}
"InvalidDocument" => {
return ModifyDocumentPermissionError::InvalidDocument(String::from(
error_message,
))
}
"InvalidPermissionType" => {
return ModifyDocumentPermissionError::InvalidPermissionType(String::from(
error_message,
))
}
"ValidationException" => {
return ModifyDocumentPermissionError::Validation(error_message.to_string())
}
_ => {}
}
}
return ModifyDocumentPermissionError::Unknown(res);
}
}
impl From<serde_json::error::Error> for ModifyDocumentPermissionError {
fn from(err: serde_json::error::Error) -> ModifyDocumentPermissionError {
ModifyDocumentPermissionError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for ModifyDocumentPermissionError {
fn from(err: CredentialsError) -> ModifyDocumentPermissionError {
ModifyDocumentPermissionError::Credentials(err)
}
}
impl From<HttpDispatchError> for ModifyDocumentPermissionError {
fn from(err: HttpDispatchError) -> ModifyDocumentPermissionError {
ModifyDocumentPermissionError::HttpDispatch(err)
}
}
impl From<io::Error> for ModifyDocumentPermissionError {
fn from(err: io::Error) -> ModifyDocumentPermissionError {
ModifyDocumentPermissionError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for ModifyDocumentPermissionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyDocumentPermissionError {
fn description(&self) -> &str {
match *self {
ModifyDocumentPermissionError::DocumentLimitExceeded(ref cause) => cause,
ModifyDocumentPermissionError::DocumentPermissionLimit(ref cause) => cause,
ModifyDocumentPermissionError::InternalServerError(ref cause) => cause,
ModifyDocumentPermissionError::InvalidDocument(ref cause) => cause,
ModifyDocumentPermissionError::InvalidPermissionType(ref cause) => cause,
ModifyDocumentPermissionError::Validation(ref cause) => cause,
ModifyDocumentPermissionError::Credentials(ref err) => err.description(),
ModifyDocumentPermissionError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
ModifyDocumentPermissionError::ParseError(ref cause) => cause,
ModifyDocumentPermissionError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum PutComplianceItemsError {
ComplianceTypeCountLimitExceeded(String),
InternalServerError(String),
InvalidItemContent(String),
InvalidResourceId(String),
InvalidResourceType(String),
ItemSizeLimitExceeded(String),
TotalSizeLimitExceeded(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl PutComplianceItemsError {
pub fn from_response(res: BufferedHttpResponse) -> PutComplianceItemsError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"ComplianceTypeCountLimitExceededException" => {
return PutComplianceItemsError::ComplianceTypeCountLimitExceeded(String::from(
error_message,
))
}
"InternalServerError" => {
return PutComplianceItemsError::InternalServerError(String::from(error_message))
}
"InvalidItemContentException" => {
return PutComplianceItemsError::InvalidItemContent(String::from(error_message))
}
"InvalidResourceId" => {
return PutComplianceItemsError::InvalidResourceId(String::from(error_message))
}
"InvalidResourceType" => {
return PutComplianceItemsError::InvalidResourceType(String::from(error_message))
}
"ItemSizeLimitExceededException" => {
return PutComplianceItemsError::ItemSizeLimitExceeded(String::from(
error_message,
))
}
"TotalSizeLimitExceededException" => {
return PutComplianceItemsError::TotalSizeLimitExceeded(String::from(
error_message,
))
}
"ValidationException" => {
return PutComplianceItemsError::Validation(error_message.to_string())
}
_ => {}
}
}
return PutComplianceItemsError::Unknown(res);
}
}
impl From<serde_json::error::Error> for PutComplianceItemsError {
fn from(err: serde_json::error::Error) -> PutComplianceItemsError {
PutComplianceItemsError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for PutComplianceItemsError {
fn from(err: CredentialsError) -> PutComplianceItemsError {
PutComplianceItemsError::Credentials(err)
}
}
impl From<HttpDispatchError> for PutComplianceItemsError {
fn from(err: HttpDispatchError) -> PutComplianceItemsError {
PutComplianceItemsError::HttpDispatch(err)
}
}
impl From<io::Error> for PutComplianceItemsError {
fn from(err: io::Error) -> PutComplianceItemsError {
PutComplianceItemsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for PutComplianceItemsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PutComplianceItemsError {
fn description(&self) -> &str {
match *self {
PutComplianceItemsError::ComplianceTypeCountLimitExceeded(ref cause) => cause,
PutComplianceItemsError::InternalServerError(ref cause) => cause,
PutComplianceItemsError::InvalidItemContent(ref cause) => cause,
PutComplianceItemsError::InvalidResourceId(ref cause) => cause,
PutComplianceItemsError::InvalidResourceType(ref cause) => cause,
PutComplianceItemsError::ItemSizeLimitExceeded(ref cause) => cause,
PutComplianceItemsError::TotalSizeLimitExceeded(ref cause) => cause,
PutComplianceItemsError::Validation(ref cause) => cause,
PutComplianceItemsError::Credentials(ref err) => err.description(),
PutComplianceItemsError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
PutComplianceItemsError::ParseError(ref cause) => cause,
PutComplianceItemsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum PutInventoryError {
CustomSchemaCountLimitExceeded(String),
InternalServerError(String),
InvalidInstanceId(String),
InvalidInventoryItemContext(String),
InvalidItemContent(String),
InvalidTypeName(String),
ItemContentMismatch(String),
ItemSizeLimitExceeded(String),
SubTypeCountLimitExceeded(String),
TotalSizeLimitExceeded(String),
UnsupportedInventoryItemContext(String),
UnsupportedInventorySchemaVersion(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl PutInventoryError {
pub fn from_response(res: BufferedHttpResponse) -> PutInventoryError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"CustomSchemaCountLimitExceededException" => {
return PutInventoryError::CustomSchemaCountLimitExceeded(String::from(
error_message,
))
}
"InternalServerError" => {
return PutInventoryError::InternalServerError(String::from(error_message))
}
"InvalidInstanceId" => {
return PutInventoryError::InvalidInstanceId(String::from(error_message))
}
"InvalidInventoryItemContextException" => {
return PutInventoryError::InvalidInventoryItemContext(String::from(
error_message,
))
}
"InvalidItemContentException" => {
return PutInventoryError::InvalidItemContent(String::from(error_message))
}
"InvalidTypeNameException" => {
return PutInventoryError::InvalidTypeName(String::from(error_message))
}
"ItemContentMismatchException" => {
return PutInventoryError::ItemContentMismatch(String::from(error_message))
}
"ItemSizeLimitExceededException" => {
return PutInventoryError::ItemSizeLimitExceeded(String::from(error_message))
}
"SubTypeCountLimitExceededException" => {
return PutInventoryError::SubTypeCountLimitExceeded(String::from(error_message))
}
"TotalSizeLimitExceededException" => {
return PutInventoryError::TotalSizeLimitExceeded(String::from(error_message))
}
"UnsupportedInventoryItemContextException" => {
return PutInventoryError::UnsupportedInventoryItemContext(String::from(
error_message,
))
}
"UnsupportedInventorySchemaVersionException" => {
return PutInventoryError::UnsupportedInventorySchemaVersion(String::from(
error_message,
))
}
"ValidationException" => {
return PutInventoryError::Validation(error_message.to_string())
}
_ => {}
}
}
return PutInventoryError::Unknown(res);
}
}
impl From<serde_json::error::Error> for PutInventoryError {
fn from(err: serde_json::error::Error) -> PutInventoryError {
PutInventoryError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for PutInventoryError {
fn from(err: CredentialsError) -> PutInventoryError {
PutInventoryError::Credentials(err)
}
}
impl From<HttpDispatchError> for PutInventoryError {
fn from(err: HttpDispatchError) -> PutInventoryError {
PutInventoryError::HttpDispatch(err)
}
}
impl From<io::Error> for PutInventoryError {
fn from(err: io::Error) -> PutInventoryError {
PutInventoryError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for PutInventoryError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PutInventoryError {
fn description(&self) -> &str {
match *self {
PutInventoryError::CustomSchemaCountLimitExceeded(ref cause) => cause,
PutInventoryError::InternalServerError(ref cause) => cause,
PutInventoryError::InvalidInstanceId(ref cause) => cause,
PutInventoryError::InvalidInventoryItemContext(ref cause) => cause,
PutInventoryError::InvalidItemContent(ref cause) => cause,
PutInventoryError::InvalidTypeName(ref cause) => cause,
PutInventoryError::ItemContentMismatch(ref cause) => cause,
PutInventoryError::ItemSizeLimitExceeded(ref cause) => cause,
PutInventoryError::SubTypeCountLimitExceeded(ref cause) => cause,
PutInventoryError::TotalSizeLimitExceeded(ref cause) => cause,
PutInventoryError::UnsupportedInventoryItemContext(ref cause) => cause,
PutInventoryError::UnsupportedInventorySchemaVersion(ref cause) => cause,
PutInventoryError::Validation(ref cause) => cause,
PutInventoryError::Credentials(ref err) => err.description(),
PutInventoryError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
PutInventoryError::ParseError(ref cause) => cause,
PutInventoryError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum PutParameterError {
HierarchyLevelLimitExceeded(String),
HierarchyTypeMismatch(String),
InternalServerError(String),
InvalidAllowedPattern(String),
InvalidKeyId(String),
ParameterAlreadyExists(String),
ParameterLimitExceeded(String),
ParameterMaxVersionLimitExceeded(String),
ParameterPatternMismatch(String),
TooManyUpdates(String),
UnsupportedParameterType(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl PutParameterError {
pub fn from_response(res: BufferedHttpResponse) -> PutParameterError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"HierarchyLevelLimitExceededException" => {
return PutParameterError::HierarchyLevelLimitExceeded(String::from(
error_message,
))
}
"HierarchyTypeMismatchException" => {
return PutParameterError::HierarchyTypeMismatch(String::from(error_message))
}
"InternalServerError" => {
return PutParameterError::InternalServerError(String::from(error_message))
}
"InvalidAllowedPatternException" => {
return PutParameterError::InvalidAllowedPattern(String::from(error_message))
}
"InvalidKeyId" => {
return PutParameterError::InvalidKeyId(String::from(error_message))
}
"ParameterAlreadyExists" => {
return PutParameterError::ParameterAlreadyExists(String::from(error_message))
}
"ParameterLimitExceeded" => {
return PutParameterError::ParameterLimitExceeded(String::from(error_message))
}
"ParameterMaxVersionLimitExceeded" => {
return PutParameterError::ParameterMaxVersionLimitExceeded(String::from(
error_message,
))
}
"ParameterPatternMismatchException" => {
return PutParameterError::ParameterPatternMismatch(String::from(error_message))
}
"TooManyUpdates" => {
return PutParameterError::TooManyUpdates(String::from(error_message))
}
"UnsupportedParameterType" => {
return PutParameterError::UnsupportedParameterType(String::from(error_message))
}
"ValidationException" => {
return PutParameterError::Validation(error_message.to_string())
}
_ => {}
}
}
return PutParameterError::Unknown(res);
}
}
impl From<serde_json::error::Error> for PutParameterError {
fn from(err: serde_json::error::Error) -> PutParameterError {
PutParameterError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for PutParameterError {
fn from(err: CredentialsError) -> PutParameterError {
PutParameterError::Credentials(err)
}
}
impl From<HttpDispatchError> for PutParameterError {
fn from(err: HttpDispatchError) -> PutParameterError {
PutParameterError::HttpDispatch(err)
}
}
impl From<io::Error> for PutParameterError {
fn from(err: io::Error) -> PutParameterError {
PutParameterError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for PutParameterError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PutParameterError {
fn description(&self) -> &str {
match *self {
PutParameterError::HierarchyLevelLimitExceeded(ref cause) => cause,
PutParameterError::HierarchyTypeMismatch(ref cause) => cause,
PutParameterError::InternalServerError(ref cause) => cause,
PutParameterError::InvalidAllowedPattern(ref cause) => cause,
PutParameterError::InvalidKeyId(ref cause) => cause,
PutParameterError::ParameterAlreadyExists(ref cause) => cause,
PutParameterError::ParameterLimitExceeded(ref cause) => cause,
PutParameterError::ParameterMaxVersionLimitExceeded(ref cause) => cause,
PutParameterError::ParameterPatternMismatch(ref cause) => cause,
PutParameterError::TooManyUpdates(ref cause) => cause,
PutParameterError::UnsupportedParameterType(ref cause) => cause,
PutParameterError::Validation(ref cause) => cause,
PutParameterError::Credentials(ref err) => err.description(),
PutParameterError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
PutParameterError::ParseError(ref cause) => cause,
PutParameterError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum RegisterDefaultPatchBaselineError {
DoesNotExist(String),
InternalServerError(String),
InvalidResourceId(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl RegisterDefaultPatchBaselineError {
pub fn from_response(res: BufferedHttpResponse) -> RegisterDefaultPatchBaselineError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"DoesNotExistException" => {
return RegisterDefaultPatchBaselineError::DoesNotExist(String::from(
error_message,
))
}
"InternalServerError" => {
return RegisterDefaultPatchBaselineError::InternalServerError(String::from(
error_message,
))
}
"InvalidResourceId" => {
return RegisterDefaultPatchBaselineError::InvalidResourceId(String::from(
error_message,
))
}
"ValidationException" => {
return RegisterDefaultPatchBaselineError::Validation(error_message.to_string())
}
_ => {}
}
}
return RegisterDefaultPatchBaselineError::Unknown(res);
}
}
impl From<serde_json::error::Error> for RegisterDefaultPatchBaselineError {
fn from(err: serde_json::error::Error) -> RegisterDefaultPatchBaselineError {
RegisterDefaultPatchBaselineError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for RegisterDefaultPatchBaselineError {
fn from(err: CredentialsError) -> RegisterDefaultPatchBaselineError {
RegisterDefaultPatchBaselineError::Credentials(err)
}
}
impl From<HttpDispatchError> for RegisterDefaultPatchBaselineError {
fn from(err: HttpDispatchError) -> RegisterDefaultPatchBaselineError {
RegisterDefaultPatchBaselineError::HttpDispatch(err)
}
}
impl From<io::Error> for RegisterDefaultPatchBaselineError {
fn from(err: io::Error) -> RegisterDefaultPatchBaselineError {
RegisterDefaultPatchBaselineError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for RegisterDefaultPatchBaselineError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RegisterDefaultPatchBaselineError {
fn description(&self) -> &str {
match *self {
RegisterDefaultPatchBaselineError::DoesNotExist(ref cause) => cause,
RegisterDefaultPatchBaselineError::InternalServerError(ref cause) => cause,
RegisterDefaultPatchBaselineError::InvalidResourceId(ref cause) => cause,
RegisterDefaultPatchBaselineError::Validation(ref cause) => cause,
RegisterDefaultPatchBaselineError::Credentials(ref err) => err.description(),
RegisterDefaultPatchBaselineError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
RegisterDefaultPatchBaselineError::ParseError(ref cause) => cause,
RegisterDefaultPatchBaselineError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum RegisterPatchBaselineForPatchGroupError {
AlreadyExists(String),
DoesNotExist(String),
InternalServerError(String),
InvalidResourceId(String),
ResourceLimitExceeded(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl RegisterPatchBaselineForPatchGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RegisterPatchBaselineForPatchGroupError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"AlreadyExistsException" => {
return RegisterPatchBaselineForPatchGroupError::AlreadyExists(String::from(
error_message,
))
}
"DoesNotExistException" => {
return RegisterPatchBaselineForPatchGroupError::DoesNotExist(String::from(
error_message,
))
}
"InternalServerError" => {
return RegisterPatchBaselineForPatchGroupError::InternalServerError(
String::from(error_message),
)
}
"InvalidResourceId" => {
return RegisterPatchBaselineForPatchGroupError::InvalidResourceId(String::from(
error_message,
))
}
"ResourceLimitExceededException" => {
return RegisterPatchBaselineForPatchGroupError::ResourceLimitExceeded(
String::from(error_message),
)
}
"ValidationException" => {
return RegisterPatchBaselineForPatchGroupError::Validation(
error_message.to_string(),
)
}
_ => {}
}
}
return RegisterPatchBaselineForPatchGroupError::Unknown(res);
}
}
impl From<serde_json::error::Error> for RegisterPatchBaselineForPatchGroupError {
fn from(err: serde_json::error::Error) -> RegisterPatchBaselineForPatchGroupError {
RegisterPatchBaselineForPatchGroupError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for RegisterPatchBaselineForPatchGroupError {
fn from(err: CredentialsError) -> RegisterPatchBaselineForPatchGroupError {
RegisterPatchBaselineForPatchGroupError::Credentials(err)
}
}
impl From<HttpDispatchError> for RegisterPatchBaselineForPatchGroupError {
fn from(err: HttpDispatchError) -> RegisterPatchBaselineForPatchGroupError {
RegisterPatchBaselineForPatchGroupError::HttpDispatch(err)
}
}
impl From<io::Error> for RegisterPatchBaselineForPatchGroupError {
fn from(err: io::Error) -> RegisterPatchBaselineForPatchGroupError {
RegisterPatchBaselineForPatchGroupError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for RegisterPatchBaselineForPatchGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RegisterPatchBaselineForPatchGroupError {
fn description(&self) -> &str {
match *self {
RegisterPatchBaselineForPatchGroupError::AlreadyExists(ref cause) => cause,
RegisterPatchBaselineForPatchGroupError::DoesNotExist(ref cause) => cause,
RegisterPatchBaselineForPatchGroupError::InternalServerError(ref cause) => cause,
RegisterPatchBaselineForPatchGroupError::InvalidResourceId(ref cause) => cause,
RegisterPatchBaselineForPatchGroupError::ResourceLimitExceeded(ref cause) => cause,
RegisterPatchBaselineForPatchGroupError::Validation(ref cause) => cause,
RegisterPatchBaselineForPatchGroupError::Credentials(ref err) => err.description(),
RegisterPatchBaselineForPatchGroupError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
RegisterPatchBaselineForPatchGroupError::ParseError(ref cause) => cause,
RegisterPatchBaselineForPatchGroupError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum RegisterTargetWithMaintenanceWindowError {
DoesNotExist(String),
IdempotentParameterMismatch(String),
InternalServerError(String),
ResourceLimitExceeded(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl RegisterTargetWithMaintenanceWindowError {
pub fn from_response(res: BufferedHttpResponse) -> RegisterTargetWithMaintenanceWindowError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"DoesNotExistException" => {
return RegisterTargetWithMaintenanceWindowError::DoesNotExist(String::from(
error_message,
))
}
"IdempotentParameterMismatch" => {
return RegisterTargetWithMaintenanceWindowError::IdempotentParameterMismatch(
String::from(error_message),
)
}
"InternalServerError" => {
return RegisterTargetWithMaintenanceWindowError::InternalServerError(
String::from(error_message),
)
}
"ResourceLimitExceededException" => {
return RegisterTargetWithMaintenanceWindowError::ResourceLimitExceeded(
String::from(error_message),
)
}
"ValidationException" => {
return RegisterTargetWithMaintenanceWindowError::Validation(
error_message.to_string(),
)
}
_ => {}
}
}
return RegisterTargetWithMaintenanceWindowError::Unknown(res);
}
}
impl From<serde_json::error::Error> for RegisterTargetWithMaintenanceWindowError {
fn from(err: serde_json::error::Error) -> RegisterTargetWithMaintenanceWindowError {
RegisterTargetWithMaintenanceWindowError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for RegisterTargetWithMaintenanceWindowError {
fn from(err: CredentialsError) -> RegisterTargetWithMaintenanceWindowError {
RegisterTargetWithMaintenanceWindowError::Credentials(err)
}
}
impl From<HttpDispatchError> for RegisterTargetWithMaintenanceWindowError {
fn from(err: HttpDispatchError) -> RegisterTargetWithMaintenanceWindowError {
RegisterTargetWithMaintenanceWindowError::HttpDispatch(err)
}
}
impl From<io::Error> for RegisterTargetWithMaintenanceWindowError {
fn from(err: io::Error) -> RegisterTargetWithMaintenanceWindowError {
RegisterTargetWithMaintenanceWindowError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for RegisterTargetWithMaintenanceWindowError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RegisterTargetWithMaintenanceWindowError {
fn description(&self) -> &str {
match *self {
RegisterTargetWithMaintenanceWindowError::DoesNotExist(ref cause) => cause,
RegisterTargetWithMaintenanceWindowError::IdempotentParameterMismatch(ref cause) => {
cause
}
RegisterTargetWithMaintenanceWindowError::InternalServerError(ref cause) => cause,
RegisterTargetWithMaintenanceWindowError::ResourceLimitExceeded(ref cause) => cause,
RegisterTargetWithMaintenanceWindowError::Validation(ref cause) => cause,
RegisterTargetWithMaintenanceWindowError::Credentials(ref err) => err.description(),
RegisterTargetWithMaintenanceWindowError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
RegisterTargetWithMaintenanceWindowError::ParseError(ref cause) => cause,
RegisterTargetWithMaintenanceWindowError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum RegisterTaskWithMaintenanceWindowError {
DoesNotExist(String),
FeatureNotAvailable(String),
IdempotentParameterMismatch(String),
InternalServerError(String),
ResourceLimitExceeded(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl RegisterTaskWithMaintenanceWindowError {
pub fn from_response(res: BufferedHttpResponse) -> RegisterTaskWithMaintenanceWindowError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"DoesNotExistException" => {
return RegisterTaskWithMaintenanceWindowError::DoesNotExist(String::from(
error_message,
))
}
"FeatureNotAvailableException" => {
return RegisterTaskWithMaintenanceWindowError::FeatureNotAvailable(
String::from(error_message),
)
}
"IdempotentParameterMismatch" => {
return RegisterTaskWithMaintenanceWindowError::IdempotentParameterMismatch(
String::from(error_message),
)
}
"InternalServerError" => {
return RegisterTaskWithMaintenanceWindowError::InternalServerError(
String::from(error_message),
)
}
"ResourceLimitExceededException" => {
return RegisterTaskWithMaintenanceWindowError::ResourceLimitExceeded(
String::from(error_message),
)
}
"ValidationException" => {
return RegisterTaskWithMaintenanceWindowError::Validation(
error_message.to_string(),
)
}
_ => {}
}
}
return RegisterTaskWithMaintenanceWindowError::Unknown(res);
}
}
impl From<serde_json::error::Error> for RegisterTaskWithMaintenanceWindowError {
fn from(err: serde_json::error::Error) -> RegisterTaskWithMaintenanceWindowError {
RegisterTaskWithMaintenanceWindowError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for RegisterTaskWithMaintenanceWindowError {
fn from(err: CredentialsError) -> RegisterTaskWithMaintenanceWindowError {
RegisterTaskWithMaintenanceWindowError::Credentials(err)
}
}
impl From<HttpDispatchError> for RegisterTaskWithMaintenanceWindowError {
fn from(err: HttpDispatchError) -> RegisterTaskWithMaintenanceWindowError {
RegisterTaskWithMaintenanceWindowError::HttpDispatch(err)
}
}
impl From<io::Error> for RegisterTaskWithMaintenanceWindowError {
fn from(err: io::Error) -> RegisterTaskWithMaintenanceWindowError {
RegisterTaskWithMaintenanceWindowError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for RegisterTaskWithMaintenanceWindowError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RegisterTaskWithMaintenanceWindowError {
fn description(&self) -> &str {
match *self {
RegisterTaskWithMaintenanceWindowError::DoesNotExist(ref cause) => cause,
RegisterTaskWithMaintenanceWindowError::FeatureNotAvailable(ref cause) => cause,
RegisterTaskWithMaintenanceWindowError::IdempotentParameterMismatch(ref cause) => cause,
RegisterTaskWithMaintenanceWindowError::InternalServerError(ref cause) => cause,
RegisterTaskWithMaintenanceWindowError::ResourceLimitExceeded(ref cause) => cause,
RegisterTaskWithMaintenanceWindowError::Validation(ref cause) => cause,
RegisterTaskWithMaintenanceWindowError::Credentials(ref err) => err.description(),
RegisterTaskWithMaintenanceWindowError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
RegisterTaskWithMaintenanceWindowError::ParseError(ref cause) => cause,
RegisterTaskWithMaintenanceWindowError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum RemoveTagsFromResourceError {
InternalServerError(String),
InvalidResourceId(String),
InvalidResourceType(String),
TooManyUpdates(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl RemoveTagsFromResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RemoveTagsFromResourceError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return RemoveTagsFromResourceError::InternalServerError(String::from(
error_message,
))
}
"InvalidResourceId" => {
return RemoveTagsFromResourceError::InvalidResourceId(String::from(
error_message,
))
}
"InvalidResourceType" => {
return RemoveTagsFromResourceError::InvalidResourceType(String::from(
error_message,
))
}
"TooManyUpdates" => {
return RemoveTagsFromResourceError::TooManyUpdates(String::from(error_message))
}
"ValidationException" => {
return RemoveTagsFromResourceError::Validation(error_message.to_string())
}
_ => {}
}
}
return RemoveTagsFromResourceError::Unknown(res);
}
}
impl From<serde_json::error::Error> for RemoveTagsFromResourceError {
fn from(err: serde_json::error::Error) -> RemoveTagsFromResourceError {
RemoveTagsFromResourceError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for RemoveTagsFromResourceError {
fn from(err: CredentialsError) -> RemoveTagsFromResourceError {
RemoveTagsFromResourceError::Credentials(err)
}
}
impl From<HttpDispatchError> for RemoveTagsFromResourceError {
fn from(err: HttpDispatchError) -> RemoveTagsFromResourceError {
RemoveTagsFromResourceError::HttpDispatch(err)
}
}
impl From<io::Error> for RemoveTagsFromResourceError {
fn from(err: io::Error) -> RemoveTagsFromResourceError {
RemoveTagsFromResourceError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for RemoveTagsFromResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RemoveTagsFromResourceError {
fn description(&self) -> &str {
match *self {
RemoveTagsFromResourceError::InternalServerError(ref cause) => cause,
RemoveTagsFromResourceError::InvalidResourceId(ref cause) => cause,
RemoveTagsFromResourceError::InvalidResourceType(ref cause) => cause,
RemoveTagsFromResourceError::TooManyUpdates(ref cause) => cause,
RemoveTagsFromResourceError::Validation(ref cause) => cause,
RemoveTagsFromResourceError::Credentials(ref err) => err.description(),
RemoveTagsFromResourceError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
RemoveTagsFromResourceError::ParseError(ref cause) => cause,
RemoveTagsFromResourceError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum SendAutomationSignalError {
AutomationExecutionNotFound(String),
AutomationStepNotFound(String),
InternalServerError(String),
InvalidAutomationSignal(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl SendAutomationSignalError {
pub fn from_response(res: BufferedHttpResponse) -> SendAutomationSignalError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"AutomationExecutionNotFoundException" => {
return SendAutomationSignalError::AutomationExecutionNotFound(String::from(
error_message,
))
}
"AutomationStepNotFoundException" => {
return SendAutomationSignalError::AutomationStepNotFound(String::from(
error_message,
))
}
"InternalServerError" => {
return SendAutomationSignalError::InternalServerError(String::from(
error_message,
))
}
"InvalidAutomationSignalException" => {
return SendAutomationSignalError::InvalidAutomationSignal(String::from(
error_message,
))
}
"ValidationException" => {
return SendAutomationSignalError::Validation(error_message.to_string())
}
_ => {}
}
}
return SendAutomationSignalError::Unknown(res);
}
}
impl From<serde_json::error::Error> for SendAutomationSignalError {
fn from(err: serde_json::error::Error) -> SendAutomationSignalError {
SendAutomationSignalError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for SendAutomationSignalError {
fn from(err: CredentialsError) -> SendAutomationSignalError {
SendAutomationSignalError::Credentials(err)
}
}
impl From<HttpDispatchError> for SendAutomationSignalError {
fn from(err: HttpDispatchError) -> SendAutomationSignalError {
SendAutomationSignalError::HttpDispatch(err)
}
}
impl From<io::Error> for SendAutomationSignalError {
fn from(err: io::Error) -> SendAutomationSignalError {
SendAutomationSignalError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for SendAutomationSignalError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SendAutomationSignalError {
fn description(&self) -> &str {
match *self {
SendAutomationSignalError::AutomationExecutionNotFound(ref cause) => cause,
SendAutomationSignalError::AutomationStepNotFound(ref cause) => cause,
SendAutomationSignalError::InternalServerError(ref cause) => cause,
SendAutomationSignalError::InvalidAutomationSignal(ref cause) => cause,
SendAutomationSignalError::Validation(ref cause) => cause,
SendAutomationSignalError::Credentials(ref err) => err.description(),
SendAutomationSignalError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
SendAutomationSignalError::ParseError(ref cause) => cause,
SendAutomationSignalError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum SendCommandError {
DuplicateInstanceId(String),
InternalServerError(String),
InvalidDocument(String),
InvalidDocumentVersion(String),
InvalidInstanceId(String),
InvalidNotificationConfig(String),
InvalidOutputFolder(String),
InvalidParameters(String),
InvalidRole(String),
MaxDocumentSizeExceeded(String),
UnsupportedPlatformType(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl SendCommandError {
pub fn from_response(res: BufferedHttpResponse) -> SendCommandError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"DuplicateInstanceId" => {
return SendCommandError::DuplicateInstanceId(String::from(error_message))
}
"InternalServerError" => {
return SendCommandError::InternalServerError(String::from(error_message))
}
"InvalidDocument" => {
return SendCommandError::InvalidDocument(String::from(error_message))
}
"InvalidDocumentVersion" => {
return SendCommandError::InvalidDocumentVersion(String::from(error_message))
}
"InvalidInstanceId" => {
return SendCommandError::InvalidInstanceId(String::from(error_message))
}
"InvalidNotificationConfig" => {
return SendCommandError::InvalidNotificationConfig(String::from(error_message))
}
"InvalidOutputFolder" => {
return SendCommandError::InvalidOutputFolder(String::from(error_message))
}
"InvalidParameters" => {
return SendCommandError::InvalidParameters(String::from(error_message))
}
"InvalidRole" => return SendCommandError::InvalidRole(String::from(error_message)),
"MaxDocumentSizeExceeded" => {
return SendCommandError::MaxDocumentSizeExceeded(String::from(error_message))
}
"UnsupportedPlatformType" => {
return SendCommandError::UnsupportedPlatformType(String::from(error_message))
}
"ValidationException" => {
return SendCommandError::Validation(error_message.to_string())
}
_ => {}
}
}
return SendCommandError::Unknown(res);
}
}
impl From<serde_json::error::Error> for SendCommandError {
fn from(err: serde_json::error::Error) -> SendCommandError {
SendCommandError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for SendCommandError {
fn from(err: CredentialsError) -> SendCommandError {
SendCommandError::Credentials(err)
}
}
impl From<HttpDispatchError> for SendCommandError {
fn from(err: HttpDispatchError) -> SendCommandError {
SendCommandError::HttpDispatch(err)
}
}
impl From<io::Error> for SendCommandError {
fn from(err: io::Error) -> SendCommandError {
SendCommandError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for SendCommandError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SendCommandError {
fn description(&self) -> &str {
match *self {
SendCommandError::DuplicateInstanceId(ref cause) => cause,
SendCommandError::InternalServerError(ref cause) => cause,
SendCommandError::InvalidDocument(ref cause) => cause,
SendCommandError::InvalidDocumentVersion(ref cause) => cause,
SendCommandError::InvalidInstanceId(ref cause) => cause,
SendCommandError::InvalidNotificationConfig(ref cause) => cause,
SendCommandError::InvalidOutputFolder(ref cause) => cause,
SendCommandError::InvalidParameters(ref cause) => cause,
SendCommandError::InvalidRole(ref cause) => cause,
SendCommandError::MaxDocumentSizeExceeded(ref cause) => cause,
SendCommandError::UnsupportedPlatformType(ref cause) => cause,
SendCommandError::Validation(ref cause) => cause,
SendCommandError::Credentials(ref err) => err.description(),
SendCommandError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
SendCommandError::ParseError(ref cause) => cause,
SendCommandError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum StartAssociationsOnceError {
AssociationDoesNotExist(String),
InvalidAssociation(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl StartAssociationsOnceError {
pub fn from_response(res: BufferedHttpResponse) -> StartAssociationsOnceError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"AssociationDoesNotExist" => {
return StartAssociationsOnceError::AssociationDoesNotExist(String::from(
error_message,
))
}
"InvalidAssociation" => {
return StartAssociationsOnceError::InvalidAssociation(String::from(
error_message,
))
}
"ValidationException" => {
return StartAssociationsOnceError::Validation(error_message.to_string())
}
_ => {}
}
}
return StartAssociationsOnceError::Unknown(res);
}
}
impl From<serde_json::error::Error> for StartAssociationsOnceError {
fn from(err: serde_json::error::Error) -> StartAssociationsOnceError {
StartAssociationsOnceError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for StartAssociationsOnceError {
fn from(err: CredentialsError) -> StartAssociationsOnceError {
StartAssociationsOnceError::Credentials(err)
}
}
impl From<HttpDispatchError> for StartAssociationsOnceError {
fn from(err: HttpDispatchError) -> StartAssociationsOnceError {
StartAssociationsOnceError::HttpDispatch(err)
}
}
impl From<io::Error> for StartAssociationsOnceError {
fn from(err: io::Error) -> StartAssociationsOnceError {
StartAssociationsOnceError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for StartAssociationsOnceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StartAssociationsOnceError {
fn description(&self) -> &str {
match *self {
StartAssociationsOnceError::AssociationDoesNotExist(ref cause) => cause,
StartAssociationsOnceError::InvalidAssociation(ref cause) => cause,
StartAssociationsOnceError::Validation(ref cause) => cause,
StartAssociationsOnceError::Credentials(ref err) => err.description(),
StartAssociationsOnceError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
StartAssociationsOnceError::ParseError(ref cause) => cause,
StartAssociationsOnceError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum StartAutomationExecutionError {
AutomationDefinitionNotFound(String),
AutomationDefinitionVersionNotFound(String),
AutomationExecutionLimitExceeded(String),
IdempotentParameterMismatch(String),
InternalServerError(String),
InvalidAutomationExecutionParameters(String),
InvalidTarget(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl StartAutomationExecutionError {
pub fn from_response(res: BufferedHttpResponse) -> StartAutomationExecutionError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"AutomationDefinitionNotFoundException" => {
return StartAutomationExecutionError::AutomationDefinitionNotFound(
String::from(error_message),
)
}
"AutomationDefinitionVersionNotFoundException" => {
return StartAutomationExecutionError::AutomationDefinitionVersionNotFound(
String::from(error_message),
)
}
"AutomationExecutionLimitExceededException" => {
return StartAutomationExecutionError::AutomationExecutionLimitExceeded(
String::from(error_message),
)
}
"IdempotentParameterMismatch" => {
return StartAutomationExecutionError::IdempotentParameterMismatch(String::from(
error_message,
))
}
"InternalServerError" => {
return StartAutomationExecutionError::InternalServerError(String::from(
error_message,
))
}
"InvalidAutomationExecutionParametersException" => {
return StartAutomationExecutionError::InvalidAutomationExecutionParameters(
String::from(error_message),
)
}
"InvalidTarget" => {
return StartAutomationExecutionError::InvalidTarget(String::from(error_message))
}
"ValidationException" => {
return StartAutomationExecutionError::Validation(error_message.to_string())
}
_ => {}
}
}
return StartAutomationExecutionError::Unknown(res);
}
}
impl From<serde_json::error::Error> for StartAutomationExecutionError {
fn from(err: serde_json::error::Error) -> StartAutomationExecutionError {
StartAutomationExecutionError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for StartAutomationExecutionError {
fn from(err: CredentialsError) -> StartAutomationExecutionError {
StartAutomationExecutionError::Credentials(err)
}
}
impl From<HttpDispatchError> for StartAutomationExecutionError {
fn from(err: HttpDispatchError) -> StartAutomationExecutionError {
StartAutomationExecutionError::HttpDispatch(err)
}
}
impl From<io::Error> for StartAutomationExecutionError {
fn from(err: io::Error) -> StartAutomationExecutionError {
StartAutomationExecutionError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for StartAutomationExecutionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StartAutomationExecutionError {
fn description(&self) -> &str {
match *self {
StartAutomationExecutionError::AutomationDefinitionNotFound(ref cause) => cause,
StartAutomationExecutionError::AutomationDefinitionVersionNotFound(ref cause) => cause,
StartAutomationExecutionError::AutomationExecutionLimitExceeded(ref cause) => cause,
StartAutomationExecutionError::IdempotentParameterMismatch(ref cause) => cause,
StartAutomationExecutionError::InternalServerError(ref cause) => cause,
StartAutomationExecutionError::InvalidAutomationExecutionParameters(ref cause) => cause,
StartAutomationExecutionError::InvalidTarget(ref cause) => cause,
StartAutomationExecutionError::Validation(ref cause) => cause,
StartAutomationExecutionError::Credentials(ref err) => err.description(),
StartAutomationExecutionError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
StartAutomationExecutionError::ParseError(ref cause) => cause,
StartAutomationExecutionError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum StopAutomationExecutionError {
AutomationExecutionNotFound(String),
InternalServerError(String),
InvalidAutomationStatusUpdate(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl StopAutomationExecutionError {
pub fn from_response(res: BufferedHttpResponse) -> StopAutomationExecutionError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"AutomationExecutionNotFoundException" => {
return StopAutomationExecutionError::AutomationExecutionNotFound(String::from(
error_message,
))
}
"InternalServerError" => {
return StopAutomationExecutionError::InternalServerError(String::from(
error_message,
))
}
"InvalidAutomationStatusUpdateException" => {
return StopAutomationExecutionError::InvalidAutomationStatusUpdate(
String::from(error_message),
)
}
"ValidationException" => {
return StopAutomationExecutionError::Validation(error_message.to_string())
}
_ => {}
}
}
return StopAutomationExecutionError::Unknown(res);
}
}
impl From<serde_json::error::Error> for StopAutomationExecutionError {
fn from(err: serde_json::error::Error) -> StopAutomationExecutionError {
StopAutomationExecutionError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for StopAutomationExecutionError {
fn from(err: CredentialsError) -> StopAutomationExecutionError {
StopAutomationExecutionError::Credentials(err)
}
}
impl From<HttpDispatchError> for StopAutomationExecutionError {
fn from(err: HttpDispatchError) -> StopAutomationExecutionError {
StopAutomationExecutionError::HttpDispatch(err)
}
}
impl From<io::Error> for StopAutomationExecutionError {
fn from(err: io::Error) -> StopAutomationExecutionError {
StopAutomationExecutionError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for StopAutomationExecutionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StopAutomationExecutionError {
fn description(&self) -> &str {
match *self {
StopAutomationExecutionError::AutomationExecutionNotFound(ref cause) => cause,
StopAutomationExecutionError::InternalServerError(ref cause) => cause,
StopAutomationExecutionError::InvalidAutomationStatusUpdate(ref cause) => cause,
StopAutomationExecutionError::Validation(ref cause) => cause,
StopAutomationExecutionError::Credentials(ref err) => err.description(),
StopAutomationExecutionError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
StopAutomationExecutionError::ParseError(ref cause) => cause,
StopAutomationExecutionError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateAssociationError {
AssociationDoesNotExist(String),
AssociationVersionLimitExceeded(String),
InternalServerError(String),
InvalidAssociationVersion(String),
InvalidDocument(String),
InvalidDocumentVersion(String),
InvalidOutputLocation(String),
InvalidParameters(String),
InvalidSchedule(String),
InvalidTarget(String),
InvalidUpdate(String),
TooManyUpdates(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl UpdateAssociationError {
pub fn from_response(res: BufferedHttpResponse) -> UpdateAssociationError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"AssociationDoesNotExist" => {
return UpdateAssociationError::AssociationDoesNotExist(String::from(
error_message,
))
}
"AssociationVersionLimitExceeded" => {
return UpdateAssociationError::AssociationVersionLimitExceeded(String::from(
error_message,
))
}
"InternalServerError" => {
return UpdateAssociationError::InternalServerError(String::from(error_message))
}
"InvalidAssociationVersion" => {
return UpdateAssociationError::InvalidAssociationVersion(String::from(
error_message,
))
}
"InvalidDocument" => {
return UpdateAssociationError::InvalidDocument(String::from(error_message))
}
"InvalidDocumentVersion" => {
return UpdateAssociationError::InvalidDocumentVersion(String::from(
error_message,
))
}
"InvalidOutputLocation" => {
return UpdateAssociationError::InvalidOutputLocation(String::from(
error_message,
))
}
"InvalidParameters" => {
return UpdateAssociationError::InvalidParameters(String::from(error_message))
}
"InvalidSchedule" => {
return UpdateAssociationError::InvalidSchedule(String::from(error_message))
}
"InvalidTarget" => {
return UpdateAssociationError::InvalidTarget(String::from(error_message))
}
"InvalidUpdate" => {
return UpdateAssociationError::InvalidUpdate(String::from(error_message))
}
"TooManyUpdates" => {
return UpdateAssociationError::TooManyUpdates(String::from(error_message))
}
"ValidationException" => {
return UpdateAssociationError::Validation(error_message.to_string())
}
_ => {}
}
}
return UpdateAssociationError::Unknown(res);
}
}
impl From<serde_json::error::Error> for UpdateAssociationError {
fn from(err: serde_json::error::Error) -> UpdateAssociationError {
UpdateAssociationError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for UpdateAssociationError {
fn from(err: CredentialsError) -> UpdateAssociationError {
UpdateAssociationError::Credentials(err)
}
}
impl From<HttpDispatchError> for UpdateAssociationError {
fn from(err: HttpDispatchError) -> UpdateAssociationError {
UpdateAssociationError::HttpDispatch(err)
}
}
impl From<io::Error> for UpdateAssociationError {
fn from(err: io::Error) -> UpdateAssociationError {
UpdateAssociationError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for UpdateAssociationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateAssociationError {
fn description(&self) -> &str {
match *self {
UpdateAssociationError::AssociationDoesNotExist(ref cause) => cause,
UpdateAssociationError::AssociationVersionLimitExceeded(ref cause) => cause,
UpdateAssociationError::InternalServerError(ref cause) => cause,
UpdateAssociationError::InvalidAssociationVersion(ref cause) => cause,
UpdateAssociationError::InvalidDocument(ref cause) => cause,
UpdateAssociationError::InvalidDocumentVersion(ref cause) => cause,
UpdateAssociationError::InvalidOutputLocation(ref cause) => cause,
UpdateAssociationError::InvalidParameters(ref cause) => cause,
UpdateAssociationError::InvalidSchedule(ref cause) => cause,
UpdateAssociationError::InvalidTarget(ref cause) => cause,
UpdateAssociationError::InvalidUpdate(ref cause) => cause,
UpdateAssociationError::TooManyUpdates(ref cause) => cause,
UpdateAssociationError::Validation(ref cause) => cause,
UpdateAssociationError::Credentials(ref err) => err.description(),
UpdateAssociationError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
UpdateAssociationError::ParseError(ref cause) => cause,
UpdateAssociationError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateAssociationStatusError {
AssociationDoesNotExist(String),
InternalServerError(String),
InvalidDocument(String),
InvalidInstanceId(String),
StatusUnchanged(String),
TooManyUpdates(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl UpdateAssociationStatusError {
pub fn from_response(res: BufferedHttpResponse) -> UpdateAssociationStatusError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"AssociationDoesNotExist" => {
return UpdateAssociationStatusError::AssociationDoesNotExist(String::from(
error_message,
))
}
"InternalServerError" => {
return UpdateAssociationStatusError::InternalServerError(String::from(
error_message,
))
}
"InvalidDocument" => {
return UpdateAssociationStatusError::InvalidDocument(String::from(
error_message,
))
}
"InvalidInstanceId" => {
return UpdateAssociationStatusError::InvalidInstanceId(String::from(
error_message,
))
}
"StatusUnchanged" => {
return UpdateAssociationStatusError::StatusUnchanged(String::from(
error_message,
))
}
"TooManyUpdates" => {
return UpdateAssociationStatusError::TooManyUpdates(String::from(error_message))
}
"ValidationException" => {
return UpdateAssociationStatusError::Validation(error_message.to_string())
}
_ => {}
}
}
return UpdateAssociationStatusError::Unknown(res);
}
}
impl From<serde_json::error::Error> for UpdateAssociationStatusError {
fn from(err: serde_json::error::Error) -> UpdateAssociationStatusError {
UpdateAssociationStatusError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for UpdateAssociationStatusError {
fn from(err: CredentialsError) -> UpdateAssociationStatusError {
UpdateAssociationStatusError::Credentials(err)
}
}
impl From<HttpDispatchError> for UpdateAssociationStatusError {
fn from(err: HttpDispatchError) -> UpdateAssociationStatusError {
UpdateAssociationStatusError::HttpDispatch(err)
}
}
impl From<io::Error> for UpdateAssociationStatusError {
fn from(err: io::Error) -> UpdateAssociationStatusError {
UpdateAssociationStatusError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for UpdateAssociationStatusError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateAssociationStatusError {
fn description(&self) -> &str {
match *self {
UpdateAssociationStatusError::AssociationDoesNotExist(ref cause) => cause,
UpdateAssociationStatusError::InternalServerError(ref cause) => cause,
UpdateAssociationStatusError::InvalidDocument(ref cause) => cause,
UpdateAssociationStatusError::InvalidInstanceId(ref cause) => cause,
UpdateAssociationStatusError::StatusUnchanged(ref cause) => cause,
UpdateAssociationStatusError::TooManyUpdates(ref cause) => cause,
UpdateAssociationStatusError::Validation(ref cause) => cause,
UpdateAssociationStatusError::Credentials(ref err) => err.description(),
UpdateAssociationStatusError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
UpdateAssociationStatusError::ParseError(ref cause) => cause,
UpdateAssociationStatusError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateDocumentError {
DocumentVersionLimitExceeded(String),
DuplicateDocumentContent(String),
InternalServerError(String),
InvalidDocument(String),
InvalidDocumentContent(String),
InvalidDocumentSchemaVersion(String),
InvalidDocumentVersion(String),
MaxDocumentSizeExceeded(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl UpdateDocumentError {
pub fn from_response(res: BufferedHttpResponse) -> UpdateDocumentError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"DocumentVersionLimitExceeded" => {
return UpdateDocumentError::DocumentVersionLimitExceeded(String::from(
error_message,
))
}
"DuplicateDocumentContent" => {
return UpdateDocumentError::DuplicateDocumentContent(String::from(
error_message,
))
}
"InternalServerError" => {
return UpdateDocumentError::InternalServerError(String::from(error_message))
}
"InvalidDocument" => {
return UpdateDocumentError::InvalidDocument(String::from(error_message))
}
"InvalidDocumentContent" => {
return UpdateDocumentError::InvalidDocumentContent(String::from(error_message))
}
"InvalidDocumentSchemaVersion" => {
return UpdateDocumentError::InvalidDocumentSchemaVersion(String::from(
error_message,
))
}
"InvalidDocumentVersion" => {
return UpdateDocumentError::InvalidDocumentVersion(String::from(error_message))
}
"MaxDocumentSizeExceeded" => {
return UpdateDocumentError::MaxDocumentSizeExceeded(String::from(error_message))
}
"ValidationException" => {
return UpdateDocumentError::Validation(error_message.to_string())
}
_ => {}
}
}
return UpdateDocumentError::Unknown(res);
}
}
impl From<serde_json::error::Error> for UpdateDocumentError {
fn from(err: serde_json::error::Error) -> UpdateDocumentError {
UpdateDocumentError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for UpdateDocumentError {
fn from(err: CredentialsError) -> UpdateDocumentError {
UpdateDocumentError::Credentials(err)
}
}
impl From<HttpDispatchError> for UpdateDocumentError {
fn from(err: HttpDispatchError) -> UpdateDocumentError {
UpdateDocumentError::HttpDispatch(err)
}
}
impl From<io::Error> for UpdateDocumentError {
fn from(err: io::Error) -> UpdateDocumentError {
UpdateDocumentError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for UpdateDocumentError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateDocumentError {
fn description(&self) -> &str {
match *self {
UpdateDocumentError::DocumentVersionLimitExceeded(ref cause) => cause,
UpdateDocumentError::DuplicateDocumentContent(ref cause) => cause,
UpdateDocumentError::InternalServerError(ref cause) => cause,
UpdateDocumentError::InvalidDocument(ref cause) => cause,
UpdateDocumentError::InvalidDocumentContent(ref cause) => cause,
UpdateDocumentError::InvalidDocumentSchemaVersion(ref cause) => cause,
UpdateDocumentError::InvalidDocumentVersion(ref cause) => cause,
UpdateDocumentError::MaxDocumentSizeExceeded(ref cause) => cause,
UpdateDocumentError::Validation(ref cause) => cause,
UpdateDocumentError::Credentials(ref err) => err.description(),
UpdateDocumentError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
UpdateDocumentError::ParseError(ref cause) => cause,
UpdateDocumentError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateDocumentDefaultVersionError {
InternalServerError(String),
InvalidDocument(String),
InvalidDocumentSchemaVersion(String),
InvalidDocumentVersion(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl UpdateDocumentDefaultVersionError {
pub fn from_response(res: BufferedHttpResponse) -> UpdateDocumentDefaultVersionError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return UpdateDocumentDefaultVersionError::InternalServerError(String::from(
error_message,
))
}
"InvalidDocument" => {
return UpdateDocumentDefaultVersionError::InvalidDocument(String::from(
error_message,
))
}
"InvalidDocumentSchemaVersion" => {
return UpdateDocumentDefaultVersionError::InvalidDocumentSchemaVersion(
String::from(error_message),
)
}
"InvalidDocumentVersion" => {
return UpdateDocumentDefaultVersionError::InvalidDocumentVersion(String::from(
error_message,
))
}
"ValidationException" => {
return UpdateDocumentDefaultVersionError::Validation(error_message.to_string())
}
_ => {}
}
}
return UpdateDocumentDefaultVersionError::Unknown(res);
}
}
impl From<serde_json::error::Error> for UpdateDocumentDefaultVersionError {
fn from(err: serde_json::error::Error) -> UpdateDocumentDefaultVersionError {
UpdateDocumentDefaultVersionError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for UpdateDocumentDefaultVersionError {
fn from(err: CredentialsError) -> UpdateDocumentDefaultVersionError {
UpdateDocumentDefaultVersionError::Credentials(err)
}
}
impl From<HttpDispatchError> for UpdateDocumentDefaultVersionError {
fn from(err: HttpDispatchError) -> UpdateDocumentDefaultVersionError {
UpdateDocumentDefaultVersionError::HttpDispatch(err)
}
}
impl From<io::Error> for UpdateDocumentDefaultVersionError {
fn from(err: io::Error) -> UpdateDocumentDefaultVersionError {
UpdateDocumentDefaultVersionError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for UpdateDocumentDefaultVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateDocumentDefaultVersionError {
fn description(&self) -> &str {
match *self {
UpdateDocumentDefaultVersionError::InternalServerError(ref cause) => cause,
UpdateDocumentDefaultVersionError::InvalidDocument(ref cause) => cause,
UpdateDocumentDefaultVersionError::InvalidDocumentSchemaVersion(ref cause) => cause,
UpdateDocumentDefaultVersionError::InvalidDocumentVersion(ref cause) => cause,
UpdateDocumentDefaultVersionError::Validation(ref cause) => cause,
UpdateDocumentDefaultVersionError::Credentials(ref err) => err.description(),
UpdateDocumentDefaultVersionError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
UpdateDocumentDefaultVersionError::ParseError(ref cause) => cause,
UpdateDocumentDefaultVersionError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateMaintenanceWindowError {
DoesNotExist(String),
InternalServerError(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl UpdateMaintenanceWindowError {
pub fn from_response(res: BufferedHttpResponse) -> UpdateMaintenanceWindowError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"DoesNotExistException" => {
return UpdateMaintenanceWindowError::DoesNotExist(String::from(error_message))
}
"InternalServerError" => {
return UpdateMaintenanceWindowError::InternalServerError(String::from(
error_message,
))
}
"ValidationException" => {
return UpdateMaintenanceWindowError::Validation(error_message.to_string())
}
_ => {}
}
}
return UpdateMaintenanceWindowError::Unknown(res);
}
}
impl From<serde_json::error::Error> for UpdateMaintenanceWindowError {
fn from(err: serde_json::error::Error) -> UpdateMaintenanceWindowError {
UpdateMaintenanceWindowError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for UpdateMaintenanceWindowError {
fn from(err: CredentialsError) -> UpdateMaintenanceWindowError {
UpdateMaintenanceWindowError::Credentials(err)
}
}
impl From<HttpDispatchError> for UpdateMaintenanceWindowError {
fn from(err: HttpDispatchError) -> UpdateMaintenanceWindowError {
UpdateMaintenanceWindowError::HttpDispatch(err)
}
}
impl From<io::Error> for UpdateMaintenanceWindowError {
fn from(err: io::Error) -> UpdateMaintenanceWindowError {
UpdateMaintenanceWindowError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for UpdateMaintenanceWindowError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateMaintenanceWindowError {
fn description(&self) -> &str {
match *self {
UpdateMaintenanceWindowError::DoesNotExist(ref cause) => cause,
UpdateMaintenanceWindowError::InternalServerError(ref cause) => cause,
UpdateMaintenanceWindowError::Validation(ref cause) => cause,
UpdateMaintenanceWindowError::Credentials(ref err) => err.description(),
UpdateMaintenanceWindowError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
UpdateMaintenanceWindowError::ParseError(ref cause) => cause,
UpdateMaintenanceWindowError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateMaintenanceWindowTargetError {
DoesNotExist(String),
InternalServerError(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl UpdateMaintenanceWindowTargetError {
pub fn from_response(res: BufferedHttpResponse) -> UpdateMaintenanceWindowTargetError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"DoesNotExistException" => {
return UpdateMaintenanceWindowTargetError::DoesNotExist(String::from(
error_message,
))
}
"InternalServerError" => {
return UpdateMaintenanceWindowTargetError::InternalServerError(String::from(
error_message,
))
}
"ValidationException" => {
return UpdateMaintenanceWindowTargetError::Validation(error_message.to_string())
}
_ => {}
}
}
return UpdateMaintenanceWindowTargetError::Unknown(res);
}
}
impl From<serde_json::error::Error> for UpdateMaintenanceWindowTargetError {
fn from(err: serde_json::error::Error) -> UpdateMaintenanceWindowTargetError {
UpdateMaintenanceWindowTargetError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for UpdateMaintenanceWindowTargetError {
fn from(err: CredentialsError) -> UpdateMaintenanceWindowTargetError {
UpdateMaintenanceWindowTargetError::Credentials(err)
}
}
impl From<HttpDispatchError> for UpdateMaintenanceWindowTargetError {
fn from(err: HttpDispatchError) -> UpdateMaintenanceWindowTargetError {
UpdateMaintenanceWindowTargetError::HttpDispatch(err)
}
}
impl From<io::Error> for UpdateMaintenanceWindowTargetError {
fn from(err: io::Error) -> UpdateMaintenanceWindowTargetError {
UpdateMaintenanceWindowTargetError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for UpdateMaintenanceWindowTargetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateMaintenanceWindowTargetError {
fn description(&self) -> &str {
match *self {
UpdateMaintenanceWindowTargetError::DoesNotExist(ref cause) => cause,
UpdateMaintenanceWindowTargetError::InternalServerError(ref cause) => cause,
UpdateMaintenanceWindowTargetError::Validation(ref cause) => cause,
UpdateMaintenanceWindowTargetError::Credentials(ref err) => err.description(),
UpdateMaintenanceWindowTargetError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
UpdateMaintenanceWindowTargetError::ParseError(ref cause) => cause,
UpdateMaintenanceWindowTargetError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateMaintenanceWindowTaskError {
DoesNotExist(String),
InternalServerError(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl UpdateMaintenanceWindowTaskError {
pub fn from_response(res: BufferedHttpResponse) -> UpdateMaintenanceWindowTaskError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"DoesNotExistException" => {
return UpdateMaintenanceWindowTaskError::DoesNotExist(String::from(
error_message,
))
}
"InternalServerError" => {
return UpdateMaintenanceWindowTaskError::InternalServerError(String::from(
error_message,
))
}
"ValidationException" => {
return UpdateMaintenanceWindowTaskError::Validation(error_message.to_string())
}
_ => {}
}
}
return UpdateMaintenanceWindowTaskError::Unknown(res);
}
}
impl From<serde_json::error::Error> for UpdateMaintenanceWindowTaskError {
fn from(err: serde_json::error::Error) -> UpdateMaintenanceWindowTaskError {
UpdateMaintenanceWindowTaskError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for UpdateMaintenanceWindowTaskError {
fn from(err: CredentialsError) -> UpdateMaintenanceWindowTaskError {
UpdateMaintenanceWindowTaskError::Credentials(err)
}
}
impl From<HttpDispatchError> for UpdateMaintenanceWindowTaskError {
fn from(err: HttpDispatchError) -> UpdateMaintenanceWindowTaskError {
UpdateMaintenanceWindowTaskError::HttpDispatch(err)
}
}
impl From<io::Error> for UpdateMaintenanceWindowTaskError {
fn from(err: io::Error) -> UpdateMaintenanceWindowTaskError {
UpdateMaintenanceWindowTaskError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for UpdateMaintenanceWindowTaskError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateMaintenanceWindowTaskError {
fn description(&self) -> &str {
match *self {
UpdateMaintenanceWindowTaskError::DoesNotExist(ref cause) => cause,
UpdateMaintenanceWindowTaskError::InternalServerError(ref cause) => cause,
UpdateMaintenanceWindowTaskError::Validation(ref cause) => cause,
UpdateMaintenanceWindowTaskError::Credentials(ref err) => err.description(),
UpdateMaintenanceWindowTaskError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
UpdateMaintenanceWindowTaskError::ParseError(ref cause) => cause,
UpdateMaintenanceWindowTaskError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateManagedInstanceRoleError {
InternalServerError(String),
InvalidInstanceId(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl UpdateManagedInstanceRoleError {
pub fn from_response(res: BufferedHttpResponse) -> UpdateManagedInstanceRoleError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"InternalServerError" => {
return UpdateManagedInstanceRoleError::InternalServerError(String::from(
error_message,
))
}
"InvalidInstanceId" => {
return UpdateManagedInstanceRoleError::InvalidInstanceId(String::from(
error_message,
))
}
"ValidationException" => {
return UpdateManagedInstanceRoleError::Validation(error_message.to_string())
}
_ => {}
}
}
return UpdateManagedInstanceRoleError::Unknown(res);
}
}
impl From<serde_json::error::Error> for UpdateManagedInstanceRoleError {
fn from(err: serde_json::error::Error) -> UpdateManagedInstanceRoleError {
UpdateManagedInstanceRoleError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for UpdateManagedInstanceRoleError {
fn from(err: CredentialsError) -> UpdateManagedInstanceRoleError {
UpdateManagedInstanceRoleError::Credentials(err)
}
}
impl From<HttpDispatchError> for UpdateManagedInstanceRoleError {
fn from(err: HttpDispatchError) -> UpdateManagedInstanceRoleError {
UpdateManagedInstanceRoleError::HttpDispatch(err)
}
}
impl From<io::Error> for UpdateManagedInstanceRoleError {
fn from(err: io::Error) -> UpdateManagedInstanceRoleError {
UpdateManagedInstanceRoleError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for UpdateManagedInstanceRoleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateManagedInstanceRoleError {
fn description(&self) -> &str {
match *self {
UpdateManagedInstanceRoleError::InternalServerError(ref cause) => cause,
UpdateManagedInstanceRoleError::InvalidInstanceId(ref cause) => cause,
UpdateManagedInstanceRoleError::Validation(ref cause) => cause,
UpdateManagedInstanceRoleError::Credentials(ref err) => err.description(),
UpdateManagedInstanceRoleError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
UpdateManagedInstanceRoleError::ParseError(ref cause) => cause,
UpdateManagedInstanceRoleError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdatePatchBaselineError {
DoesNotExist(String),
InternalServerError(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl UpdatePatchBaselineError {
pub fn from_response(res: BufferedHttpResponse) -> UpdatePatchBaselineError {
if let Ok(json) = from_slice::<SerdeJsonValue>(&res.body) {
let raw_error_type = json
.get("__type")
.and_then(|e| e.as_str())
.unwrap_or("Unknown");
let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or("");
let pieces: Vec<&str> = raw_error_type.split("#").collect();
let error_type = pieces.last().expect("Expected error type");
match *error_type {
"DoesNotExistException" => {
return UpdatePatchBaselineError::DoesNotExist(String::from(error_message))
}
"InternalServerError" => {
return UpdatePatchBaselineError::InternalServerError(String::from(
error_message,
))
}
"ValidationException" => {
return UpdatePatchBaselineError::Validation(error_message.to_string())
}
_ => {}
}
}
return UpdatePatchBaselineError::Unknown(res);
}
}
impl From<serde_json::error::Error> for UpdatePatchBaselineError {
fn from(err: serde_json::error::Error) -> UpdatePatchBaselineError {
UpdatePatchBaselineError::ParseError(err.description().to_string())
}
}
impl From<CredentialsError> for UpdatePatchBaselineError {
fn from(err: CredentialsError) -> UpdatePatchBaselineError {
UpdatePatchBaselineError::Credentials(err)
}
}
impl From<HttpDispatchError> for UpdatePatchBaselineError {
fn from(err: HttpDispatchError) -> UpdatePatchBaselineError {
UpdatePatchBaselineError::HttpDispatch(err)
}
}
impl From<io::Error> for UpdatePatchBaselineError {
fn from(err: io::Error) -> UpdatePatchBaselineError {
UpdatePatchBaselineError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for UpdatePatchBaselineError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdatePatchBaselineError {
fn description(&self) -> &str {
match *self {
UpdatePatchBaselineError::DoesNotExist(ref cause) => cause,
UpdatePatchBaselineError::InternalServerError(ref cause) => cause,
UpdatePatchBaselineError::Validation(ref cause) => cause,
UpdatePatchBaselineError::Credentials(ref err) => err.description(),
UpdatePatchBaselineError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
UpdatePatchBaselineError::ParseError(ref cause) => cause,
UpdatePatchBaselineError::Unknown(_) => "unknown error",
}
}
}
pub trait Ssm {
fn add_tags_to_resource(
&self,
input: AddTagsToResourceRequest,
) -> RusotoFuture<AddTagsToResourceResult, AddTagsToResourceError>;
fn cancel_command(
&self,
input: CancelCommandRequest,
) -> RusotoFuture<CancelCommandResult, CancelCommandError>;
fn create_activation(
&self,
input: CreateActivationRequest,
) -> RusotoFuture<CreateActivationResult, CreateActivationError>;
fn create_association(
&self,
input: CreateAssociationRequest,
) -> RusotoFuture<CreateAssociationResult, CreateAssociationError>;
fn create_association_batch(
&self,
input: CreateAssociationBatchRequest,
) -> RusotoFuture<CreateAssociationBatchResult, CreateAssociationBatchError>;
fn create_document(
&self,
input: CreateDocumentRequest,
) -> RusotoFuture<CreateDocumentResult, CreateDocumentError>;
fn create_maintenance_window(
&self,
input: CreateMaintenanceWindowRequest,
) -> RusotoFuture<CreateMaintenanceWindowResult, CreateMaintenanceWindowError>;
fn create_patch_baseline(
&self,
input: CreatePatchBaselineRequest,
) -> RusotoFuture<CreatePatchBaselineResult, CreatePatchBaselineError>;
fn create_resource_data_sync(
&self,
input: CreateResourceDataSyncRequest,
) -> RusotoFuture<CreateResourceDataSyncResult, CreateResourceDataSyncError>;
fn delete_activation(
&self,
input: DeleteActivationRequest,
) -> RusotoFuture<DeleteActivationResult, DeleteActivationError>;
fn delete_association(
&self,
input: DeleteAssociationRequest,
) -> RusotoFuture<DeleteAssociationResult, DeleteAssociationError>;
fn delete_document(
&self,
input: DeleteDocumentRequest,
) -> RusotoFuture<DeleteDocumentResult, DeleteDocumentError>;
fn delete_inventory(
&self,
input: DeleteInventoryRequest,
) -> RusotoFuture<DeleteInventoryResult, DeleteInventoryError>;
fn delete_maintenance_window(
&self,
input: DeleteMaintenanceWindowRequest,
) -> RusotoFuture<DeleteMaintenanceWindowResult, DeleteMaintenanceWindowError>;
fn delete_parameter(
&self,
input: DeleteParameterRequest,
) -> RusotoFuture<DeleteParameterResult, DeleteParameterError>;
fn delete_parameters(
&self,
input: DeleteParametersRequest,
) -> RusotoFuture<DeleteParametersResult, DeleteParametersError>;
fn delete_patch_baseline(
&self,
input: DeletePatchBaselineRequest,
) -> RusotoFuture<DeletePatchBaselineResult, DeletePatchBaselineError>;
fn delete_resource_data_sync(
&self,
input: DeleteResourceDataSyncRequest,
) -> RusotoFuture<DeleteResourceDataSyncResult, DeleteResourceDataSyncError>;
fn deregister_managed_instance(
&self,
input: DeregisterManagedInstanceRequest,
) -> RusotoFuture<DeregisterManagedInstanceResult, DeregisterManagedInstanceError>;
fn deregister_patch_baseline_for_patch_group(
&self,
input: DeregisterPatchBaselineForPatchGroupRequest,
) -> RusotoFuture<
DeregisterPatchBaselineForPatchGroupResult,
DeregisterPatchBaselineForPatchGroupError,
>;
fn deregister_target_from_maintenance_window(
&self,
input: DeregisterTargetFromMaintenanceWindowRequest,
) -> RusotoFuture<
DeregisterTargetFromMaintenanceWindowResult,
DeregisterTargetFromMaintenanceWindowError,
>;
fn deregister_task_from_maintenance_window(
&self,
input: DeregisterTaskFromMaintenanceWindowRequest,
) -> RusotoFuture<
DeregisterTaskFromMaintenanceWindowResult,
DeregisterTaskFromMaintenanceWindowError,
>;
fn describe_activations(
&self,
input: DescribeActivationsRequest,
) -> RusotoFuture<DescribeActivationsResult, DescribeActivationsError>;
fn describe_association(
&self,
input: DescribeAssociationRequest,
) -> RusotoFuture<DescribeAssociationResult, DescribeAssociationError>;
fn describe_association_execution_targets(
&self,
input: DescribeAssociationExecutionTargetsRequest,
) -> RusotoFuture<
DescribeAssociationExecutionTargetsResult,
DescribeAssociationExecutionTargetsError,
>;
fn describe_association_executions(
&self,
input: DescribeAssociationExecutionsRequest,
) -> RusotoFuture<DescribeAssociationExecutionsResult, DescribeAssociationExecutionsError>;
fn describe_automation_executions(
&self,
input: DescribeAutomationExecutionsRequest,
) -> RusotoFuture<DescribeAutomationExecutionsResult, DescribeAutomationExecutionsError>;
fn describe_automation_step_executions(
&self,
input: DescribeAutomationStepExecutionsRequest,
) -> RusotoFuture<DescribeAutomationStepExecutionsResult, DescribeAutomationStepExecutionsError>;
fn describe_available_patches(
&self,
input: DescribeAvailablePatchesRequest,
) -> RusotoFuture<DescribeAvailablePatchesResult, DescribeAvailablePatchesError>;
fn describe_document(
&self,
input: DescribeDocumentRequest,
) -> RusotoFuture<DescribeDocumentResult, DescribeDocumentError>;
fn describe_document_permission(
&self,
input: DescribeDocumentPermissionRequest,
) -> RusotoFuture<DescribeDocumentPermissionResponse, DescribeDocumentPermissionError>;
fn describe_effective_instance_associations(
&self,
input: DescribeEffectiveInstanceAssociationsRequest,
) -> RusotoFuture<
DescribeEffectiveInstanceAssociationsResult,
DescribeEffectiveInstanceAssociationsError,
>;
fn describe_effective_patches_for_patch_baseline(
&self,
input: DescribeEffectivePatchesForPatchBaselineRequest,
) -> RusotoFuture<
DescribeEffectivePatchesForPatchBaselineResult,
DescribeEffectivePatchesForPatchBaselineError,
>;
fn describe_instance_associations_status(
&self,
input: DescribeInstanceAssociationsStatusRequest,
) -> RusotoFuture<
DescribeInstanceAssociationsStatusResult,
DescribeInstanceAssociationsStatusError,
>;
fn describe_instance_information(
&self,
input: DescribeInstanceInformationRequest,
) -> RusotoFuture<DescribeInstanceInformationResult, DescribeInstanceInformationError>;
fn describe_instance_patch_states(
&self,
input: DescribeInstancePatchStatesRequest,
) -> RusotoFuture<DescribeInstancePatchStatesResult, DescribeInstancePatchStatesError>;
fn describe_instance_patch_states_for_patch_group(
&self,
input: DescribeInstancePatchStatesForPatchGroupRequest,
) -> RusotoFuture<
DescribeInstancePatchStatesForPatchGroupResult,
DescribeInstancePatchStatesForPatchGroupError,
>;
fn describe_instance_patches(
&self,
input: DescribeInstancePatchesRequest,
) -> RusotoFuture<DescribeInstancePatchesResult, DescribeInstancePatchesError>;
fn describe_inventory_deletions(
&self,
input: DescribeInventoryDeletionsRequest,
) -> RusotoFuture<DescribeInventoryDeletionsResult, DescribeInventoryDeletionsError>;
fn describe_maintenance_window_execution_task_invocations(
&self,
input: DescribeMaintenanceWindowExecutionTaskInvocationsRequest,
) -> RusotoFuture<
DescribeMaintenanceWindowExecutionTaskInvocationsResult,
DescribeMaintenanceWindowExecutionTaskInvocationsError,
>;
fn describe_maintenance_window_execution_tasks(
&self,
input: DescribeMaintenanceWindowExecutionTasksRequest,
) -> RusotoFuture<
DescribeMaintenanceWindowExecutionTasksResult,
DescribeMaintenanceWindowExecutionTasksError,
>;
fn describe_maintenance_window_executions(
&self,
input: DescribeMaintenanceWindowExecutionsRequest,
) -> RusotoFuture<
DescribeMaintenanceWindowExecutionsResult,
DescribeMaintenanceWindowExecutionsError,
>;
fn describe_maintenance_window_targets(
&self,
input: DescribeMaintenanceWindowTargetsRequest,
) -> RusotoFuture<DescribeMaintenanceWindowTargetsResult, DescribeMaintenanceWindowTargetsError>;
fn describe_maintenance_window_tasks(
&self,
input: DescribeMaintenanceWindowTasksRequest,
) -> RusotoFuture<DescribeMaintenanceWindowTasksResult, DescribeMaintenanceWindowTasksError>;
fn describe_maintenance_windows(
&self,
input: DescribeMaintenanceWindowsRequest,
) -> RusotoFuture<DescribeMaintenanceWindowsResult, DescribeMaintenanceWindowsError>;
fn describe_parameters(
&self,
input: DescribeParametersRequest,
) -> RusotoFuture<DescribeParametersResult, DescribeParametersError>;
fn describe_patch_baselines(
&self,
input: DescribePatchBaselinesRequest,
) -> RusotoFuture<DescribePatchBaselinesResult, DescribePatchBaselinesError>;
fn describe_patch_group_state(
&self,
input: DescribePatchGroupStateRequest,
) -> RusotoFuture<DescribePatchGroupStateResult, DescribePatchGroupStateError>;
fn describe_patch_groups(
&self,
input: DescribePatchGroupsRequest,
) -> RusotoFuture<DescribePatchGroupsResult, DescribePatchGroupsError>;
fn get_automation_execution(
&self,
input: GetAutomationExecutionRequest,
) -> RusotoFuture<GetAutomationExecutionResult, GetAutomationExecutionError>;
fn get_command_invocation(
&self,
input: GetCommandInvocationRequest,
) -> RusotoFuture<GetCommandInvocationResult, GetCommandInvocationError>;
fn get_default_patch_baseline(
&self,
input: GetDefaultPatchBaselineRequest,
) -> RusotoFuture<GetDefaultPatchBaselineResult, GetDefaultPatchBaselineError>;
fn get_deployable_patch_snapshot_for_instance(
&self,
input: GetDeployablePatchSnapshotForInstanceRequest,
) -> RusotoFuture<
GetDeployablePatchSnapshotForInstanceResult,
GetDeployablePatchSnapshotForInstanceError,
>;
fn get_document(
&self,
input: GetDocumentRequest,
) -> RusotoFuture<GetDocumentResult, GetDocumentError>;
fn get_inventory(
&self,
input: GetInventoryRequest,
) -> RusotoFuture<GetInventoryResult, GetInventoryError>;
fn get_inventory_schema(
&self,
input: GetInventorySchemaRequest,
) -> RusotoFuture<GetInventorySchemaResult, GetInventorySchemaError>;
fn get_maintenance_window(
&self,
input: GetMaintenanceWindowRequest,
) -> RusotoFuture<GetMaintenanceWindowResult, GetMaintenanceWindowError>;
fn get_maintenance_window_execution(
&self,
input: GetMaintenanceWindowExecutionRequest,
) -> RusotoFuture<GetMaintenanceWindowExecutionResult, GetMaintenanceWindowExecutionError>;
fn get_maintenance_window_execution_task(
&self,
input: GetMaintenanceWindowExecutionTaskRequest,
) -> RusotoFuture<GetMaintenanceWindowExecutionTaskResult, GetMaintenanceWindowExecutionTaskError>;
fn get_maintenance_window_execution_task_invocation(
&self,
input: GetMaintenanceWindowExecutionTaskInvocationRequest,
) -> RusotoFuture<
GetMaintenanceWindowExecutionTaskInvocationResult,
GetMaintenanceWindowExecutionTaskInvocationError,
>;
fn get_maintenance_window_task(
&self,
input: GetMaintenanceWindowTaskRequest,
) -> RusotoFuture<GetMaintenanceWindowTaskResult, GetMaintenanceWindowTaskError>;
fn get_parameter(
&self,
input: GetParameterRequest,
) -> RusotoFuture<GetParameterResult, GetParameterError>;
fn get_parameter_history(
&self,
input: GetParameterHistoryRequest,
) -> RusotoFuture<GetParameterHistoryResult, GetParameterHistoryError>;
fn get_parameters(
&self,
input: GetParametersRequest,
) -> RusotoFuture<GetParametersResult, GetParametersError>;
fn get_parameters_by_path(
&self,
input: GetParametersByPathRequest,
) -> RusotoFuture<GetParametersByPathResult, GetParametersByPathError>;
fn get_patch_baseline(
&self,
input: GetPatchBaselineRequest,
) -> RusotoFuture<GetPatchBaselineResult, GetPatchBaselineError>;
fn get_patch_baseline_for_patch_group(
&self,
input: GetPatchBaselineForPatchGroupRequest,
) -> RusotoFuture<GetPatchBaselineForPatchGroupResult, GetPatchBaselineForPatchGroupError>;
fn label_parameter_version(
&self,
input: LabelParameterVersionRequest,
) -> RusotoFuture<LabelParameterVersionResult, LabelParameterVersionError>;
fn list_association_versions(
&self,
input: ListAssociationVersionsRequest,
) -> RusotoFuture<ListAssociationVersionsResult, ListAssociationVersionsError>;
fn list_associations(
&self,
input: ListAssociationsRequest,
) -> RusotoFuture<ListAssociationsResult, ListAssociationsError>;
fn list_command_invocations(
&self,
input: ListCommandInvocationsRequest,
) -> RusotoFuture<ListCommandInvocationsResult, ListCommandInvocationsError>;
fn list_commands(
&self,
input: ListCommandsRequest,
) -> RusotoFuture<ListCommandsResult, ListCommandsError>;
fn list_compliance_items(
&self,
input: ListComplianceItemsRequest,
) -> RusotoFuture<ListComplianceItemsResult, ListComplianceItemsError>;
fn list_compliance_summaries(
&self,
input: ListComplianceSummariesRequest,
) -> RusotoFuture<ListComplianceSummariesResult, ListComplianceSummariesError>;
fn list_document_versions(
&self,
input: ListDocumentVersionsRequest,
) -> RusotoFuture<ListDocumentVersionsResult, ListDocumentVersionsError>;
fn list_documents(
&self,
input: ListDocumentsRequest,
) -> RusotoFuture<ListDocumentsResult, ListDocumentsError>;
fn list_inventory_entries(
&self,
input: ListInventoryEntriesRequest,
) -> RusotoFuture<ListInventoryEntriesResult, ListInventoryEntriesError>;
fn list_resource_compliance_summaries(
&self,
input: ListResourceComplianceSummariesRequest,
) -> RusotoFuture<ListResourceComplianceSummariesResult, ListResourceComplianceSummariesError>;
fn list_resource_data_sync(
&self,
input: ListResourceDataSyncRequest,
) -> RusotoFuture<ListResourceDataSyncResult, ListResourceDataSyncError>;
fn list_tags_for_resource(
&self,
input: ListTagsForResourceRequest,
) -> RusotoFuture<ListTagsForResourceResult, ListTagsForResourceError>;
fn modify_document_permission(
&self,
input: ModifyDocumentPermissionRequest,
) -> RusotoFuture<ModifyDocumentPermissionResponse, ModifyDocumentPermissionError>;
fn put_compliance_items(
&self,
input: PutComplianceItemsRequest,
) -> RusotoFuture<PutComplianceItemsResult, PutComplianceItemsError>;
fn put_inventory(
&self,
input: PutInventoryRequest,
) -> RusotoFuture<PutInventoryResult, PutInventoryError>;
fn put_parameter(
&self,
input: PutParameterRequest,
) -> RusotoFuture<PutParameterResult, PutParameterError>;
fn register_default_patch_baseline(
&self,
input: RegisterDefaultPatchBaselineRequest,
) -> RusotoFuture<RegisterDefaultPatchBaselineResult, RegisterDefaultPatchBaselineError>;
fn register_patch_baseline_for_patch_group(
&self,
input: RegisterPatchBaselineForPatchGroupRequest,
) -> RusotoFuture<
RegisterPatchBaselineForPatchGroupResult,
RegisterPatchBaselineForPatchGroupError,
>;
fn register_target_with_maintenance_window(
&self,
input: RegisterTargetWithMaintenanceWindowRequest,
) -> RusotoFuture<
RegisterTargetWithMaintenanceWindowResult,
RegisterTargetWithMaintenanceWindowError,
>;
fn register_task_with_maintenance_window(
&self,
input: RegisterTaskWithMaintenanceWindowRequest,
) -> RusotoFuture<RegisterTaskWithMaintenanceWindowResult, RegisterTaskWithMaintenanceWindowError>;
fn remove_tags_from_resource(
&self,
input: RemoveTagsFromResourceRequest,
) -> RusotoFuture<RemoveTagsFromResourceResult, RemoveTagsFromResourceError>;
fn send_automation_signal(
&self,
input: SendAutomationSignalRequest,
) -> RusotoFuture<SendAutomationSignalResult, SendAutomationSignalError>;
fn send_command(
&self,
input: SendCommandRequest,
) -> RusotoFuture<SendCommandResult, SendCommandError>;
fn start_associations_once(
&self,
input: StartAssociationsOnceRequest,
) -> RusotoFuture<StartAssociationsOnceResult, StartAssociationsOnceError>;
fn start_automation_execution(
&self,
input: StartAutomationExecutionRequest,
) -> RusotoFuture<StartAutomationExecutionResult, StartAutomationExecutionError>;
fn stop_automation_execution(
&self,
input: StopAutomationExecutionRequest,
) -> RusotoFuture<StopAutomationExecutionResult, StopAutomationExecutionError>;
fn update_association(
&self,
input: UpdateAssociationRequest,
) -> RusotoFuture<UpdateAssociationResult, UpdateAssociationError>;
fn update_association_status(
&self,
input: UpdateAssociationStatusRequest,
) -> RusotoFuture<UpdateAssociationStatusResult, UpdateAssociationStatusError>;
fn update_document(
&self,
input: UpdateDocumentRequest,
) -> RusotoFuture<UpdateDocumentResult, UpdateDocumentError>;
fn update_document_default_version(
&self,
input: UpdateDocumentDefaultVersionRequest,
) -> RusotoFuture<UpdateDocumentDefaultVersionResult, UpdateDocumentDefaultVersionError>;
fn update_maintenance_window(
&self,
input: UpdateMaintenanceWindowRequest,
) -> RusotoFuture<UpdateMaintenanceWindowResult, UpdateMaintenanceWindowError>;
fn update_maintenance_window_target(
&self,
input: UpdateMaintenanceWindowTargetRequest,
) -> RusotoFuture<UpdateMaintenanceWindowTargetResult, UpdateMaintenanceWindowTargetError>;
fn update_maintenance_window_task(
&self,
input: UpdateMaintenanceWindowTaskRequest,
) -> RusotoFuture<UpdateMaintenanceWindowTaskResult, UpdateMaintenanceWindowTaskError>;
fn update_managed_instance_role(
&self,
input: UpdateManagedInstanceRoleRequest,
) -> RusotoFuture<UpdateManagedInstanceRoleResult, UpdateManagedInstanceRoleError>;
fn update_patch_baseline(
&self,
input: UpdatePatchBaselineRequest,
) -> RusotoFuture<UpdatePatchBaselineResult, UpdatePatchBaselineError>;
}
pub struct SsmClient {
client: Client,
region: region::Region,
}
impl SsmClient {
pub fn new(region: region::Region) -> SsmClient {
SsmClient {
client: Client::shared(),
region: region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> SsmClient
where
P: ProvideAwsCredentials + Send + Sync + 'static,
P::Future: Send,
D: DispatchSignedRequest + Send + Sync + 'static,
D::Future: Send,
{
SsmClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region: region,
}
}
}
impl Ssm for SsmClient {
fn add_tags_to_resource(
&self,
input: AddTagsToResourceRequest,
) -> RusotoFuture<AddTagsToResourceResult, AddTagsToResourceError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.AddTagsToResource");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<AddTagsToResourceResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(AddTagsToResourceError::from_response(response))),
)
}
})
}
fn cancel_command(
&self,
input: CancelCommandRequest,
) -> RusotoFuture<CancelCommandResult, CancelCommandError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.CancelCommand");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<CancelCommandResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CancelCommandError::from_response(response))),
)
}
})
}
fn create_activation(
&self,
input: CreateActivationRequest,
) -> RusotoFuture<CreateActivationResult, CreateActivationError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.CreateActivation");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<CreateActivationResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateActivationError::from_response(response))),
)
}
})
}
fn create_association(
&self,
input: CreateAssociationRequest,
) -> RusotoFuture<CreateAssociationResult, CreateAssociationError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.CreateAssociation");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<CreateAssociationResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateAssociationError::from_response(response))),
)
}
})
}
fn create_association_batch(
&self,
input: CreateAssociationBatchRequest,
) -> RusotoFuture<CreateAssociationBatchResult, CreateAssociationBatchError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.CreateAssociationBatch");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<CreateAssociationBatchResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(CreateAssociationBatchError::from_response(response))
}),
)
}
})
}
fn create_document(
&self,
input: CreateDocumentRequest,
) -> RusotoFuture<CreateDocumentResult, CreateDocumentError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.CreateDocument");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<CreateDocumentResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateDocumentError::from_response(response))),
)
}
})
}
fn create_maintenance_window(
&self,
input: CreateMaintenanceWindowRequest,
) -> RusotoFuture<CreateMaintenanceWindowResult, CreateMaintenanceWindowError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.CreateMaintenanceWindow");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<CreateMaintenanceWindowResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateMaintenanceWindowError::from_response(response))
}))
}
})
}
fn create_patch_baseline(
&self,
input: CreatePatchBaselineRequest,
) -> RusotoFuture<CreatePatchBaselineResult, CreatePatchBaselineError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.CreatePatchBaseline");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<CreatePatchBaselineResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(CreatePatchBaselineError::from_response(response))
}),
)
}
})
}
fn create_resource_data_sync(
&self,
input: CreateResourceDataSyncRequest,
) -> RusotoFuture<CreateResourceDataSyncResult, CreateResourceDataSyncError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.CreateResourceDataSync");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<CreateResourceDataSyncResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(CreateResourceDataSyncError::from_response(response))
}),
)
}
})
}
fn delete_activation(
&self,
input: DeleteActivationRequest,
) -> RusotoFuture<DeleteActivationResult, DeleteActivationError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.DeleteActivation");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DeleteActivationResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteActivationError::from_response(response))),
)
}
})
}
fn delete_association(
&self,
input: DeleteAssociationRequest,
) -> RusotoFuture<DeleteAssociationResult, DeleteAssociationError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.DeleteAssociation");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DeleteAssociationResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteAssociationError::from_response(response))),
)
}
})
}
fn delete_document(
&self,
input: DeleteDocumentRequest,
) -> RusotoFuture<DeleteDocumentResult, DeleteDocumentError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.DeleteDocument");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DeleteDocumentResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteDocumentError::from_response(response))),
)
}
})
}
fn delete_inventory(
&self,
input: DeleteInventoryRequest,
) -> RusotoFuture<DeleteInventoryResult, DeleteInventoryError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.DeleteInventory");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DeleteInventoryResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteInventoryError::from_response(response))),
)
}
})
}
fn delete_maintenance_window(
&self,
input: DeleteMaintenanceWindowRequest,
) -> RusotoFuture<DeleteMaintenanceWindowResult, DeleteMaintenanceWindowError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.DeleteMaintenanceWindow");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DeleteMaintenanceWindowResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteMaintenanceWindowError::from_response(response))
}))
}
})
}
fn delete_parameter(
&self,
input: DeleteParameterRequest,
) -> RusotoFuture<DeleteParameterResult, DeleteParameterError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.DeleteParameter");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DeleteParameterResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteParameterError::from_response(response))),
)
}
})
}
fn delete_parameters(
&self,
input: DeleteParametersRequest,
) -> RusotoFuture<DeleteParametersResult, DeleteParametersError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.DeleteParameters");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DeleteParametersResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteParametersError::from_response(response))),
)
}
})
}
fn delete_patch_baseline(
&self,
input: DeletePatchBaselineRequest,
) -> RusotoFuture<DeletePatchBaselineResult, DeletePatchBaselineError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.DeletePatchBaseline");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DeletePatchBaselineResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeletePatchBaselineError::from_response(response))
}),
)
}
})
}
fn delete_resource_data_sync(
&self,
input: DeleteResourceDataSyncRequest,
) -> RusotoFuture<DeleteResourceDataSyncResult, DeleteResourceDataSyncError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.DeleteResourceDataSync");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DeleteResourceDataSyncResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteResourceDataSyncError::from_response(response))
}),
)
}
})
}
fn deregister_managed_instance(
&self,
input: DeregisterManagedInstanceRequest,
) -> RusotoFuture<DeregisterManagedInstanceResult, DeregisterManagedInstanceError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.DeregisterManagedInstance");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DeregisterManagedInstanceResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DeregisterManagedInstanceError::from_response(response))
}))
}
})
}
fn deregister_patch_baseline_for_patch_group(
&self,
input: DeregisterPatchBaselineForPatchGroupRequest,
) -> RusotoFuture<
DeregisterPatchBaselineForPatchGroupResult,
DeregisterPatchBaselineForPatchGroupError,
> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AmazonSSM.DeregisterPatchBaselineForPatchGroup",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DeregisterPatchBaselineForPatchGroupResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DeregisterPatchBaselineForPatchGroupError::from_response(
response,
))
}))
}
})
}
fn deregister_target_from_maintenance_window(
&self,
input: DeregisterTargetFromMaintenanceWindowRequest,
) -> RusotoFuture<
DeregisterTargetFromMaintenanceWindowResult,
DeregisterTargetFromMaintenanceWindowError,
> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AmazonSSM.DeregisterTargetFromMaintenanceWindow",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DeregisterTargetFromMaintenanceWindowResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DeregisterTargetFromMaintenanceWindowError::from_response(
response,
))
}))
}
})
}
fn deregister_task_from_maintenance_window(
&self,
input: DeregisterTaskFromMaintenanceWindowRequest,
) -> RusotoFuture<
DeregisterTaskFromMaintenanceWindowResult,
DeregisterTaskFromMaintenanceWindowError,
> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AmazonSSM.DeregisterTaskFromMaintenanceWindow",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DeregisterTaskFromMaintenanceWindowResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DeregisterTaskFromMaintenanceWindowError::from_response(
response,
))
}))
}
})
}
fn describe_activations(
&self,
input: DescribeActivationsRequest,
) -> RusotoFuture<DescribeActivationsResult, DescribeActivationsError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.DescribeActivations");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DescribeActivationsResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribeActivationsError::from_response(response))
}),
)
}
})
}
fn describe_association(
&self,
input: DescribeAssociationRequest,
) -> RusotoFuture<DescribeAssociationResult, DescribeAssociationError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.DescribeAssociation");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DescribeAssociationResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribeAssociationError::from_response(response))
}),
)
}
})
}
fn describe_association_execution_targets(
&self,
input: DescribeAssociationExecutionTargetsRequest,
) -> RusotoFuture<
DescribeAssociationExecutionTargetsResult,
DescribeAssociationExecutionTargetsError,
> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AmazonSSM.DescribeAssociationExecutionTargets",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DescribeAssociationExecutionTargetsResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeAssociationExecutionTargetsError::from_response(
response,
))
}))
}
})
}
fn describe_association_executions(
&self,
input: DescribeAssociationExecutionsRequest,
) -> RusotoFuture<DescribeAssociationExecutionsResult, DescribeAssociationExecutionsError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.DescribeAssociationExecutions");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DescribeAssociationExecutionsResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeAssociationExecutionsError::from_response(response))
}))
}
})
}
fn describe_automation_executions(
&self,
input: DescribeAutomationExecutionsRequest,
) -> RusotoFuture<DescribeAutomationExecutionsResult, DescribeAutomationExecutionsError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.DescribeAutomationExecutions");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DescribeAutomationExecutionsResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeAutomationExecutionsError::from_response(response))
}))
}
})
}
fn describe_automation_step_executions(
&self,
input: DescribeAutomationStepExecutionsRequest,
) -> RusotoFuture<DescribeAutomationStepExecutionsResult, DescribeAutomationStepExecutionsError>
{
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.DescribeAutomationStepExecutions");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DescribeAutomationStepExecutionsResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeAutomationStepExecutionsError::from_response(
response,
))
}))
}
})
}
fn describe_available_patches(
&self,
input: DescribeAvailablePatchesRequest,
) -> RusotoFuture<DescribeAvailablePatchesResult, DescribeAvailablePatchesError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.DescribeAvailablePatches");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DescribeAvailablePatchesResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeAvailablePatchesError::from_response(response))
}))
}
})
}
fn describe_document(
&self,
input: DescribeDocumentRequest,
) -> RusotoFuture<DescribeDocumentResult, DescribeDocumentError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.DescribeDocument");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DescribeDocumentResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeDocumentError::from_response(response))),
)
}
})
}
fn describe_document_permission(
&self,
input: DescribeDocumentPermissionRequest,
) -> RusotoFuture<DescribeDocumentPermissionResponse, DescribeDocumentPermissionError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.DescribeDocumentPermission");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DescribeDocumentPermissionResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeDocumentPermissionError::from_response(response))
}))
}
})
}
fn describe_effective_instance_associations(
&self,
input: DescribeEffectiveInstanceAssociationsRequest,
) -> RusotoFuture<
DescribeEffectiveInstanceAssociationsResult,
DescribeEffectiveInstanceAssociationsError,
> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AmazonSSM.DescribeEffectiveInstanceAssociations",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DescribeEffectiveInstanceAssociationsResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeEffectiveInstanceAssociationsError::from_response(
response,
))
}))
}
})
}
fn describe_effective_patches_for_patch_baseline(
&self,
input: DescribeEffectivePatchesForPatchBaselineRequest,
) -> RusotoFuture<
DescribeEffectivePatchesForPatchBaselineResult,
DescribeEffectivePatchesForPatchBaselineError,
> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AmazonSSM.DescribeEffectivePatchesForPatchBaseline",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DescribeEffectivePatchesForPatchBaselineResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeEffectivePatchesForPatchBaselineError::from_response(response))
}))
}
})
}
fn describe_instance_associations_status(
&self,
input: DescribeInstanceAssociationsStatusRequest,
) -> RusotoFuture<
DescribeInstanceAssociationsStatusResult,
DescribeInstanceAssociationsStatusError,
> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AmazonSSM.DescribeInstanceAssociationsStatus",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DescribeInstanceAssociationsStatusResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeInstanceAssociationsStatusError::from_response(
response,
))
}))
}
})
}
fn describe_instance_information(
&self,
input: DescribeInstanceInformationRequest,
) -> RusotoFuture<DescribeInstanceInformationResult, DescribeInstanceInformationError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.DescribeInstanceInformation");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DescribeInstanceInformationResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeInstanceInformationError::from_response(response))
}))
}
})
}
fn describe_instance_patch_states(
&self,
input: DescribeInstancePatchStatesRequest,
) -> RusotoFuture<DescribeInstancePatchStatesResult, DescribeInstancePatchStatesError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.DescribeInstancePatchStates");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DescribeInstancePatchStatesResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeInstancePatchStatesError::from_response(response))
}))
}
})
}
fn describe_instance_patch_states_for_patch_group(
&self,
input: DescribeInstancePatchStatesForPatchGroupRequest,
) -> RusotoFuture<
DescribeInstancePatchStatesForPatchGroupResult,
DescribeInstancePatchStatesForPatchGroupError,
> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AmazonSSM.DescribeInstancePatchStatesForPatchGroup",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DescribeInstancePatchStatesForPatchGroupResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeInstancePatchStatesForPatchGroupError::from_response(response))
}))
}
})
}
fn describe_instance_patches(
&self,
input: DescribeInstancePatchesRequest,
) -> RusotoFuture<DescribeInstancePatchesResult, DescribeInstancePatchesError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.DescribeInstancePatches");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DescribeInstancePatchesResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeInstancePatchesError::from_response(response))
}))
}
})
}
fn describe_inventory_deletions(
&self,
input: DescribeInventoryDeletionsRequest,
) -> RusotoFuture<DescribeInventoryDeletionsResult, DescribeInventoryDeletionsError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.DescribeInventoryDeletions");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DescribeInventoryDeletionsResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeInventoryDeletionsError::from_response(response))
}))
}
})
}
fn describe_maintenance_window_execution_task_invocations(
&self,
input: DescribeMaintenanceWindowExecutionTaskInvocationsRequest,
) -> RusotoFuture<
DescribeMaintenanceWindowExecutionTaskInvocationsResult,
DescribeMaintenanceWindowExecutionTaskInvocationsError,
> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AmazonSSM.DescribeMaintenanceWindowExecutionTaskInvocations",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DescribeMaintenanceWindowExecutionTaskInvocationsResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(
DescribeMaintenanceWindowExecutionTaskInvocationsError::from_response(
response,
),
)
}))
}
})
}
fn describe_maintenance_window_execution_tasks(
&self,
input: DescribeMaintenanceWindowExecutionTasksRequest,
) -> RusotoFuture<
DescribeMaintenanceWindowExecutionTasksResult,
DescribeMaintenanceWindowExecutionTasksError,
> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AmazonSSM.DescribeMaintenanceWindowExecutionTasks",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DescribeMaintenanceWindowExecutionTasksResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeMaintenanceWindowExecutionTasksError::from_response(
response,
))
}))
}
})
}
fn describe_maintenance_window_executions(
&self,
input: DescribeMaintenanceWindowExecutionsRequest,
) -> RusotoFuture<
DescribeMaintenanceWindowExecutionsResult,
DescribeMaintenanceWindowExecutionsError,
> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AmazonSSM.DescribeMaintenanceWindowExecutions",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DescribeMaintenanceWindowExecutionsResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeMaintenanceWindowExecutionsError::from_response(
response,
))
}))
}
})
}
fn describe_maintenance_window_targets(
&self,
input: DescribeMaintenanceWindowTargetsRequest,
) -> RusotoFuture<DescribeMaintenanceWindowTargetsResult, DescribeMaintenanceWindowTargetsError>
{
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.DescribeMaintenanceWindowTargets");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DescribeMaintenanceWindowTargetsResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeMaintenanceWindowTargetsError::from_response(
response,
))
}))
}
})
}
fn describe_maintenance_window_tasks(
&self,
input: DescribeMaintenanceWindowTasksRequest,
) -> RusotoFuture<DescribeMaintenanceWindowTasksResult, DescribeMaintenanceWindowTasksError>
{
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.DescribeMaintenanceWindowTasks");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DescribeMaintenanceWindowTasksResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeMaintenanceWindowTasksError::from_response(response))
}))
}
})
}
fn describe_maintenance_windows(
&self,
input: DescribeMaintenanceWindowsRequest,
) -> RusotoFuture<DescribeMaintenanceWindowsResult, DescribeMaintenanceWindowsError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.DescribeMaintenanceWindows");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DescribeMaintenanceWindowsResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeMaintenanceWindowsError::from_response(response))
}))
}
})
}
fn describe_parameters(
&self,
input: DescribeParametersRequest,
) -> RusotoFuture<DescribeParametersResult, DescribeParametersError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.DescribeParameters");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DescribeParametersResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeParametersError::from_response(response))),
)
}
})
}
fn describe_patch_baselines(
&self,
input: DescribePatchBaselinesRequest,
) -> RusotoFuture<DescribePatchBaselinesResult, DescribePatchBaselinesError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.DescribePatchBaselines");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DescribePatchBaselinesResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribePatchBaselinesError::from_response(response))
}),
)
}
})
}
fn describe_patch_group_state(
&self,
input: DescribePatchGroupStateRequest,
) -> RusotoFuture<DescribePatchGroupStateResult, DescribePatchGroupStateError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.DescribePatchGroupState");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DescribePatchGroupStateResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribePatchGroupStateError::from_response(response))
}))
}
})
}
fn describe_patch_groups(
&self,
input: DescribePatchGroupsRequest,
) -> RusotoFuture<DescribePatchGroupsResult, DescribePatchGroupsError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.DescribePatchGroups");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<DescribePatchGroupsResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribePatchGroupsError::from_response(response))
}),
)
}
})
}
fn get_automation_execution(
&self,
input: GetAutomationExecutionRequest,
) -> RusotoFuture<GetAutomationExecutionResult, GetAutomationExecutionError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.GetAutomationExecution");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<GetAutomationExecutionResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetAutomationExecutionError::from_response(response))
}),
)
}
})
}
fn get_command_invocation(
&self,
input: GetCommandInvocationRequest,
) -> RusotoFuture<GetCommandInvocationResult, GetCommandInvocationError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.GetCommandInvocation");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<GetCommandInvocationResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetCommandInvocationError::from_response(response))
}),
)
}
})
}
fn get_default_patch_baseline(
&self,
input: GetDefaultPatchBaselineRequest,
) -> RusotoFuture<GetDefaultPatchBaselineResult, GetDefaultPatchBaselineError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.GetDefaultPatchBaseline");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<GetDefaultPatchBaselineResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetDefaultPatchBaselineError::from_response(response))
}))
}
})
}
fn get_deployable_patch_snapshot_for_instance(
&self,
input: GetDeployablePatchSnapshotForInstanceRequest,
) -> RusotoFuture<
GetDeployablePatchSnapshotForInstanceResult,
GetDeployablePatchSnapshotForInstanceError,
> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AmazonSSM.GetDeployablePatchSnapshotForInstance",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<GetDeployablePatchSnapshotForInstanceResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetDeployablePatchSnapshotForInstanceError::from_response(
response,
))
}))
}
})
}
fn get_document(
&self,
input: GetDocumentRequest,
) -> RusotoFuture<GetDocumentResult, GetDocumentError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.GetDocument");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<GetDocumentResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetDocumentError::from_response(response))),
)
}
})
}
fn get_inventory(
&self,
input: GetInventoryRequest,
) -> RusotoFuture<GetInventoryResult, GetInventoryError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.GetInventory");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<GetInventoryResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetInventoryError::from_response(response))),
)
}
})
}
fn get_inventory_schema(
&self,
input: GetInventorySchemaRequest,
) -> RusotoFuture<GetInventorySchemaResult, GetInventorySchemaError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.GetInventorySchema");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<GetInventorySchemaResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetInventorySchemaError::from_response(response))),
)
}
})
}
fn get_maintenance_window(
&self,
input: GetMaintenanceWindowRequest,
) -> RusotoFuture<GetMaintenanceWindowResult, GetMaintenanceWindowError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.GetMaintenanceWindow");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<GetMaintenanceWindowResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetMaintenanceWindowError::from_response(response))
}),
)
}
})
}
fn get_maintenance_window_execution(
&self,
input: GetMaintenanceWindowExecutionRequest,
) -> RusotoFuture<GetMaintenanceWindowExecutionResult, GetMaintenanceWindowExecutionError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.GetMaintenanceWindowExecution");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<GetMaintenanceWindowExecutionResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetMaintenanceWindowExecutionError::from_response(response))
}))
}
})
}
fn get_maintenance_window_execution_task(
&self,
input: GetMaintenanceWindowExecutionTaskRequest,
) -> RusotoFuture<GetMaintenanceWindowExecutionTaskResult, GetMaintenanceWindowExecutionTaskError>
{
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AmazonSSM.GetMaintenanceWindowExecutionTask",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<GetMaintenanceWindowExecutionTaskResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetMaintenanceWindowExecutionTaskError::from_response(
response,
))
}))
}
})
}
fn get_maintenance_window_execution_task_invocation(
&self,
input: GetMaintenanceWindowExecutionTaskInvocationRequest,
) -> RusotoFuture<
GetMaintenanceWindowExecutionTaskInvocationResult,
GetMaintenanceWindowExecutionTaskInvocationError,
> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AmazonSSM.GetMaintenanceWindowExecutionTaskInvocation",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<GetMaintenanceWindowExecutionTaskInvocationResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetMaintenanceWindowExecutionTaskInvocationError::from_response(response))
}))
}
})
}
fn get_maintenance_window_task(
&self,
input: GetMaintenanceWindowTaskRequest,
) -> RusotoFuture<GetMaintenanceWindowTaskResult, GetMaintenanceWindowTaskError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.GetMaintenanceWindowTask");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<GetMaintenanceWindowTaskResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetMaintenanceWindowTaskError::from_response(response))
}))
}
})
}
fn get_parameter(
&self,
input: GetParameterRequest,
) -> RusotoFuture<GetParameterResult, GetParameterError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.GetParameter");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<GetParameterResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetParameterError::from_response(response))),
)
}
})
}
fn get_parameter_history(
&self,
input: GetParameterHistoryRequest,
) -> RusotoFuture<GetParameterHistoryResult, GetParameterHistoryError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.GetParameterHistory");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<GetParameterHistoryResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetParameterHistoryError::from_response(response))
}),
)
}
})
}
fn get_parameters(
&self,
input: GetParametersRequest,
) -> RusotoFuture<GetParametersResult, GetParametersError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.GetParameters");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<GetParametersResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetParametersError::from_response(response))),
)
}
})
}
fn get_parameters_by_path(
&self,
input: GetParametersByPathRequest,
) -> RusotoFuture<GetParametersByPathResult, GetParametersByPathError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.GetParametersByPath");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<GetParametersByPathResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetParametersByPathError::from_response(response))
}),
)
}
})
}
fn get_patch_baseline(
&self,
input: GetPatchBaselineRequest,
) -> RusotoFuture<GetPatchBaselineResult, GetPatchBaselineError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.GetPatchBaseline");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<GetPatchBaselineResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetPatchBaselineError::from_response(response))),
)
}
})
}
fn get_patch_baseline_for_patch_group(
&self,
input: GetPatchBaselineForPatchGroupRequest,
) -> RusotoFuture<GetPatchBaselineForPatchGroupResult, GetPatchBaselineForPatchGroupError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.GetPatchBaselineForPatchGroup");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<GetPatchBaselineForPatchGroupResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetPatchBaselineForPatchGroupError::from_response(response))
}))
}
})
}
fn label_parameter_version(
&self,
input: LabelParameterVersionRequest,
) -> RusotoFuture<LabelParameterVersionResult, LabelParameterVersionError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.LabelParameterVersion");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<LabelParameterVersionResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(LabelParameterVersionError::from_response(response))
}),
)
}
})
}
fn list_association_versions(
&self,
input: ListAssociationVersionsRequest,
) -> RusotoFuture<ListAssociationVersionsResult, ListAssociationVersionsError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.ListAssociationVersions");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<ListAssociationVersionsResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListAssociationVersionsError::from_response(response))
}))
}
})
}
fn list_associations(
&self,
input: ListAssociationsRequest,
) -> RusotoFuture<ListAssociationsResult, ListAssociationsError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.ListAssociations");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<ListAssociationsResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListAssociationsError::from_response(response))),
)
}
})
}
fn list_command_invocations(
&self,
input: ListCommandInvocationsRequest,
) -> RusotoFuture<ListCommandInvocationsResult, ListCommandInvocationsError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.ListCommandInvocations");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<ListCommandInvocationsResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListCommandInvocationsError::from_response(response))
}),
)
}
})
}
fn list_commands(
&self,
input: ListCommandsRequest,
) -> RusotoFuture<ListCommandsResult, ListCommandsError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.ListCommands");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<ListCommandsResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListCommandsError::from_response(response))),
)
}
})
}
fn list_compliance_items(
&self,
input: ListComplianceItemsRequest,
) -> RusotoFuture<ListComplianceItemsResult, ListComplianceItemsError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.ListComplianceItems");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<ListComplianceItemsResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListComplianceItemsError::from_response(response))
}),
)
}
})
}
fn list_compliance_summaries(
&self,
input: ListComplianceSummariesRequest,
) -> RusotoFuture<ListComplianceSummariesResult, ListComplianceSummariesError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.ListComplianceSummaries");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<ListComplianceSummariesResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListComplianceSummariesError::from_response(response))
}))
}
})
}
fn list_document_versions(
&self,
input: ListDocumentVersionsRequest,
) -> RusotoFuture<ListDocumentVersionsResult, ListDocumentVersionsError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.ListDocumentVersions");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<ListDocumentVersionsResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListDocumentVersionsError::from_response(response))
}),
)
}
})
}
fn list_documents(
&self,
input: ListDocumentsRequest,
) -> RusotoFuture<ListDocumentsResult, ListDocumentsError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.ListDocuments");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<ListDocumentsResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListDocumentsError::from_response(response))),
)
}
})
}
fn list_inventory_entries(
&self,
input: ListInventoryEntriesRequest,
) -> RusotoFuture<ListInventoryEntriesResult, ListInventoryEntriesError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.ListInventoryEntries");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<ListInventoryEntriesResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListInventoryEntriesError::from_response(response))
}),
)
}
})
}
fn list_resource_compliance_summaries(
&self,
input: ListResourceComplianceSummariesRequest,
) -> RusotoFuture<ListResourceComplianceSummariesResult, ListResourceComplianceSummariesError>
{
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.ListResourceComplianceSummaries");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<ListResourceComplianceSummariesResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListResourceComplianceSummariesError::from_response(
response,
))
}))
}
})
}
fn list_resource_data_sync(
&self,
input: ListResourceDataSyncRequest,
) -> RusotoFuture<ListResourceDataSyncResult, ListResourceDataSyncError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.ListResourceDataSync");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<ListResourceDataSyncResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListResourceDataSyncError::from_response(response))
}),
)
}
})
}
fn list_tags_for_resource(
&self,
input: ListTagsForResourceRequest,
) -> RusotoFuture<ListTagsForResourceResult, ListTagsForResourceError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.ListTagsForResource");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<ListTagsForResourceResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListTagsForResourceError::from_response(response))
}),
)
}
})
}
fn modify_document_permission(
&self,
input: ModifyDocumentPermissionRequest,
) -> RusotoFuture<ModifyDocumentPermissionResponse, ModifyDocumentPermissionError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.ModifyDocumentPermission");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<ModifyDocumentPermissionResponse>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ModifyDocumentPermissionError::from_response(response))
}))
}
})
}
fn put_compliance_items(
&self,
input: PutComplianceItemsRequest,
) -> RusotoFuture<PutComplianceItemsResult, PutComplianceItemsError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.PutComplianceItems");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<PutComplianceItemsResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(PutComplianceItemsError::from_response(response))),
)
}
})
}
fn put_inventory(
&self,
input: PutInventoryRequest,
) -> RusotoFuture<PutInventoryResult, PutInventoryError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.PutInventory");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<PutInventoryResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(PutInventoryError::from_response(response))),
)
}
})
}
fn put_parameter(
&self,
input: PutParameterRequest,
) -> RusotoFuture<PutParameterResult, PutParameterError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.PutParameter");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<PutParameterResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(PutParameterError::from_response(response))),
)
}
})
}
fn register_default_patch_baseline(
&self,
input: RegisterDefaultPatchBaselineRequest,
) -> RusotoFuture<RegisterDefaultPatchBaselineResult, RegisterDefaultPatchBaselineError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.RegisterDefaultPatchBaseline");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<RegisterDefaultPatchBaselineResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(RegisterDefaultPatchBaselineError::from_response(response))
}))
}
})
}
fn register_patch_baseline_for_patch_group(
&self,
input: RegisterPatchBaselineForPatchGroupRequest,
) -> RusotoFuture<
RegisterPatchBaselineForPatchGroupResult,
RegisterPatchBaselineForPatchGroupError,
> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AmazonSSM.RegisterPatchBaselineForPatchGroup",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<RegisterPatchBaselineForPatchGroupResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(RegisterPatchBaselineForPatchGroupError::from_response(
response,
))
}))
}
})
}
fn register_target_with_maintenance_window(
&self,
input: RegisterTargetWithMaintenanceWindowRequest,
) -> RusotoFuture<
RegisterTargetWithMaintenanceWindowResult,
RegisterTargetWithMaintenanceWindowError,
> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AmazonSSM.RegisterTargetWithMaintenanceWindow",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<RegisterTargetWithMaintenanceWindowResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(RegisterTargetWithMaintenanceWindowError::from_response(
response,
))
}))
}
})
}
fn register_task_with_maintenance_window(
&self,
input: RegisterTaskWithMaintenanceWindowRequest,
) -> RusotoFuture<RegisterTaskWithMaintenanceWindowResult, RegisterTaskWithMaintenanceWindowError>
{
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AmazonSSM.RegisterTaskWithMaintenanceWindow",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<RegisterTaskWithMaintenanceWindowResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(RegisterTaskWithMaintenanceWindowError::from_response(
response,
))
}))
}
})
}
fn remove_tags_from_resource(
&self,
input: RemoveTagsFromResourceRequest,
) -> RusotoFuture<RemoveTagsFromResourceResult, RemoveTagsFromResourceError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.RemoveTagsFromResource");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<RemoveTagsFromResourceResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(RemoveTagsFromResourceError::from_response(response))
}),
)
}
})
}
fn send_automation_signal(
&self,
input: SendAutomationSignalRequest,
) -> RusotoFuture<SendAutomationSignalResult, SendAutomationSignalError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.SendAutomationSignal");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<SendAutomationSignalResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(SendAutomationSignalError::from_response(response))
}),
)
}
})
}
fn send_command(
&self,
input: SendCommandRequest,
) -> RusotoFuture<SendCommandResult, SendCommandError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.SendCommand");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<SendCommandResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(SendCommandError::from_response(response))),
)
}
})
}
fn start_associations_once(
&self,
input: StartAssociationsOnceRequest,
) -> RusotoFuture<StartAssociationsOnceResult, StartAssociationsOnceError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.StartAssociationsOnce");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<StartAssociationsOnceResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(StartAssociationsOnceError::from_response(response))
}),
)
}
})
}
fn start_automation_execution(
&self,
input: StartAutomationExecutionRequest,
) -> RusotoFuture<StartAutomationExecutionResult, StartAutomationExecutionError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.StartAutomationExecution");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<StartAutomationExecutionResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(StartAutomationExecutionError::from_response(response))
}))
}
})
}
fn stop_automation_execution(
&self,
input: StopAutomationExecutionRequest,
) -> RusotoFuture<StopAutomationExecutionResult, StopAutomationExecutionError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.StopAutomationExecution");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<StopAutomationExecutionResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(StopAutomationExecutionError::from_response(response))
}))
}
})
}
fn update_association(
&self,
input: UpdateAssociationRequest,
) -> RusotoFuture<UpdateAssociationResult, UpdateAssociationError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.UpdateAssociation");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<UpdateAssociationResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateAssociationError::from_response(response))),
)
}
})
}
fn update_association_status(
&self,
input: UpdateAssociationStatusRequest,
) -> RusotoFuture<UpdateAssociationStatusResult, UpdateAssociationStatusError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.UpdateAssociationStatus");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<UpdateAssociationStatusResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateAssociationStatusError::from_response(response))
}))
}
})
}
fn update_document(
&self,
input: UpdateDocumentRequest,
) -> RusotoFuture<UpdateDocumentResult, UpdateDocumentError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.UpdateDocument");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<UpdateDocumentResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateDocumentError::from_response(response))),
)
}
})
}
fn update_document_default_version(
&self,
input: UpdateDocumentDefaultVersionRequest,
) -> RusotoFuture<UpdateDocumentDefaultVersionResult, UpdateDocumentDefaultVersionError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.UpdateDocumentDefaultVersion");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<UpdateDocumentDefaultVersionResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateDocumentDefaultVersionError::from_response(response))
}))
}
})
}
fn update_maintenance_window(
&self,
input: UpdateMaintenanceWindowRequest,
) -> RusotoFuture<UpdateMaintenanceWindowResult, UpdateMaintenanceWindowError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.UpdateMaintenanceWindow");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<UpdateMaintenanceWindowResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateMaintenanceWindowError::from_response(response))
}))
}
})
}
fn update_maintenance_window_target(
&self,
input: UpdateMaintenanceWindowTargetRequest,
) -> RusotoFuture<UpdateMaintenanceWindowTargetResult, UpdateMaintenanceWindowTargetError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.UpdateMaintenanceWindowTarget");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<UpdateMaintenanceWindowTargetResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateMaintenanceWindowTargetError::from_response(response))
}))
}
})
}
fn update_maintenance_window_task(
&self,
input: UpdateMaintenanceWindowTaskRequest,
) -> RusotoFuture<UpdateMaintenanceWindowTaskResult, UpdateMaintenanceWindowTaskError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.UpdateMaintenanceWindowTask");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<UpdateMaintenanceWindowTaskResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateMaintenanceWindowTaskError::from_response(response))
}))
}
})
}
fn update_managed_instance_role(
&self,
input: UpdateManagedInstanceRoleRequest,
) -> RusotoFuture<UpdateManagedInstanceRoleResult, UpdateManagedInstanceRoleError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.UpdateManagedInstanceRole");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<UpdateManagedInstanceRoleResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateManagedInstanceRoleError::from_response(response))
}))
}
})
}
fn update_patch_baseline(
&self,
input: UpdatePatchBaselineRequest,
) -> RusotoFuture<UpdatePatchBaselineResult, UpdatePatchBaselineError> {
let mut request = SignedRequest::new("POST", "ssm", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AmazonSSM.UpdatePatchBaseline");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded.into_bytes()));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().map(|response| {
let mut body = response.body;
if body.is_empty() || body == b"null" {
body = b"{}".to_vec();
}
serde_json::from_str::<UpdatePatchBaselineResult>(
String::from_utf8_lossy(body.as_ref()).as_ref(),
)
.unwrap()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdatePatchBaselineError::from_response(response))
}),
)
}
})
}
}
#[cfg(test)]
mod protocol_tests {}