Conversation
| #include <memory> | ||
| #include <aws/core/utils/memory/stl/AWSVector.h> | ||
|
|
||
| namespace Aws |
There was a problem hiding this comment.
dont format the entire file as part of the PR, even if clang-format fails. It makes reading the file of what actually changed, much more difficult
| * EnvironmentAWSCredentialsProvider, ProfileConfigFileAWSCredentialsProvider, | ||
| * ProcessCredentialsProvider, STSAssumeRoleWebIdentityCredentialsProvider and SSOCredentialsProvider. | ||
| */ | ||
| DefaultAWSCredentialsProviderChain( |
There was a problem hiding this comment.
adding a default parameter will break ABI, we cant update a no-arg constructor to have a default value
DefaultAWSCredentialsProviderChain();
DefaultAWSCredentialsProviderChain(const Aws::Client::CredentialProviderConfiguration& config);
DefaultAWSCredentialsProviderChain(const DefaultAWSCredentialsProviderChain& chain);
| * such as profile name and client configuration for HTTP requests made by | ||
| * credential providers that need to make network calls (e.g., InstanceProfileCredentialsProvider). | ||
| */ | ||
| struct CredentialProviderConfiguration { |
There was a problem hiding this comment.
this only declares a struct, it doesnt actually create a member in the client configuration object.
| #set($AdditionalServiceSpecificConfigLoadString = "Load${metadata.classNamePrefix}SpecificConfig(config);") | ||
| #end | ||
| #set($clientConfigurationNamespace = "Client") | ||
| #if($clientConfiguration.profileName && !$clientConfiguration.profileName.empty()) |
There was a problem hiding this comment.
I dont think the object $clientConfiguration declared in this flow? i see it declared as a string, but not as a object? it doesnt have the member profileName, that is passed at runtime. i dont think this is accomplishing what you you think its doing.
when we create the credentials provider chain as part of the code generation process you want to pass the client configuration that is created in the constructor.
| /** | ||
| * AWS profile name to use for credentials. | ||
| */ | ||
| Aws::String profile; |
There was a problem hiding this comment.
this needs to be initialized to the same value of client configuration profile in its constructor, i think we're missing that
297aeec to
03a9e59
Compare
da2cc7b to
f885df4
Compare
Issue #, if available: #3395
Description of changes: Added support for profile names in DefaultAWSCredentialsProviderChain by extending the constructor to accept a CredentialProviderConfiguration parameter. This addresses the feature request to allow specification of non-default profile names in the credentials chain.
Check all that applies:
Check which platforms you have built SDK on to verify the correctness of this PR.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.