Skip to content

Commit 126ab2a

Browse files
committed
updating clientConfiguration
1 parent c4b382e commit 126ab2a

File tree

4 files changed

+18
-19
lines changed

4 files changed

+18
-19
lines changed

src/aws-cpp-sdk-core/include/aws/core/auth/AWSCredentialsProviderChain.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ namespace Aws
6565
*/
6666
DefaultAWSCredentialsProviderChain();
6767

68-
DefaultAWSCredentialsProviderChain(const Aws::Client::CredentialProviderConfiguration& config);
68+
DefaultAWSCredentialsProviderChain(const Aws::Client::ClientConfiguration::CredentialProviderConfiguration& config);
6969

7070
DefaultAWSCredentialsProviderChain(const DefaultAWSCredentialsProviderChain& chain);
7171
};

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

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,18 @@ namespace Aws
481481
* https://docs.aws.amazon.com/sdkref/latest/guide/feature-account-endpoints.html
482482
*/
483483
Aws::String accountIdEndpointMode = "preferred";
484+
/**
485+
* Configuration structure for credential providers in the AWS SDK.
486+
* This structure allows passing configuration options to credential providers
487+
* such as profile name and client configuration for HTTP requests made by
488+
* credential providers that need to make network calls (e.g., InstanceProfileCredentialsProvider).
489+
*/
490+
struct CredentialProviderConfiguration {
491+
/**
492+
* AWS profile name to use for credentials.
493+
*/
494+
Aws::String profile;
495+
}credentialProviderConfig;
484496
};
485497

486498
/**
@@ -496,18 +508,5 @@ namespace Aws
496508
AWS_CORE_API Aws::String ComputeUserAgentString(ClientConfiguration const * const pConfig = nullptr);
497509

498510
AWS_CORE_API Aws::String FilterUserAgentToken(char const * const token);
499-
500-
/**
501-
* Configuration structure for credential providers in the AWS SDK.
502-
* This structure allows passing configuration options to credential providers
503-
* such as profile name and client configuration for HTTP requests made by
504-
* credential providers that need to make network calls (e.g., InstanceProfileCredentialsProvider).
505-
*/
506-
struct CredentialProviderConfiguration {
507-
/**
508-
* AWS profile name to use for credentials.
509-
*/
510-
Aws::String profile;
511-
}credentialProviderConfig;
512511
} // namespace Client
513512
} // 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::ClientConfiguration::CredentialProviderConfiguration& config) : AWSCredentialsProviderChain()
8989
{
9090
AddProvider(Aws::MakeShared<EnvironmentAWSCredentialsProvider>(DefaultCredentialsProviderChainTag));
9191
AddProvider(Aws::MakeShared<ProfileConfigFileAWSCredentialsProvider>(DefaultCredentialsProviderChainTag,config.profile.c_str()));

src/aws-cpp-sdk-core/source/client/ClientConfiguration.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ ClientConfiguration::ClientConfiguration()
295295
this->disableIMDS = false;
296296
setLegacyClientConfigurationParameters(*this);
297297
setConfigFromEnvOrProfile(*this);
298-
credentialProviderConfig.profile = this->profileName;
298+
this->credentialProviderConfig.profile = this->profileName;
299299

300300
if (!this->disableIMDS &&
301301
region.empty() &&
@@ -319,7 +319,7 @@ ClientConfiguration::ClientConfiguration(const ClientConfigurationInitValues &co
319319
this->disableIMDS = configuration.shouldDisableIMDS;
320320
setLegacyClientConfigurationParameters(*this);
321321
setConfigFromEnvOrProfile(*this);
322-
credentialProviderConfig.profile = this->profileName;
322+
this->credentialProviderConfig.profile = this->profileName;
323323

324324
if (!this->disableIMDS &&
325325
region.empty() &&
@@ -344,7 +344,7 @@ ClientConfiguration::ClientConfiguration(const char* profile, bool shouldDisable
344344
if (profile && Aws::Config::HasCachedConfigProfile(profile)) {
345345
this->profileName = Aws::String(profile);
346346
}
347-
credentialProviderConfig.profile = this->profileName;
347+
this->credentialProviderConfig.profile = this->profileName;
348348
setLegacyClientConfigurationParameters(*this);
349349
setConfigFromEnvOrProfile(*this);
350350
// Call EC2 Instance Metadata service only once
@@ -389,7 +389,7 @@ ClientConfiguration::ClientConfiguration(bool /*useSmartDefaults*/, const char*
389389
this->disableIMDS = shouldDisableIMDS;
390390
setLegacyClientConfigurationParameters(*this);
391391
setConfigFromEnvOrProfile(*this);
392-
credentialProviderConfig.profile = this->profileName;
392+
this->credentialProviderConfig.profile = this->profileName;
393393

394394
// Call EC2 Instance Metadata service only once
395395
Aws::String ec2MetadataRegion;

0 commit comments

Comments
 (0)