aws-sdk-cpp
aws-sdk-cpp copied to clipboard
Typedefs for ClientConfiguration and EndpointProvider types in Client classes
Describe the feature
Add typedefs ClientConfigurationType and EndpointProviderType to service client classes.
Use Case
Makes it easier to use template functions to construct service clients while applying shared configuration values.
For example:
template<typename T>
std::shared_ptr<T> CreateAwsClient(const T::ClientConfigurationType& config) {
auto config_ = config;
config_.profile = "my_custom_profile";
return std::make_shared<T>(config_);
}
Proposed Solution
Add the typedefs to the ServiceClient templates and regenerate the clients.
Other Information
This can currently be worked around by using deprecated constructors that take Aws::Client::ClientConfiguration instead of the service-specific configuration.
Acknowledgements
- [X] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
Thanks for opening this and making a PR. Reviewing the PR