#![cfg(feature = "test-util")]
#[::tokio::test]
async fn operation_input_test_get_object_1() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:not-s3:us-west-2:123456789012:accesspoint:myendpoint".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error =
_result.expect_err("expected error: Invalid ARN: The ARN was not for the S3 service, found: not-s3 [Invalid access point ARN: Not S3]");
assert!(
format!("{:?}", error).contains("Invalid ARN: The ARN was not for the S3 service, found: not-s3"),
"expected error to contain `Invalid ARN: The ARN was not for the S3 service, found: not-s3` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_2() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint:more-data".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Invalid ARN: The ARN may only contain a single resource component after `accesspoint`. [Invalid access point ARN: invalid resource]");
assert!(
format!("{:?}", error).contains("Invalid ARN: The ARN may only contain a single resource component after `accesspoint`."),
"expected error to contain `Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_3() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("arn:aws:s3:us-west-2:123456789012:accesspoint:".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Invalid ARN: Expected a resource of the format `accesspoint:<accesspoint name>` but no name was provided [Invalid access point ARN: invalid no ap name]");
assert!(
format!("{:?}", error).contains("Invalid ARN: Expected a resource of the format `accesspoint:<accesspoint name>` but no name was provided"),
"expected error to contain `Invalid ARN: Expected a resource of the format `accesspoint:<accesspoint name>` but no name was provided` but it was {:?}", error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_4() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3:us-west-2:123456_789012:accesspoint:apname".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `123456_789012` [Invalid access point ARN: AccountId is invalid]");
assert!(
format!("{:?}", error).contains("Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `123456_789012`"),
"expected error to contain `Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `123456_789012`` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_5() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3:us-west-2:123456789012:accesspoint:ap_name".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `ap_name` [Invalid access point ARN: access point name is invalid]");
assert!(
format!("{:?}", error).contains("Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `ap_name`"),
"expected error to contain `Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `ap_name`` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_6() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://myendpoint-123456789012.s3-accesspoint.us-west-2.amazonaws.com"),
"expected URI to start with `https://myendpoint-123456789012.s3-accesspoint.us-west-2.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_7() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("cn-north-1"));
let builder = builder.use_fips(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3:cn-north-1:123456789012:accesspoint:myendpoint".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Partition does not support FIPS [Access points: partition does not support FIPS]");
assert!(
format!("{:?}", error).contains("Partition does not support FIPS"),
"expected error to contain `Partition does not support FIPS` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_8() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3:us-west -2:123456789012:accesspoint:myendpoint".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Invalid region in ARN: `us-west -2` (invalid DNS name) [Bucket region is invalid]");
assert!(
format!("{:?}", error).contains("Invalid region in ARN: `us-west -2` (invalid DNS name)"),
"expected error to contain `Invalid region in ARN: `us-west -2` (invalid DNS name)` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_create_bucket_9() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.create_bucket()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint".to_owned()
))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Access points are not supported for this operation [Access points when Access points explicitly disabled (used for CreateBucket)]");
assert!(
format!("{:?}", error).contains("Access points are not supported for this operation"),
"expected error to contain `Access points are not supported for this operation` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_10() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("arn:aws:s3:us-west-2:123456789012:".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Invalid ARN: `arn:aws:s3:us-west-2:123456789012:` was not a valid ARN [missing arn type]");
assert!(
format!("{:?}", error).contains("Invalid ARN: `arn:aws:s3:us-west-2:123456789012:` was not a valid ARN"),
"expected error to contain `Invalid ARN: `arn:aws:s3:us-west-2:123456789012:` was not a valid ARN` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_11() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("cn-north-1"));
let builder = builder.use_dual_stack(true);
let builder = builder.endpoint_url("https://beta.example.com");
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err(
"expected error: Cannot set dual-stack in combination with a custom endpoint. [SDK::Host + access point + Dualstack is an error]",
);
assert!(
format!("{:?}", error).contains("Cannot set dual-stack in combination with a custom endpoint."),
"expected error to contain `Cannot set dual-stack in combination with a custom endpoint.` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_12() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
let builder = builder.use_fips(true);
let builder = builder.use_dual_stack(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://myendpoint-123456789012.s3-accesspoint-fips.dualstack.us-west-2.amazonaws.com"),
"expected URI to start with `https://myendpoint-123456789012.s3-accesspoint-fips.dualstack.us-west-2.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_13() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
let builder = builder.use_dual_stack(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://myendpoint-123456789012.s3-accesspoint.dualstack.us-west-2.amazonaws.com"),
"expected URI to start with `https://myendpoint-123456789012.s3-accesspoint.dualstack.us-west-2.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_14() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://mfzwi23gnjvgw.mrap.accesspoint.s3-global.amazonaws.com"),
"expected URI to start with `https://mfzwi23gnjvgw.mrap.accesspoint.s3-global.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_15() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
let builder = builder.use_fips(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: S3 MRAP does not support FIPS [MRAP does not support FIPS]");
assert!(
format!("{:?}", error).contains("S3 MRAP does not support FIPS"),
"expected error to contain `S3 MRAP does not support FIPS` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_16() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
let builder = builder.use_dual_stack(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: S3 MRAP does not support dual-stack [MRAP does not support DualStack]");
assert!(
format!("{:?}", error).contains("S3 MRAP does not support dual-stack"),
"expected error to contain `S3 MRAP does not support dual-stack` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_17() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
let builder = builder.accelerate(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: S3 MRAP does not support S3 Accelerate [MRAP does not support S3 Accelerate]");
assert!(
format!("{:?}", error).contains("S3 MRAP does not support S3 Accelerate"),
"expected error to contain `S3 MRAP does not support S3 Accelerate` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_18() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
let builder = builder.disable_multi_region_access_points(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Invalid configuration: Multi-Region Access Point ARNs are disabled. [MRAP explicitly disabled]");
assert!(
format!("{:?}", error).contains("Invalid configuration: Multi-Region Access Point ARNs are disabled."),
"expected error to contain `Invalid configuration: Multi-Region Access Point ARNs are disabled.` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_19() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_dual_stack(true);
let builder = builder.force_path_style(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucketname".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3.dualstack.us-west-2.amazonaws.com/bucketname"),
"expected URI to start with `https://s3.dualstack.us-west-2.amazonaws.com/bucketname` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_20() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_dual_stack(true);
let builder = builder.endpoint_url("https://abc.com");
let builder = builder.force_path_style(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucketname".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error =
_result.expect_err("expected error: Cannot set dual-stack in combination with a custom endpoint. [Dual-stack endpoint + SDK::Host is error]");
assert!(
format!("{:?}", error).contains("Cannot set dual-stack in combination with a custom endpoint."),
"expected error to contain `Cannot set dual-stack in combination with a custom endpoint.` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_21() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.force_path_style(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Path-style addressing cannot be used with ARN buckets [path style + ARN bucket]");
assert!(
format!("{:?}", error).contains("Path-style addressing cannot be used with ARN buckets"),
"expected error to contain `Path-style addressing cannot be used with ARN buckets` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_22() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_dual_stack(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("99_ab".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3.dualstack.us-west-2.amazonaws.com/99_ab"),
"expected URI to start with `https://s3.dualstack.us-west-2.amazonaws.com/99_ab` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_23() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_dual_stack(true);
let builder = builder.endpoint_url("http://abc.com");
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("99_ab".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error =
_result.expect_err("expected error: Cannot set dual-stack in combination with a custom endpoint. [implicit path style bucket + dualstack]");
assert!(
format!("{:?}", error).contains("Cannot set dual-stack in combination with a custom endpoint."),
"expected error to contain `Cannot set dual-stack in combination with a custom endpoint.` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_24() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("example.com#".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3.us-west-2.amazonaws.com/example.com%23"),
"expected URI to start with `https://s3.us-west-2.amazonaws.com/example.com%23` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_25() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3.us-west-2.amazonaws.com/bucket%20name"),
"expected URI to start with `https://s3.us-west-2.amazonaws.com/bucket%20name` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_26() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("af-south-1"));
let builder = builder.endpoint_url("https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com");
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("99_ab".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/99_ab"),
"expected URI to start with `https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/99_ab` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_27() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("af-south-1"));
let builder = builder.endpoint_url("https://123.123.0.1");
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucketname".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://123.123.0.1/bucketname"),
"expected URI to start with `https://123.123.0.1/bucketname` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_28() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_arn_region(false);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3:us-east-1:123456789012:accesspoint:myendpoint".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false` [vanilla access point arn with region mismatch and UseArnRegion=false]");
assert!(
format!("{:?}", error).contains("Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false`"),
"expected error to contain `Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false`` but it was {:?}", error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_29() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://myendpoint-123456789012.s3-accesspoint.us-west-2.amazonaws.com"),
"expected URI to start with `https://myendpoint-123456789012.s3-accesspoint.us-west-2.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_30() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
let builder = builder.use_arn_region(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://myendpoint-123456789012.s3-accesspoint.us-west-2.amazonaws.com"),
"expected URI to start with `https://myendpoint-123456789012.s3-accesspoint.us-west-2.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_31() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket.name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3.us-east-1.amazonaws.com/bucket.name"),
"expected URI to start with `https://s3.us-east-1.amazonaws.com/bucket.name` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_32() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("aaa".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://aaa.s3.us-east-1.amazonaws.com"),
"expected URI to start with `https://aaa.s3.us-east-1.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_33() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("aa".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3.us-east-1.amazonaws.com/aa"),
"expected URI to start with `https://s3.us-east-1.amazonaws.com/aa` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_34() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("BucketName".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3.us-east-1.amazonaws.com/BucketName"),
"expected URI to start with `https://s3.us-east-1.amazonaws.com/BucketName` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_35() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
let builder = builder.endpoint_url("http://example.com");
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket.name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("http://bucket.name.example.com"),
"expected URI to start with `http://bucket.name.example.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_list_buckets_36() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("aws-global"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(client.list_buckets().send().await);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3.amazonaws.com"),
"expected URI to start with `https://s3.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_list_buckets_37() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("aws-global"));
let builder = builder.use_fips(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(client.list_buckets().send().await);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3-fips.us-east-1.amazonaws.com"),
"expected URI to start with `https://s3-fips.us-east-1.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_list_buckets_38() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("aws-global"));
let builder = builder.use_dual_stack(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(client.list_buckets().send().await);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3.dualstack.us-east-1.amazonaws.com"),
"expected URI to start with `https://s3.dualstack.us-east-1.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_list_buckets_39() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("aws-global"));
let builder = builder.use_fips(true);
let builder = builder.use_dual_stack(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(client.list_buckets().send().await);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3-fips.dualstack.us-east-1.amazonaws.com"),
"expected URI to start with `https://s3-fips.dualstack.us-east-1.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_list_buckets_40() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("aws-global"));
let builder = builder.accelerate(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(client.list_buckets().send().await);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3.amazonaws.com"),
"expected URI to start with `https://s3.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_list_buckets_41() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("aws-global"));
let builder = builder.endpoint_url("https://example.com");
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(client.list_buckets().send().await);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://example.com"),
"expected URI to start with `https://example.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_42() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("aws-global"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://bucket-name.s3.amazonaws.com"),
"expected URI to start with `https://bucket-name.s3.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_list_objects_43() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("aws-global"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.list_objects()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_prefix(::std::option::Option::Some("prefix".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://bucket-name.s3.amazonaws.com"),
"expected URI to start with `https://bucket-name.s3.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_44() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("aws-global"));
let builder = builder.use_fips(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://bucket-name.s3-fips.us-east-1.amazonaws.com"),
"expected URI to start with `https://bucket-name.s3-fips.us-east-1.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_45() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("aws-global"));
let builder = builder.use_dual_stack(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://bucket-name.s3.dualstack.us-east-1.amazonaws.com"),
"expected URI to start with `https://bucket-name.s3.dualstack.us-east-1.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_46() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("aws-global"));
let builder = builder.use_fips(true);
let builder = builder.use_dual_stack(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://bucket-name.s3-fips.dualstack.us-east-1.amazonaws.com"),
"expected URI to start with `https://bucket-name.s3-fips.dualstack.us-east-1.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_47() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("aws-global"));
let builder = builder.accelerate(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://bucket-name.s3-accelerate.amazonaws.com"),
"expected URI to start with `https://bucket-name.s3-accelerate.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_48() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("aws-global"));
let builder = builder.endpoint_url("https://example.com");
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://bucket-name.example.com"),
"expected URI to start with `https://bucket-name.example.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_49() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("aws-global"));
let builder = builder.force_path_style(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3.amazonaws.com/bucket-name"),
"expected URI to start with `https://s3.amazonaws.com/bucket-name` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_50() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("aws-global"));
let builder = builder.use_dual_stack(true);
let builder = builder.force_path_style(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3.dualstack.us-east-1.amazonaws.com/bucket-name"),
"expected URI to start with `https://s3.dualstack.us-east-1.amazonaws.com/bucket-name` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_51() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("aws-global"));
let builder = builder.endpoint_url("https://example.com");
let builder = builder.force_path_style(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://example.com/bucket-name"),
"expected URI to start with `https://example.com/bucket-name` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_52() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("aws-global"));
let builder = builder.use_arn_region(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456/accesspoint/reports".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://reports-123456789012.op-01234567890123456.s3-outposts.us-east-1.amazonaws.com"),
"expected URI to start with `https://reports-123456789012.op-01234567890123456.s3-outposts.us-east-1.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_53() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws-cn:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err(
"expected error: Client was configured for partition `aws` but bucket referred to partition `aws-cn` [cross partition MRAP ARN is an error]",
);
assert!(
format!("{:?}", error).contains("Client was configured for partition `aws` but bucket referred to partition `aws-cn`"),
"expected error to contain `Client was configured for partition `aws` but bucket referred to partition `aws-cn`` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_54() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.endpoint_url("http://beta.example.com:1234");
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("http://myendpoint-123456789012.beta.example.com:1234"),
"expected URI to start with `http://myendpoint-123456789012.beta.example.com:1234` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_55() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://bucket-name.s3.us-west-2.amazonaws.com"),
"expected URI to start with `https://bucket-name.s3.us-west-2.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_56() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_dual_stack(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://bucket-name.s3.dualstack.us-west-2.amazonaws.com"),
"expected URI to start with `https://bucket-name.s3.dualstack.us-west-2.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_57() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_dual_stack(true);
let builder = builder.accelerate(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://bucket-name.s3-accelerate.dualstack.amazonaws.com"),
"expected URI to start with `https://bucket-name.s3-accelerate.dualstack.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_58() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.accelerate(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://bucket-name.s3-accelerate.amazonaws.com"),
"expected URI to start with `https://bucket-name.s3-accelerate.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_59() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_fips(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://bucket-name.s3-fips.us-west-2.amazonaws.com"),
"expected URI to start with `https://bucket-name.s3-fips.us-west-2.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_60() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_fips(true);
let builder = builder.use_dual_stack(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://bucket-name.s3-fips.dualstack.us-west-2.amazonaws.com"),
"expected URI to start with `https://bucket-name.s3-fips.dualstack.us-west-2.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_61() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_fips(true);
let builder = builder.accelerate(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Accelerate cannot be used with FIPS [accelerate + fips = error@us-west-2]");
assert!(
format!("{:?}", error).contains("Accelerate cannot be used with FIPS"),
"expected error to contain `Accelerate cannot be used with FIPS` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_62() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("cn-north-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://bucket-name.s3.cn-north-1.amazonaws.com.cn"),
"expected URI to start with `https://bucket-name.s3.cn-north-1.amazonaws.com.cn` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_63() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("cn-north-1"));
let builder = builder.use_dual_stack(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://bucket-name.s3.dualstack.cn-north-1.amazonaws.com.cn"),
"expected URI to start with `https://bucket-name.s3.dualstack.cn-north-1.amazonaws.com.cn` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_64() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("af-south-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://bucket-name.s3.af-south-1.amazonaws.com"),
"expected URI to start with `https://bucket-name.s3.af-south-1.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_65() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("af-south-1"));
let builder = builder.use_dual_stack(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://bucket-name.s3.dualstack.af-south-1.amazonaws.com"),
"expected URI to start with `https://bucket-name.s3.dualstack.af-south-1.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_66() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("af-south-1"));
let builder = builder.use_dual_stack(true);
let builder = builder.accelerate(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://bucket-name.s3-accelerate.dualstack.amazonaws.com"),
"expected URI to start with `https://bucket-name.s3-accelerate.dualstack.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_67() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("af-south-1"));
let builder = builder.accelerate(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://bucket-name.s3-accelerate.amazonaws.com"),
"expected URI to start with `https://bucket-name.s3-accelerate.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_68() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("af-south-1"));
let builder = builder.use_fips(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://bucket-name.s3-fips.af-south-1.amazonaws.com"),
"expected URI to start with `https://bucket-name.s3-fips.af-south-1.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_69() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("af-south-1"));
let builder = builder.use_fips(true);
let builder = builder.use_dual_stack(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://bucket-name.s3-fips.dualstack.af-south-1.amazonaws.com"),
"expected URI to start with `https://bucket-name.s3-fips.dualstack.af-south-1.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_70() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("af-south-1"));
let builder = builder.use_fips(true);
let builder = builder.accelerate(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Accelerate cannot be used with FIPS [accelerate + fips = error@af-south-1]");
assert!(
format!("{:?}", error).contains("Accelerate cannot be used with FIPS"),
"expected error to contain `Accelerate cannot be used with FIPS` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_71() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.force_path_style(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3.us-west-2.amazonaws.com/bucket-name"),
"expected URI to start with `https://s3.us-west-2.amazonaws.com/bucket-name` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_72() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-gov-west-1"));
let builder = builder.use_fips(true);
let builder = builder.force_path_style(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket.with.dots".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3-fips.us-gov-west-1.amazonaws.com/bucket.with.dots"),
"expected URI to start with `https://s3-fips.us-gov-west-1.amazonaws.com/bucket.with.dots` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_73() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.force_path_style(true);
let builder = builder.accelerate(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error =
_result.expect_err("expected error: Path-style addressing cannot be used with S3 Accelerate [path style + accelerate = error@us-west-2]");
assert!(
format!("{:?}", error).contains("Path-style addressing cannot be used with S3 Accelerate"),
"expected error to contain `Path-style addressing cannot be used with S3 Accelerate` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_74() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_dual_stack(true);
let builder = builder.force_path_style(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3.dualstack.us-west-2.amazonaws.com/bucket-name"),
"expected URI to start with `https://s3.dualstack.us-west-2.amazonaws.com/bucket-name` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_75() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.force_path_style(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Path-style addressing cannot be used with ARN buckets [path style + arn is error@us-west-2]");
assert!(
format!("{:?}", error).contains("Path-style addressing cannot be used with ARN buckets"),
"expected error to contain `Path-style addressing cannot be used with ARN buckets` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_76() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.force_path_style(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("99a_b".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3.us-west-2.amazonaws.com/99a_b"),
"expected URI to start with `https://s3.us-west-2.amazonaws.com/99a_b` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_77() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("99a_b".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3.us-west-2.amazonaws.com/99a_b"),
"expected URI to start with `https://s3.us-west-2.amazonaws.com/99a_b` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_78() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("cn-north-1"));
let builder = builder.force_path_style(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3.cn-north-1.amazonaws.com.cn/bucket-name"),
"expected URI to start with `https://s3.cn-north-1.amazonaws.com.cn/bucket-name` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_79() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("cn-north-1"));
let builder = builder.use_fips(true);
let builder = builder.force_path_style(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Partition does not support FIPS [path style + fips@cn-north-1]");
assert!(
format!("{:?}", error).contains("Partition does not support FIPS"),
"expected error to contain `Partition does not support FIPS` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_80() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("cn-north-1"));
let builder = builder.force_path_style(true);
let builder = builder.accelerate(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error =
_result.expect_err("expected error: Path-style addressing cannot be used with S3 Accelerate [path style + accelerate = error@cn-north-1]");
assert!(
format!("{:?}", error).contains("Path-style addressing cannot be used with S3 Accelerate"),
"expected error to contain `Path-style addressing cannot be used with S3 Accelerate` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_81() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("cn-north-1"));
let builder = builder.use_dual_stack(true);
let builder = builder.force_path_style(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3.dualstack.cn-north-1.amazonaws.com.cn/bucket-name"),
"expected URI to start with `https://s3.dualstack.cn-north-1.amazonaws.com.cn/bucket-name` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_82() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("cn-north-1"));
let builder = builder.force_path_style(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Path-style addressing cannot be used with ARN buckets [path style + arn is error@cn-north-1]");
assert!(
format!("{:?}", error).contains("Path-style addressing cannot be used with ARN buckets"),
"expected error to contain `Path-style addressing cannot be used with ARN buckets` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_83() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("cn-north-1"));
let builder = builder.force_path_style(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("99a_b".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3.cn-north-1.amazonaws.com.cn/99a_b"),
"expected URI to start with `https://s3.cn-north-1.amazonaws.com.cn/99a_b` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_84() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("cn-north-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("99a_b".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3.cn-north-1.amazonaws.com.cn/99a_b"),
"expected URI to start with `https://s3.cn-north-1.amazonaws.com.cn/99a_b` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_85() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("af-south-1"));
let builder = builder.force_path_style(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3.af-south-1.amazonaws.com/bucket-name"),
"expected URI to start with `https://s3.af-south-1.amazonaws.com/bucket-name` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_86() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("af-south-1"));
let builder = builder.use_fips(true);
let builder = builder.force_path_style(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3-fips.af-south-1.amazonaws.com/bucket-name"),
"expected URI to start with `https://s3-fips.af-south-1.amazonaws.com/bucket-name` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_87() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("af-south-1"));
let builder = builder.force_path_style(true);
let builder = builder.accelerate(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error =
_result.expect_err("expected error: Path-style addressing cannot be used with S3 Accelerate [path style + accelerate = error@af-south-1]");
assert!(
format!("{:?}", error).contains("Path-style addressing cannot be used with S3 Accelerate"),
"expected error to contain `Path-style addressing cannot be used with S3 Accelerate` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_88() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("af-south-1"));
let builder = builder.use_dual_stack(true);
let builder = builder.force_path_style(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3.dualstack.af-south-1.amazonaws.com/bucket-name"),
"expected URI to start with `https://s3.dualstack.af-south-1.amazonaws.com/bucket-name` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_89() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("af-south-1"));
let builder = builder.force_path_style(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:PARTITION:s3-outposts:REGION:123456789012:outpost:op-01234567890123456:bucket:mybucket".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Path-style addressing cannot be used with ARN buckets [path style + arn is error@af-south-1]");
assert!(
format!("{:?}", error).contains("Path-style addressing cannot be used with ARN buckets"),
"expected error to contain `Path-style addressing cannot be used with ARN buckets` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_90() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("af-south-1"));
let builder = builder.force_path_style(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("99a_b".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3.af-south-1.amazonaws.com/99a_b"),
"expected URI to start with `https://s3.af-south-1.amazonaws.com/99a_b` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_91() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("af-south-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("99a_b".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3.af-south-1.amazonaws.com/99a_b"),
"expected URI to start with `https://s3.af-south-1.amazonaws.com/99a_b` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_92() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.endpoint_url("http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com");
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("http://bucket-name.control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com"),
"expected URI to start with `http://bucket-name.control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_93() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.endpoint_url("https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com");
let builder = builder.force_path_style(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/bucket-name"),
"expected URI to start with `https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/bucket-name` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_94() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_fips(true);
let builder = builder.endpoint_url("https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com");
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: A custom endpoint cannot be combined with FIPS [SDK::Host + FIPS@us-west-2]");
assert!(
format!("{:?}", error).contains("A custom endpoint cannot be combined with FIPS"),
"expected error to contain `A custom endpoint cannot be combined with FIPS` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_95() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_dual_stack(true);
let builder = builder.endpoint_url("https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com");
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Cannot set dual-stack in combination with a custom endpoint. [SDK::Host + DualStack@us-west-2]");
assert!(
format!("{:?}", error).contains("Cannot set dual-stack in combination with a custom endpoint."),
"expected error to contain `Cannot set dual-stack in combination with a custom endpoint.` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_96() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.endpoint_url("http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com");
let builder = builder.accelerate(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: A custom endpoint cannot be combined with S3 Accelerate [SDK::HOST + accelerate@us-west-2]");
assert!(
format!("{:?}", error).contains("A custom endpoint cannot be combined with S3 Accelerate"),
"expected error to contain `A custom endpoint cannot be combined with S3 Accelerate` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_97() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.endpoint_url("https://beta.example.com");
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://myendpoint-123456789012.beta.example.com"),
"expected URI to start with `https://myendpoint-123456789012.beta.example.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_98() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("cn-north-1"));
let builder = builder.endpoint_url("https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com");
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://bucket-name.control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com"),
"expected URI to start with `https://bucket-name.control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_99() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("cn-north-1"));
let builder = builder.endpoint_url("https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com");
let builder = builder.force_path_style(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/bucket-name"),
"expected URI to start with `https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/bucket-name` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_100() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("cn-north-1"));
let builder = builder.use_dual_stack(true);
let builder = builder.endpoint_url("https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com");
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Cannot set dual-stack in combination with a custom endpoint. [SDK::Host + DualStack@cn-north-1]");
assert!(
format!("{:?}", error).contains("Cannot set dual-stack in combination with a custom endpoint."),
"expected error to contain `Cannot set dual-stack in combination with a custom endpoint.` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_101() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("cn-north-1"));
let builder = builder.endpoint_url("https://beta.example.com");
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://myendpoint-123456789012.beta.example.com"),
"expected URI to start with `https://myendpoint-123456789012.beta.example.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_102() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("af-south-1"));
let builder = builder.endpoint_url("https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com");
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://bucket-name.control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com"),
"expected URI to start with `https://bucket-name.control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_103() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("af-south-1"));
let builder = builder.endpoint_url("https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com");
let builder = builder.force_path_style(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/bucket-name"),
"expected URI to start with `https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/bucket-name` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_104() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("af-south-1"));
let builder = builder.use_fips(true);
let builder = builder.endpoint_url("https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com");
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: A custom endpoint cannot be combined with FIPS [SDK::Host + FIPS@af-south-1]");
assert!(
format!("{:?}", error).contains("A custom endpoint cannot be combined with FIPS"),
"expected error to contain `A custom endpoint cannot be combined with FIPS` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_105() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("af-south-1"));
let builder = builder.use_dual_stack(true);
let builder = builder.endpoint_url("https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com");
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Cannot set dual-stack in combination with a custom endpoint. [SDK::Host + DualStack@af-south-1]");
assert!(
format!("{:?}", error).contains("Cannot set dual-stack in combination with a custom endpoint."),
"expected error to contain `Cannot set dual-stack in combination with a custom endpoint.` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_106() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("af-south-1"));
let builder = builder.endpoint_url("https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com");
let builder = builder.accelerate(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("bucket-name".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: A custom endpoint cannot be combined with S3 Accelerate [SDK::HOST + accelerate@af-south-1]");
assert!(
format!("{:?}", error).contains("A custom endpoint cannot be combined with S3 Accelerate"),
"expected error to contain `A custom endpoint cannot be combined with S3 Accelerate` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_107() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("af-south-1"));
let builder = builder.endpoint_url("https://beta.example.com");
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://myendpoint-123456789012.beta.example.com"),
"expected URI to start with `https://myendpoint-123456789012.beta.example.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_108() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://myendpoint-123456789012.s3-accesspoint.us-west-2.amazonaws.com"),
"expected URI to start with `https://myendpoint-123456789012.s3-accesspoint.us-west-2.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_109() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_fips(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://myendpoint-123456789012.s3-accesspoint-fips.us-west-2.amazonaws.com"),
"expected URI to start with `https://myendpoint-123456789012.s3-accesspoint-fips.us-west-2.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_110() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.accelerate(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Access Points do not support S3 Accelerate [access point arn + accelerate = error@us-west-2]");
assert!(
format!("{:?}", error).contains("Access Points do not support S3 Accelerate"),
"expected error to contain `Access Points do not support S3 Accelerate` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_111() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_fips(true);
let builder = builder.use_dual_stack(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://myendpoint-123456789012.s3-accesspoint-fips.dualstack.us-west-2.amazonaws.com"),
"expected URI to start with `https://myendpoint-123456789012.s3-accesspoint-fips.dualstack.us-west-2.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_112() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("cn-north-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://myendpoint-123456789012.s3-accesspoint.cn-north-1.amazonaws.com.cn"),
"expected URI to start with `https://myendpoint-123456789012.s3-accesspoint.cn-north-1.amazonaws.com.cn` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_113() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("cn-north-1"));
let builder = builder.accelerate(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws-cn:s3:cn-north-1:123456789012:accesspoint:myendpoint".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Access Points do not support S3 Accelerate [access point arn + accelerate = error@cn-north-1]");
assert!(
format!("{:?}", error).contains("Access Points do not support S3 Accelerate"),
"expected error to contain `Access Points do not support S3 Accelerate` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_114() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("af-south-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://myendpoint-123456789012.s3-accesspoint.af-south-1.amazonaws.com"),
"expected URI to start with `https://myendpoint-123456789012.s3-accesspoint.af-south-1.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_115() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("af-south-1"));
let builder = builder.use_fips(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://myendpoint-123456789012.s3-accesspoint-fips.af-south-1.amazonaws.com"),
"expected URI to start with `https://myendpoint-123456789012.s3-accesspoint-fips.af-south-1.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_116() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("af-south-1"));
let builder = builder.accelerate(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Access Points do not support S3 Accelerate [access point arn + accelerate = error@af-south-1]");
assert!(
format!("{:?}", error).contains("Access Points do not support S3 Accelerate"),
"expected error to contain `Access Points do not support S3 Accelerate` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_117() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("af-south-1"));
let builder = builder.use_fips(true);
let builder = builder.use_dual_stack(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3:af-south-1:123456789012:accesspoint:myendpoint".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://myendpoint-123456789012.s3-accesspoint-fips.dualstack.af-south-1.amazonaws.com"),
"expected URI to start with `https://myendpoint-123456789012.s3-accesspoint-fips.dualstack.af-south-1.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_118() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://reports-123456789012.op-01234567890123456.s3-outposts.us-west-2.amazonaws.com"),
"expected URI to start with `https://reports-123456789012.op-01234567890123456.s3-outposts.us-west-2.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_119() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.endpoint_url("https://example.amazonaws.com");
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3-outposts:us-west-2:123456789012:outpost/op-01234567890123456/accesspoint/reports".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://reports-123456789012.op-01234567890123456.example.amazonaws.com"),
"expected URI to start with `https://reports-123456789012.op-01234567890123456.example.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_120() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_arn_region(false);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false` [outposts arn with region mismatch and UseArnRegion=false]");
assert!(
format!("{:?}", error).contains("Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false`"),
"expected error to contain `Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false`` but it was {:?}", error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_121() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.endpoint_url("https://example.com");
let builder = builder.use_arn_region(false);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false` [outposts arn with region mismatch, custom region and UseArnRegion=false]");
assert!(
format!("{:?}", error).contains("Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false`"),
"expected error to contain `Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false`` but it was {:?}", error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_122() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_arn_region(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://myaccesspoint-123456789012.op-01234567890123456.s3-outposts.us-east-1.amazonaws.com"),
"expected URI to start with `https://myaccesspoint-123456789012.op-01234567890123456.s3-outposts.us-east-1.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_123() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://myaccesspoint-123456789012.op-01234567890123456.s3-outposts.us-east-1.amazonaws.com"),
"expected URI to start with `https://myaccesspoint-123456789012.op-01234567890123456.s3-outposts.us-east-1.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_124() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_arn_region(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Client was configured for partition `aws` but ARN (`arn:aws:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint`) has `aws-cn` [outposts arn with partition mismatch and UseArnRegion=true]");
assert!(
format!("{:?}", error).contains("Client was configured for partition `aws` but ARN (`arn:aws:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint`) has `aws-cn`"),
"expected error to contain `Client was configured for partition `aws` but ARN (`arn:aws:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint`) has `aws-cn`` but it was {:?}", error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_125() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
let builder = builder.use_arn_region(false);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://mybanner-123456789012.s3-object-lambda.us-east-1.amazonaws.com"),
"expected URI to start with `https://mybanner-123456789012.s3-object-lambda.us-east-1.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_126() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_arn_region(false);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://mybanner-123456789012.s3-object-lambda.us-west-2.amazonaws.com"),
"expected URI to start with `https://mybanner-123456789012.s3-object-lambda.us-west-2.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_127() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_arn_region(false);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint:mybanner".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://mybanner-123456789012.s3-object-lambda.us-west-2.amazonaws.com"),
"expected URI to start with `https://mybanner-123456789012.s3-object-lambda.us-west-2.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_128() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_arn_region(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://mybanner-123456789012.s3-object-lambda.us-east-1.amazonaws.com"),
"expected URI to start with `https://mybanner-123456789012.s3-object-lambda.us-east-1.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_129() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("s3-external-1"));
let builder = builder.use_arn_region(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://mybanner-123456789012.s3-object-lambda.us-east-1.amazonaws.com"),
"expected URI to start with `https://mybanner-123456789012.s3-object-lambda.us-east-1.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_130() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("s3-external-1"));
let builder = builder.use_arn_region(false);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Invalid configuration: region from ARN `us-east-1` does not match client region `s3-external-1` and UseArnRegion is `false` [object lambda @us-east-1, client region s3-external-1, useArnRegion=false]");
assert!(
format!("{:?}", error).contains("Invalid configuration: region from ARN `us-east-1` does not match client region `s3-external-1` and UseArnRegion is `false`"),
"expected error to contain `Invalid configuration: region from ARN `us-east-1` does not match client region `s3-external-1` and UseArnRegion is `false`` but it was {:?}", error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_131() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("aws-global"));
let builder = builder.use_arn_region(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://mybanner-123456789012.s3-object-lambda.us-east-1.amazonaws.com"),
"expected URI to start with `https://mybanner-123456789012.s3-object-lambda.us-east-1.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_132() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("aws-global"));
let builder = builder.use_arn_region(false);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Invalid configuration: region from ARN `us-east-1` does not match client region `aws-global` and UseArnRegion is `false` [object lambda @us-east-1, client region aws-global, useArnRegion=false]");
assert!(
format!("{:?}", error).contains("Invalid configuration: region from ARN `us-east-1` does not match client region `aws-global` and UseArnRegion is `false`"),
"expected error to contain `Invalid configuration: region from ARN `us-east-1` does not match client region `aws-global` and UseArnRegion is `false`` but it was {:?}", error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_133() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("aws-global"));
let builder = builder.use_arn_region(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws-cn:s3-object-lambda:cn-north-1:123456789012:accesspoint/mybanner".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Client was configured for partition `aws` but ARN (`arn:aws-cn:s3-object-lambda:cn-north-1:123456789012:accesspoint/mybanner`) has `aws-cn` [object lambda @cn-north-1, client region us-west-2 (cross partition), useArnRegion=true]");
assert!(
format!("{:?}", error).contains("Client was configured for partition `aws` but ARN (`arn:aws-cn:s3-object-lambda:cn-north-1:123456789012:accesspoint/mybanner`) has `aws-cn`"),
"expected error to contain `Client was configured for partition `aws` but ARN (`arn:aws-cn:s3-object-lambda:cn-north-1:123456789012:accesspoint/mybanner`) has `aws-cn`` but it was {:?}", error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_134() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_dual_stack(true);
let builder = builder.use_arn_region(false);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: S3 Object Lambda does not support Dual-stack [object lambda with dualstack]");
assert!(
format!("{:?}", error).contains("S3 Object Lambda does not support Dual-stack"),
"expected error to contain `S3 Object Lambda does not support Dual-stack` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_135() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.accelerate(true);
let builder = builder.use_arn_region(false);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: S3 Object Lambda does not support S3 Accelerate [object lambda with accelerate]");
assert!(
format!("{:?}", error).contains("S3 Object Lambda does not support S3 Accelerate"),
"expected error to contain `S3 Object Lambda does not support S3 Accelerate` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_136() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_arn_region(false);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("arn:aws:sqs:us-west-2:123456789012:someresource".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Invalid ARN: Unrecognized format: arn:aws:sqs:us-west-2:123456789012:someresource (type: someresource) [object lambda with invalid arn - bad service and someresource]");
assert!(
format!("{:?}", error).contains("Invalid ARN: Unrecognized format: arn:aws:sqs:us-west-2:123456789012:someresource (type: someresource)"),
"expected error to contain `Invalid ARN: Unrecognized format: arn:aws:sqs:us-west-2:123456789012:someresource (type: someresource)` but it was {:?}", error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_137() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_arn_region(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3-object-lambda:us-west-2:123.45678.9012:accesspoint:mybucket".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `123.45678.9012` [object lambda with invalid arn - account id contains invalid characters]");
assert!(
format!("{:?}", error).contains("Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `123.45678.9012`"),
"expected error to contain `Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `123.45678.9012`` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_138() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.endpoint_url("https://my-endpoint.com");
let builder = builder.use_arn_region(false);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3-object-lambda:us-west-2:123456789012:accesspoint/mybanner".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://mybanner-123456789012.my-endpoint.com"),
"expected URI to start with `https://mybanner-123456789012.my-endpoint.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_139() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_arn_region(false);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some(
"arn:aws:s3-object-lambda:us-east-1:123456789012:accesspoint/mybanner".to_owned()
))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false` [object lambda arn with region mismatch and UseArnRegion=false]");
assert!(
format!("{:?}", error).contains("Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false`"),
"expected error to contain `Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false`` but it was {:?}", error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_140() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("mybucket--abcd-ab1--x-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://mybucket--abcd-ab1--x-s3.s3express-abcd-ab1.us-east-1.amazonaws.com"),
"expected URI to start with `https://mybucket--abcd-ab1--x-s3.s3express-abcd-ab1.us-east-1.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_141() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("cn-north-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("mybucket--abcd-ab1--x-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://mybucket--abcd-ab1--x-s3.s3express-abcd-ab1.cn-north-1.amazonaws.com.cn"),
"expected URI to start with `https://mybucket--abcd-ab1--x-s3.s3express-abcd-ab1.cn-north-1.amazonaws.com.cn` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_142() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("myaccesspoint--abcd-ab1--xa-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://myaccesspoint--abcd-ab1--xa-s3.s3express-abcd-ab1.us-east-1.amazonaws.com"),
"expected URI to start with `https://myaccesspoint--abcd-ab1--xa-s3.s3express-abcd-ab1.us-east-1.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_143() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("cn-north-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("myaccesspoint--abcd-ab1--xa-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://myaccesspoint--abcd-ab1--xa-s3.s3express-abcd-ab1.cn-north-1.amazonaws.com.cn"),
"expected URI to start with `https://myaccesspoint--abcd-ab1--xa-s3.s3express-abcd-ab1.cn-north-1.amazonaws.com.cn` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_144() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("mybucket--test-zone-ab1--x-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://mybucket--test-zone-ab1--x-s3.s3express-test-zone-ab1.us-west-2.amazonaws.com"),
"expected URI to start with `https://mybucket--test-zone-ab1--x-s3.s3express-test-zone-ab1.us-west-2.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_145() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("myaccesspoint--test-zone-ab1--xa-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://myaccesspoint--test-zone-ab1--xa-s3.s3express-test-zone-ab1.us-west-2.amazonaws.com"),
"expected URI to start with `https://myaccesspoint--test-zone-ab1--xa-s3.s3express-test-zone-ab1.us-west-2.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_146() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("mybucket--test1-zone-ab1--x-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://mybucket--test1-zone-ab1--x-s3.s3express-test1-zone-ab1.us-west-2.amazonaws.com"),
"expected URI to start with `https://mybucket--test1-zone-ab1--x-s3.s3express-test1-zone-ab1.us-west-2.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_147() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("myaccesspoint--test1-zone-ab1--xa-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://myaccesspoint--test1-zone-ab1--xa-s3.s3express-test1-zone-ab1.us-west-2.amazonaws.com"),
"expected URI to start with `https://myaccesspoint--test1-zone-ab1--xa-s3.s3express-test1-zone-ab1.us-west-2.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_148() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("mybucket--test1-long1-zone-ab1--x-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(uri.starts_with("https://mybucket--test1-long1-zone-ab1--x-s3.s3express-test1-long1-zone-ab1.us-west-2.amazonaws.com"), "expected URI to start with `https://mybucket--test1-long1-zone-ab1--x-s3.s3express-test1-long1-zone-ab1.us-west-2.amazonaws.com` but it was `{}`", uri);
}
#[::tokio::test]
async fn operation_input_test_get_object_149() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("myaccesspoint--test1-long1-zone-ab1--xa-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(uri.starts_with("https://myaccesspoint--test1-long1-zone-ab1--xa-s3.s3express-test1-long1-zone-ab1.us-west-2.amazonaws.com"), "expected URI to start with `https://myaccesspoint--test1-long1-zone-ab1--xa-s3.s3express-test1-long1-zone-ab1.us-west-2.amazonaws.com` but it was `{}`", uri);
}
#[::tokio::test]
async fn operation_input_test_get_object_150() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
let builder = builder.use_fips(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("mybucket--test-ab1--x-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://mybucket--test-ab1--x-s3.s3express-fips-test-ab1.us-east-1.amazonaws.com"),
"expected URI to start with `https://mybucket--test-ab1--x-s3.s3express-fips-test-ab1.us-east-1.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_151() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("cn-north-1"));
let builder = builder.use_fips(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("mybucket--test-ab1--x-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Partition does not support FIPS [Data Plane with short zone fips china region]");
assert!(
format!("{:?}", error).contains("Partition does not support FIPS"),
"expected error to contain `Partition does not support FIPS` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_152() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
let builder = builder.use_fips(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("myaccesspoint--test-ab1--xa-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://myaccesspoint--test-ab1--xa-s3.s3express-fips-test-ab1.us-east-1.amazonaws.com"),
"expected URI to start with `https://myaccesspoint--test-ab1--xa-s3.s3express-fips-test-ab1.us-east-1.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_153() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("cn-north-1"));
let builder = builder.use_fips(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("myaccesspoint--test-ab1--xa-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Partition does not support FIPS [Data Plane with short zone fips with AP china region]");
assert!(
format!("{:?}", error).contains("Partition does not support FIPS"),
"expected error to contain `Partition does not support FIPS` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_154() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_fips(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("mybucket--test-zone-ab1--x-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://mybucket--test-zone-ab1--x-s3.s3express-fips-test-zone-ab1.us-west-2.amazonaws.com"),
"expected URI to start with `https://mybucket--test-zone-ab1--x-s3.s3express-fips-test-zone-ab1.us-west-2.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_155() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_fips(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("myaccesspoint--test-zone-ab1--xa-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(uri.starts_with("https://myaccesspoint--test-zone-ab1--xa-s3.s3express-fips-test-zone-ab1.us-west-2.amazonaws.com"), "expected URI to start with `https://myaccesspoint--test-zone-ab1--xa-s3.s3express-fips-test-zone-ab1.us-west-2.amazonaws.com` but it was `{}`", uri);
}
#[::tokio::test]
async fn operation_input_test_get_object_156() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_fips(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("mybucket--test1-zone-ab1--x-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://mybucket--test1-zone-ab1--x-s3.s3express-fips-test1-zone-ab1.us-west-2.amazonaws.com"),
"expected URI to start with `https://mybucket--test1-zone-ab1--x-s3.s3express-fips-test1-zone-ab1.us-west-2.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_157() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_fips(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("myaccesspoint--test1-zone-ab1--xa-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(uri.starts_with("https://myaccesspoint--test1-zone-ab1--xa-s3.s3express-fips-test1-zone-ab1.us-west-2.amazonaws.com"), "expected URI to start with `https://myaccesspoint--test1-zone-ab1--xa-s3.s3express-fips-test1-zone-ab1.us-west-2.amazonaws.com` but it was `{}`", uri);
}
#[::tokio::test]
async fn operation_input_test_get_object_158() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_fips(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("mybucket--test1-long1-zone-ab1--x-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(uri.starts_with("https://mybucket--test1-long1-zone-ab1--x-s3.s3express-fips-test1-long1-zone-ab1.us-west-2.amazonaws.com"), "expected URI to start with `https://mybucket--test1-long1-zone-ab1--x-s3.s3express-fips-test1-long1-zone-ab1.us-west-2.amazonaws.com` but it was `{}`", uri);
}
#[::tokio::test]
async fn operation_input_test_get_object_159() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_fips(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("myaccesspoint--test1-long1-zone-ab1--xa-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(uri.starts_with("https://myaccesspoint--test1-long1-zone-ab1--xa-s3.s3express-fips-test1-long1-zone-ab1.us-west-2.amazonaws.com"), "expected URI to start with `https://myaccesspoint--test1-long1-zone-ab1--xa-s3.s3express-fips-test1-long1-zone-ab1.us-west-2.amazonaws.com` but it was `{}`", uri);
}
#[::tokio::test]
async fn operation_input_test_get_object_160() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("mybucket--test1-az1--x-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://mybucket--test1-az1--x-s3.s3express-test1-az1.us-west-2.amazonaws.com"),
"expected URI to start with `https://mybucket--test1-az1--x-s3.s3express-test1-az1.us-west-2.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_161() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("myaccesspoint--test1-az1--xa-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://myaccesspoint--test1-az1--xa-s3.s3express-test1-az1.us-west-2.amazonaws.com"),
"expected URI to start with `https://myaccesspoint--test1-az1--xa-s3.s3express-test1-az1.us-west-2.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_162() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_fips(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("mybucket--test1-az1--x-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://mybucket--test1-az1--x-s3.s3express-fips-test1-az1.us-west-2.amazonaws.com"),
"expected URI to start with `https://mybucket--test1-az1--x-s3.s3express-fips-test1-az1.us-west-2.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_163() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_fips(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("myaccesspoint--test1-az1--xa-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://myaccesspoint--test1-az1--xa-s3.s3express-fips-test1-az1.us-west-2.amazonaws.com"),
"expected URI to start with `https://myaccesspoint--test1-az1--xa-s3.s3express-fips-test1-az1.us-west-2.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_create_bucket_164() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.create_bucket()
.set_bucket(::std::option::Option::Some("mybucket--test-ab1--x-s3".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3express-control.us-east-1.amazonaws.com/mybucket--test-ab1--x-s3"),
"expected URI to start with `https://s3express-control.us-east-1.amazonaws.com/mybucket--test-ab1--x-s3` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_create_bucket_165() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("cn-north-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.create_bucket()
.set_bucket(::std::option::Option::Some("mybucket--test-ab1--x-s3".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3express-control.cn-north-1.amazonaws.com.cn/mybucket--test-ab1--x-s3"),
"expected URI to start with `https://s3express-control.cn-north-1.amazonaws.com.cn/mybucket--test-ab1--x-s3` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_create_bucket_166() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
let builder = builder.use_fips(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.create_bucket()
.set_bucket(::std::option::Option::Some("mybucket--test-ab1--x-s3".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3express-control-fips.us-east-1.amazonaws.com/mybucket--test-ab1--x-s3"),
"expected URI to start with `https://s3express-control-fips.us-east-1.amazonaws.com/mybucket--test-ab1--x-s3` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_create_bucket_167() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("cn-north-1"));
let builder = builder.use_fips(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.create_bucket()
.set_bucket(::std::option::Option::Some("mybucket--test-ab1--x-s3".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Partition does not support FIPS [Control plane with short AZ bucket and fips china region]");
assert!(
format!("{:?}", error).contains("Partition does not support FIPS"),
"expected error to contain `Partition does not support FIPS` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_list_directory_buckets_168() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(client.list_directory_buckets().send().await);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3express-control.us-east-1.amazonaws.com"),
"expected URI to start with `https://s3express-control.us-east-1.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_list_directory_buckets_169() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
let builder = builder.use_fips(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(client.list_directory_buckets().send().await);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3express-control-fips.us-east-1.amazonaws.com"),
"expected URI to start with `https://s3express-control-fips.us-east-1.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_170() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.endpoint_url("https://10.0.0.1");
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("mybucket--usw2-az1--x-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://10.0.0.1/mybucket--usw2-az1--x-s3"),
"expected URI to start with `https://10.0.0.1/mybucket--usw2-az1--x-s3` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_171() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.endpoint_url("https://10.0.0.1");
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("myaccesspoint--usw2-az1--xa-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://10.0.0.1/myaccesspoint--usw2-az1--xa-s3"),
"expected URI to start with `https://10.0.0.1/myaccesspoint--usw2-az1--xa-s3` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_172() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.endpoint_url("https://custom.com");
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("mybucket--usw2-az1--x-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://mybucket--usw2-az1--x-s3.custom.com"),
"expected URI to start with `https://mybucket--usw2-az1--x-s3.custom.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_173() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.endpoint_url("https://custom.com");
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("myaccesspoint--usw2-az1--xa-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://myaccesspoint--usw2-az1--xa-s3.custom.com"),
"expected URI to start with `https://myaccesspoint--usw2-az1--xa-s3.custom.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_174() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("mybucket--usaz1--x-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Unrecognized S3Express bucket name format. [bad format error]");
assert!(
format!("{:?}", error).contains("Unrecognized S3Express bucket name format."),
"expected error to contain `Unrecognized S3Express bucket name format.` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_175() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("myaccesspoint--usaz1--xa-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Unrecognized S3Express bucket name format. [bad AP format error]");
assert!(
format!("{:?}", error).contains("Unrecognized S3Express bucket name format."),
"expected error to contain `Unrecognized S3Express bucket name format.` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_176() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("mybucket--usaz1--x-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Unrecognized S3Express bucket name format. [bad format error no session auth]");
assert!(
format!("{:?}", error).contains("Unrecognized S3Express bucket name format."),
"expected error to contain `Unrecognized S3Express bucket name format.` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_177() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("myaccesspoint--usaz1--xa-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: Unrecognized S3Express bucket name format. [bad AP format error no session auth]");
assert!(
format!("{:?}", error).contains("Unrecognized S3Express bucket name format."),
"expected error to contain `Unrecognized S3Express bucket name format.` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_178() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
let builder = builder.accelerate(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("mybucket--test-ab1--x-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: S3Express does not support S3 Accelerate. [accelerate error]");
assert!(
format!("{:?}", error).contains("S3Express does not support S3 Accelerate."),
"expected error to contain `S3Express does not support S3 Accelerate.` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_179() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
let builder = builder.accelerate(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("myaccesspoint--test-ab1--xa-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: S3Express does not support S3 Accelerate. [accelerate error with AP]");
assert!(
format!("{:?}", error).contains("S3Express does not support S3 Accelerate."),
"expected error to contain `S3Express does not support S3 Accelerate.` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_180() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("my.bucket--test-ab1--x-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: S3Express bucket name is not a valid virtual hostable name. [Data plane bucket format error]");
assert!(
format!("{:?}", error).contains("S3Express bucket name is not a valid virtual hostable name."),
"expected error to contain `S3Express bucket name is not a valid virtual hostable name.` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_181() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("my.myaccesspoint--test-ab1--xa-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err("expected error: S3Express bucket name is not a valid virtual hostable name. [Data plane AP format error]");
assert!(
format!("{:?}", error).contains("S3Express bucket name is not a valid virtual hostable name."),
"expected error to contain `S3Express bucket name is not a valid virtual hostable name.` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_182() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.endpoint_url("https://custom.com");
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("my.bucket--usw2-az1--x-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result.expect_err(
"expected error: S3Express bucket name is not a valid virtual hostable name. [host override data plane bucket error session auth]",
);
assert!(
format!("{:?}", error).contains("S3Express bucket name is not a valid virtual hostable name."),
"expected error to contain `S3Express bucket name is not a valid virtual hostable name.` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_get_object_183() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.endpoint_url("https://custom.com");
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("my.myaccesspoint--usw2-az1--xa-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
rcvr.expect_no_request();
let error = _result
.expect_err("expected error: S3Express bucket name is not a valid virtual hostable name. [host override data plane AP error session auth]");
assert!(
format!("{:?}", error).contains("S3Express bucket name is not a valid virtual hostable name."),
"expected error to contain `S3Express bucket name is not a valid virtual hostable name.` but it was {:?}",
error
);
}
#[::tokio::test]
async fn operation_input_test_list_directory_buckets_184() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
let builder = builder.use_dual_stack(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(client.list_directory_buckets().send().await);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3express-control.dualstack.us-east-1.amazonaws.com"),
"expected URI to start with `https://s3express-control.dualstack.us-east-1.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_list_directory_buckets_185() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
let builder = builder.use_fips(true);
let builder = builder.use_dual_stack(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(client.list_directory_buckets().send().await);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3express-control-fips.dualstack.us-east-1.amazonaws.com"),
"expected URI to start with `https://s3express-control-fips.dualstack.us-east-1.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_186() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("my--s3--bucket--abcd-ab1--x-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://my--s3--bucket--abcd-ab1--x-s3.s3express-abcd-ab1.us-east-1.amazonaws.com"),
"expected URI to start with `https://my--s3--bucket--abcd-ab1--x-s3.s3express-abcd-ab1.us-east-1.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_187() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_dual_stack(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("mybucket--usw2-az1--x-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://mybucket--usw2-az1--x-s3.s3express-usw2-az1.dualstack.us-west-2.amazonaws.com"),
"expected URI to start with `https://mybucket--usw2-az1--x-s3.s3express-usw2-az1.dualstack.us-west-2.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_get_object_188() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-west-2"));
let builder = builder.use_fips(true);
let builder = builder.use_dual_stack(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.get_object()
.set_bucket(::std::option::Option::Some("mybucket--usw2-az1--x-s3".to_owned()))
.set_key(::std::option::Option::Some("key".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://mybucket--usw2-az1--x-s3.s3express-fips-usw2-az1.dualstack.us-west-2.amazonaws.com"),
"expected URI to start with `https://mybucket--usw2-az1--x-s3.s3express-fips-usw2-az1.dualstack.us-west-2.amazonaws.com` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_create_bucket_189() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
let builder = builder.use_fips(true);
let builder = builder.use_dual_stack(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.create_bucket()
.set_bucket(::std::option::Option::Some("mybucket--test-ab1--x-s3".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3express-control-fips.dualstack.us-east-1.amazonaws.com/mybucket--test-ab1--x-s3"),
"expected URI to start with `https://s3express-control-fips.dualstack.us-east-1.amazonaws.com/mybucket--test-ab1--x-s3` but it was `{}`",
uri
);
}
#[::tokio::test]
async fn operation_input_test_create_bucket_190() {
let (http_client, rcvr) = ::aws_smithy_http_client::test_util::capture_request(None);
let conf = {
#[allow(unused_mut)]
let mut builder = aws_sdk_s3::Config::builder().with_test_defaults().http_client(http_client);
let builder = builder.region(::aws_types::region::Region::new("us-east-1"));
let builder = builder.use_dual_stack(true);
builder.build()
};
let client = aws_sdk_s3::Client::from_conf(conf);
let _result = dbg!(
client
.create_bucket()
.set_bucket(::std::option::Option::Some("mybucket--test-ab1--x-s3".to_owned()))
.send()
.await
);
let req = rcvr.expect_request();
let uri = req.uri().to_string();
assert!(
uri.starts_with("https://s3express-control.dualstack.us-east-1.amazonaws.com/mybucket--test-ab1--x-s3"),
"expected URI to start with `https://s3express-control.dualstack.us-east-1.amazonaws.com/mybucket--test-ab1--x-s3` but it was `{}`",
uri
);
}