fn from_str()

in src/aws/builder.rs [398:440]


    fn from_str(s: &str) -> Result<Self, Self::Err> {
        match s {
            "aws_access_key_id" | "access_key_id" => Ok(Self::AccessKeyId),
            "aws_secret_access_key" | "secret_access_key" => Ok(Self::SecretAccessKey),
            "aws_default_region" | "default_region" => Ok(Self::DefaultRegion),
            "aws_region" | "region" => Ok(Self::Region),
            "aws_bucket" | "aws_bucket_name" | "bucket_name" | "bucket" => Ok(Self::Bucket),
            "aws_endpoint_url" | "aws_endpoint" | "endpoint_url" | "endpoint" => Ok(Self::Endpoint),
            "aws_session_token" | "aws_token" | "session_token" | "token" => Ok(Self::Token),
            "aws_virtual_hosted_style_request" | "virtual_hosted_style_request" => {
                Ok(Self::VirtualHostedStyleRequest)
            }
            "aws_s3_express" | "s3_express" => Ok(Self::S3Express),
            "aws_imdsv1_fallback" | "imdsv1_fallback" => Ok(Self::ImdsV1Fallback),
            "aws_metadata_endpoint" | "metadata_endpoint" => Ok(Self::MetadataEndpoint),
            "aws_unsigned_payload" | "unsigned_payload" => Ok(Self::UnsignedPayload),
            "aws_checksum_algorithm" | "checksum_algorithm" => Ok(Self::Checksum),
            "aws_container_credentials_relative_uri" => Ok(Self::ContainerCredentialsRelativeUri),
            "aws_container_credentials_full_uri" => Ok(Self::ContainerCredentialsFullUri),
            "aws_container_authorization_token_file" => Ok(Self::ContainerAuthorizationTokenFile),
            "aws_skip_signature" | "skip_signature" => Ok(Self::SkipSignature),
            "aws_copy_if_not_exists" | "copy_if_not_exists" => Ok(Self::CopyIfNotExists),
            "aws_conditional_put" | "conditional_put" => Ok(Self::ConditionalPut),
            "aws_disable_tagging" | "disable_tagging" => Ok(Self::DisableTagging),
            "aws_request_payer" | "request_payer" => Ok(Self::RequestPayer),
            // Backwards compatibility
            "aws_allow_http" => Ok(Self::Client(ClientConfigKey::AllowHttp)),
            "aws_server_side_encryption" => Ok(Self::Encryption(
                S3EncryptionConfigKey::ServerSideEncryption,
            )),
            "aws_sse_kms_key_id" => Ok(Self::Encryption(S3EncryptionConfigKey::KmsKeyId)),
            "aws_sse_bucket_key_enabled" => {
                Ok(Self::Encryption(S3EncryptionConfigKey::BucketKeyEnabled))
            }
            "aws_sse_customer_key_base64" => Ok(Self::Encryption(
                S3EncryptionConfigKey::CustomerEncryptionKey,
            )),
            _ => match s.strip_prefix("aws_").unwrap_or(s).parse() {
                Ok(key) => Ok(Self::Client(key)),
                Err(_) => Err(Error::UnknownConfigurationKey { key: s.into() }.into()),
            },
        }
    }