Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Consistency] BackupClient should not accept Azure::Core::Url as input param, but rather std::string. #5952

Open
ahsonkhan opened this issue Aug 29, 2024 · 0 comments
Assignees
Labels

Comments

@ahsonkhan
Copy link
Member

We recently introduced BackupClient in azure-security-keyvault-administration: #5744

It should accept input urls as std::string, instead of Azure::Core::Url following the consistent pattern from the rest of the SDK clients. When the user needs to pass a blobContainerUrl parameter, they would get it from the GetUrl() method, which returns the std::string:

std::string GetUrl() const { return m_blobContainerUrl.GetAbsoluteUrl(); }

Calling out some examples, but we should evaluate all cases:

Response<BackupOperation> FullBackup(
Azure::Core::Url const& blobContainerUrl,
Models::SasTokenParameter const& sasToken,
Core::Context const& context = {});

Response<BackupOperation> FullRestore(
Azure::Core::Url const& blobContainerUrl,
std::string folderToRestore,
Models::SasTokenParameter const& sasToken,
Core::Context const& context = {});

Note, the BackupClient ctor is following the pattern from across KeyVault, as expected, for the vaultUrl:

explicit BackupClient(
std::string const& vaultUrl,
std::shared_ptr<Core::Credentials::TokenCredential const> credential,
BackupClientOptions options = BackupClientOptions());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Untriaged
Development

No branches or pull requests

2 participants