-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Regenerate few clients for describe endpoints default update
- Loading branch information
1 parent
653eafc
commit 25ffa82
Showing
28 changed files
with
585 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
generated/src/aws-cpp-sdk-dynamodb/include/aws/dynamodb/DynamoDBClientConfiguration.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/** | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* SPDX-License-Identifier: Apache-2.0. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <aws/dynamodb/DynamoDB_EXPORTS.h> | ||
#include <aws/core/client/GenericClientConfiguration.h> | ||
|
||
|
||
namespace Aws | ||
{ | ||
namespace DynamoDB | ||
{ | ||
struct AWS_DYNAMODB_API DynamoDBClientConfiguration : public Aws::Client::GenericClientConfiguration | ||
{ | ||
using BaseClientConfigClass = Aws::Client::GenericClientConfiguration; | ||
static const bool EndpointDiscoverySupported = true; | ||
static const bool EndpointDiscoveryRequired = false; | ||
|
||
DynamoDBClientConfiguration(const Client::ClientConfigurationInitValues &configuration = {}); | ||
|
||
/** | ||
* Create a configuration based on settings in the aws configuration file for the given profile name. | ||
* The configuration file location can be set via the environment variable AWS_CONFIG_FILE | ||
* @param profileName the aws profile name. | ||
* @param shouldDisableIMDS whether or not to disable IMDS calls. | ||
*/ | ||
DynamoDBClientConfiguration(const char* profileName, bool shouldDisableIMDS = false); | ||
|
||
/** | ||
* Create a configuration with a predefined smart defaults | ||
* @param useSmartDefaults, required to differentiate c-tors | ||
* @param defaultMode, default mode to use | ||
* @param shouldDisableIMDS whether or not to disable IMDS calls. | ||
*/ | ||
DynamoDBClientConfiguration(bool useSmartDefaults, const char* defaultMode = "legacy", bool shouldDisableIMDS = false); | ||
|
||
/** | ||
* Converting constructors for compatibility with a legacy code | ||
*/ | ||
DynamoDBClientConfiguration(const Client::ClientConfiguration& config); | ||
|
||
/** | ||
* Enable endpoint discovery | ||
* For some services to dynamically set up their endpoints for different requests. | ||
* By default, service clients will decide if endpoint discovery is enabled or not. | ||
* If disabled, regional or overridden endpoint will be used instead. | ||
* If a request requires endpoint discovery, but it was disabled then the request will never succeed. | ||
* A boolean value is either true of false, use Optional here to have an instance does not contain a value, | ||
* such that SDK will decide the default behavior as stated before, if no value specified. | ||
* DynamoDB service client does not require endpoint discovery. The default value for this setting is Disabled. | ||
*/ | ||
Aws::Crt::Optional<bool>& enableEndpointDiscovery; | ||
|
||
private: | ||
void LoadDynamoDBSpecificConfig(const Aws::String& profileName); | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
generated/src/aws-cpp-sdk-dynamodb/source/DynamoDBClientConfiguration.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/** | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* SPDX-License-Identifier: Apache-2.0. | ||
*/ | ||
|
||
#include <aws/dynamodb/DynamoDBClientConfiguration.h> | ||
|
||
namespace Aws | ||
{ | ||
namespace DynamoDB | ||
{ | ||
|
||
|
||
bool IsEndpointDiscoveryEnabled(const Aws::String& endpointOverride, const Aws::String &profileName) | ||
{ | ||
bool enabled = false; | ||
|
||
if (!endpointOverride.empty()) | ||
{ | ||
enabled = false; | ||
} | ||
else | ||
{ | ||
static const char* AWS_ENABLE_ENDPOINT_DISCOVERY_ENV_KEY = "AWS_ENABLE_ENDPOINT_DISCOVERY"; | ||
static const char* AWS_ENABLE_ENDPOINT_DISCOVERY_PROFILE_KEY = "AWS_ENABLE_ENDPOINT_DISCOVERY"; | ||
static const char* AWS_ENABLE_EP_DISCOVERY_ENABLED = "true"; | ||
static const char* AWS_ENABLE_EP_DISCOVERY_DISABLED = "false"; | ||
|
||
static const const* DEFAULT_VALUE_FOR_$serviceNameCaps = AWS_ENABLE_EP_DISCOVERY_DISABLED; | ||
Aws::String configVal = Client::ClientConfiguration::LoadConfigFromEnvOrProfile( | ||
AWS_ENABLE_ENDPOINT_DISCOVERY_ENV_KEY, profileName, AWS_ENABLE_ENDPOINT_DISCOVERY_PROFILE_KEY, | ||
{AWS_ENABLE_EP_DISCOVERY_ENABLED, AWS_ENABLE_EP_DISCOVERY_DISABLED}, DEFAULT_VALUE_FOR_$serviceNameCaps); | ||
|
||
if (AWS_ENABLE_EP_DISCOVERY_ENABLED == configVal) | ||
{ | ||
enabled = true; | ||
} | ||
} | ||
return enabled; | ||
} | ||
|
||
void DynamoDBClientConfiguration::LoadDynamoDBSpecificConfig(const Aws::String& inputProfileName) | ||
{ | ||
if(!enableEndpointDiscovery) { | ||
enableEndpointDiscovery = IsEndpointDiscoveryEnabled(this->endpointOverride, inputProfileName); | ||
} | ||
} | ||
|
||
DynamoDBClientConfiguration::DynamoDBClientConfiguration(const Client::ClientConfigurationInitValues &configuration) | ||
: BaseClientConfigClass(configuration), enableEndpointDiscovery(ClientConfiguration::enableEndpointDiscovery) | ||
{ | ||
LoadDynamoDBSpecificConfig(this->profileName); | ||
} | ||
|
||
DynamoDBClientConfiguration::DynamoDBClientConfiguration(const char* inputProfileName, bool shouldDisableIMDS) | ||
: BaseClientConfigClass(inputProfileName, shouldDisableIMDS), enableEndpointDiscovery(ClientConfiguration::enableEndpointDiscovery) | ||
{ | ||
LoadDynamoDBSpecificConfig(Aws::String(inputProfileName)); | ||
} | ||
|
||
DynamoDBClientConfiguration::DynamoDBClientConfiguration(bool useSmartDefaults, const char* defaultMode, bool shouldDisableIMDS) | ||
: BaseClientConfigClass(useSmartDefaults, defaultMode, shouldDisableIMDS), enableEndpointDiscovery(ClientConfiguration::enableEndpointDiscovery) | ||
{ | ||
LoadDynamoDBSpecificConfig(this->profileName); | ||
} | ||
|
||
DynamoDBClientConfiguration::DynamoDBClientConfiguration(const Client::ClientConfiguration& config) : BaseClientConfigClass(config), enableEndpointDiscovery(ClientConfiguration::enableEndpointDiscovery){ | ||
LoadDynamoDBSpecificConfig(this->profileName); | ||
} | ||
|
||
|
||
} // namespace DynamoDB | ||
} // namespace Aws |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
...pp-sdk-timestream-query/include/aws/timestream-query/TimestreamQueryClientConfiguration.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/** | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* SPDX-License-Identifier: Apache-2.0. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <aws/timestream-query/TimestreamQuery_EXPORTS.h> | ||
#include <aws/core/client/GenericClientConfiguration.h> | ||
|
||
|
||
namespace Aws | ||
{ | ||
namespace TimestreamQuery | ||
{ | ||
struct AWS_TIMESTREAMQUERY_API TimestreamQueryClientConfiguration : public Aws::Client::GenericClientConfiguration | ||
{ | ||
using BaseClientConfigClass = Aws::Client::GenericClientConfiguration; | ||
static const bool EndpointDiscoverySupported = true; | ||
static const bool EndpointDiscoveryRequired = true; | ||
|
||
TimestreamQueryClientConfiguration(const Client::ClientConfigurationInitValues &configuration = {}); | ||
|
||
/** | ||
* Create a configuration based on settings in the aws configuration file for the given profile name. | ||
* The configuration file location can be set via the environment variable AWS_CONFIG_FILE | ||
* @param profileName the aws profile name. | ||
* @param shouldDisableIMDS whether or not to disable IMDS calls. | ||
*/ | ||
TimestreamQueryClientConfiguration(const char* profileName, bool shouldDisableIMDS = false); | ||
|
||
/** | ||
* Create a configuration with a predefined smart defaults | ||
* @param useSmartDefaults, required to differentiate c-tors | ||
* @param defaultMode, default mode to use | ||
* @param shouldDisableIMDS whether or not to disable IMDS calls. | ||
*/ | ||
TimestreamQueryClientConfiguration(bool useSmartDefaults, const char* defaultMode = "legacy", bool shouldDisableIMDS = false); | ||
|
||
/** | ||
* Converting constructors for compatibility with a legacy code | ||
*/ | ||
TimestreamQueryClientConfiguration(const Client::ClientConfiguration& config); | ||
|
||
/** | ||
* Enable endpoint discovery | ||
* For some services to dynamically set up their endpoints for different requests. | ||
* By default, service clients will decide if endpoint discovery is enabled or not. | ||
* If disabled, regional or overridden endpoint will be used instead. | ||
* If a request requires endpoint discovery, but it was disabled then the request will never succeed. | ||
* A boolean value is either true of false, use Optional here to have an instance does not contain a value, | ||
* such that SDK will decide the default behavior as stated before, if no value specified. | ||
* Timestream Query service client requires endpoint discovery. The default value for this setting is Enabled. | ||
*/ | ||
Aws::Crt::Optional<bool>& enableEndpointDiscovery; | ||
|
||
private: | ||
void LoadTimestreamQuerySpecificConfig(const Aws::String& profileName); | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.