use std::error::Error;
use std::fmt;
use async_trait::async_trait;
use rusoto_core::credential::ProvideAwsCredentials;
use rusoto_core::region;
use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
use rusoto_core::{Client, RusotoError};
use rusoto_core::param::{Params, ServiceParams};
use rusoto_core::proto;
use rusoto_core::signature::SignedRequest;
#[allow(unused_imports)]
use serde::{Deserialize, Serialize};
use serde_json;
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct AcceptInvitationRequest {
#[serde(rename = "InvitationId")]
pub invitation_id: String,
#[serde(rename = "MasterId")]
pub master_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct AcceptInvitationResponse {}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct AccountDetails {
#[serde(rename = "AccountId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account_id: Option<String>,
#[serde(rename = "Email")]
#[serde(skip_serializing_if = "Option::is_none")]
pub email: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ActionTarget {
#[serde(rename = "ActionTargetArn")]
pub action_target_arn: String,
#[serde(rename = "Description")]
pub description: String,
#[serde(rename = "Name")]
pub name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AvailabilityZone {
#[serde(rename = "SubnetId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub subnet_id: Option<String>,
#[serde(rename = "ZoneName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub zone_name: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsAutoScalingAutoScalingGroupDetails {
#[serde(rename = "CreatedTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_time: Option<String>,
#[serde(rename = "HealthCheckGracePeriod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub health_check_grace_period: Option<i64>,
#[serde(rename = "HealthCheckType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub health_check_type: Option<String>,
#[serde(rename = "LaunchConfigurationName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub launch_configuration_name: Option<String>,
#[serde(rename = "LoadBalancerNames")]
#[serde(skip_serializing_if = "Option::is_none")]
pub load_balancer_names: Option<Vec<String>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsCloudFrontDistributionDetails {
#[serde(rename = "DomainName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_name: Option<String>,
#[serde(rename = "ETag")]
#[serde(skip_serializing_if = "Option::is_none")]
pub e_tag: Option<String>,
#[serde(rename = "LastModifiedTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified_time: Option<String>,
#[serde(rename = "Logging")]
#[serde(skip_serializing_if = "Option::is_none")]
pub logging: Option<AwsCloudFrontDistributionLogging>,
#[serde(rename = "Origins")]
#[serde(skip_serializing_if = "Option::is_none")]
pub origins: Option<AwsCloudFrontDistributionOrigins>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "WebAclId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub web_acl_id: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsCloudFrontDistributionLogging {
#[serde(rename = "Bucket")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bucket: Option<String>,
#[serde(rename = "Enabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enabled: Option<bool>,
#[serde(rename = "IncludeCookies")]
#[serde(skip_serializing_if = "Option::is_none")]
pub include_cookies: Option<bool>,
#[serde(rename = "Prefix")]
#[serde(skip_serializing_if = "Option::is_none")]
pub prefix: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsCloudFrontDistributionOriginItem {
#[serde(rename = "DomainName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_name: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "OriginPath")]
#[serde(skip_serializing_if = "Option::is_none")]
pub origin_path: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsCloudFrontDistributionOrigins {
#[serde(rename = "Items")]
#[serde(skip_serializing_if = "Option::is_none")]
pub items: Option<Vec<AwsCloudFrontDistributionOriginItem>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsCodeBuildProjectDetails {
#[serde(rename = "EncryptionKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub encryption_key: Option<String>,
#[serde(rename = "Environment")]
#[serde(skip_serializing_if = "Option::is_none")]
pub environment: Option<AwsCodeBuildProjectEnvironment>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "ServiceRole")]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_role: Option<String>,
#[serde(rename = "Source")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source: Option<AwsCodeBuildProjectSource>,
#[serde(rename = "VpcConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_config: Option<AwsCodeBuildProjectVpcConfig>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsCodeBuildProjectEnvironment {
#[serde(rename = "Certificate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate: Option<String>,
#[serde(rename = "ImagePullCredentialsType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_pull_credentials_type: Option<String>,
#[serde(rename = "RegistryCredential")]
#[serde(skip_serializing_if = "Option::is_none")]
pub registry_credential: Option<AwsCodeBuildProjectEnvironmentRegistryCredential>,
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsCodeBuildProjectEnvironmentRegistryCredential {
#[serde(rename = "Credential")]
#[serde(skip_serializing_if = "Option::is_none")]
pub credential: Option<String>,
#[serde(rename = "CredentialProvider")]
#[serde(skip_serializing_if = "Option::is_none")]
pub credential_provider: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsCodeBuildProjectSource {
#[serde(rename = "GitCloneDepth")]
#[serde(skip_serializing_if = "Option::is_none")]
pub git_clone_depth: Option<i64>,
#[serde(rename = "InsecureSsl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub insecure_ssl: Option<bool>,
#[serde(rename = "Location")]
#[serde(skip_serializing_if = "Option::is_none")]
pub location: Option<String>,
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsCodeBuildProjectVpcConfig {
#[serde(rename = "SecurityGroupIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_group_ids: Option<Vec<String>>,
#[serde(rename = "Subnets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub subnets: Option<Vec<String>>,
#[serde(rename = "VpcId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_id: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsEc2InstanceDetails {
#[serde(rename = "IamInstanceProfileArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub iam_instance_profile_arn: Option<String>,
#[serde(rename = "ImageId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_id: Option<String>,
#[serde(rename = "IpV4Addresses")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ip_v4_addresses: Option<Vec<String>>,
#[serde(rename = "IpV6Addresses")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ip_v6_addresses: Option<Vec<String>>,
#[serde(rename = "KeyName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key_name: Option<String>,
#[serde(rename = "LaunchedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub launched_at: Option<String>,
#[serde(rename = "SubnetId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub subnet_id: Option<String>,
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
#[serde(rename = "VpcId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_id: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsEc2NetworkInterfaceAttachment {
#[serde(rename = "AttachTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attach_time: Option<String>,
#[serde(rename = "AttachmentId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attachment_id: Option<String>,
#[serde(rename = "DeleteOnTermination")]
#[serde(skip_serializing_if = "Option::is_none")]
pub delete_on_termination: Option<bool>,
#[serde(rename = "DeviceIndex")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_index: Option<i64>,
#[serde(rename = "InstanceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_id: Option<String>,
#[serde(rename = "InstanceOwnerId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_owner_id: Option<String>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsEc2NetworkInterfaceDetails {
#[serde(rename = "Attachment")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attachment: Option<AwsEc2NetworkInterfaceAttachment>,
#[serde(rename = "NetworkInterfaceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub network_interface_id: Option<String>,
#[serde(rename = "SecurityGroups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_groups: Option<Vec<AwsEc2NetworkInterfaceSecurityGroup>>,
#[serde(rename = "SourceDestCheck")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_dest_check: Option<bool>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsEc2NetworkInterfaceSecurityGroup {
#[serde(rename = "GroupId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_id: Option<String>,
#[serde(rename = "GroupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_name: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsEc2SecurityGroupDetails {
#[serde(rename = "GroupId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_id: Option<String>,
#[serde(rename = "GroupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_name: Option<String>,
#[serde(rename = "IpPermissions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ip_permissions: Option<Vec<AwsEc2SecurityGroupIpPermission>>,
#[serde(rename = "IpPermissionsEgress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ip_permissions_egress: Option<Vec<AwsEc2SecurityGroupIpPermission>>,
#[serde(rename = "OwnerId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub owner_id: Option<String>,
#[serde(rename = "VpcId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_id: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsEc2SecurityGroupIpPermission {
#[serde(rename = "FromPort")]
#[serde(skip_serializing_if = "Option::is_none")]
pub from_port: Option<i64>,
#[serde(rename = "IpProtocol")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ip_protocol: Option<String>,
#[serde(rename = "IpRanges")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ip_ranges: Option<Vec<AwsEc2SecurityGroupIpRange>>,
#[serde(rename = "Ipv6Ranges")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ipv_6_ranges: Option<Vec<AwsEc2SecurityGroupIpv6Range>>,
#[serde(rename = "PrefixListIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub prefix_list_ids: Option<Vec<AwsEc2SecurityGroupPrefixListId>>,
#[serde(rename = "ToPort")]
#[serde(skip_serializing_if = "Option::is_none")]
pub to_port: Option<i64>,
#[serde(rename = "UserIdGroupPairs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_id_group_pairs: Option<Vec<AwsEc2SecurityGroupUserIdGroupPair>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsEc2SecurityGroupIpRange {
#[serde(rename = "CidrIp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cidr_ip: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsEc2SecurityGroupIpv6Range {
#[serde(rename = "CidrIpv6")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cidr_ipv_6: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsEc2SecurityGroupPrefixListId {
#[serde(rename = "PrefixListId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub prefix_list_id: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsEc2SecurityGroupUserIdGroupPair {
#[serde(rename = "GroupId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_id: Option<String>,
#[serde(rename = "GroupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_name: Option<String>,
#[serde(rename = "PeeringStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub peering_status: Option<String>,
#[serde(rename = "UserId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_id: Option<String>,
#[serde(rename = "VpcId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_id: Option<String>,
#[serde(rename = "VpcPeeringConnectionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_peering_connection_id: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsEc2VolumeAttachment {
#[serde(rename = "AttachTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attach_time: Option<String>,
#[serde(rename = "DeleteOnTermination")]
#[serde(skip_serializing_if = "Option::is_none")]
pub delete_on_termination: Option<bool>,
#[serde(rename = "InstanceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_id: Option<String>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsEc2VolumeDetails {
#[serde(rename = "Attachments")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attachments: Option<Vec<AwsEc2VolumeAttachment>>,
#[serde(rename = "CreateTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub create_time: Option<String>,
#[serde(rename = "Encrypted")]
#[serde(skip_serializing_if = "Option::is_none")]
pub encrypted: Option<bool>,
#[serde(rename = "KmsKeyId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_key_id: Option<String>,
#[serde(rename = "Size")]
#[serde(skip_serializing_if = "Option::is_none")]
pub size: Option<i64>,
#[serde(rename = "SnapshotId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub snapshot_id: Option<String>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsEc2VpcDetails {
#[serde(rename = "CidrBlockAssociationSet")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cidr_block_association_set: Option<Vec<CidrBlockAssociation>>,
#[serde(rename = "DhcpOptionsId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dhcp_options_id: Option<String>,
#[serde(rename = "Ipv6CidrBlockAssociationSet")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ipv_6_cidr_block_association_set: Option<Vec<Ipv6CidrBlockAssociation>>,
#[serde(rename = "State")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsElasticsearchDomainDetails {
#[serde(rename = "AccessPolicies")]
#[serde(skip_serializing_if = "Option::is_none")]
pub access_policies: Option<String>,
#[serde(rename = "DomainEndpointOptions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_endpoint_options: Option<AwsElasticsearchDomainDomainEndpointOptions>,
#[serde(rename = "DomainId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_id: Option<String>,
#[serde(rename = "DomainName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_name: Option<String>,
#[serde(rename = "ElasticsearchVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub elasticsearch_version: Option<String>,
#[serde(rename = "EncryptionAtRestOptions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub encryption_at_rest_options: Option<AwsElasticsearchDomainEncryptionAtRestOptions>,
#[serde(rename = "Endpoint")]
#[serde(skip_serializing_if = "Option::is_none")]
pub endpoint: Option<String>,
#[serde(rename = "Endpoints")]
#[serde(skip_serializing_if = "Option::is_none")]
pub endpoints: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "NodeToNodeEncryptionOptions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub node_to_node_encryption_options: Option<AwsElasticsearchDomainNodeToNodeEncryptionOptions>,
#[serde(rename = "VPCOptions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_options: Option<AwsElasticsearchDomainVPCOptions>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsElasticsearchDomainDomainEndpointOptions {
#[serde(rename = "EnforceHTTPS")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enforce_https: Option<bool>,
#[serde(rename = "TLSSecurityPolicy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tls_security_policy: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsElasticsearchDomainEncryptionAtRestOptions {
#[serde(rename = "Enabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enabled: Option<bool>,
#[serde(rename = "KmsKeyId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_key_id: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsElasticsearchDomainNodeToNodeEncryptionOptions {
#[serde(rename = "Enabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enabled: Option<bool>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsElasticsearchDomainVPCOptions {
#[serde(rename = "AvailabilityZones")]
#[serde(skip_serializing_if = "Option::is_none")]
pub availability_zones: Option<Vec<String>>,
#[serde(rename = "SecurityGroupIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_group_ids: Option<Vec<String>>,
#[serde(rename = "SubnetIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub subnet_ids: Option<Vec<String>>,
#[serde(rename = "VPCId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_id: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsElbv2LoadBalancerDetails {
#[serde(rename = "AvailabilityZones")]
#[serde(skip_serializing_if = "Option::is_none")]
pub availability_zones: Option<Vec<AvailabilityZone>>,
#[serde(rename = "CanonicalHostedZoneId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub canonical_hosted_zone_id: Option<String>,
#[serde(rename = "CreatedTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_time: Option<String>,
#[serde(rename = "DNSName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dns_name: Option<String>,
#[serde(rename = "IpAddressType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ip_address_type: Option<String>,
#[serde(rename = "Scheme")]
#[serde(skip_serializing_if = "Option::is_none")]
pub scheme: Option<String>,
#[serde(rename = "SecurityGroups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_groups: Option<Vec<String>>,
#[serde(rename = "State")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<LoadBalancerState>,
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
#[serde(rename = "VpcId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_id: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsIamAccessKeyDetails {
#[serde(rename = "CreatedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
#[serde(rename = "PrincipalId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub principal_id: Option<String>,
#[serde(rename = "PrincipalName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub principal_name: Option<String>,
#[serde(rename = "PrincipalType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub principal_type: Option<String>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsIamRoleDetails {
#[serde(rename = "AssumeRolePolicyDocument")]
#[serde(skip_serializing_if = "Option::is_none")]
pub assume_role_policy_document: Option<String>,
#[serde(rename = "CreateDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub create_date: Option<String>,
#[serde(rename = "MaxSessionDuration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_session_duration: Option<i64>,
#[serde(rename = "Path")]
#[serde(skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
#[serde(rename = "RoleId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_id: Option<String>,
#[serde(rename = "RoleName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_name: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsKmsKeyDetails {
#[serde(rename = "AWSAccountId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_account_id: Option<String>,
#[serde(rename = "CreationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_date: Option<f64>,
#[serde(rename = "KeyId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key_id: Option<String>,
#[serde(rename = "KeyManager")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key_manager: Option<String>,
#[serde(rename = "KeyState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key_state: Option<String>,
#[serde(rename = "Origin")]
#[serde(skip_serializing_if = "Option::is_none")]
pub origin: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsLambdaFunctionCode {
#[serde(rename = "S3Bucket")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s3_bucket: Option<String>,
#[serde(rename = "S3Key")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s3_key: Option<String>,
#[serde(rename = "S3ObjectVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s3_object_version: Option<String>,
#[serde(rename = "ZipFile")]
#[serde(skip_serializing_if = "Option::is_none")]
pub zip_file: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsLambdaFunctionDeadLetterConfig {
#[serde(rename = "TargetArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_arn: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsLambdaFunctionDetails {
#[serde(rename = "Code")]
#[serde(skip_serializing_if = "Option::is_none")]
pub code: Option<AwsLambdaFunctionCode>,
#[serde(rename = "CodeSha256")]
#[serde(skip_serializing_if = "Option::is_none")]
pub code_sha_256: Option<String>,
#[serde(rename = "DeadLetterConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dead_letter_config: Option<AwsLambdaFunctionDeadLetterConfig>,
#[serde(rename = "Environment")]
#[serde(skip_serializing_if = "Option::is_none")]
pub environment: Option<AwsLambdaFunctionEnvironment>,
#[serde(rename = "FunctionName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub function_name: Option<String>,
#[serde(rename = "Handler")]
#[serde(skip_serializing_if = "Option::is_none")]
pub handler: Option<String>,
#[serde(rename = "KmsKeyArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_key_arn: Option<String>,
#[serde(rename = "LastModified")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified: Option<String>,
#[serde(rename = "Layers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub layers: Option<Vec<AwsLambdaFunctionLayer>>,
#[serde(rename = "MasterArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub master_arn: Option<String>,
#[serde(rename = "MemorySize")]
#[serde(skip_serializing_if = "Option::is_none")]
pub memory_size: Option<i64>,
#[serde(rename = "RevisionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub revision_id: Option<String>,
#[serde(rename = "Role")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role: Option<String>,
#[serde(rename = "Runtime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub runtime: Option<String>,
#[serde(rename = "Timeout")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timeout: Option<i64>,
#[serde(rename = "TracingConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tracing_config: Option<AwsLambdaFunctionTracingConfig>,
#[serde(rename = "Version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
#[serde(rename = "VpcConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_config: Option<AwsLambdaFunctionVpcConfig>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsLambdaFunctionEnvironment {
#[serde(rename = "Error")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error: Option<AwsLambdaFunctionEnvironmentError>,
#[serde(rename = "Variables")]
#[serde(skip_serializing_if = "Option::is_none")]
pub variables: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsLambdaFunctionEnvironmentError {
#[serde(rename = "ErrorCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_code: Option<String>,
#[serde(rename = "Message")]
#[serde(skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsLambdaFunctionLayer {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CodeSize")]
#[serde(skip_serializing_if = "Option::is_none")]
pub code_size: Option<i64>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsLambdaFunctionTracingConfig {
#[serde(rename = "Mode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mode: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsLambdaFunctionVpcConfig {
#[serde(rename = "SecurityGroupIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_group_ids: Option<Vec<String>>,
#[serde(rename = "SubnetIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub subnet_ids: Option<Vec<String>>,
#[serde(rename = "VpcId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_id: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsLambdaLayerVersionDetails {
#[serde(rename = "CompatibleRuntimes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub compatible_runtimes: Option<Vec<String>>,
#[serde(rename = "CreatedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_date: Option<String>,
#[serde(rename = "Version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<i64>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsRdsDbInstanceAssociatedRole {
#[serde(rename = "FeatureName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub feature_name: Option<String>,
#[serde(rename = "RoleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_arn: Option<String>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsRdsDbInstanceDetails {
#[serde(rename = "AssociatedRoles")]
#[serde(skip_serializing_if = "Option::is_none")]
pub associated_roles: Option<Vec<AwsRdsDbInstanceAssociatedRole>>,
#[serde(rename = "CACertificateIdentifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ca_certificate_identifier: Option<String>,
#[serde(rename = "DBClusterIdentifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub db_cluster_identifier: Option<String>,
#[serde(rename = "DBInstanceClass")]
#[serde(skip_serializing_if = "Option::is_none")]
pub db_instance_class: Option<String>,
#[serde(rename = "DBInstanceIdentifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub db_instance_identifier: Option<String>,
#[serde(rename = "DBName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub db_name: Option<String>,
#[serde(rename = "DbInstancePort")]
#[serde(skip_serializing_if = "Option::is_none")]
pub db_instance_port: Option<i64>,
#[serde(rename = "DbiResourceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dbi_resource_id: Option<String>,
#[serde(rename = "DeletionProtection")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deletion_protection: Option<bool>,
#[serde(rename = "Endpoint")]
#[serde(skip_serializing_if = "Option::is_none")]
pub endpoint: Option<AwsRdsDbInstanceEndpoint>,
#[serde(rename = "Engine")]
#[serde(skip_serializing_if = "Option::is_none")]
pub engine: Option<String>,
#[serde(rename = "EngineVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub engine_version: Option<String>,
#[serde(rename = "IAMDatabaseAuthenticationEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub iam_database_authentication_enabled: Option<bool>,
#[serde(rename = "InstanceCreateTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_create_time: Option<String>,
#[serde(rename = "KmsKeyId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_key_id: Option<String>,
#[serde(rename = "PubliclyAccessible")]
#[serde(skip_serializing_if = "Option::is_none")]
pub publicly_accessible: Option<bool>,
#[serde(rename = "StorageEncrypted")]
#[serde(skip_serializing_if = "Option::is_none")]
pub storage_encrypted: Option<bool>,
#[serde(rename = "TdeCredentialArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tde_credential_arn: Option<String>,
#[serde(rename = "VpcSecurityGroups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_security_groups: Option<Vec<AwsRdsDbInstanceVpcSecurityGroup>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsRdsDbInstanceEndpoint {
#[serde(rename = "Address")]
#[serde(skip_serializing_if = "Option::is_none")]
pub address: Option<String>,
#[serde(rename = "HostedZoneId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub hosted_zone_id: Option<String>,
#[serde(rename = "Port")]
#[serde(skip_serializing_if = "Option::is_none")]
pub port: Option<i64>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsRdsDbInstanceVpcSecurityGroup {
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "VpcSecurityGroupId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_security_group_id: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsS3BucketDetails {
#[serde(rename = "CreatedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
#[serde(rename = "OwnerId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub owner_id: Option<String>,
#[serde(rename = "OwnerName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub owner_name: Option<String>,
#[serde(rename = "ServerSideEncryptionConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub server_side_encryption_configuration: Option<AwsS3BucketServerSideEncryptionConfiguration>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsS3BucketServerSideEncryptionByDefault {
#[serde(rename = "KMSMasterKeyID")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_master_key_id: Option<String>,
#[serde(rename = "SSEAlgorithm")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sse_algorithm: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsS3BucketServerSideEncryptionConfiguration {
#[serde(rename = "Rules")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rules: Option<Vec<AwsS3BucketServerSideEncryptionRule>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsS3BucketServerSideEncryptionRule {
#[serde(rename = "ApplyServerSideEncryptionByDefault")]
#[serde(skip_serializing_if = "Option::is_none")]
pub apply_server_side_encryption_by_default: Option<AwsS3BucketServerSideEncryptionByDefault>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsS3ObjectDetails {
#[serde(rename = "ContentType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_type: Option<String>,
#[serde(rename = "ETag")]
#[serde(skip_serializing_if = "Option::is_none")]
pub e_tag: Option<String>,
#[serde(rename = "LastModified")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified: Option<String>,
#[serde(rename = "SSEKMSKeyId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ssekms_key_id: Option<String>,
#[serde(rename = "ServerSideEncryption")]
#[serde(skip_serializing_if = "Option::is_none")]
pub server_side_encryption: Option<String>,
#[serde(rename = "VersionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version_id: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsSecurityFinding {
#[serde(rename = "AwsAccountId")]
pub aws_account_id: String,
#[serde(rename = "Compliance")]
#[serde(skip_serializing_if = "Option::is_none")]
pub compliance: Option<Compliance>,
#[serde(rename = "Confidence")]
#[serde(skip_serializing_if = "Option::is_none")]
pub confidence: Option<i64>,
#[serde(rename = "CreatedAt")]
pub created_at: String,
#[serde(rename = "Criticality")]
#[serde(skip_serializing_if = "Option::is_none")]
pub criticality: Option<i64>,
#[serde(rename = "Description")]
pub description: String,
#[serde(rename = "FirstObservedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub first_observed_at: Option<String>,
#[serde(rename = "GeneratorId")]
pub generator_id: String,
#[serde(rename = "Id")]
pub id: String,
#[serde(rename = "LastObservedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_observed_at: Option<String>,
#[serde(rename = "Malware")]
#[serde(skip_serializing_if = "Option::is_none")]
pub malware: Option<Vec<Malware>>,
#[serde(rename = "Network")]
#[serde(skip_serializing_if = "Option::is_none")]
pub network: Option<Network>,
#[serde(rename = "NetworkPath")]
#[serde(skip_serializing_if = "Option::is_none")]
pub network_path: Option<Vec<NetworkPathComponent>>,
#[serde(rename = "Note")]
#[serde(skip_serializing_if = "Option::is_none")]
pub note: Option<Note>,
#[serde(rename = "Process")]
#[serde(skip_serializing_if = "Option::is_none")]
pub process: Option<ProcessDetails>,
#[serde(rename = "ProductArn")]
pub product_arn: String,
#[serde(rename = "ProductFields")]
#[serde(skip_serializing_if = "Option::is_none")]
pub product_fields: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "RecordState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub record_state: Option<String>,
#[serde(rename = "RelatedFindings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub related_findings: Option<Vec<RelatedFinding>>,
#[serde(rename = "Remediation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub remediation: Option<Remediation>,
#[serde(rename = "Resources")]
pub resources: Vec<Resource>,
#[serde(rename = "SchemaVersion")]
pub schema_version: String,
#[serde(rename = "Severity")]
pub severity: Severity,
#[serde(rename = "SourceUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_url: Option<String>,
#[serde(rename = "ThreatIntelIndicators")]
#[serde(skip_serializing_if = "Option::is_none")]
pub threat_intel_indicators: Option<Vec<ThreatIntelIndicator>>,
#[serde(rename = "Title")]
pub title: String,
#[serde(rename = "Types")]
pub types: Vec<String>,
#[serde(rename = "UpdatedAt")]
pub updated_at: String,
#[serde(rename = "UserDefinedFields")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_defined_fields: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "VerificationState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub verification_state: Option<String>,
#[serde(rename = "Vulnerabilities")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vulnerabilities: Option<Vec<Vulnerability>>,
#[serde(rename = "Workflow")]
#[serde(skip_serializing_if = "Option::is_none")]
pub workflow: Option<Workflow>,
#[serde(rename = "WorkflowState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub workflow_state: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsSecurityFindingFilters {
#[serde(rename = "AwsAccountId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_account_id: Option<Vec<StringFilter>>,
#[serde(rename = "CompanyName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub company_name: Option<Vec<StringFilter>>,
#[serde(rename = "ComplianceStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub compliance_status: Option<Vec<StringFilter>>,
#[serde(rename = "Confidence")]
#[serde(skip_serializing_if = "Option::is_none")]
pub confidence: Option<Vec<NumberFilter>>,
#[serde(rename = "CreatedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_at: Option<Vec<DateFilter>>,
#[serde(rename = "Criticality")]
#[serde(skip_serializing_if = "Option::is_none")]
pub criticality: Option<Vec<NumberFilter>>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<Vec<StringFilter>>,
#[serde(rename = "FirstObservedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub first_observed_at: Option<Vec<DateFilter>>,
#[serde(rename = "GeneratorId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub generator_id: Option<Vec<StringFilter>>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<Vec<StringFilter>>,
#[serde(rename = "Keyword")]
#[serde(skip_serializing_if = "Option::is_none")]
pub keyword: Option<Vec<KeywordFilter>>,
#[serde(rename = "LastObservedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_observed_at: Option<Vec<DateFilter>>,
#[serde(rename = "MalwareName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub malware_name: Option<Vec<StringFilter>>,
#[serde(rename = "MalwarePath")]
#[serde(skip_serializing_if = "Option::is_none")]
pub malware_path: Option<Vec<StringFilter>>,
#[serde(rename = "MalwareState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub malware_state: Option<Vec<StringFilter>>,
#[serde(rename = "MalwareType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub malware_type: Option<Vec<StringFilter>>,
#[serde(rename = "NetworkDestinationDomain")]
#[serde(skip_serializing_if = "Option::is_none")]
pub network_destination_domain: Option<Vec<StringFilter>>,
#[serde(rename = "NetworkDestinationIpV4")]
#[serde(skip_serializing_if = "Option::is_none")]
pub network_destination_ip_v4: Option<Vec<IpFilter>>,
#[serde(rename = "NetworkDestinationIpV6")]
#[serde(skip_serializing_if = "Option::is_none")]
pub network_destination_ip_v6: Option<Vec<IpFilter>>,
#[serde(rename = "NetworkDestinationPort")]
#[serde(skip_serializing_if = "Option::is_none")]
pub network_destination_port: Option<Vec<NumberFilter>>,
#[serde(rename = "NetworkDirection")]
#[serde(skip_serializing_if = "Option::is_none")]
pub network_direction: Option<Vec<StringFilter>>,
#[serde(rename = "NetworkProtocol")]
#[serde(skip_serializing_if = "Option::is_none")]
pub network_protocol: Option<Vec<StringFilter>>,
#[serde(rename = "NetworkSourceDomain")]
#[serde(skip_serializing_if = "Option::is_none")]
pub network_source_domain: Option<Vec<StringFilter>>,
#[serde(rename = "NetworkSourceIpV4")]
#[serde(skip_serializing_if = "Option::is_none")]
pub network_source_ip_v4: Option<Vec<IpFilter>>,
#[serde(rename = "NetworkSourceIpV6")]
#[serde(skip_serializing_if = "Option::is_none")]
pub network_source_ip_v6: Option<Vec<IpFilter>>,
#[serde(rename = "NetworkSourceMac")]
#[serde(skip_serializing_if = "Option::is_none")]
pub network_source_mac: Option<Vec<StringFilter>>,
#[serde(rename = "NetworkSourcePort")]
#[serde(skip_serializing_if = "Option::is_none")]
pub network_source_port: Option<Vec<NumberFilter>>,
#[serde(rename = "NoteText")]
#[serde(skip_serializing_if = "Option::is_none")]
pub note_text: Option<Vec<StringFilter>>,
#[serde(rename = "NoteUpdatedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub note_updated_at: Option<Vec<DateFilter>>,
#[serde(rename = "NoteUpdatedBy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub note_updated_by: Option<Vec<StringFilter>>,
#[serde(rename = "ProcessLaunchedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub process_launched_at: Option<Vec<DateFilter>>,
#[serde(rename = "ProcessName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub process_name: Option<Vec<StringFilter>>,
#[serde(rename = "ProcessParentPid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub process_parent_pid: Option<Vec<NumberFilter>>,
#[serde(rename = "ProcessPath")]
#[serde(skip_serializing_if = "Option::is_none")]
pub process_path: Option<Vec<StringFilter>>,
#[serde(rename = "ProcessPid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub process_pid: Option<Vec<NumberFilter>>,
#[serde(rename = "ProcessTerminatedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub process_terminated_at: Option<Vec<DateFilter>>,
#[serde(rename = "ProductArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub product_arn: Option<Vec<StringFilter>>,
#[serde(rename = "ProductFields")]
#[serde(skip_serializing_if = "Option::is_none")]
pub product_fields: Option<Vec<MapFilter>>,
#[serde(rename = "ProductName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub product_name: Option<Vec<StringFilter>>,
#[serde(rename = "RecommendationText")]
#[serde(skip_serializing_if = "Option::is_none")]
pub recommendation_text: Option<Vec<StringFilter>>,
#[serde(rename = "RecordState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub record_state: Option<Vec<StringFilter>>,
#[serde(rename = "RelatedFindingsId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub related_findings_id: Option<Vec<StringFilter>>,
#[serde(rename = "RelatedFindingsProductArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub related_findings_product_arn: Option<Vec<StringFilter>>,
#[serde(rename = "ResourceAwsEc2InstanceIamInstanceProfileArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_aws_ec_2_instance_iam_instance_profile_arn: Option<Vec<StringFilter>>,
#[serde(rename = "ResourceAwsEc2InstanceImageId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_aws_ec_2_instance_image_id: Option<Vec<StringFilter>>,
#[serde(rename = "ResourceAwsEc2InstanceIpV4Addresses")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_aws_ec_2_instance_ip_v4_addresses: Option<Vec<IpFilter>>,
#[serde(rename = "ResourceAwsEc2InstanceIpV6Addresses")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_aws_ec_2_instance_ip_v6_addresses: Option<Vec<IpFilter>>,
#[serde(rename = "ResourceAwsEc2InstanceKeyName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_aws_ec_2_instance_key_name: Option<Vec<StringFilter>>,
#[serde(rename = "ResourceAwsEc2InstanceLaunchedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_aws_ec_2_instance_launched_at: Option<Vec<DateFilter>>,
#[serde(rename = "ResourceAwsEc2InstanceSubnetId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_aws_ec_2_instance_subnet_id: Option<Vec<StringFilter>>,
#[serde(rename = "ResourceAwsEc2InstanceType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_aws_ec_2_instance_type: Option<Vec<StringFilter>>,
#[serde(rename = "ResourceAwsEc2InstanceVpcId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_aws_ec_2_instance_vpc_id: Option<Vec<StringFilter>>,
#[serde(rename = "ResourceAwsIamAccessKeyCreatedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_aws_iam_access_key_created_at: Option<Vec<DateFilter>>,
#[serde(rename = "ResourceAwsIamAccessKeyStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_aws_iam_access_key_status: Option<Vec<StringFilter>>,
#[serde(rename = "ResourceAwsIamAccessKeyUserName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_aws_iam_access_key_user_name: Option<Vec<StringFilter>>,
#[serde(rename = "ResourceAwsS3BucketOwnerId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_aws_s3_bucket_owner_id: Option<Vec<StringFilter>>,
#[serde(rename = "ResourceAwsS3BucketOwnerName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_aws_s3_bucket_owner_name: Option<Vec<StringFilter>>,
#[serde(rename = "ResourceContainerImageId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_container_image_id: Option<Vec<StringFilter>>,
#[serde(rename = "ResourceContainerImageName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_container_image_name: Option<Vec<StringFilter>>,
#[serde(rename = "ResourceContainerLaunchedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_container_launched_at: Option<Vec<DateFilter>>,
#[serde(rename = "ResourceContainerName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_container_name: Option<Vec<StringFilter>>,
#[serde(rename = "ResourceDetailsOther")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_details_other: Option<Vec<MapFilter>>,
#[serde(rename = "ResourceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_id: Option<Vec<StringFilter>>,
#[serde(rename = "ResourcePartition")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_partition: Option<Vec<StringFilter>>,
#[serde(rename = "ResourceRegion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_region: Option<Vec<StringFilter>>,
#[serde(rename = "ResourceTags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_tags: Option<Vec<MapFilter>>,
#[serde(rename = "ResourceType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_type: Option<Vec<StringFilter>>,
#[serde(rename = "SeverityLabel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub severity_label: Option<Vec<StringFilter>>,
#[serde(rename = "SeverityNormalized")]
#[serde(skip_serializing_if = "Option::is_none")]
pub severity_normalized: Option<Vec<NumberFilter>>,
#[serde(rename = "SeverityProduct")]
#[serde(skip_serializing_if = "Option::is_none")]
pub severity_product: Option<Vec<NumberFilter>>,
#[serde(rename = "SourceUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_url: Option<Vec<StringFilter>>,
#[serde(rename = "ThreatIntelIndicatorCategory")]
#[serde(skip_serializing_if = "Option::is_none")]
pub threat_intel_indicator_category: Option<Vec<StringFilter>>,
#[serde(rename = "ThreatIntelIndicatorLastObservedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub threat_intel_indicator_last_observed_at: Option<Vec<DateFilter>>,
#[serde(rename = "ThreatIntelIndicatorSource")]
#[serde(skip_serializing_if = "Option::is_none")]
pub threat_intel_indicator_source: Option<Vec<StringFilter>>,
#[serde(rename = "ThreatIntelIndicatorSourceUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub threat_intel_indicator_source_url: Option<Vec<StringFilter>>,
#[serde(rename = "ThreatIntelIndicatorType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub threat_intel_indicator_type: Option<Vec<StringFilter>>,
#[serde(rename = "ThreatIntelIndicatorValue")]
#[serde(skip_serializing_if = "Option::is_none")]
pub threat_intel_indicator_value: Option<Vec<StringFilter>>,
#[serde(rename = "Title")]
#[serde(skip_serializing_if = "Option::is_none")]
pub title: Option<Vec<StringFilter>>,
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<Vec<StringFilter>>,
#[serde(rename = "UpdatedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub updated_at: Option<Vec<DateFilter>>,
#[serde(rename = "UserDefinedFields")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_defined_fields: Option<Vec<MapFilter>>,
#[serde(rename = "VerificationState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub verification_state: Option<Vec<StringFilter>>,
#[serde(rename = "WorkflowState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub workflow_state: Option<Vec<StringFilter>>,
#[serde(rename = "WorkflowStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub workflow_status: Option<Vec<StringFilter>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsSecurityFindingIdentifier {
#[serde(rename = "Id")]
pub id: String,
#[serde(rename = "ProductArn")]
pub product_arn: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsSnsTopicDetails {
#[serde(rename = "KmsMasterKeyId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_master_key_id: Option<String>,
#[serde(rename = "Owner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub owner: Option<String>,
#[serde(rename = "Subscription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub subscription: Option<Vec<AwsSnsTopicSubscription>>,
#[serde(rename = "TopicName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub topic_name: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsSnsTopicSubscription {
#[serde(rename = "Endpoint")]
#[serde(skip_serializing_if = "Option::is_none")]
pub endpoint: Option<String>,
#[serde(rename = "Protocol")]
#[serde(skip_serializing_if = "Option::is_none")]
pub protocol: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsSqsQueueDetails {
#[serde(rename = "DeadLetterTargetArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dead_letter_target_arn: Option<String>,
#[serde(rename = "KmsDataKeyReusePeriodSeconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_data_key_reuse_period_seconds: Option<i64>,
#[serde(rename = "KmsMasterKeyId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_master_key_id: Option<String>,
#[serde(rename = "QueueName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub queue_name: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsWafWebAclDetails {
#[serde(rename = "DefaultAction")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_action: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Rules")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rules: Option<Vec<AwsWafWebAclRule>>,
#[serde(rename = "WebAclId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub web_acl_id: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsWafWebAclRule {
#[serde(rename = "Action")]
#[serde(skip_serializing_if = "Option::is_none")]
pub action: Option<WafAction>,
#[serde(rename = "ExcludedRules")]
#[serde(skip_serializing_if = "Option::is_none")]
pub excluded_rules: Option<Vec<WafExcludedRule>>,
#[serde(rename = "OverrideAction")]
#[serde(skip_serializing_if = "Option::is_none")]
pub override_action: Option<WafOverrideAction>,
#[serde(rename = "Priority")]
#[serde(skip_serializing_if = "Option::is_none")]
pub priority: Option<i64>,
#[serde(rename = "RuleId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rule_id: Option<String>,
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct BatchDisableStandardsRequest {
#[serde(rename = "StandardsSubscriptionArns")]
pub standards_subscription_arns: Vec<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct BatchDisableStandardsResponse {
#[serde(rename = "StandardsSubscriptions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub standards_subscriptions: Option<Vec<StandardsSubscription>>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct BatchEnableStandardsRequest {
#[serde(rename = "StandardsSubscriptionRequests")]
pub standards_subscription_requests: Vec<StandardsSubscriptionRequest>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct BatchEnableStandardsResponse {
#[serde(rename = "StandardsSubscriptions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub standards_subscriptions: Option<Vec<StandardsSubscription>>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct BatchImportFindingsRequest {
#[serde(rename = "Findings")]
pub findings: Vec<AwsSecurityFinding>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct BatchImportFindingsResponse {
#[serde(rename = "FailedCount")]
pub failed_count: i64,
#[serde(rename = "FailedFindings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub failed_findings: Option<Vec<ImportFindingsError>>,
#[serde(rename = "SuccessCount")]
pub success_count: i64,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct BatchUpdateFindingsRequest {
#[serde(rename = "Confidence")]
#[serde(skip_serializing_if = "Option::is_none")]
pub confidence: Option<i64>,
#[serde(rename = "Criticality")]
#[serde(skip_serializing_if = "Option::is_none")]
pub criticality: Option<i64>,
#[serde(rename = "FindingIdentifiers")]
pub finding_identifiers: Vec<AwsSecurityFindingIdentifier>,
#[serde(rename = "Note")]
#[serde(skip_serializing_if = "Option::is_none")]
pub note: Option<NoteUpdate>,
#[serde(rename = "RelatedFindings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub related_findings: Option<Vec<RelatedFinding>>,
#[serde(rename = "Severity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub severity: Option<SeverityUpdate>,
#[serde(rename = "Types")]
#[serde(skip_serializing_if = "Option::is_none")]
pub types: Option<Vec<String>>,
#[serde(rename = "UserDefinedFields")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_defined_fields: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "VerificationState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub verification_state: Option<String>,
#[serde(rename = "Workflow")]
#[serde(skip_serializing_if = "Option::is_none")]
pub workflow: Option<WorkflowUpdate>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct BatchUpdateFindingsResponse {
#[serde(rename = "ProcessedFindings")]
pub processed_findings: Vec<AwsSecurityFindingIdentifier>,
#[serde(rename = "UnprocessedFindings")]
pub unprocessed_findings: Vec<BatchUpdateFindingsUnprocessedFinding>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct BatchUpdateFindingsUnprocessedFinding {
#[serde(rename = "ErrorCode")]
pub error_code: String,
#[serde(rename = "ErrorMessage")]
pub error_message: String,
#[serde(rename = "FindingIdentifier")]
pub finding_identifier: AwsSecurityFindingIdentifier,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct CidrBlockAssociation {
#[serde(rename = "AssociationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_id: Option<String>,
#[serde(rename = "CidrBlock")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cidr_block: Option<String>,
#[serde(rename = "CidrBlockState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cidr_block_state: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct Compliance {
#[serde(rename = "RelatedRequirements")]
#[serde(skip_serializing_if = "Option::is_none")]
pub related_requirements: Option<Vec<String>>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "StatusReasons")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status_reasons: Option<Vec<StatusReason>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct ContainerDetails {
#[serde(rename = "ImageId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_id: Option<String>,
#[serde(rename = "ImageName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_name: Option<String>,
#[serde(rename = "LaunchedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub launched_at: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateActionTargetRequest {
#[serde(rename = "Description")]
pub description: String,
#[serde(rename = "Id")]
pub id: String,
#[serde(rename = "Name")]
pub name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CreateActionTargetResponse {
#[serde(rename = "ActionTargetArn")]
pub action_target_arn: String,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateInsightRequest {
#[serde(rename = "Filters")]
pub filters: AwsSecurityFindingFilters,
#[serde(rename = "GroupByAttribute")]
pub group_by_attribute: String,
#[serde(rename = "Name")]
pub name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CreateInsightResponse {
#[serde(rename = "InsightArn")]
pub insight_arn: String,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateMembersRequest {
#[serde(rename = "AccountDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account_details: Option<Vec<AccountDetails>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CreateMembersResponse {
#[serde(rename = "UnprocessedAccounts")]
#[serde(skip_serializing_if = "Option::is_none")]
pub unprocessed_accounts: Option<Vec<SecurityHubResult>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct Cvss {
#[serde(rename = "BaseScore")]
#[serde(skip_serializing_if = "Option::is_none")]
pub base_score: Option<f64>,
#[serde(rename = "BaseVector")]
#[serde(skip_serializing_if = "Option::is_none")]
pub base_vector: Option<String>,
#[serde(rename = "Version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct DateFilter {
#[serde(rename = "DateRange")]
#[serde(skip_serializing_if = "Option::is_none")]
pub date_range: Option<DateRange>,
#[serde(rename = "End")]
#[serde(skip_serializing_if = "Option::is_none")]
pub end: Option<String>,
#[serde(rename = "Start")]
#[serde(skip_serializing_if = "Option::is_none")]
pub start: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct DateRange {
#[serde(rename = "Unit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub unit: Option<String>,
#[serde(rename = "Value")]
#[serde(skip_serializing_if = "Option::is_none")]
pub value: Option<i64>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeclineInvitationsRequest {
#[serde(rename = "AccountIds")]
pub account_ids: Vec<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DeclineInvitationsResponse {
#[serde(rename = "UnprocessedAccounts")]
#[serde(skip_serializing_if = "Option::is_none")]
pub unprocessed_accounts: Option<Vec<SecurityHubResult>>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteActionTargetRequest {
#[serde(rename = "ActionTargetArn")]
pub action_target_arn: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DeleteActionTargetResponse {
#[serde(rename = "ActionTargetArn")]
pub action_target_arn: String,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteInsightRequest {
#[serde(rename = "InsightArn")]
pub insight_arn: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DeleteInsightResponse {
#[serde(rename = "InsightArn")]
pub insight_arn: String,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteInvitationsRequest {
#[serde(rename = "AccountIds")]
pub account_ids: Vec<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DeleteInvitationsResponse {
#[serde(rename = "UnprocessedAccounts")]
#[serde(skip_serializing_if = "Option::is_none")]
pub unprocessed_accounts: Option<Vec<SecurityHubResult>>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteMembersRequest {
#[serde(rename = "AccountIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account_ids: Option<Vec<String>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DeleteMembersResponse {
#[serde(rename = "UnprocessedAccounts")]
#[serde(skip_serializing_if = "Option::is_none")]
pub unprocessed_accounts: Option<Vec<SecurityHubResult>>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DescribeActionTargetsRequest {
#[serde(rename = "ActionTargetArns")]
#[serde(skip_serializing_if = "Option::is_none")]
pub action_target_arns: Option<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(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DescribeActionTargetsResponse {
#[serde(rename = "ActionTargets")]
pub action_targets: Vec<ActionTarget>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DescribeHubRequest {
#[serde(rename = "HubArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub hub_arn: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DescribeHubResponse {
#[serde(rename = "HubArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub hub_arn: Option<String>,
#[serde(rename = "SubscribedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub subscribed_at: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DescribeProductsRequest {
#[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(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DescribeProductsResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Products")]
pub products: Vec<Product>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DescribeStandardsControlsRequest {
#[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 = "StandardsSubscriptionArn")]
pub standards_subscription_arn: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DescribeStandardsControlsResponse {
#[serde(rename = "Controls")]
#[serde(skip_serializing_if = "Option::is_none")]
pub controls: Option<Vec<StandardsControl>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DescribeStandardsRequest {
#[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(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DescribeStandardsResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Standards")]
#[serde(skip_serializing_if = "Option::is_none")]
pub standards: Option<Vec<Standard>>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DisableImportFindingsForProductRequest {
#[serde(rename = "ProductSubscriptionArn")]
pub product_subscription_arn: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DisableImportFindingsForProductResponse {}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DisableSecurityHubRequest {}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DisableSecurityHubResponse {}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DisassociateFromMasterAccountRequest {}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DisassociateFromMasterAccountResponse {}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DisassociateMembersRequest {
#[serde(rename = "AccountIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account_ids: Option<Vec<String>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DisassociateMembersResponse {}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct EnableImportFindingsForProductRequest {
#[serde(rename = "ProductArn")]
pub product_arn: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct EnableImportFindingsForProductResponse {
#[serde(rename = "ProductSubscriptionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub product_subscription_arn: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct EnableSecurityHubRequest {
#[serde(rename = "EnableDefaultStandards")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enable_default_standards: Option<bool>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct EnableSecurityHubResponse {}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetEnabledStandardsRequest {
#[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 = "StandardsSubscriptionArns")]
#[serde(skip_serializing_if = "Option::is_none")]
pub standards_subscription_arns: Option<Vec<String>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetEnabledStandardsResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "StandardsSubscriptions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub standards_subscriptions: Option<Vec<StandardsSubscription>>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetFindingsRequest {
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<AwsSecurityFindingFilters>,
#[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 = "SortCriteria")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sort_criteria: Option<Vec<SortCriterion>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetFindingsResponse {
#[serde(rename = "Findings")]
pub findings: Vec<AwsSecurityFinding>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetInsightResultsRequest {
#[serde(rename = "InsightArn")]
pub insight_arn: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetInsightResultsResponse {
#[serde(rename = "InsightResults")]
pub insight_results: InsightResults,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetInsightsRequest {
#[serde(rename = "InsightArns")]
#[serde(skip_serializing_if = "Option::is_none")]
pub insight_arns: Option<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(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetInsightsResponse {
#[serde(rename = "Insights")]
pub insights: Vec<Insight>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetInvitationsCountRequest {}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetInvitationsCountResponse {
#[serde(rename = "InvitationsCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub invitations_count: Option<i64>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetMasterAccountRequest {}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetMasterAccountResponse {
#[serde(rename = "Master")]
#[serde(skip_serializing_if = "Option::is_none")]
pub master: Option<Invitation>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetMembersRequest {
#[serde(rename = "AccountIds")]
pub account_ids: Vec<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetMembersResponse {
#[serde(rename = "Members")]
#[serde(skip_serializing_if = "Option::is_none")]
pub members: Option<Vec<Member>>,
#[serde(rename = "UnprocessedAccounts")]
#[serde(skip_serializing_if = "Option::is_none")]
pub unprocessed_accounts: Option<Vec<SecurityHubResult>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ImportFindingsError {
#[serde(rename = "ErrorCode")]
pub error_code: String,
#[serde(rename = "ErrorMessage")]
pub error_message: String,
#[serde(rename = "Id")]
pub id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Insight {
#[serde(rename = "Filters")]
pub filters: AwsSecurityFindingFilters,
#[serde(rename = "GroupByAttribute")]
pub group_by_attribute: String,
#[serde(rename = "InsightArn")]
pub insight_arn: String,
#[serde(rename = "Name")]
pub name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct InsightResultValue {
#[serde(rename = "Count")]
pub count: i64,
#[serde(rename = "GroupByAttributeValue")]
pub group_by_attribute_value: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct InsightResults {
#[serde(rename = "GroupByAttribute")]
pub group_by_attribute: String,
#[serde(rename = "InsightArn")]
pub insight_arn: String,
#[serde(rename = "ResultValues")]
pub result_values: Vec<InsightResultValue>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Invitation {
#[serde(rename = "AccountId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account_id: Option<String>,
#[serde(rename = "InvitationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub invitation_id: Option<String>,
#[serde(rename = "InvitedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub invited_at: Option<f64>,
#[serde(rename = "MemberStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub member_status: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct InviteMembersRequest {
#[serde(rename = "AccountIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account_ids: Option<Vec<String>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct InviteMembersResponse {
#[serde(rename = "UnprocessedAccounts")]
#[serde(skip_serializing_if = "Option::is_none")]
pub unprocessed_accounts: Option<Vec<SecurityHubResult>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct IpFilter {
#[serde(rename = "Cidr")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cidr: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct Ipv6CidrBlockAssociation {
#[serde(rename = "AssociationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_id: Option<String>,
#[serde(rename = "CidrBlockState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cidr_block_state: Option<String>,
#[serde(rename = "Ipv6CidrBlock")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ipv_6_cidr_block: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct KeywordFilter {
#[serde(rename = "Value")]
#[serde(skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListEnabledProductsForImportRequest {
#[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(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListEnabledProductsForImportResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "ProductSubscriptions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub product_subscriptions: Option<Vec<String>>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListInvitationsRequest {
#[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(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListInvitationsResponse {
#[serde(rename = "Invitations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub invitations: Option<Vec<Invitation>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListMembersRequest {
#[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 = "OnlyAssociated")]
#[serde(skip_serializing_if = "Option::is_none")]
pub only_associated: Option<bool>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListMembersResponse {
#[serde(rename = "Members")]
#[serde(skip_serializing_if = "Option::is_none")]
pub members: Option<Vec<Member>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListTagsForResourceRequest {
#[serde(rename = "ResourceArn")]
pub resource_arn: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListTagsForResourceResponse {
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct LoadBalancerState {
#[serde(rename = "Code")]
#[serde(skip_serializing_if = "Option::is_none")]
pub code: Option<String>,
#[serde(rename = "Reason")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reason: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct Malware {
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "Path")]
#[serde(skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
#[serde(rename = "State")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct MapFilter {
#[serde(rename = "Comparison")]
#[serde(skip_serializing_if = "Option::is_none")]
pub comparison: Option<String>,
#[serde(rename = "Key")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key: Option<String>,
#[serde(rename = "Value")]
#[serde(skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Member {
#[serde(rename = "AccountId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account_id: Option<String>,
#[serde(rename = "Email")]
#[serde(skip_serializing_if = "Option::is_none")]
pub email: Option<String>,
#[serde(rename = "InvitedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub invited_at: Option<f64>,
#[serde(rename = "MasterId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub master_id: Option<String>,
#[serde(rename = "MemberStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub member_status: Option<String>,
#[serde(rename = "UpdatedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub updated_at: Option<f64>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct Network {
#[serde(rename = "DestinationDomain")]
#[serde(skip_serializing_if = "Option::is_none")]
pub destination_domain: Option<String>,
#[serde(rename = "DestinationIpV4")]
#[serde(skip_serializing_if = "Option::is_none")]
pub destination_ip_v4: Option<String>,
#[serde(rename = "DestinationIpV6")]
#[serde(skip_serializing_if = "Option::is_none")]
pub destination_ip_v6: Option<String>,
#[serde(rename = "DestinationPort")]
#[serde(skip_serializing_if = "Option::is_none")]
pub destination_port: Option<i64>,
#[serde(rename = "Direction")]
#[serde(skip_serializing_if = "Option::is_none")]
pub direction: Option<String>,
#[serde(rename = "OpenPortRange")]
#[serde(skip_serializing_if = "Option::is_none")]
pub open_port_range: Option<PortRange>,
#[serde(rename = "Protocol")]
#[serde(skip_serializing_if = "Option::is_none")]
pub protocol: Option<String>,
#[serde(rename = "SourceDomain")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_domain: Option<String>,
#[serde(rename = "SourceIpV4")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_ip_v4: Option<String>,
#[serde(rename = "SourceIpV6")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_ip_v6: Option<String>,
#[serde(rename = "SourceMac")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_mac: Option<String>,
#[serde(rename = "SourcePort")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_port: Option<i64>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct NetworkHeader {
#[serde(rename = "Destination")]
#[serde(skip_serializing_if = "Option::is_none")]
pub destination: Option<NetworkPathComponentDetails>,
#[serde(rename = "Protocol")]
#[serde(skip_serializing_if = "Option::is_none")]
pub protocol: Option<String>,
#[serde(rename = "Source")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source: Option<NetworkPathComponentDetails>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct NetworkPathComponent {
#[serde(rename = "ComponentId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub component_id: Option<String>,
#[serde(rename = "ComponentType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub component_type: Option<String>,
#[serde(rename = "Egress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub egress: Option<NetworkHeader>,
#[serde(rename = "Ingress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ingress: Option<NetworkHeader>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct NetworkPathComponentDetails {
#[serde(rename = "Address")]
#[serde(skip_serializing_if = "Option::is_none")]
pub address: Option<Vec<String>>,
#[serde(rename = "PortRanges")]
#[serde(skip_serializing_if = "Option::is_none")]
pub port_ranges: Option<Vec<PortRange>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct Note {
#[serde(rename = "Text")]
pub text: String,
#[serde(rename = "UpdatedAt")]
pub updated_at: String,
#[serde(rename = "UpdatedBy")]
pub updated_by: String,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct NoteUpdate {
#[serde(rename = "Text")]
pub text: String,
#[serde(rename = "UpdatedBy")]
pub updated_by: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct NumberFilter {
#[serde(rename = "Eq")]
#[serde(skip_serializing_if = "Option::is_none")]
pub eq: Option<f64>,
#[serde(rename = "Gte")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gte: Option<f64>,
#[serde(rename = "Lte")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lte: Option<f64>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct PortRange {
#[serde(rename = "Begin")]
#[serde(skip_serializing_if = "Option::is_none")]
pub begin: Option<i64>,
#[serde(rename = "End")]
#[serde(skip_serializing_if = "Option::is_none")]
pub end: Option<i64>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct ProcessDetails {
#[serde(rename = "LaunchedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub launched_at: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "ParentPid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parent_pid: Option<i64>,
#[serde(rename = "Path")]
#[serde(skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
#[serde(rename = "Pid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pid: Option<i64>,
#[serde(rename = "TerminatedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub terminated_at: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Product {
#[serde(rename = "ActivationUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub activation_url: Option<String>,
#[serde(rename = "Categories")]
#[serde(skip_serializing_if = "Option::is_none")]
pub categories: Option<Vec<String>>,
#[serde(rename = "CompanyName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub company_name: Option<String>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "IntegrationTypes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_types: Option<Vec<String>>,
#[serde(rename = "MarketplaceUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marketplace_url: Option<String>,
#[serde(rename = "ProductArn")]
pub product_arn: String,
#[serde(rename = "ProductName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub product_name: Option<String>,
#[serde(rename = "ProductSubscriptionResourcePolicy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub product_subscription_resource_policy: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct Recommendation {
#[serde(rename = "Text")]
#[serde(skip_serializing_if = "Option::is_none")]
pub text: Option<String>,
#[serde(rename = "Url")]
#[serde(skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct RelatedFinding {
#[serde(rename = "Id")]
pub id: String,
#[serde(rename = "ProductArn")]
pub product_arn: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct Remediation {
#[serde(rename = "Recommendation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub recommendation: Option<Recommendation>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct Resource {
#[serde(rename = "Details")]
#[serde(skip_serializing_if = "Option::is_none")]
pub details: Option<ResourceDetails>,
#[serde(rename = "Id")]
pub id: String,
#[serde(rename = "Partition")]
#[serde(skip_serializing_if = "Option::is_none")]
pub partition: Option<String>,
#[serde(rename = "Region")]
#[serde(skip_serializing_if = "Option::is_none")]
pub region: Option<String>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "Type")]
pub type_: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct ResourceDetails {
#[serde(rename = "AwsAutoScalingAutoScalingGroup")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_auto_scaling_auto_scaling_group: Option<AwsAutoScalingAutoScalingGroupDetails>,
#[serde(rename = "AwsCloudFrontDistribution")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_cloud_front_distribution: Option<AwsCloudFrontDistributionDetails>,
#[serde(rename = "AwsCodeBuildProject")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_code_build_project: Option<AwsCodeBuildProjectDetails>,
#[serde(rename = "AwsEc2Instance")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_ec_2_instance: Option<AwsEc2InstanceDetails>,
#[serde(rename = "AwsEc2NetworkInterface")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_ec_2_network_interface: Option<AwsEc2NetworkInterfaceDetails>,
#[serde(rename = "AwsEc2SecurityGroup")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_ec_2_security_group: Option<AwsEc2SecurityGroupDetails>,
#[serde(rename = "AwsEc2Volume")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_ec_2_volume: Option<AwsEc2VolumeDetails>,
#[serde(rename = "AwsEc2Vpc")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_ec_2_vpc: Option<AwsEc2VpcDetails>,
#[serde(rename = "AwsElasticsearchDomain")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_elasticsearch_domain: Option<AwsElasticsearchDomainDetails>,
#[serde(rename = "AwsElbv2LoadBalancer")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_elbv_2_load_balancer: Option<AwsElbv2LoadBalancerDetails>,
#[serde(rename = "AwsIamAccessKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_iam_access_key: Option<AwsIamAccessKeyDetails>,
#[serde(rename = "AwsIamRole")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_iam_role: Option<AwsIamRoleDetails>,
#[serde(rename = "AwsKmsKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_kms_key: Option<AwsKmsKeyDetails>,
#[serde(rename = "AwsLambdaFunction")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_lambda_function: Option<AwsLambdaFunctionDetails>,
#[serde(rename = "AwsLambdaLayerVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_lambda_layer_version: Option<AwsLambdaLayerVersionDetails>,
#[serde(rename = "AwsRdsDbInstance")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_rds_db_instance: Option<AwsRdsDbInstanceDetails>,
#[serde(rename = "AwsS3Bucket")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_s3_bucket: Option<AwsS3BucketDetails>,
#[serde(rename = "AwsS3Object")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_s3_object: Option<AwsS3ObjectDetails>,
#[serde(rename = "AwsSnsTopic")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_sns_topic: Option<AwsSnsTopicDetails>,
#[serde(rename = "AwsSqsQueue")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_sqs_queue: Option<AwsSqsQueueDetails>,
#[serde(rename = "AwsWafWebAcl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_waf_web_acl: Option<AwsWafWebAclDetails>,
#[serde(rename = "Container")]
#[serde(skip_serializing_if = "Option::is_none")]
pub container: Option<ContainerDetails>,
#[serde(rename = "Other")]
#[serde(skip_serializing_if = "Option::is_none")]
pub other: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct SecurityHubResult {
#[serde(rename = "AccountId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account_id: Option<String>,
#[serde(rename = "ProcessingResult")]
#[serde(skip_serializing_if = "Option::is_none")]
pub processing_result: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct Severity {
#[serde(rename = "Label")]
#[serde(skip_serializing_if = "Option::is_none")]
pub label: Option<String>,
#[serde(rename = "Normalized")]
#[serde(skip_serializing_if = "Option::is_none")]
pub normalized: Option<i64>,
#[serde(rename = "Original")]
#[serde(skip_serializing_if = "Option::is_none")]
pub original: Option<String>,
#[serde(rename = "Product")]
#[serde(skip_serializing_if = "Option::is_none")]
pub product: Option<f64>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct SeverityUpdate {
#[serde(rename = "Label")]
#[serde(skip_serializing_if = "Option::is_none")]
pub label: Option<String>,
#[serde(rename = "Normalized")]
#[serde(skip_serializing_if = "Option::is_none")]
pub normalized: Option<i64>,
#[serde(rename = "Product")]
#[serde(skip_serializing_if = "Option::is_none")]
pub product: Option<f64>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct SoftwarePackage {
#[serde(rename = "Architecture")]
#[serde(skip_serializing_if = "Option::is_none")]
pub architecture: Option<String>,
#[serde(rename = "Epoch")]
#[serde(skip_serializing_if = "Option::is_none")]
pub epoch: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Release")]
#[serde(skip_serializing_if = "Option::is_none")]
pub release: Option<String>,
#[serde(rename = "Version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct SortCriterion {
#[serde(rename = "Field")]
#[serde(skip_serializing_if = "Option::is_none")]
pub field: Option<String>,
#[serde(rename = "SortOrder")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sort_order: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Standard {
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "EnabledByDefault")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enabled_by_default: Option<bool>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "StandardsArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub standards_arn: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct StandardsControl {
#[serde(rename = "ControlId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub control_id: Option<String>,
#[serde(rename = "ControlStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub control_status: Option<String>,
#[serde(rename = "ControlStatusUpdatedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub control_status_updated_at: Option<f64>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "DisabledReason")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disabled_reason: Option<String>,
#[serde(rename = "RelatedRequirements")]
#[serde(skip_serializing_if = "Option::is_none")]
pub related_requirements: Option<Vec<String>>,
#[serde(rename = "RemediationUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub remediation_url: Option<String>,
#[serde(rename = "SeverityRating")]
#[serde(skip_serializing_if = "Option::is_none")]
pub severity_rating: Option<String>,
#[serde(rename = "StandardsControlArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub standards_control_arn: Option<String>,
#[serde(rename = "Title")]
#[serde(skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct StandardsSubscription {
#[serde(rename = "StandardsArn")]
pub standards_arn: String,
#[serde(rename = "StandardsInput")]
pub standards_input: ::std::collections::HashMap<String, String>,
#[serde(rename = "StandardsStatus")]
pub standards_status: String,
#[serde(rename = "StandardsSubscriptionArn")]
pub standards_subscription_arn: String,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct StandardsSubscriptionRequest {
#[serde(rename = "StandardsArn")]
pub standards_arn: String,
#[serde(rename = "StandardsInput")]
#[serde(skip_serializing_if = "Option::is_none")]
pub standards_input: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct StatusReason {
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "ReasonCode")]
pub reason_code: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct StringFilter {
#[serde(rename = "Comparison")]
#[serde(skip_serializing_if = "Option::is_none")]
pub comparison: Option<String>,
#[serde(rename = "Value")]
#[serde(skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct TagResourceRequest {
#[serde(rename = "ResourceArn")]
pub resource_arn: String,
#[serde(rename = "Tags")]
pub tags: ::std::collections::HashMap<String, String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct TagResourceResponse {}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct ThreatIntelIndicator {
#[serde(rename = "Category")]
#[serde(skip_serializing_if = "Option::is_none")]
pub category: Option<String>,
#[serde(rename = "LastObservedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_observed_at: Option<String>,
#[serde(rename = "Source")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source: Option<String>,
#[serde(rename = "SourceUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_url: 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>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UntagResourceRequest {
#[serde(rename = "ResourceArn")]
pub resource_arn: String,
#[serde(rename = "TagKeys")]
pub tag_keys: Vec<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct UntagResourceResponse {}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateActionTargetRequest {
#[serde(rename = "ActionTargetArn")]
pub action_target_arn: 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>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct UpdateActionTargetResponse {}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateFindingsRequest {
#[serde(rename = "Filters")]
pub filters: AwsSecurityFindingFilters,
#[serde(rename = "Note")]
#[serde(skip_serializing_if = "Option::is_none")]
pub note: Option<NoteUpdate>,
#[serde(rename = "RecordState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub record_state: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct UpdateFindingsResponse {}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateInsightRequest {
#[serde(rename = "Filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<AwsSecurityFindingFilters>,
#[serde(rename = "GroupByAttribute")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_by_attribute: Option<String>,
#[serde(rename = "InsightArn")]
pub insight_arn: String,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct UpdateInsightResponse {}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateStandardsControlRequest {
#[serde(rename = "ControlStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub control_status: Option<String>,
#[serde(rename = "DisabledReason")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disabled_reason: Option<String>,
#[serde(rename = "StandardsControlArn")]
pub standards_control_arn: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct UpdateStandardsControlResponse {}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct Vulnerability {
#[serde(rename = "Cvss")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cvss: Option<Vec<Cvss>>,
#[serde(rename = "Id")]
pub id: String,
#[serde(rename = "ReferenceUrls")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reference_urls: Option<Vec<String>>,
#[serde(rename = "RelatedVulnerabilities")]
#[serde(skip_serializing_if = "Option::is_none")]
pub related_vulnerabilities: Option<Vec<String>>,
#[serde(rename = "Vendor")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vendor: Option<VulnerabilityVendor>,
#[serde(rename = "VulnerablePackages")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vulnerable_packages: Option<Vec<SoftwarePackage>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VulnerabilityVendor {
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "Url")]
#[serde(skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
#[serde(rename = "VendorCreatedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vendor_created_at: Option<String>,
#[serde(rename = "VendorSeverity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vendor_severity: Option<String>,
#[serde(rename = "VendorUpdatedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vendor_updated_at: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct WafAction {
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct WafExcludedRule {
#[serde(rename = "RuleId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rule_id: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct WafOverrideAction {
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct Workflow {
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct WorkflowUpdate {
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
#[derive(Debug, PartialEq)]
pub enum AcceptInvitationError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
LimitExceeded(String),
ResourceNotFound(String),
}
impl AcceptInvitationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AcceptInvitationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(AcceptInvitationError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(AcceptInvitationError::InvalidAccess(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(AcceptInvitationError::InvalidInput(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(AcceptInvitationError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AcceptInvitationError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for AcceptInvitationError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
AcceptInvitationError::Internal(ref cause) => write!(f, "{}", cause),
AcceptInvitationError::InvalidAccess(ref cause) => write!(f, "{}", cause),
AcceptInvitationError::InvalidInput(ref cause) => write!(f, "{}", cause),
AcceptInvitationError::LimitExceeded(ref cause) => write!(f, "{}", cause),
AcceptInvitationError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for AcceptInvitationError {}
#[derive(Debug, PartialEq)]
pub enum BatchDisableStandardsError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
LimitExceeded(String),
}
impl BatchDisableStandardsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BatchDisableStandardsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(BatchDisableStandardsError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(BatchDisableStandardsError::InvalidAccess(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(BatchDisableStandardsError::InvalidInput(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(BatchDisableStandardsError::LimitExceeded(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for BatchDisableStandardsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
BatchDisableStandardsError::Internal(ref cause) => write!(f, "{}", cause),
BatchDisableStandardsError::InvalidAccess(ref cause) => write!(f, "{}", cause),
BatchDisableStandardsError::InvalidInput(ref cause) => write!(f, "{}", cause),
BatchDisableStandardsError::LimitExceeded(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for BatchDisableStandardsError {}
#[derive(Debug, PartialEq)]
pub enum BatchEnableStandardsError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
LimitExceeded(String),
}
impl BatchEnableStandardsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BatchEnableStandardsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(BatchEnableStandardsError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(BatchEnableStandardsError::InvalidAccess(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(BatchEnableStandardsError::InvalidInput(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(BatchEnableStandardsError::LimitExceeded(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for BatchEnableStandardsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
BatchEnableStandardsError::Internal(ref cause) => write!(f, "{}", cause),
BatchEnableStandardsError::InvalidAccess(ref cause) => write!(f, "{}", cause),
BatchEnableStandardsError::InvalidInput(ref cause) => write!(f, "{}", cause),
BatchEnableStandardsError::LimitExceeded(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for BatchEnableStandardsError {}
#[derive(Debug, PartialEq)]
pub enum BatchImportFindingsError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
LimitExceeded(String),
}
impl BatchImportFindingsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BatchImportFindingsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(BatchImportFindingsError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(BatchImportFindingsError::InvalidAccess(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(BatchImportFindingsError::InvalidInput(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(BatchImportFindingsError::LimitExceeded(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for BatchImportFindingsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
BatchImportFindingsError::Internal(ref cause) => write!(f, "{}", cause),
BatchImportFindingsError::InvalidAccess(ref cause) => write!(f, "{}", cause),
BatchImportFindingsError::InvalidInput(ref cause) => write!(f, "{}", cause),
BatchImportFindingsError::LimitExceeded(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for BatchImportFindingsError {}
#[derive(Debug, PartialEq)]
pub enum BatchUpdateFindingsError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
LimitExceeded(String),
}
impl BatchUpdateFindingsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BatchUpdateFindingsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(BatchUpdateFindingsError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(BatchUpdateFindingsError::InvalidAccess(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(BatchUpdateFindingsError::InvalidInput(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(BatchUpdateFindingsError::LimitExceeded(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for BatchUpdateFindingsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
BatchUpdateFindingsError::Internal(ref cause) => write!(f, "{}", cause),
BatchUpdateFindingsError::InvalidAccess(ref cause) => write!(f, "{}", cause),
BatchUpdateFindingsError::InvalidInput(ref cause) => write!(f, "{}", cause),
BatchUpdateFindingsError::LimitExceeded(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for BatchUpdateFindingsError {}
#[derive(Debug, PartialEq)]
pub enum CreateActionTargetError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
LimitExceeded(String),
ResourceConflict(String),
}
impl CreateActionTargetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateActionTargetError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(CreateActionTargetError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(CreateActionTargetError::InvalidAccess(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(CreateActionTargetError::InvalidInput(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateActionTargetError::LimitExceeded(err.msg))
}
"ResourceConflictException" => {
return RusotoError::Service(CreateActionTargetError::ResourceConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateActionTargetError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateActionTargetError::Internal(ref cause) => write!(f, "{}", cause),
CreateActionTargetError::InvalidAccess(ref cause) => write!(f, "{}", cause),
CreateActionTargetError::InvalidInput(ref cause) => write!(f, "{}", cause),
CreateActionTargetError::LimitExceeded(ref cause) => write!(f, "{}", cause),
CreateActionTargetError::ResourceConflict(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateActionTargetError {}
#[derive(Debug, PartialEq)]
pub enum CreateInsightError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
LimitExceeded(String),
ResourceConflict(String),
}
impl CreateInsightError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateInsightError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(CreateInsightError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(CreateInsightError::InvalidAccess(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(CreateInsightError::InvalidInput(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateInsightError::LimitExceeded(err.msg))
}
"ResourceConflictException" => {
return RusotoError::Service(CreateInsightError::ResourceConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateInsightError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateInsightError::Internal(ref cause) => write!(f, "{}", cause),
CreateInsightError::InvalidAccess(ref cause) => write!(f, "{}", cause),
CreateInsightError::InvalidInput(ref cause) => write!(f, "{}", cause),
CreateInsightError::LimitExceeded(ref cause) => write!(f, "{}", cause),
CreateInsightError::ResourceConflict(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateInsightError {}
#[derive(Debug, PartialEq)]
pub enum CreateMembersError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
LimitExceeded(String),
ResourceConflict(String),
}
impl CreateMembersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateMembersError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(CreateMembersError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(CreateMembersError::InvalidAccess(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(CreateMembersError::InvalidInput(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateMembersError::LimitExceeded(err.msg))
}
"ResourceConflictException" => {
return RusotoError::Service(CreateMembersError::ResourceConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateMembersError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateMembersError::Internal(ref cause) => write!(f, "{}", cause),
CreateMembersError::InvalidAccess(ref cause) => write!(f, "{}", cause),
CreateMembersError::InvalidInput(ref cause) => write!(f, "{}", cause),
CreateMembersError::LimitExceeded(ref cause) => write!(f, "{}", cause),
CreateMembersError::ResourceConflict(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateMembersError {}
#[derive(Debug, PartialEq)]
pub enum DeclineInvitationsError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
ResourceNotFound(String),
}
impl DeclineInvitationsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeclineInvitationsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(DeclineInvitationsError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(DeclineInvitationsError::InvalidAccess(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(DeclineInvitationsError::InvalidInput(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeclineInvitationsError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeclineInvitationsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeclineInvitationsError::Internal(ref cause) => write!(f, "{}", cause),
DeclineInvitationsError::InvalidAccess(ref cause) => write!(f, "{}", cause),
DeclineInvitationsError::InvalidInput(ref cause) => write!(f, "{}", cause),
DeclineInvitationsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeclineInvitationsError {}
#[derive(Debug, PartialEq)]
pub enum DeleteActionTargetError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
ResourceNotFound(String),
}
impl DeleteActionTargetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteActionTargetError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(DeleteActionTargetError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(DeleteActionTargetError::InvalidAccess(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(DeleteActionTargetError::InvalidInput(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteActionTargetError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteActionTargetError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteActionTargetError::Internal(ref cause) => write!(f, "{}", cause),
DeleteActionTargetError::InvalidAccess(ref cause) => write!(f, "{}", cause),
DeleteActionTargetError::InvalidInput(ref cause) => write!(f, "{}", cause),
DeleteActionTargetError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteActionTargetError {}
#[derive(Debug, PartialEq)]
pub enum DeleteInsightError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
LimitExceeded(String),
ResourceNotFound(String),
}
impl DeleteInsightError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteInsightError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(DeleteInsightError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(DeleteInsightError::InvalidAccess(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(DeleteInsightError::InvalidInput(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(DeleteInsightError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteInsightError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteInsightError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteInsightError::Internal(ref cause) => write!(f, "{}", cause),
DeleteInsightError::InvalidAccess(ref cause) => write!(f, "{}", cause),
DeleteInsightError::InvalidInput(ref cause) => write!(f, "{}", cause),
DeleteInsightError::LimitExceeded(ref cause) => write!(f, "{}", cause),
DeleteInsightError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteInsightError {}
#[derive(Debug, PartialEq)]
pub enum DeleteInvitationsError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
LimitExceeded(String),
ResourceNotFound(String),
}
impl DeleteInvitationsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteInvitationsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(DeleteInvitationsError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(DeleteInvitationsError::InvalidAccess(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(DeleteInvitationsError::InvalidInput(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(DeleteInvitationsError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteInvitationsError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteInvitationsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteInvitationsError::Internal(ref cause) => write!(f, "{}", cause),
DeleteInvitationsError::InvalidAccess(ref cause) => write!(f, "{}", cause),
DeleteInvitationsError::InvalidInput(ref cause) => write!(f, "{}", cause),
DeleteInvitationsError::LimitExceeded(ref cause) => write!(f, "{}", cause),
DeleteInvitationsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteInvitationsError {}
#[derive(Debug, PartialEq)]
pub enum DeleteMembersError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
LimitExceeded(String),
ResourceNotFound(String),
}
impl DeleteMembersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteMembersError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(DeleteMembersError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(DeleteMembersError::InvalidAccess(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(DeleteMembersError::InvalidInput(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(DeleteMembersError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteMembersError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteMembersError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteMembersError::Internal(ref cause) => write!(f, "{}", cause),
DeleteMembersError::InvalidAccess(ref cause) => write!(f, "{}", cause),
DeleteMembersError::InvalidInput(ref cause) => write!(f, "{}", cause),
DeleteMembersError::LimitExceeded(ref cause) => write!(f, "{}", cause),
DeleteMembersError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteMembersError {}
#[derive(Debug, PartialEq)]
pub enum DescribeActionTargetsError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
ResourceNotFound(String),
}
impl DescribeActionTargetsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeActionTargetsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(DescribeActionTargetsError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(DescribeActionTargetsError::InvalidAccess(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(DescribeActionTargetsError::InvalidInput(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeActionTargetsError::ResourceNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DescribeActionTargetsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DescribeActionTargetsError::Internal(ref cause) => write!(f, "{}", cause),
DescribeActionTargetsError::InvalidAccess(ref cause) => write!(f, "{}", cause),
DescribeActionTargetsError::InvalidInput(ref cause) => write!(f, "{}", cause),
DescribeActionTargetsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DescribeActionTargetsError {}
#[derive(Debug, PartialEq)]
pub enum DescribeHubError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
LimitExceeded(String),
ResourceNotFound(String),
}
impl DescribeHubError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeHubError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(DescribeHubError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(DescribeHubError::InvalidAccess(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(DescribeHubError::InvalidInput(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(DescribeHubError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeHubError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DescribeHubError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DescribeHubError::Internal(ref cause) => write!(f, "{}", cause),
DescribeHubError::InvalidAccess(ref cause) => write!(f, "{}", cause),
DescribeHubError::InvalidInput(ref cause) => write!(f, "{}", cause),
DescribeHubError::LimitExceeded(ref cause) => write!(f, "{}", cause),
DescribeHubError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DescribeHubError {}
#[derive(Debug, PartialEq)]
pub enum DescribeProductsError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
LimitExceeded(String),
}
impl DescribeProductsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeProductsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(DescribeProductsError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(DescribeProductsError::InvalidAccess(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(DescribeProductsError::InvalidInput(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(DescribeProductsError::LimitExceeded(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DescribeProductsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DescribeProductsError::Internal(ref cause) => write!(f, "{}", cause),
DescribeProductsError::InvalidAccess(ref cause) => write!(f, "{}", cause),
DescribeProductsError::InvalidInput(ref cause) => write!(f, "{}", cause),
DescribeProductsError::LimitExceeded(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DescribeProductsError {}
#[derive(Debug, PartialEq)]
pub enum DescribeStandardsError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
}
impl DescribeStandardsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeStandardsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(DescribeStandardsError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(DescribeStandardsError::InvalidAccess(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(DescribeStandardsError::InvalidInput(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DescribeStandardsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DescribeStandardsError::Internal(ref cause) => write!(f, "{}", cause),
DescribeStandardsError::InvalidAccess(ref cause) => write!(f, "{}", cause),
DescribeStandardsError::InvalidInput(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DescribeStandardsError {}
#[derive(Debug, PartialEq)]
pub enum DescribeStandardsControlsError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
ResourceNotFound(String),
}
impl DescribeStandardsControlsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeStandardsControlsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(DescribeStandardsControlsError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(DescribeStandardsControlsError::InvalidAccess(
err.msg,
))
}
"InvalidInputException" => {
return RusotoError::Service(DescribeStandardsControlsError::InvalidInput(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeStandardsControlsError::ResourceNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DescribeStandardsControlsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DescribeStandardsControlsError::Internal(ref cause) => write!(f, "{}", cause),
DescribeStandardsControlsError::InvalidAccess(ref cause) => write!(f, "{}", cause),
DescribeStandardsControlsError::InvalidInput(ref cause) => write!(f, "{}", cause),
DescribeStandardsControlsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DescribeStandardsControlsError {}
#[derive(Debug, PartialEq)]
pub enum DisableImportFindingsForProductError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
LimitExceeded(String),
ResourceNotFound(String),
}
impl DisableImportFindingsForProductError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DisableImportFindingsForProductError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(DisableImportFindingsForProductError::Internal(
err.msg,
))
}
"InvalidAccessException" => {
return RusotoError::Service(
DisableImportFindingsForProductError::InvalidAccess(err.msg),
)
}
"InvalidInputException" => {
return RusotoError::Service(
DisableImportFindingsForProductError::InvalidInput(err.msg),
)
}
"LimitExceededException" => {
return RusotoError::Service(
DisableImportFindingsForProductError::LimitExceeded(err.msg),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(
DisableImportFindingsForProductError::ResourceNotFound(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DisableImportFindingsForProductError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DisableImportFindingsForProductError::Internal(ref cause) => write!(f, "{}", cause),
DisableImportFindingsForProductError::InvalidAccess(ref cause) => {
write!(f, "{}", cause)
}
DisableImportFindingsForProductError::InvalidInput(ref cause) => write!(f, "{}", cause),
DisableImportFindingsForProductError::LimitExceeded(ref cause) => {
write!(f, "{}", cause)
}
DisableImportFindingsForProductError::ResourceNotFound(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for DisableImportFindingsForProductError {}
#[derive(Debug, PartialEq)]
pub enum DisableSecurityHubError {
Internal(String),
InvalidAccess(String),
LimitExceeded(String),
ResourceNotFound(String),
}
impl DisableSecurityHubError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DisableSecurityHubError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(DisableSecurityHubError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(DisableSecurityHubError::InvalidAccess(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(DisableSecurityHubError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DisableSecurityHubError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DisableSecurityHubError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DisableSecurityHubError::Internal(ref cause) => write!(f, "{}", cause),
DisableSecurityHubError::InvalidAccess(ref cause) => write!(f, "{}", cause),
DisableSecurityHubError::LimitExceeded(ref cause) => write!(f, "{}", cause),
DisableSecurityHubError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DisableSecurityHubError {}
#[derive(Debug, PartialEq)]
pub enum DisassociateFromMasterAccountError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
LimitExceeded(String),
ResourceNotFound(String),
}
impl DisassociateFromMasterAccountError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DisassociateFromMasterAccountError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(DisassociateFromMasterAccountError::Internal(
err.msg,
))
}
"InvalidAccessException" => {
return RusotoError::Service(DisassociateFromMasterAccountError::InvalidAccess(
err.msg,
))
}
"InvalidInputException" => {
return RusotoError::Service(DisassociateFromMasterAccountError::InvalidInput(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(DisassociateFromMasterAccountError::LimitExceeded(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(
DisassociateFromMasterAccountError::ResourceNotFound(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DisassociateFromMasterAccountError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DisassociateFromMasterAccountError::Internal(ref cause) => write!(f, "{}", cause),
DisassociateFromMasterAccountError::InvalidAccess(ref cause) => write!(f, "{}", cause),
DisassociateFromMasterAccountError::InvalidInput(ref cause) => write!(f, "{}", cause),
DisassociateFromMasterAccountError::LimitExceeded(ref cause) => write!(f, "{}", cause),
DisassociateFromMasterAccountError::ResourceNotFound(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for DisassociateFromMasterAccountError {}
#[derive(Debug, PartialEq)]
pub enum DisassociateMembersError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
LimitExceeded(String),
ResourceNotFound(String),
}
impl DisassociateMembersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DisassociateMembersError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(DisassociateMembersError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(DisassociateMembersError::InvalidAccess(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(DisassociateMembersError::InvalidInput(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(DisassociateMembersError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DisassociateMembersError::ResourceNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DisassociateMembersError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DisassociateMembersError::Internal(ref cause) => write!(f, "{}", cause),
DisassociateMembersError::InvalidAccess(ref cause) => write!(f, "{}", cause),
DisassociateMembersError::InvalidInput(ref cause) => write!(f, "{}", cause),
DisassociateMembersError::LimitExceeded(ref cause) => write!(f, "{}", cause),
DisassociateMembersError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DisassociateMembersError {}
#[derive(Debug, PartialEq)]
pub enum EnableImportFindingsForProductError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
LimitExceeded(String),
ResourceConflict(String),
}
impl EnableImportFindingsForProductError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<EnableImportFindingsForProductError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(EnableImportFindingsForProductError::Internal(
err.msg,
))
}
"InvalidAccessException" => {
return RusotoError::Service(
EnableImportFindingsForProductError::InvalidAccess(err.msg),
)
}
"InvalidInputException" => {
return RusotoError::Service(EnableImportFindingsForProductError::InvalidInput(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(
EnableImportFindingsForProductError::LimitExceeded(err.msg),
)
}
"ResourceConflictException" => {
return RusotoError::Service(
EnableImportFindingsForProductError::ResourceConflict(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for EnableImportFindingsForProductError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
EnableImportFindingsForProductError::Internal(ref cause) => write!(f, "{}", cause),
EnableImportFindingsForProductError::InvalidAccess(ref cause) => write!(f, "{}", cause),
EnableImportFindingsForProductError::InvalidInput(ref cause) => write!(f, "{}", cause),
EnableImportFindingsForProductError::LimitExceeded(ref cause) => write!(f, "{}", cause),
EnableImportFindingsForProductError::ResourceConflict(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for EnableImportFindingsForProductError {}
#[derive(Debug, PartialEq)]
pub enum EnableSecurityHubError {
AccessDenied(String),
Internal(String),
InvalidAccess(String),
LimitExceeded(String),
ResourceConflict(String),
}
impl EnableSecurityHubError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<EnableSecurityHubError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(EnableSecurityHubError::AccessDenied(err.msg))
}
"InternalException" => {
return RusotoError::Service(EnableSecurityHubError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(EnableSecurityHubError::InvalidAccess(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(EnableSecurityHubError::LimitExceeded(err.msg))
}
"ResourceConflictException" => {
return RusotoError::Service(EnableSecurityHubError::ResourceConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for EnableSecurityHubError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
EnableSecurityHubError::AccessDenied(ref cause) => write!(f, "{}", cause),
EnableSecurityHubError::Internal(ref cause) => write!(f, "{}", cause),
EnableSecurityHubError::InvalidAccess(ref cause) => write!(f, "{}", cause),
EnableSecurityHubError::LimitExceeded(ref cause) => write!(f, "{}", cause),
EnableSecurityHubError::ResourceConflict(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for EnableSecurityHubError {}
#[derive(Debug, PartialEq)]
pub enum GetEnabledStandardsError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
LimitExceeded(String),
}
impl GetEnabledStandardsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetEnabledStandardsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(GetEnabledStandardsError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(GetEnabledStandardsError::InvalidAccess(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(GetEnabledStandardsError::InvalidInput(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(GetEnabledStandardsError::LimitExceeded(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetEnabledStandardsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetEnabledStandardsError::Internal(ref cause) => write!(f, "{}", cause),
GetEnabledStandardsError::InvalidAccess(ref cause) => write!(f, "{}", cause),
GetEnabledStandardsError::InvalidInput(ref cause) => write!(f, "{}", cause),
GetEnabledStandardsError::LimitExceeded(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetEnabledStandardsError {}
#[derive(Debug, PartialEq)]
pub enum GetFindingsError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
LimitExceeded(String),
}
impl GetFindingsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetFindingsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(GetFindingsError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(GetFindingsError::InvalidAccess(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(GetFindingsError::InvalidInput(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(GetFindingsError::LimitExceeded(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetFindingsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetFindingsError::Internal(ref cause) => write!(f, "{}", cause),
GetFindingsError::InvalidAccess(ref cause) => write!(f, "{}", cause),
GetFindingsError::InvalidInput(ref cause) => write!(f, "{}", cause),
GetFindingsError::LimitExceeded(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetFindingsError {}
#[derive(Debug, PartialEq)]
pub enum GetInsightResultsError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
LimitExceeded(String),
ResourceNotFound(String),
}
impl GetInsightResultsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetInsightResultsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(GetInsightResultsError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(GetInsightResultsError::InvalidAccess(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(GetInsightResultsError::InvalidInput(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(GetInsightResultsError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(GetInsightResultsError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetInsightResultsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetInsightResultsError::Internal(ref cause) => write!(f, "{}", cause),
GetInsightResultsError::InvalidAccess(ref cause) => write!(f, "{}", cause),
GetInsightResultsError::InvalidInput(ref cause) => write!(f, "{}", cause),
GetInsightResultsError::LimitExceeded(ref cause) => write!(f, "{}", cause),
GetInsightResultsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetInsightResultsError {}
#[derive(Debug, PartialEq)]
pub enum GetInsightsError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
LimitExceeded(String),
ResourceNotFound(String),
}
impl GetInsightsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetInsightsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(GetInsightsError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(GetInsightsError::InvalidAccess(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(GetInsightsError::InvalidInput(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(GetInsightsError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(GetInsightsError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetInsightsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetInsightsError::Internal(ref cause) => write!(f, "{}", cause),
GetInsightsError::InvalidAccess(ref cause) => write!(f, "{}", cause),
GetInsightsError::InvalidInput(ref cause) => write!(f, "{}", cause),
GetInsightsError::LimitExceeded(ref cause) => write!(f, "{}", cause),
GetInsightsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetInsightsError {}
#[derive(Debug, PartialEq)]
pub enum GetInvitationsCountError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
LimitExceeded(String),
}
impl GetInvitationsCountError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetInvitationsCountError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(GetInvitationsCountError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(GetInvitationsCountError::InvalidAccess(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(GetInvitationsCountError::InvalidInput(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(GetInvitationsCountError::LimitExceeded(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetInvitationsCountError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetInvitationsCountError::Internal(ref cause) => write!(f, "{}", cause),
GetInvitationsCountError::InvalidAccess(ref cause) => write!(f, "{}", cause),
GetInvitationsCountError::InvalidInput(ref cause) => write!(f, "{}", cause),
GetInvitationsCountError::LimitExceeded(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetInvitationsCountError {}
#[derive(Debug, PartialEq)]
pub enum GetMasterAccountError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
LimitExceeded(String),
ResourceNotFound(String),
}
impl GetMasterAccountError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetMasterAccountError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(GetMasterAccountError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(GetMasterAccountError::InvalidAccess(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(GetMasterAccountError::InvalidInput(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(GetMasterAccountError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(GetMasterAccountError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetMasterAccountError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetMasterAccountError::Internal(ref cause) => write!(f, "{}", cause),
GetMasterAccountError::InvalidAccess(ref cause) => write!(f, "{}", cause),
GetMasterAccountError::InvalidInput(ref cause) => write!(f, "{}", cause),
GetMasterAccountError::LimitExceeded(ref cause) => write!(f, "{}", cause),
GetMasterAccountError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetMasterAccountError {}
#[derive(Debug, PartialEq)]
pub enum GetMembersError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
LimitExceeded(String),
ResourceNotFound(String),
}
impl GetMembersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetMembersError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(GetMembersError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(GetMembersError::InvalidAccess(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(GetMembersError::InvalidInput(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(GetMembersError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(GetMembersError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetMembersError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetMembersError::Internal(ref cause) => write!(f, "{}", cause),
GetMembersError::InvalidAccess(ref cause) => write!(f, "{}", cause),
GetMembersError::InvalidInput(ref cause) => write!(f, "{}", cause),
GetMembersError::LimitExceeded(ref cause) => write!(f, "{}", cause),
GetMembersError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetMembersError {}
#[derive(Debug, PartialEq)]
pub enum InviteMembersError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
LimitExceeded(String),
ResourceNotFound(String),
}
impl InviteMembersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<InviteMembersError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(InviteMembersError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(InviteMembersError::InvalidAccess(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(InviteMembersError::InvalidInput(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(InviteMembersError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(InviteMembersError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for InviteMembersError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
InviteMembersError::Internal(ref cause) => write!(f, "{}", cause),
InviteMembersError::InvalidAccess(ref cause) => write!(f, "{}", cause),
InviteMembersError::InvalidInput(ref cause) => write!(f, "{}", cause),
InviteMembersError::LimitExceeded(ref cause) => write!(f, "{}", cause),
InviteMembersError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for InviteMembersError {}
#[derive(Debug, PartialEq)]
pub enum ListEnabledProductsForImportError {
Internal(String),
InvalidAccess(String),
LimitExceeded(String),
}
impl ListEnabledProductsForImportError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListEnabledProductsForImportError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(ListEnabledProductsForImportError::Internal(
err.msg,
))
}
"InvalidAccessException" => {
return RusotoError::Service(ListEnabledProductsForImportError::InvalidAccess(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(ListEnabledProductsForImportError::LimitExceeded(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListEnabledProductsForImportError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListEnabledProductsForImportError::Internal(ref cause) => write!(f, "{}", cause),
ListEnabledProductsForImportError::InvalidAccess(ref cause) => write!(f, "{}", cause),
ListEnabledProductsForImportError::LimitExceeded(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListEnabledProductsForImportError {}
#[derive(Debug, PartialEq)]
pub enum ListInvitationsError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
LimitExceeded(String),
}
impl ListInvitationsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListInvitationsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(ListInvitationsError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(ListInvitationsError::InvalidAccess(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(ListInvitationsError::InvalidInput(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(ListInvitationsError::LimitExceeded(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListInvitationsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListInvitationsError::Internal(ref cause) => write!(f, "{}", cause),
ListInvitationsError::InvalidAccess(ref cause) => write!(f, "{}", cause),
ListInvitationsError::InvalidInput(ref cause) => write!(f, "{}", cause),
ListInvitationsError::LimitExceeded(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListInvitationsError {}
#[derive(Debug, PartialEq)]
pub enum ListMembersError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
LimitExceeded(String),
}
impl ListMembersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListMembersError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(ListMembersError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(ListMembersError::InvalidAccess(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(ListMembersError::InvalidInput(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(ListMembersError::LimitExceeded(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListMembersError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListMembersError::Internal(ref cause) => write!(f, "{}", cause),
ListMembersError::InvalidAccess(ref cause) => write!(f, "{}", cause),
ListMembersError::InvalidInput(ref cause) => write!(f, "{}", cause),
ListMembersError::LimitExceeded(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListMembersError {}
#[derive(Debug, PartialEq)]
pub enum ListTagsForResourceError {
Internal(String),
InvalidInput(String),
ResourceNotFound(String),
}
impl ListTagsForResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForResourceError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(ListTagsForResourceError::Internal(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(ListTagsForResourceError::InvalidInput(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListTagsForResourceError::ResourceNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListTagsForResourceError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListTagsForResourceError::Internal(ref cause) => write!(f, "{}", cause),
ListTagsForResourceError::InvalidInput(ref cause) => write!(f, "{}", cause),
ListTagsForResourceError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListTagsForResourceError {}
#[derive(Debug, PartialEq)]
pub enum TagResourceError {
Internal(String),
InvalidInput(String),
ResourceNotFound(String),
}
impl TagResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagResourceError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(TagResourceError::Internal(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(TagResourceError::InvalidInput(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(TagResourceError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for TagResourceError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
TagResourceError::Internal(ref cause) => write!(f, "{}", cause),
TagResourceError::InvalidInput(ref cause) => write!(f, "{}", cause),
TagResourceError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for TagResourceError {}
#[derive(Debug, PartialEq)]
pub enum UntagResourceError {
Internal(String),
InvalidInput(String),
ResourceNotFound(String),
}
impl UntagResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagResourceError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(UntagResourceError::Internal(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(UntagResourceError::InvalidInput(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UntagResourceError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UntagResourceError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UntagResourceError::Internal(ref cause) => write!(f, "{}", cause),
UntagResourceError::InvalidInput(ref cause) => write!(f, "{}", cause),
UntagResourceError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UntagResourceError {}
#[derive(Debug, PartialEq)]
pub enum UpdateActionTargetError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
ResourceNotFound(String),
}
impl UpdateActionTargetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateActionTargetError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(UpdateActionTargetError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(UpdateActionTargetError::InvalidAccess(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(UpdateActionTargetError::InvalidInput(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateActionTargetError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateActionTargetError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateActionTargetError::Internal(ref cause) => write!(f, "{}", cause),
UpdateActionTargetError::InvalidAccess(ref cause) => write!(f, "{}", cause),
UpdateActionTargetError::InvalidInput(ref cause) => write!(f, "{}", cause),
UpdateActionTargetError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateActionTargetError {}
#[derive(Debug, PartialEq)]
pub enum UpdateFindingsError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
LimitExceeded(String),
ResourceNotFound(String),
}
impl UpdateFindingsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateFindingsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(UpdateFindingsError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(UpdateFindingsError::InvalidAccess(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(UpdateFindingsError::InvalidInput(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(UpdateFindingsError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateFindingsError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateFindingsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateFindingsError::Internal(ref cause) => write!(f, "{}", cause),
UpdateFindingsError::InvalidAccess(ref cause) => write!(f, "{}", cause),
UpdateFindingsError::InvalidInput(ref cause) => write!(f, "{}", cause),
UpdateFindingsError::LimitExceeded(ref cause) => write!(f, "{}", cause),
UpdateFindingsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateFindingsError {}
#[derive(Debug, PartialEq)]
pub enum UpdateInsightError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
LimitExceeded(String),
ResourceNotFound(String),
}
impl UpdateInsightError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateInsightError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(UpdateInsightError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(UpdateInsightError::InvalidAccess(err.msg))
}
"InvalidInputException" => {
return RusotoError::Service(UpdateInsightError::InvalidInput(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(UpdateInsightError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateInsightError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateInsightError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateInsightError::Internal(ref cause) => write!(f, "{}", cause),
UpdateInsightError::InvalidAccess(ref cause) => write!(f, "{}", cause),
UpdateInsightError::InvalidInput(ref cause) => write!(f, "{}", cause),
UpdateInsightError::LimitExceeded(ref cause) => write!(f, "{}", cause),
UpdateInsightError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateInsightError {}
#[derive(Debug, PartialEq)]
pub enum UpdateStandardsControlError {
Internal(String),
InvalidAccess(String),
InvalidInput(String),
ResourceNotFound(String),
}
impl UpdateStandardsControlError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateStandardsControlError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(UpdateStandardsControlError::Internal(err.msg))
}
"InvalidAccessException" => {
return RusotoError::Service(UpdateStandardsControlError::InvalidAccess(
err.msg,
))
}
"InvalidInputException" => {
return RusotoError::Service(UpdateStandardsControlError::InvalidInput(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateStandardsControlError::ResourceNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateStandardsControlError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateStandardsControlError::Internal(ref cause) => write!(f, "{}", cause),
UpdateStandardsControlError::InvalidAccess(ref cause) => write!(f, "{}", cause),
UpdateStandardsControlError::InvalidInput(ref cause) => write!(f, "{}", cause),
UpdateStandardsControlError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateStandardsControlError {}
#[async_trait]
pub trait SecurityHub {
async fn accept_invitation(
&self,
input: AcceptInvitationRequest,
) -> Result<AcceptInvitationResponse, RusotoError<AcceptInvitationError>>;
async fn batch_disable_standards(
&self,
input: BatchDisableStandardsRequest,
) -> Result<BatchDisableStandardsResponse, RusotoError<BatchDisableStandardsError>>;
async fn batch_enable_standards(
&self,
input: BatchEnableStandardsRequest,
) -> Result<BatchEnableStandardsResponse, RusotoError<BatchEnableStandardsError>>;
async fn batch_import_findings(
&self,
input: BatchImportFindingsRequest,
) -> Result<BatchImportFindingsResponse, RusotoError<BatchImportFindingsError>>;
async fn batch_update_findings(
&self,
input: BatchUpdateFindingsRequest,
) -> Result<BatchUpdateFindingsResponse, RusotoError<BatchUpdateFindingsError>>;
async fn create_action_target(
&self,
input: CreateActionTargetRequest,
) -> Result<CreateActionTargetResponse, RusotoError<CreateActionTargetError>>;
async fn create_insight(
&self,
input: CreateInsightRequest,
) -> Result<CreateInsightResponse, RusotoError<CreateInsightError>>;
async fn create_members(
&self,
input: CreateMembersRequest,
) -> Result<CreateMembersResponse, RusotoError<CreateMembersError>>;
async fn decline_invitations(
&self,
input: DeclineInvitationsRequest,
) -> Result<DeclineInvitationsResponse, RusotoError<DeclineInvitationsError>>;
async fn delete_action_target(
&self,
input: DeleteActionTargetRequest,
) -> Result<DeleteActionTargetResponse, RusotoError<DeleteActionTargetError>>;
async fn delete_insight(
&self,
input: DeleteInsightRequest,
) -> Result<DeleteInsightResponse, RusotoError<DeleteInsightError>>;
async fn delete_invitations(
&self,
input: DeleteInvitationsRequest,
) -> Result<DeleteInvitationsResponse, RusotoError<DeleteInvitationsError>>;
async fn delete_members(
&self,
input: DeleteMembersRequest,
) -> Result<DeleteMembersResponse, RusotoError<DeleteMembersError>>;
async fn describe_action_targets(
&self,
input: DescribeActionTargetsRequest,
) -> Result<DescribeActionTargetsResponse, RusotoError<DescribeActionTargetsError>>;
async fn describe_hub(
&self,
input: DescribeHubRequest,
) -> Result<DescribeHubResponse, RusotoError<DescribeHubError>>;
async fn describe_products(
&self,
input: DescribeProductsRequest,
) -> Result<DescribeProductsResponse, RusotoError<DescribeProductsError>>;
async fn describe_standards(
&self,
input: DescribeStandardsRequest,
) -> Result<DescribeStandardsResponse, RusotoError<DescribeStandardsError>>;
async fn describe_standards_controls(
&self,
input: DescribeStandardsControlsRequest,
) -> Result<DescribeStandardsControlsResponse, RusotoError<DescribeStandardsControlsError>>;
async fn disable_import_findings_for_product(
&self,
input: DisableImportFindingsForProductRequest,
) -> Result<
DisableImportFindingsForProductResponse,
RusotoError<DisableImportFindingsForProductError>,
>;
async fn disable_security_hub(
&self,
) -> Result<DisableSecurityHubResponse, RusotoError<DisableSecurityHubError>>;
async fn disassociate_from_master_account(
&self,
) -> Result<
DisassociateFromMasterAccountResponse,
RusotoError<DisassociateFromMasterAccountError>,
>;
async fn disassociate_members(
&self,
input: DisassociateMembersRequest,
) -> Result<DisassociateMembersResponse, RusotoError<DisassociateMembersError>>;
async fn enable_import_findings_for_product(
&self,
input: EnableImportFindingsForProductRequest,
) -> Result<
EnableImportFindingsForProductResponse,
RusotoError<EnableImportFindingsForProductError>,
>;
async fn enable_security_hub(
&self,
input: EnableSecurityHubRequest,
) -> Result<EnableSecurityHubResponse, RusotoError<EnableSecurityHubError>>;
async fn get_enabled_standards(
&self,
input: GetEnabledStandardsRequest,
) -> Result<GetEnabledStandardsResponse, RusotoError<GetEnabledStandardsError>>;
async fn get_findings(
&self,
input: GetFindingsRequest,
) -> Result<GetFindingsResponse, RusotoError<GetFindingsError>>;
async fn get_insight_results(
&self,
input: GetInsightResultsRequest,
) -> Result<GetInsightResultsResponse, RusotoError<GetInsightResultsError>>;
async fn get_insights(
&self,
input: GetInsightsRequest,
) -> Result<GetInsightsResponse, RusotoError<GetInsightsError>>;
async fn get_invitations_count(
&self,
) -> Result<GetInvitationsCountResponse, RusotoError<GetInvitationsCountError>>;
async fn get_master_account(
&self,
) -> Result<GetMasterAccountResponse, RusotoError<GetMasterAccountError>>;
async fn get_members(
&self,
input: GetMembersRequest,
) -> Result<GetMembersResponse, RusotoError<GetMembersError>>;
async fn invite_members(
&self,
input: InviteMembersRequest,
) -> Result<InviteMembersResponse, RusotoError<InviteMembersError>>;
async fn list_enabled_products_for_import(
&self,
input: ListEnabledProductsForImportRequest,
) -> Result<ListEnabledProductsForImportResponse, RusotoError<ListEnabledProductsForImportError>>;
async fn list_invitations(
&self,
input: ListInvitationsRequest,
) -> Result<ListInvitationsResponse, RusotoError<ListInvitationsError>>;
async fn list_members(
&self,
input: ListMembersRequest,
) -> Result<ListMembersResponse, RusotoError<ListMembersError>>;
async fn list_tags_for_resource(
&self,
input: ListTagsForResourceRequest,
) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>>;
async fn tag_resource(
&self,
input: TagResourceRequest,
) -> Result<TagResourceResponse, RusotoError<TagResourceError>>;
async fn untag_resource(
&self,
input: UntagResourceRequest,
) -> Result<UntagResourceResponse, RusotoError<UntagResourceError>>;
async fn update_action_target(
&self,
input: UpdateActionTargetRequest,
) -> Result<UpdateActionTargetResponse, RusotoError<UpdateActionTargetError>>;
async fn update_findings(
&self,
input: UpdateFindingsRequest,
) -> Result<UpdateFindingsResponse, RusotoError<UpdateFindingsError>>;
async fn update_insight(
&self,
input: UpdateInsightRequest,
) -> Result<UpdateInsightResponse, RusotoError<UpdateInsightError>>;
async fn update_standards_control(
&self,
input: UpdateStandardsControlRequest,
) -> Result<UpdateStandardsControlResponse, RusotoError<UpdateStandardsControlError>>;
}
#[derive(Clone)]
pub struct SecurityHubClient {
client: Client,
region: region::Region,
}
impl SecurityHubClient {
pub fn new(region: region::Region) -> SecurityHubClient {
SecurityHubClient {
client: Client::shared(),
region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> SecurityHubClient
where
P: ProvideAwsCredentials + Send + Sync + 'static,
D: DispatchSignedRequest + Send + Sync + 'static,
{
SecurityHubClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region,
}
}
pub fn new_with_client(client: Client, region: region::Region) -> SecurityHubClient {
SecurityHubClient { client, region }
}
}
#[async_trait]
impl SecurityHub for SecurityHubClient {
#[allow(unused_mut)]
async fn accept_invitation(
&self,
input: AcceptInvitationRequest,
) -> Result<AcceptInvitationResponse, RusotoError<AcceptInvitationError>> {
let request_uri = "/master";
let mut request = SignedRequest::new("POST", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<AcceptInvitationResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(AcceptInvitationError::from_response(response))
}
}
#[allow(unused_mut)]
async fn batch_disable_standards(
&self,
input: BatchDisableStandardsRequest,
) -> Result<BatchDisableStandardsResponse, RusotoError<BatchDisableStandardsError>> {
let request_uri = "/standards/deregister";
let mut request = SignedRequest::new("POST", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<BatchDisableStandardsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(BatchDisableStandardsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn batch_enable_standards(
&self,
input: BatchEnableStandardsRequest,
) -> Result<BatchEnableStandardsResponse, RusotoError<BatchEnableStandardsError>> {
let request_uri = "/standards/register";
let mut request = SignedRequest::new("POST", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<BatchEnableStandardsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(BatchEnableStandardsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn batch_import_findings(
&self,
input: BatchImportFindingsRequest,
) -> Result<BatchImportFindingsResponse, RusotoError<BatchImportFindingsError>> {
let request_uri = "/findings/import";
let mut request = SignedRequest::new("POST", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<BatchImportFindingsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(BatchImportFindingsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn batch_update_findings(
&self,
input: BatchUpdateFindingsRequest,
) -> Result<BatchUpdateFindingsResponse, RusotoError<BatchUpdateFindingsError>> {
let request_uri = "/findings/batchupdate";
let mut request = SignedRequest::new("PATCH", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<BatchUpdateFindingsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(BatchUpdateFindingsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn create_action_target(
&self,
input: CreateActionTargetRequest,
) -> Result<CreateActionTargetResponse, RusotoError<CreateActionTargetError>> {
let request_uri = "/actionTargets";
let mut request = SignedRequest::new("POST", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateActionTargetResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateActionTargetError::from_response(response))
}
}
#[allow(unused_mut)]
async fn create_insight(
&self,
input: CreateInsightRequest,
) -> Result<CreateInsightResponse, RusotoError<CreateInsightError>> {
let request_uri = "/insights";
let mut request = SignedRequest::new("POST", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateInsightResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateInsightError::from_response(response))
}
}
#[allow(unused_mut)]
async fn create_members(
&self,
input: CreateMembersRequest,
) -> Result<CreateMembersResponse, RusotoError<CreateMembersError>> {
let request_uri = "/members";
let mut request = SignedRequest::new("POST", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateMembersResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateMembersError::from_response(response))
}
}
#[allow(unused_mut)]
async fn decline_invitations(
&self,
input: DeclineInvitationsRequest,
) -> Result<DeclineInvitationsResponse, RusotoError<DeclineInvitationsError>> {
let request_uri = "/invitations/decline";
let mut request = SignedRequest::new("POST", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeclineInvitationsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeclineInvitationsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn delete_action_target(
&self,
input: DeleteActionTargetRequest,
) -> Result<DeleteActionTargetResponse, RusotoError<DeleteActionTargetError>> {
let request_uri = format!(
"/actionTargets/{action_target_arn}",
action_target_arn = input.action_target_arn
);
let mut request = SignedRequest::new("DELETE", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteActionTargetResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteActionTargetError::from_response(response))
}
}
#[allow(unused_mut)]
async fn delete_insight(
&self,
input: DeleteInsightRequest,
) -> Result<DeleteInsightResponse, RusotoError<DeleteInsightError>> {
let request_uri = format!("/insights/{insight_arn}", insight_arn = input.insight_arn);
let mut request = SignedRequest::new("DELETE", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteInsightResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteInsightError::from_response(response))
}
}
#[allow(unused_mut)]
async fn delete_invitations(
&self,
input: DeleteInvitationsRequest,
) -> Result<DeleteInvitationsResponse, RusotoError<DeleteInvitationsError>> {
let request_uri = "/invitations/delete";
let mut request = SignedRequest::new("POST", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteInvitationsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteInvitationsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn delete_members(
&self,
input: DeleteMembersRequest,
) -> Result<DeleteMembersResponse, RusotoError<DeleteMembersError>> {
let request_uri = "/members/delete";
let mut request = SignedRequest::new("POST", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteMembersResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteMembersError::from_response(response))
}
}
#[allow(unused_mut)]
async fn describe_action_targets(
&self,
input: DescribeActionTargetsRequest,
) -> Result<DescribeActionTargetsResponse, RusotoError<DescribeActionTargetsError>> {
let request_uri = "/actionTargets/get";
let mut request = SignedRequest::new("POST", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeActionTargetsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DescribeActionTargetsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn describe_hub(
&self,
input: DescribeHubRequest,
) -> Result<DescribeHubResponse, RusotoError<DescribeHubError>> {
let request_uri = "/accounts";
let mut request = SignedRequest::new("GET", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.hub_arn {
params.put("HubArn", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeHubResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DescribeHubError::from_response(response))
}
}
#[allow(unused_mut)]
async fn describe_products(
&self,
input: DescribeProductsRequest,
) -> Result<DescribeProductsResponse, RusotoError<DescribeProductsError>> {
let request_uri = "/products";
let mut request = SignedRequest::new("GET", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("MaxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("NextToken", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeProductsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DescribeProductsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn describe_standards(
&self,
input: DescribeStandardsRequest,
) -> Result<DescribeStandardsResponse, RusotoError<DescribeStandardsError>> {
let request_uri = "/standards";
let mut request = SignedRequest::new("GET", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("MaxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("NextToken", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeStandardsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DescribeStandardsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn describe_standards_controls(
&self,
input: DescribeStandardsControlsRequest,
) -> Result<DescribeStandardsControlsResponse, RusotoError<DescribeStandardsControlsError>>
{
let request_uri = format!(
"/standards/controls/{standards_subscription_arn}",
standards_subscription_arn = input.standards_subscription_arn
);
let mut request = SignedRequest::new("GET", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("MaxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("NextToken", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeStandardsControlsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DescribeStandardsControlsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn disable_import_findings_for_product(
&self,
input: DisableImportFindingsForProductRequest,
) -> Result<
DisableImportFindingsForProductResponse,
RusotoError<DisableImportFindingsForProductError>,
> {
let request_uri = format!(
"/productSubscriptions/{product_subscription_arn}",
product_subscription_arn = input.product_subscription_arn
);
let mut request = SignedRequest::new("DELETE", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DisableImportFindingsForProductResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DisableImportFindingsForProductError::from_response(
response,
))
}
}
#[allow(unused_mut)]
async fn disable_security_hub(
&self,
) -> Result<DisableSecurityHubResponse, RusotoError<DisableSecurityHubError>> {
let request_uri = "/accounts";
let mut request = SignedRequest::new("DELETE", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DisableSecurityHubResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DisableSecurityHubError::from_response(response))
}
}
#[allow(unused_mut)]
async fn disassociate_from_master_account(
&self,
) -> Result<
DisassociateFromMasterAccountResponse,
RusotoError<DisassociateFromMasterAccountError>,
> {
let request_uri = "/master/disassociate";
let mut request = SignedRequest::new("POST", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DisassociateFromMasterAccountResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DisassociateFromMasterAccountError::from_response(response))
}
}
#[allow(unused_mut)]
async fn disassociate_members(
&self,
input: DisassociateMembersRequest,
) -> Result<DisassociateMembersResponse, RusotoError<DisassociateMembersError>> {
let request_uri = "/members/disassociate";
let mut request = SignedRequest::new("POST", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DisassociateMembersResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DisassociateMembersError::from_response(response))
}
}
#[allow(unused_mut)]
async fn enable_import_findings_for_product(
&self,
input: EnableImportFindingsForProductRequest,
) -> Result<
EnableImportFindingsForProductResponse,
RusotoError<EnableImportFindingsForProductError>,
> {
let request_uri = "/productSubscriptions";
let mut request = SignedRequest::new("POST", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<EnableImportFindingsForProductResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(EnableImportFindingsForProductError::from_response(response))
}
}
#[allow(unused_mut)]
async fn enable_security_hub(
&self,
input: EnableSecurityHubRequest,
) -> Result<EnableSecurityHubResponse, RusotoError<EnableSecurityHubError>> {
let request_uri = "/accounts";
let mut request = SignedRequest::new("POST", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<EnableSecurityHubResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(EnableSecurityHubError::from_response(response))
}
}
#[allow(unused_mut)]
async fn get_enabled_standards(
&self,
input: GetEnabledStandardsRequest,
) -> Result<GetEnabledStandardsResponse, RusotoError<GetEnabledStandardsError>> {
let request_uri = "/standards/get";
let mut request = SignedRequest::new("POST", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetEnabledStandardsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetEnabledStandardsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn get_findings(
&self,
input: GetFindingsRequest,
) -> Result<GetFindingsResponse, RusotoError<GetFindingsError>> {
let request_uri = "/findings";
let mut request = SignedRequest::new("POST", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetFindingsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetFindingsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn get_insight_results(
&self,
input: GetInsightResultsRequest,
) -> Result<GetInsightResultsResponse, RusotoError<GetInsightResultsError>> {
let request_uri = format!(
"/insights/results/{insight_arn}",
insight_arn = input.insight_arn
);
let mut request = SignedRequest::new("GET", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetInsightResultsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetInsightResultsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn get_insights(
&self,
input: GetInsightsRequest,
) -> Result<GetInsightsResponse, RusotoError<GetInsightsError>> {
let request_uri = "/insights/get";
let mut request = SignedRequest::new("POST", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetInsightsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetInsightsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn get_invitations_count(
&self,
) -> Result<GetInvitationsCountResponse, RusotoError<GetInvitationsCountError>> {
let request_uri = "/invitations/count";
let mut request = SignedRequest::new("GET", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetInvitationsCountResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetInvitationsCountError::from_response(response))
}
}
#[allow(unused_mut)]
async fn get_master_account(
&self,
) -> Result<GetMasterAccountResponse, RusotoError<GetMasterAccountError>> {
let request_uri = "/master";
let mut request = SignedRequest::new("GET", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetMasterAccountResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetMasterAccountError::from_response(response))
}
}
#[allow(unused_mut)]
async fn get_members(
&self,
input: GetMembersRequest,
) -> Result<GetMembersResponse, RusotoError<GetMembersError>> {
let request_uri = "/members/get";
let mut request = SignedRequest::new("POST", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetMembersResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetMembersError::from_response(response))
}
}
#[allow(unused_mut)]
async fn invite_members(
&self,
input: InviteMembersRequest,
) -> Result<InviteMembersResponse, RusotoError<InviteMembersError>> {
let request_uri = "/members/invite";
let mut request = SignedRequest::new("POST", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<InviteMembersResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(InviteMembersError::from_response(response))
}
}
#[allow(unused_mut)]
async fn list_enabled_products_for_import(
&self,
input: ListEnabledProductsForImportRequest,
) -> Result<ListEnabledProductsForImportResponse, RusotoError<ListEnabledProductsForImportError>>
{
let request_uri = "/productSubscriptions";
let mut request = SignedRequest::new("GET", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("MaxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("NextToken", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListEnabledProductsForImportResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(ListEnabledProductsForImportError::from_response(response))
}
}
#[allow(unused_mut)]
async fn list_invitations(
&self,
input: ListInvitationsRequest,
) -> Result<ListInvitationsResponse, RusotoError<ListInvitationsError>> {
let request_uri = "/invitations";
let mut request = SignedRequest::new("GET", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("MaxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("NextToken", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListInvitationsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(ListInvitationsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn list_members(
&self,
input: ListMembersRequest,
) -> Result<ListMembersResponse, RusotoError<ListMembersError>> {
let request_uri = "/members";
let mut request = SignedRequest::new("GET", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("MaxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("NextToken", x);
}
if let Some(ref x) = input.only_associated {
params.put("OnlyAssociated", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListMembersResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(ListMembersError::from_response(response))
}
}
#[allow(unused_mut)]
async fn list_tags_for_resource(
&self,
input: ListTagsForResourceRequest,
) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>> {
let request_uri = format!("/tags/{resource_arn}", resource_arn = input.resource_arn);
let mut request = SignedRequest::new("GET", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListTagsForResourceResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(ListTagsForResourceError::from_response(response))
}
}
#[allow(unused_mut)]
async fn tag_resource(
&self,
input: TagResourceRequest,
) -> Result<TagResourceResponse, RusotoError<TagResourceError>> {
let request_uri = format!("/tags/{resource_arn}", resource_arn = input.resource_arn);
let mut request = SignedRequest::new("POST", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<TagResourceResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(TagResourceError::from_response(response))
}
}
#[allow(unused_mut)]
async fn untag_resource(
&self,
input: UntagResourceRequest,
) -> Result<UntagResourceResponse, RusotoError<UntagResourceError>> {
let request_uri = format!("/tags/{resource_arn}", resource_arn = input.resource_arn);
let mut request = SignedRequest::new("DELETE", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
for item in input.tag_keys.iter() {
params.put("tagKeys", item);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UntagResourceResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UntagResourceError::from_response(response))
}
}
#[allow(unused_mut)]
async fn update_action_target(
&self,
input: UpdateActionTargetRequest,
) -> Result<UpdateActionTargetResponse, RusotoError<UpdateActionTargetError>> {
let request_uri = format!(
"/actionTargets/{action_target_arn}",
action_target_arn = input.action_target_arn
);
let mut request = SignedRequest::new("PATCH", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateActionTargetResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateActionTargetError::from_response(response))
}
}
#[allow(unused_mut)]
async fn update_findings(
&self,
input: UpdateFindingsRequest,
) -> Result<UpdateFindingsResponse, RusotoError<UpdateFindingsError>> {
let request_uri = "/findings";
let mut request = SignedRequest::new("PATCH", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateFindingsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateFindingsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn update_insight(
&self,
input: UpdateInsightRequest,
) -> Result<UpdateInsightResponse, RusotoError<UpdateInsightError>> {
let request_uri = format!("/insights/{insight_arn}", insight_arn = input.insight_arn);
let mut request = SignedRequest::new("PATCH", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateInsightResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateInsightError::from_response(response))
}
}
#[allow(unused_mut)]
async fn update_standards_control(
&self,
input: UpdateStandardsControlRequest,
) -> Result<UpdateStandardsControlResponse, RusotoError<UpdateStandardsControlError>> {
let request_uri = format!(
"/standards/control/{standards_control_arn}",
standards_control_arn = input.standards_control_arn
);
let mut request = SignedRequest::new("PATCH", "securityhub", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateStandardsControlResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateStandardsControlError::from_response(response))
}
}
}