Skip to content

Commit 62a48ef

Browse files
Update SDK models
1 parent dafe709 commit 62a48ef

File tree

85 files changed

+3116
-480
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+3116
-480
lines changed

aws-models/ecr-public.json

+493-63
Large diffs are not rendered by default.

aws-models/ecr.json

+864-161
Large diffs are not rendered by default.

sdk/ecr/Cargo.toml

-5
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,6 @@ path = "../aws-credential-types"
7575
features = ["test-util"]
7676
version = "1.2.1"
7777

78-
[dev-dependencies.aws-smithy-runtime]
79-
path = "../aws-smithy-runtime"
80-
features = ["client", "test-util"]
81-
version = "1.7.6"
82-
8378
[dev-dependencies.tokio]
8479
version = "1.23.1"
8580
features = ["macros", "test-util", "rt-multi-thread"]

sdk/ecr/src/config.rs

+32
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ impl Builder {
160160
builder.set_timeout_config(config_bag.load::<::aws_smithy_types::timeout::TimeoutConfig>().cloned());
161161
builder.set_retry_partition(config_bag.load::<::aws_smithy_runtime::client::retries::RetryPartition>().cloned());
162162
builder.set_app_name(config_bag.load::<::aws_types::app_name::AppName>().cloned());
163+
builder.set_endpoint_url(config_bag.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()));
163164
builder.set_use_dual_stack(config_bag.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0));
164165
builder.set_use_fips(config_bag.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0));
165166
builder.set_region(config_bag.load::<crate::config::Region>().cloned());
@@ -887,6 +888,24 @@ impl Builder {
887888
self.config.store_or_unset(gen);
888889
self
889890
}
891+
/// Sets the endpoint URL used to communicate with this service
892+
893+
/// Note: this is used in combination with other endpoint rules, e.g. an API that applies a host-label prefix
894+
/// will be prefixed onto this URL. To fully override the endpoint resolver, use
895+
/// [`Builder::endpoint_resolver`].
896+
pub fn endpoint_url(mut self, endpoint_url: impl Into<::std::string::String>) -> Self {
897+
self.set_endpoint_url(Some(endpoint_url.into()));
898+
self
899+
}
900+
/// Sets the endpoint URL used to communicate with this service
901+
902+
/// Note: this is used in combination with other endpoint rules, e.g. an API that applies a host-label prefix
903+
/// will be prefixed onto this URL. To fully override the endpoint resolver, use
904+
/// [`Builder::endpoint_resolver`].
905+
pub fn set_endpoint_url(&mut self, endpoint_url: Option<::std::string::String>) -> &mut Self {
906+
self.config.store_or_unset(endpoint_url.map(::aws_types::endpoint_config::EndpointUrl));
907+
self
908+
}
890909
/// When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.
891910
pub fn use_dual_stack(mut self, use_dual_stack: impl Into<bool>) -> Self {
892911
self.set_use_dual_stack(Some(use_dual_stack.into()));
@@ -1190,6 +1209,19 @@ impl From<&::aws_types::sdk_config::SdkConfig> for Builder {
11901209
builder = builder.region(input.region().cloned());
11911210
builder.set_use_fips(input.use_fips());
11921211
builder.set_use_dual_stack(input.use_dual_stack());
1212+
if input.get_origin("endpoint_url").is_client_config() {
1213+
builder.set_endpoint_url(input.endpoint_url().map(|s| s.to_string()));
1214+
} else {
1215+
builder.set_endpoint_url(
1216+
input
1217+
.service_config()
1218+
.and_then(|conf| {
1219+
conf.load_config(service_config_key("AWS_ENDPOINT_URL", "endpoint_url"))
1220+
.map(|it| it.parse().unwrap())
1221+
})
1222+
.or_else(|| input.endpoint_url().map(|s| s.to_string())),
1223+
);
1224+
}
11931225
// resiliency
11941226
builder.set_retry_config(input.retry_config().cloned());
11951227
builder.set_timeout_config(input.timeout_config().cloned());

0 commit comments

Comments
 (0)