Skip to content

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

@ahsonkhan

Description

@ahsonkhan

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());

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    Not Started

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions