Fix typos (#6234)
* Fix typos * Fix name collision * Re-trigger CI * Re-trigger CI --------- Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
This commit is contained in:
Родитель
88beb19768
Коммит
bef420162e
|
@ -49,23 +49,23 @@ AttestationAdministrationClient::AttestationAdministrationClient(
|
|||
"azure-security-attestation-cpp",
|
||||
PackageVersion::ToString()}
|
||||
{
|
||||
std::vector<std::unique_ptr<HttpPolicy>> perRetrypolicies;
|
||||
std::vector<std::unique_ptr<HttpPolicy>> perRetryPolicies;
|
||||
if (credential)
|
||||
{
|
||||
Azure::Core::Credentials::TokenRequestContext tokenContext;
|
||||
tokenContext.Scopes = {"https://attest.azure.net/.default"};
|
||||
|
||||
perRetrypolicies.emplace_back(
|
||||
perRetryPolicies.emplace_back(
|
||||
std::make_unique<BearerTokenAuthenticationPolicy>(credential, tokenContext));
|
||||
}
|
||||
std::vector<std::unique_ptr<HttpPolicy>> perCallpolicies;
|
||||
std::vector<std::unique_ptr<HttpPolicy>> perCallPolicies;
|
||||
|
||||
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
|
||||
options,
|
||||
"security.attestation",
|
||||
PackageVersion::ToString(),
|
||||
std::move(perRetrypolicies),
|
||||
std::move(perCallpolicies));
|
||||
std::move(perRetryPolicies),
|
||||
std::move(perCallPolicies));
|
||||
}
|
||||
|
||||
AttestationAdministrationClient AttestationAdministrationClient::Create(
|
||||
|
|
|
@ -39,23 +39,23 @@ AttestationClient::AttestationClient(
|
|||
"azure-security-attestation-cpp",
|
||||
PackageVersion::ToString()}
|
||||
{
|
||||
std::vector<std::unique_ptr<HttpPolicy>> perRetrypolicies;
|
||||
std::vector<std::unique_ptr<HttpPolicy>> perRetryPolicies;
|
||||
if (credential)
|
||||
{
|
||||
Azure::Core::Credentials::TokenRequestContext tokenContext;
|
||||
tokenContext.Scopes = {"https://attest.azure.net/.default"};
|
||||
|
||||
perRetrypolicies.emplace_back(
|
||||
perRetryPolicies.emplace_back(
|
||||
std::make_unique<BearerTokenAuthenticationPolicy>(credential, tokenContext));
|
||||
}
|
||||
std::vector<std::unique_ptr<HttpPolicy>> perCallpolicies;
|
||||
std::vector<std::unique_ptr<HttpPolicy>> perCallPolicies;
|
||||
|
||||
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
|
||||
options,
|
||||
"security.attestation",
|
||||
PackageVersion::ToString(),
|
||||
std::move(perRetrypolicies),
|
||||
std::move(perCallpolicies));
|
||||
std::move(perRetryPolicies),
|
||||
std::move(perCallPolicies));
|
||||
}
|
||||
|
||||
Azure::Response<OpenIdMetadata> AttestationClient::GetOpenIdMetadata(
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
// endif()
|
||||
//
|
||||
// And if the SDK is being consumed using the neither option from the above (neither cmake
|
||||
// fetchcontent nor a package, but some custom build process that is unknown to us, yet uncapable of
|
||||
// fetchcontent nor a package, but some custom build process that is unknown to us, yet incapable of
|
||||
// handling AZ_xxx_BUILT_AS_DLL correctly), there is always an option for th consumer to define
|
||||
// AZ_xxx_DLL manually.
|
||||
// --
|
||||
|
|
|
@ -785,7 +785,7 @@ void CurlSession::ParseChunkSize(Context const& context)
|
|||
if (index + 1 == this->m_innerBufferSize)
|
||||
{
|
||||
/*
|
||||
* index + 1 represents the next possition to Read. If that's equal to the inner buffer
|
||||
* index + 1 represents the next position to Read. If that's equal to the inner buffer
|
||||
* size it means that there is no more data and we need to fetch more from network. And
|
||||
* whatever we fetch will be the start of the chunk data. The bodyStart is set to 0 to
|
||||
* indicate the the next read call should read from the inner buffer start.
|
||||
|
@ -2562,7 +2562,7 @@ CurlConnection::CurlConnection(
|
|||
if (result != CURLE_OK)
|
||||
{
|
||||
throw Http::TransportException(
|
||||
"Broken connection. Couldn't get the active sockect for it."
|
||||
"Broken connection. Couldn't get the active socket for it."
|
||||
+ std::string(curl_easy_strerror(result)));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ namespace Azure { namespace Core {
|
|||
constexpr static int32_t DefaultCleanerIntervalMilliseconds = 1000 * 90;
|
||||
// 60 sec -> expired connection is when it waits for 60 sec or more and it's not re-used
|
||||
constexpr static int32_t DefaultConnectionExpiredMilliseconds = 1000 * 60;
|
||||
// Define the maximun allowed connections per host-index in the pool. If this number is
|
||||
// Define the maximum allowed connections per host-index in the pool. If this number is
|
||||
// reached for the host-index, next connections trying to be added to the pool will be
|
||||
// ignored.
|
||||
constexpr static int32_t MaxConnectionsPerIndex = 1024;
|
||||
|
|
|
@ -181,7 +181,7 @@ namespace Azure { namespace Messaging { namespace EventHubs {
|
|||
{
|
||||
if (!options.PartitionId.empty() && !options.PartitionKey.empty())
|
||||
{
|
||||
throw std::runtime_error("Either PartionID or PartitionKey can be set, but not both.");
|
||||
throw std::runtime_error("Either PartitionID or PartitionKey can be set, but not both.");
|
||||
}
|
||||
|
||||
if (options.PartitionId.empty())
|
||||
|
|
|
@ -169,15 +169,15 @@ std::vector<Ownership> ProcessorLoadBalancer::GreedyLoadBalancer(
|
|||
(void)context;
|
||||
std::vector<Models::Ownership> ours = loadBalancerInfo.Current;
|
||||
// try claiming from the completely unowned or expires ownerships _first_
|
||||
std::vector<Models::Ownership> randomOwneships = GetRandomOwnerships(
|
||||
std::vector<Models::Ownership> randomOwnerships = GetRandomOwnerships(
|
||||
loadBalancerInfo.UnownedOrExpired, loadBalancerInfo.MaxAllowed - ours.size());
|
||||
ours.insert(ours.end(), randomOwneships.begin(), randomOwneships.end());
|
||||
ours.insert(ours.end(), randomOwnerships.begin(), randomOwnerships.end());
|
||||
|
||||
if (ours.size() < loadBalancerInfo.MaxAllowed)
|
||||
{ // try claiming from the completely unowned or expires ownerships _first_
|
||||
std::vector<Models::Ownership> randomOwnerships
|
||||
std::vector<Models::Ownership> additionalRandomOwnerships
|
||||
= GetRandomOwnerships(loadBalancerInfo.AboveMax, loadBalancerInfo.MaxAllowed - ours.size());
|
||||
ours.insert(ours.end(), randomOwnerships.begin(), randomOwnerships.end());
|
||||
ours.insert(ours.end(), additionalRandomOwnerships.begin(), additionalRandomOwnerships.end());
|
||||
}
|
||||
for (Models::Ownership& ownership : ours)
|
||||
{
|
||||
|
|
|
@ -29,24 +29,24 @@ namespace Azure { namespace Messaging { namespace EventHubs { namespace Test {
|
|||
{
|
||||
|
||||
Azure::Core::_internal::ClientOptions options;
|
||||
std::vector<std::unique_ptr<Azure::Core::Http::Policies::HttpPolicy>> perRetrypolicies;
|
||||
std::vector<std::unique_ptr<Azure::Core::Http::Policies::HttpPolicy>> perRetryPolicies;
|
||||
|
||||
{
|
||||
Azure::Core::Credentials::TokenRequestContext tokenContext;
|
||||
tokenContext.Scopes = {"https://management.azure.com/.default"};
|
||||
perRetrypolicies.emplace_back(
|
||||
perRetryPolicies.emplace_back(
|
||||
std::make_unique<Azure::Core::Http::Policies::_internal::BearerTokenAuthenticationPolicy>(
|
||||
credential, tokenContext));
|
||||
}
|
||||
std::vector<std::unique_ptr<Azure::Core::Http::Policies::HttpPolicy>> perCallpolicies;
|
||||
std::vector<std::unique_ptr<Azure::Core::Http::Policies::HttpPolicy>> perCallPolicies;
|
||||
options.Telemetry.ApplicationId = "eventhubs.test";
|
||||
|
||||
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
|
||||
options,
|
||||
"eventhubs.test",
|
||||
"1.0.0",
|
||||
std::move(perRetrypolicies),
|
||||
std::move(perCallpolicies));
|
||||
std::move(perRetryPolicies),
|
||||
std::move(perCallPolicies));
|
||||
}
|
||||
|
||||
EventHubsManagement::EventHubsCreateOrUpdateOperation EventHubsManagement::CreateNamespace(
|
||||
|
|
|
@ -128,9 +128,9 @@ namespace Azure { namespace Messaging { namespace EventHubs { namespace Test {
|
|||
EXPECT_TRUE(ownerships[0].PartitionId == "1" || ownerships[0].PartitionId == "2");
|
||||
EXPECT_TRUE(ownerships[1].PartitionId == "1" || ownerships[1].PartitionId == "2");
|
||||
|
||||
auto finalOwneships = loadBalancer.m_checkpointStore->ListOwnership(
|
||||
auto finalOwnerships = loadBalancer.m_checkpointStore->ListOwnership(
|
||||
testEventHubFQDN, testEventHubName, testConsumerGroup);
|
||||
EXPECT_EQ(finalOwneships.size(), 4ul);
|
||||
EXPECT_EQ(finalOwnerships.size(), 4ul);
|
||||
}
|
||||
|
||||
TEST_F(ProcessorLoadBalancerTest, Balanced_UnownedPartitions)
|
||||
|
@ -183,9 +183,9 @@ namespace Azure { namespace Messaging { namespace EventHubs { namespace Test {
|
|||
auto ownerships = loadBalancer.LoadBalance(std::vector<std::string>{"0", "1", "2", "3"});
|
||||
|
||||
EXPECT_FALSE(ownerships.size() == 0);
|
||||
auto finalOwneships = loadBalancer.m_checkpointStore->ListOwnership(
|
||||
auto finalOwnerships = loadBalancer.m_checkpointStore->ListOwnership(
|
||||
testEventHubFQDN, testEventHubName, testConsumerGroup);
|
||||
auto ownersMap = GroupByOwner(finalOwneships);
|
||||
auto ownersMap = GroupByOwner(finalOwnerships);
|
||||
auto commons = FindCommon(ownersMap);
|
||||
EXPECT_EQ(commons.size(), 0ul);
|
||||
}
|
||||
|
|
|
@ -200,7 +200,7 @@ AccessToken AzureCliCredential::GetToken(
|
|||
// json::exception gets thrown when a string we provided for parsing is not a json object.
|
||||
// It should not get thrown if the string is a valid JSON, but there are specific problems
|
||||
// with the token JSON object - missing property, failure to parse a specific property etc.
|
||||
// I.e. this means that the az commnd has rather printed some error message
|
||||
// I.e. this means that the az command has rather printed some error message
|
||||
// (such as "ERROR: Please run az login to setup account.") instead of producing a JSON
|
||||
// object output. In this case, we want the exception to be thrown with the output from the
|
||||
// command (which is likely the error message) and not with the details of the exception
|
||||
|
|
|
@ -14,7 +14,7 @@ using Azure::Identity::_detail::TenantIdResolver;
|
|||
using Azure::Identity::_detail::TokenCredentialImpl;
|
||||
|
||||
// The authority host used by the credentials is in the following order of precedence:
|
||||
// 1. AuthorityHost option set/overriden by the user.
|
||||
// 1. AuthorityHost option set/overridden by the user.
|
||||
// 2. The value of AZURE_AUTHORITY_HOST environment variable, which is the default value of the
|
||||
// option.
|
||||
// 3. If that environment variable isn't set or is empty, use Azure Public Cloud.
|
||||
|
|
|
@ -27,7 +27,7 @@ DefaultAzureCredential::DefaultAzureCredential(
|
|||
IdentityLog::Write(
|
||||
IdentityLog::Level::Verbose,
|
||||
"Creating " + GetCredentialName()
|
||||
+ " which combines mutiple parameterless credentials into a single one.\n"
|
||||
+ " which combines multiple parameterless credentials into a single one.\n"
|
||||
+ GetCredentialName()
|
||||
+ " is only recommended for the early stages of development, "
|
||||
"and not for usage in production environment."
|
||||
|
|
|
@ -175,7 +175,7 @@ TEST(DefaultAzureCredential, LogMessages)
|
|||
EXPECT_EQ(
|
||||
log[0].second,
|
||||
"Identity: Creating DefaultAzureCredential which combines "
|
||||
"mutiple parameterless credentials into a single one."
|
||||
"multiple parameterless credentials into a single one."
|
||||
"\nDefaultAzureCredential is only recommended for the early stages of development, "
|
||||
"and not for usage in production environment."
|
||||
"\nOnce the developer focuses on the Credentials and Authentication aspects of their "
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Administra
|
|||
|
||||
/**
|
||||
* @brief Only friend classes are permitted to construct a BackupOperation. This is
|
||||
* because a KeyVaultPipelne is required and it is not exposed to customers.
|
||||
* because a KeyVaultPipeline is required and it is not exposed to customers.
|
||||
*
|
||||
* @param backupClient A #BackupClient that is used for getting status updates.
|
||||
* @param status A BackupOperationStatus object.
|
||||
|
@ -59,7 +59,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Administra
|
|||
m_isBackupOperation{isBackupOperation} {};
|
||||
/**
|
||||
* @brief Only friend classes are permitted to construct a BackupOperation. This is
|
||||
* because a KeyVaultPipelne is required and it is not exposed to customers.
|
||||
* because a KeyVaultPipeline is required and it is not exposed to customers.
|
||||
* @param backupClient A BackupClient that is used for getting status updates.
|
||||
* @param continuationToken A string that is used to resume the operation.
|
||||
* @param isBackupOperation A boolean indicating if the operation is a backup operation or a
|
||||
|
|
|
@ -34,23 +34,23 @@ BackupClient::BackupClient(
|
|||
BackupClientOptions options)
|
||||
: m_vaultBaseUrl(vaultUrl), m_apiVersion(options.ApiVersion)
|
||||
{
|
||||
std::vector<std::unique_ptr<HttpPolicy>> perRetrypolicies;
|
||||
std::vector<std::unique_ptr<HttpPolicy>> perRetryPolicies;
|
||||
{
|
||||
Azure::Core::Credentials::TokenRequestContext tokenContext;
|
||||
tokenContext.Scopes = {_internal::UrlScope::GetScopeFromUrl(m_vaultBaseUrl)};
|
||||
|
||||
perRetrypolicies.emplace_back(
|
||||
perRetryPolicies.emplace_back(
|
||||
std::make_unique<_internal::KeyVaultChallengeBasedAuthenticationPolicy>(
|
||||
credential, std::move(tokenContext)));
|
||||
}
|
||||
std::vector<std::unique_ptr<HttpPolicy>> perCallpolicies;
|
||||
std::vector<std::unique_ptr<HttpPolicy>> perCallPolicies;
|
||||
|
||||
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
|
||||
options,
|
||||
_detail::KeyVaultServicePackageName,
|
||||
_detail::PackageVersion::ToString(),
|
||||
std::move(perRetrypolicies),
|
||||
std::move(perCallpolicies));
|
||||
std::move(perRetryPolicies),
|
||||
std::move(perCallPolicies));
|
||||
}
|
||||
|
||||
Azure::Response<BackupOperation> BackupClient::FullBackup(
|
||||
|
|
|
@ -49,23 +49,23 @@ SettingsClient::SettingsClient(
|
|||
{
|
||||
auto apiVersion = options.ApiVersion;
|
||||
|
||||
std::vector<std::unique_ptr<HttpPolicy>> perRetrypolicies;
|
||||
std::vector<std::unique_ptr<HttpPolicy>> perRetryPolicies;
|
||||
{
|
||||
Azure::Core::Credentials::TokenRequestContext tokenContext;
|
||||
tokenContext.Scopes = {_internal::UrlScope::GetScopeFromUrl(m_vaultUrl)};
|
||||
|
||||
perRetrypolicies.emplace_back(
|
||||
perRetryPolicies.emplace_back(
|
||||
std::make_unique<_internal::KeyVaultChallengeBasedAuthenticationPolicy>(
|
||||
credential, std::move(tokenContext)));
|
||||
}
|
||||
std::vector<std::unique_ptr<HttpPolicy>> perCallpolicies;
|
||||
std::vector<std::unique_ptr<HttpPolicy>> perCallPolicies;
|
||||
|
||||
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
|
||||
options,
|
||||
_detail::KeyVaultServicePackageName,
|
||||
_detail::PackageVersion::ToString(),
|
||||
std::move(perRetrypolicies),
|
||||
std::move(perCallpolicies));
|
||||
std::move(perRetryPolicies),
|
||||
std::move(perCallPolicies));
|
||||
}
|
||||
|
||||
Azure::Response<Setting> SettingsClient::UpdateSetting(
|
||||
|
|
|
@ -70,23 +70,23 @@ CertificateClient::CertificateClient(
|
|||
{
|
||||
auto apiVersion = options.ApiVersion;
|
||||
|
||||
std::vector<std::unique_ptr<HttpPolicy>> perRetrypolicies;
|
||||
std::vector<std::unique_ptr<HttpPolicy>> perRetryPolicies;
|
||||
{
|
||||
Azure::Core::Credentials::TokenRequestContext tokenContext;
|
||||
tokenContext.Scopes = {_internal::UrlScope::GetScopeFromUrl(m_vaultUrl)};
|
||||
|
||||
perRetrypolicies.emplace_back(
|
||||
perRetryPolicies.emplace_back(
|
||||
std::make_unique<_internal::KeyVaultChallengeBasedAuthenticationPolicy>(
|
||||
credential, std::move(tokenContext)));
|
||||
}
|
||||
std::vector<std::unique_ptr<HttpPolicy>> perCallpolicies;
|
||||
std::vector<std::unique_ptr<HttpPolicy>> perCallPolicies;
|
||||
|
||||
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
|
||||
options,
|
||||
KeyVaultServicePackageName,
|
||||
PackageVersion::ToString(),
|
||||
std::move(perRetrypolicies),
|
||||
std::move(perCallpolicies));
|
||||
std::move(perRetryPolicies),
|
||||
std::move(perCallPolicies));
|
||||
}
|
||||
|
||||
Response<KeyVaultCertificateWithPolicy> CertificateClient::GetCertificate(
|
||||
|
|
|
@ -138,7 +138,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Certificat
|
|||
CertificateContactsSerializer() = delete;
|
||||
|
||||
public:
|
||||
static std::string Serialize(std::vector<CertificateContact> const& constacts);
|
||||
static std::string Serialize(std::vector<CertificateContact> const& contacts);
|
||||
static CertificateContactsResult Deserialize(
|
||||
Azure::Core::Http::RawResponse const& rawResponse);
|
||||
};
|
||||
|
|
|
@ -860,7 +860,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Keys {
|
|||
|
||||
/*
|
||||
* Only friend classes are permitted to construct a DeleteOperation. This is because a
|
||||
* KeyVaultPipelne is required and it is not exposed to customers.
|
||||
* KeyVaultPipeline is required and it is not exposed to customers.
|
||||
*
|
||||
* Since C++ doesn't offer `internal` access, we use friends-only instead.
|
||||
*/
|
||||
|
@ -951,7 +951,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Keys {
|
|||
|
||||
/*
|
||||
* Only friend classes are permitted to construct a RecoverDeletedKeyOperation. This is
|
||||
* because a KeyVaultPipelne is required and it is not exposed to customers.
|
||||
* because a KeyVaultPipeline is required and it is not exposed to customers.
|
||||
*
|
||||
* Since C++ doesn't offer `internal` access, we use friends-only instead.
|
||||
*/
|
||||
|
|
|
@ -99,23 +99,23 @@ CryptographyClient::CryptographyClient(
|
|||
CryptographyClientOptions const& options)
|
||||
: m_keyId(Azure::Core::Url(keyId)), m_apiVersion(options.Version)
|
||||
{
|
||||
std::vector<std::unique_ptr<HttpPolicy>> perRetrypolicies;
|
||||
std::vector<std::unique_ptr<HttpPolicy>> perRetryPolicies;
|
||||
{
|
||||
Azure::Core::Credentials::TokenRequestContext tokenContext;
|
||||
tokenContext.Scopes = {_internal::UrlScope::GetScopeFromUrl(m_keyId)};
|
||||
|
||||
perRetrypolicies.emplace_back(
|
||||
perRetryPolicies.emplace_back(
|
||||
std::make_unique<_internal::KeyVaultChallengeBasedAuthenticationPolicy>(
|
||||
std::move(credential), tokenContext));
|
||||
}
|
||||
std::vector<std::unique_ptr<HttpPolicy>> perCallpolicies;
|
||||
std::vector<std::unique_ptr<HttpPolicy>> perCallPolicies;
|
||||
|
||||
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
|
||||
options,
|
||||
KeyVaultServicePackageName,
|
||||
PackageVersion::ToString(),
|
||||
std::move(perRetrypolicies),
|
||||
std::move(perCallpolicies));
|
||||
std::move(perRetryPolicies),
|
||||
std::move(perCallPolicies));
|
||||
}
|
||||
|
||||
Azure::Response<EncryptResult> CryptographyClient::Encrypt(
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace Azure {
|
|||
{
|
||||
return std::make_unique<Azure::Core::Cryptography::_internal::Sha512Hash>();
|
||||
}
|
||||
throw std::runtime_error("Unkown Hash algorithm for: " + m_value);
|
||||
throw std::runtime_error("Unknown Hash algorithm for: " + m_value);
|
||||
}
|
||||
|
||||
}}}}} // namespace Azure::Security::KeyVault::Keys::Cryptography
|
||||
|
|
|
@ -49,7 +49,7 @@ Azure::Security::KeyVault::Keys::DeleteKeyOperation::PollInternal(
|
|||
}
|
||||
|
||||
// To ensure the success of calling Poll multiple times, even after operation is completed, a
|
||||
// copy of the raw HTTP response is returned instead of transfering the ownership of the raw
|
||||
// copy of the raw HTTP response is returned instead of transferring the ownership of the raw
|
||||
// response inside the Operation.
|
||||
return rawResponse;
|
||||
}
|
||||
|
|
|
@ -71,23 +71,23 @@ KeyClient::KeyClient(
|
|||
KeyClientOptions const& options)
|
||||
: m_vaultUrl(vaultUrl), m_apiVersion(options.ApiVersion)
|
||||
{
|
||||
std::vector<std::unique_ptr<HttpPolicy>> perRetrypolicies;
|
||||
std::vector<std::unique_ptr<HttpPolicy>> perRetryPolicies;
|
||||
{
|
||||
Azure::Core::Credentials::TokenRequestContext tokenContext;
|
||||
tokenContext.Scopes = {_internal::UrlScope::GetScopeFromUrl(m_vaultUrl)};
|
||||
|
||||
perRetrypolicies.emplace_back(
|
||||
perRetryPolicies.emplace_back(
|
||||
std::make_unique<_internal::KeyVaultChallengeBasedAuthenticationPolicy>(
|
||||
std::move(credential), std::move(tokenContext)));
|
||||
}
|
||||
std::vector<std::unique_ptr<HttpPolicy>> perCallpolicies;
|
||||
std::vector<std::unique_ptr<HttpPolicy>> perCallPolicies;
|
||||
|
||||
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
|
||||
options,
|
||||
KeyVaultServicePackageName,
|
||||
PackageVersion::ToString(),
|
||||
std::move(perRetrypolicies),
|
||||
std::move(perCallpolicies));
|
||||
std::move(perRetryPolicies),
|
||||
std::move(perCallPolicies));
|
||||
}
|
||||
|
||||
Azure::Response<KeyVaultKey> KeyClient::GetKey(
|
||||
|
|
|
@ -46,7 +46,7 @@ Azure::Security::KeyVault::Keys::RecoverDeletedKeyOperation::PollInternal(
|
|||
}
|
||||
|
||||
// To ensure the success of calling Poll multiple times, even after operation is completed, a
|
||||
// copy of the raw HTTP response is returned instead of transfering the ownership of the raw
|
||||
// copy of the raw HTTP response is returned instead of transferring the ownership of the raw
|
||||
// response inside the Operation.
|
||||
return rawResponse;
|
||||
}
|
||||
|
|
|
@ -108,14 +108,14 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Keys { nam
|
|||
KeyClientOptions const& options = KeyClientOptions())
|
||||
: KeyClient(vaultUrl, nullptr, options)
|
||||
{
|
||||
std::vector<std::unique_ptr<Azure::Core::Http::Policies::HttpPolicy>> perCallpolicies;
|
||||
std::vector<std::unique_ptr<Azure::Core::Http::Policies::HttpPolicy>> perRetrypolicies;
|
||||
std::vector<std::unique_ptr<Azure::Core::Http::Policies::HttpPolicy>> perCallPolicies;
|
||||
std::vector<std::unique_ptr<Azure::Core::Http::Policies::HttpPolicy>> perRetryPolicies;
|
||||
m_pipeline = std::make_unique<Azure::Core::Http::_internal::HttpPipeline>(
|
||||
options,
|
||||
"keyvault-keys",
|
||||
Azure::Security::KeyVault::Keys::_detail::PackageVersion::ToString(),
|
||||
std::move(perRetrypolicies),
|
||||
std::move(perCallpolicies));
|
||||
std::move(perRetryPolicies),
|
||||
std::move(perCallPolicies));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Secrets {
|
|||
|
||||
/*
|
||||
* Only friend classes are permitted to construct an Operation. This is because a
|
||||
* KeyVaultPipelne is required and it is not exposed to customers.
|
||||
* KeyVaultPipeline is required and it is not exposed to customers.
|
||||
*
|
||||
* Since C++ doesn't offer `internal` access, we use friends-only instead.
|
||||
*/
|
||||
|
@ -105,7 +105,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Secrets {
|
|||
|
||||
/*
|
||||
* Only friend classes are permitted to call the constructor . This is because a
|
||||
* KeyVaultPipelne is required and it is not exposed to customers.
|
||||
* KeyVaultPipeline is required and it is not exposed to customers.
|
||||
*
|
||||
* Since C++ doesn't offer `internal` access, we use friends-only instead.
|
||||
*/
|
||||
|
|
|
@ -68,24 +68,24 @@ SecretClient::SecretClient(
|
|||
auto apiVersion = options.ApiVersion;
|
||||
Azure::Core::Url url(vaultUrl);
|
||||
|
||||
std::vector<std::unique_ptr<HttpPolicy>> perRetrypolicies;
|
||||
std::vector<std::unique_ptr<HttpPolicy>> perRetryPolicies;
|
||||
{
|
||||
Azure::Core::Credentials::TokenRequestContext tokenContext;
|
||||
tokenContext.Scopes = {_internal::UrlScope::GetScopeFromUrl(url)};
|
||||
|
||||
perRetrypolicies.emplace_back(
|
||||
perRetryPolicies.emplace_back(
|
||||
std::make_unique<_internal::KeyVaultChallengeBasedAuthenticationPolicy>(
|
||||
credential, tokenContext));
|
||||
}
|
||||
|
||||
std::vector<std::unique_ptr<HttpPolicy>> perCallpolicies;
|
||||
std::vector<std::unique_ptr<HttpPolicy>> perCallPolicies;
|
||||
|
||||
m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
|
||||
options,
|
||||
KeyVaultServicePackageName,
|
||||
PackageVersion::ToString(),
|
||||
std::move(perRetrypolicies),
|
||||
std::move(perCallpolicies));
|
||||
std::move(perRetryPolicies),
|
||||
std::move(perCallPolicies));
|
||||
}
|
||||
|
||||
Azure::Response<KeyVaultSecret> SecretClient::GetSecret(
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace Azure { namespace Data { namespace Tables { namespace _detail {
|
|||
// various strings used in the library
|
||||
constexpr static const char* OriginHeader = "Origin";
|
||||
constexpr static const char* AccessControlRequestMethodHeader = "Access-Control-Request-Method";
|
||||
constexpr static const char* ResrouceTypeService = "service";
|
||||
constexpr static const char* ResourceTypeService = "service";
|
||||
constexpr static const char* ComponentProperties = "properties";
|
||||
constexpr static const char* ContentTypeXml = "application/xml";
|
||||
constexpr static const char* ContentTypeJson = "application/json";
|
||||
|
|
|
@ -119,7 +119,7 @@ Azure::Response<Models::SetServicePropertiesResult> TableServiceClient::SetServi
|
|||
std::string xmlBody = Serializers::SetServiceProperties(options);
|
||||
auto url = m_url;
|
||||
|
||||
url.AppendQueryParameter(ResourceTypeHeader, ResrouceTypeService);
|
||||
url.AppendQueryParameter(ResourceTypeHeader, ResourceTypeService);
|
||||
url.AppendQueryParameter(CompHeader, ComponentProperties);
|
||||
Core::IO::MemoryBodyStream requestBody(
|
||||
reinterpret_cast<std::uint8_t const*>(xmlBody.data()), xmlBody.length());
|
||||
|
@ -146,7 +146,7 @@ Azure::Response<Models::TableServiceProperties> TableServiceClient::GetServicePr
|
|||
Core::Context const& context)
|
||||
{
|
||||
auto url = m_url;
|
||||
url.AppendQueryParameter(ResourceTypeHeader, ResrouceTypeService);
|
||||
url.AppendQueryParameter(ResourceTypeHeader, ResourceTypeService);
|
||||
url.AppendQueryParameter(CompHeader, ComponentProperties);
|
||||
|
||||
Core::Http::Request request(Core::Http::HttpMethod::Get, url);
|
||||
|
@ -173,7 +173,7 @@ Azure::Response<Models::ServiceStatistics> TableServiceClient::GetStatistics(
|
|||
std::string accountName = host.substr(0, host.find('.'));
|
||||
accountName += "-secondary";
|
||||
url.SetHost(accountName + "." + host.substr(host.find('.') + 1));
|
||||
url.AppendQueryParameter(ResourceTypeHeader, ResrouceTypeService);
|
||||
url.AppendQueryParameter(ResourceTypeHeader, ResourceTypeService);
|
||||
url.AppendQueryParameter(CompHeader, "stats");
|
||||
Core::Http::Request request(Core::Http::HttpMethod::Get, url);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче