Skip to content

Commit 297aeec

Browse files
committed
CredentialProviderConfiguration declaration update
1 parent 03f03ed commit 297aeec

File tree

3 files changed

+13
-20
lines changed

3 files changed

+13
-20
lines changed

src/aws-cpp-sdk-core/include/aws/core/client/ClientConfiguration.h

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -88,19 +88,6 @@ namespace Aws
8888
bool shouldDisableIMDS = false;
8989
};
9090

91-
/**
92-
* Configuration structure for credential providers in the AWS SDK.
93-
* This structure allows passing configuration options to credential providers
94-
* such as profile name and client configuration for HTTP requests made by
95-
* credential providers that need to make network calls (e.g., InstanceProfileCredentialsProvider).
96-
*/
97-
struct CredentialProviderConfiguration {
98-
/**
99-
* AWS profile name to use for credentials.
100-
*/
101-
Aws::String profile;
102-
};
103-
10491
/**
10592
* This mutable structure is used to configure any of the AWS clients.
10693
* Default values can only be overwritten prior to passing to the client constructors.
@@ -169,11 +156,6 @@ namespace Aws
169156
*/
170157
ProviderFactories configFactories = ProviderFactories::defaultFactories;
171158

172-
/**
173-
* Credential provider configuration options.
174-
*/
175-
CredentialProviderConfiguration credentialProviderConfig;
176-
177159
/**
178160
* User Agent string user for http calls. This is filled in for you in the constructor. Don't override this unless you have a really good reason.
179161
*/
@@ -514,5 +496,17 @@ namespace Aws
514496
AWS_CORE_API Aws::String ComputeUserAgentString(ClientConfiguration const * const pConfig = nullptr);
515497

516498
AWS_CORE_API Aws::String FilterUserAgentToken(char const * const token);
499+
/**
500+
* Configuration structure for credential providers in the AWS SDK.
501+
* This structure allows passing configuration options to credential providers
502+
* such as profile name and client configuration for HTTP requests made by
503+
* credential providers that need to make network calls (e.g., InstanceProfileCredentialsProvider).
504+
*/
505+
struct CredentialProviderConfiguration {
506+
/**
507+
* AWS profile name to use for credentials.
508+
*/
509+
Aws::String profile;
510+
}credentialProviderConfig;
517511
} // namespace Client
518512
} // namespace Aws

src/aws-cpp-sdk-core/source/auth/AWSCredentialsProviderChain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ DefaultAWSCredentialsProviderChain::DefaultAWSCredentialsProviderChain() : AWSCr
8585
}
8686
}
8787

88-
DefaultAWSCredentialsProviderChain::DefaultAWSCredentialsProviderChain(const Aws::Client::CredentialProviderConfiguration& config) : AWSCredentialsProviderChain()
88+
DefaultAWSCredentialsProviderChain::DefaultAWSCredentialsProviderChain(const Aws::Client::CredentialProviderConfiguration& config)
8989
{
9090
AddProvider(Aws::MakeShared<EnvironmentAWSCredentialsProvider>(DefaultCredentialsProviderChainTag));
9191
AddProvider(Aws::MakeShared<ProfileConfigFileAWSCredentialsProvider>(DefaultCredentialsProviderChainTag,config.profile.c_str()));

tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/ServiceClientSourceInit.vm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
#set($AdditionalServiceSpecificConfigLoadString = "Load${metadata.classNamePrefix}SpecificConfig(config);")
6464
#end
6565
#set($clientConfigurationNamespace = "Client")
66-
#set($defaultCredentialsProviderChainParam = "Aws::MakeShared<DefaultAWSCredentialsProviderChain>(ALLOCATION_TAG)")
6766
#set($defaultCredentialsProviderChainParam = "Aws::MakeShared<DefaultAWSCredentialsProviderChain>(ALLOCATION_TAG, clientConfiguration.credentialProviderConfig)")
6867
#set($s3ExpressIdentityProviderParam = "clientConfiguration.identityProviderSupplier(*this)")
6968
#set($simpleCredentialsProviderParam = "Aws::MakeShared<SimpleAWSCredentialsProvider>(ALLOCATION_TAG, credentials)")

0 commit comments

Comments
 (0)