Skip to content

GetDeletedCertificates should accept an optional includePending bool, to match the KeyVault certificate service spec #6236

Open
@ahsonkhan

Description

@ahsonkhan

The current API doesn't allow the customer to set the optional includePending:

/**
* @brief Lists the deleted certificates in the specified vault currently available for
* recovery.
*
* @details The GetDeletedCertificates operation retrieves the certificates in the current vault
* which are in a deleted state and ready for recovery or purging. This operation includes
* deletion-specific information. This operation requires the certificates/get/list permission.
*
* @remark This operation can only be enabled on soft-delete enabled vaults.
*
* @param options The options for the request.
* @param context The context for the operation can be used for request cancellation.
* @return A response message containing a list of deleted certificates in the vault along with
* a link to the next page of deleted certificates.
*/
DeletedCertificatesPagedResponse GetDeletedCertificates(
GetDeletedCertificatesOptions const& options = GetDeletedCertificatesOptions(),
Azure::Core::Context const& context = Azure::Core::Context()) const;

/**
* @brief The options for calling an operation
* #Azure::Security::KeyVault::Certificates::CertificateClient::GetDeletedCertificates.
*
*/
struct GetDeletedCertificatesOptions final
{
/** @brief The token for the next page, if present. */
Azure::Nullable<std::string> NextPageToken;
};

The service spec specifies the optional parameter:
https://github.com/Azure/azure-rest-api-specs/blob/297c3a012316e290e6a6ab737ec8944611554542/specification/keyvault/data-plane/Microsoft.KeyVault/stable/7.5/certificates.json#L1092-L1098

REST API doc:
https://learn.microsoft.com/en-us/rest/api/keyvault/certificates/get-deleted-certificates/get-deleted-certificates?view=rest-keyvault-certificates-7.4&tabs=HTTP#uri-parameters

All other language SDKs let the user set this via an optional/defaulted parameter.

For example:
https://github.com/Azure/azure-sdk-for-go/blob/3199096307ce6269cd16df5f92251d5868378e7a/sdk/security/keyvault/azcertificates/options.go#L89-L94
https://github.com/Azure/azure-sdk-for-go/blob/3199096307ce6269cd16df5f92251d5868378e7a/sdk/security/keyvault/azcertificates/client.go#L860

https://github.com/Azure/azure-sdk-for-net/blob/22d05dc3b735d7b31ee827440df0aacc6c26cfb8/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/CertificateClient.cs#L1005

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Untriaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions