Certificate Contacts API (#2912)

* Certificate Contacts API

* PR issues

* spell

* revert cspell , set disables in code

* set disables in code

* PR comments

* PR comments

* pr issue

* pr comments

* oops

* missed replace
This commit is contained in:
George Arama 2021-10-06 12:12:18 -07:00 committed by GitHub
parent 5aa13f541d
commit e5a01a29bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 647 additions and 8 deletions

View File

@ -66,7 +66,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Certificat
explicit CertificateClient(CertificateClient const& keyClient) = default;
/**
* @brief Returns the latest version of the KeyVaultCertificate along with its
* @brief Return the latest version of the KeyVaultCertificate along with its
* CertificatePolicy.
*
* @remark This operation requires the certificates/get permission.
@ -81,7 +81,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Certificat
Azure::Core::Context const& context = Azure::Core::Context()) const;
/**
* @brief Returns a specific version of the certificate without its CertificatePolicy.
* @brief Return a specific version of the certificate without its CertificatePolicy.
*
* @details If the version is not set in the options, the latest version is returned.
*
@ -99,7 +99,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Certificat
Azure::Core::Context const& context = Azure::Core::Context()) const;
/**
* @brief Creates a new certificate.
* @brief Create a new certificate.
*
* @details If this is the first version, the certificate resource is created.
*
@ -116,7 +116,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Certificat
Azure::Core::Context const& context = Azure::Core::Context()) const;
/**
* @brief Creates a new certificate issuer.
* @brief Create a new certificate issuer.
*
* @details The operation adds or updates the specified certificate issuer.
*
@ -131,7 +131,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Certificat
Azure::Core::Context const& context = Azure::Core::Context()) const;
/**
* @brief Lists the specified certificate issuer.
* @brief List the specified certificate issuer.
*
* @details The GetCertificateIssuer operation returns the specified
* certificate issuer resources in the specified key vault.
@ -147,7 +147,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Certificat
Azure::Core::Context const& context = Azure::Core::Context()) const;
/**
* @brief Updates the specified certificate issuer.
* @brief Update the specified certificate issuer.
*
* @details The operation performs an update on the specified certificate issuer entity.
*
@ -162,7 +162,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Certificat
Azure::Core::Context const& context = Azure::Core::Context()) const;
/**
* @brief Deletes the specified certificate issuer.
* @brief Delete the specified certificate issuer.
*
* @details The operation permanently removes the specified certificate issuer from the vault.
*
@ -176,6 +176,48 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Certificat
std::string const& name,
Azure::Core::Context const& context = Azure::Core::Context()) const;
/**
* @brief List the certificate contacts for a specified key vault.
*
* @details The GetContacts operation returns the set of certificate contact
* resources in the specified key vault.
*
* @remark This operation requires the certificates/managecontacts permission.
*
* @param context The context for the operation can be used for request cancellation.
* @return The contacts list for the key vault certificate.
*/
Azure::Response<std::vector<CertificateContact>> GetContacts(
Azure::Core::Context const& context = Azure::Core::Context()) const;
/**
* @brief Delete the certificate contacts for a specified key vault.
*
* @details Deletes the certificate contacts for a specified key vault certificate.
*
* @remark This operation requires the certificates/managecontacts permission.
*
* @param context The context for the operation can be used for request cancellation.
* @return The contacts for the key vault certificate.
*/
Azure::Response<std::vector<CertificateContact>> DeleteContacts(
Azure::Core::Context const& context = Azure::Core::Context()) const;
/**
* @brief Set certificate contacts.
*
* @details Set the certificate contacts for the specified key vault.
*
* @remark This operation requires the certificates/managecontacts permission.
*
* @param contacts The contacts for the key vault certificate.
* @param context The context for the operation can be used for request cancellation.
* @return The contacts for the key vault certificate.
*/
Azure::Response<std::vector<CertificateContact>> SetContacts(
std::vector<CertificateContact> const& contacts,
Azure::Core::Context const& context = Azure::Core::Context()) const;
private:
std::unique_ptr<Azure::Core::Http::RawResponse> SendRequest(
Azure::Core::Http::Request& request,

View File

@ -970,4 +970,28 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Certificat
IssuerProperties Properties;
};
/**
* @brief The contact information for the vault certificates.
*
*/
struct CertificateContact
{
/**
* @brief Contact e-mail address.
*
*/
std::string EmailAddress;
/**
* @brief Contact name.
*
*/
Azure::Nullable<std::string> Name;
/**
* @brief Contact phone number.
*
*/
Azure::Nullable<std::string> Phone;
};
}}}} // namespace Azure::Security::KeyVault::Certificates

View File

@ -2,6 +2,7 @@
// SPDX-License-Identifier: MIT
#include "azure/keyvault/certificates/certificate_client.hpp"
#include "private/certificate_constants.hpp"
#include "private/certificate_serializers.hpp"
#include "private/keyvault_certificates_common_request.hpp"
@ -27,7 +28,6 @@ using namespace Azure::Core::Http::_internal;
using namespace Azure::Security::KeyVault::_detail;
namespace {
// This is a Key-Vault only patch to calculate token scope/audience
std::string GetScopeFromUrl(Azure::Core::Url const& url)
{
@ -201,4 +201,41 @@ Azure::Response<CertificateIssuer> CertificateClient::UpdateIssuer(
return Azure::Response<CertificateIssuer>(std::move(value), std::move(rawResponse));
}
Response<std::vector<CertificateContact>> CertificateClient::GetContacts(
Azure::Core::Context const& context) const
{
auto request = CreateRequest(HttpMethod::Get, {CertificatesPath, ContactsPath});
// Send and parse respone
auto rawResponse = SendRequest(request, context);
auto value = CertificateContactsSerializer::Deserialize(*rawResponse);
return Azure::Response<std::vector<CertificateContact>>(std::move(value), std::move(rawResponse));
}
Response<std::vector<CertificateContact>> CertificateClient::DeleteContacts(
Azure::Core::Context const& context) const
{
auto request = CreateRequest(HttpMethod::Delete, {CertificatesPath, ContactsPath});
// Send and parse respone
auto rawResponse = SendRequest(request, context);
auto value = CertificateContactsSerializer::Deserialize(*rawResponse);
return Azure::Response<std::vector<CertificateContact>>(std::move(value), std::move(rawResponse));
}
Response<std::vector<CertificateContact>> CertificateClient::SetContacts(
std::vector<CertificateContact> const& contacts,
Azure::Core::Context const& context) const
{
auto payload = CertificateContactsSerializer::Serialize(contacts);
Azure::Core::IO::MemoryBodyStream payloadStream(
reinterpret_cast<const uint8_t*>(payload.data()), payload.size());
auto request = CreateRequest(HttpMethod::Put, {CertificatesPath, ContactsPath}, &payloadStream);
auto rawResponse = SendRequest(request, context);
auto value = CertificateContactsSerializer::Deserialize(*rawResponse);
return Azure::Response<std::vector<CertificateContact>>(std::move(value), std::move(rawResponse));
}
const ServiceVersion ServiceVersion::V7_2("7.2");

View File

@ -489,3 +489,47 @@ std::string CertificateIssuerSerializer::Serialize(CertificateIssuer const& issu
return jsonResponse.dump();
}
std::string CertificateContactsSerializer::Serialize(
std::vector<CertificateContact> const& contacts)
{
json payload;
for (auto contact : contacts)
{
json contactJson;
contactJson[EmailPropertyName] = contact.EmailAddress;
JsonOptional::SetFromNullable(contact.Name, contactJson, NamePropertyName);
JsonOptional::SetFromNullable(contact.Phone, contactJson, PhonePropertyName);
payload[ContactsPropertyName].emplace_back(contactJson);
}
return payload.dump();
}
std::vector<CertificateContact> CertificateContactsSerializer::Deserialize(
Azure::Core::Http::RawResponse const& rawResponse)
{
std::vector<CertificateContact> response;
auto const& body = rawResponse.GetBody();
auto jsonResponse = json::parse(body);
if (jsonResponse.contains(ContactsPropertyName))
{
for (auto contactJson : jsonResponse[ContactsPropertyName])
{
CertificateContact contact;
contact.EmailAddress = contactJson[EmailPropertyName];
JsonOptional::SetIfExists(contact.Name, contactJson, NamePropertyName);
JsonOptional::SetIfExists(contact.Phone, contactJson, PhonePropertyName);
response.emplace_back(contact);
}
}
return response;
}

View File

@ -17,6 +17,8 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Certificat
constexpr static const char CertificatesPath[] = "certificates";
constexpr static const char CertificatesCreatePath[] = "create";
constexpr static const char IssuersPath[] = "issuers";
constexpr static const char ContactsPath[] = "contacts";
constexpr static const char ContactsPropertyName[] = "contacts";
/***************** Certificates Properties *****************/
constexpr static const char IdName[] = "id";
@ -107,4 +109,8 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Certificat
constexpr static const char EmailPropertyValue[] = "email";
constexpr static const char PhonePropertyValue[] = "phone";
/***************** Certificates Contact *****************/
constexpr static const char EmailPropertyName[] = "email";
constexpr static const char NamePropertyName[] = "name";
constexpr static const char PhonePropertyName[] = "phone";
}}}}} // namespace Azure::Security::KeyVault::Certificates::_detail

View File

@ -109,4 +109,13 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Certificat
static std::string Serialize(CertificateIssuer const& issuer);
};
class CertificateContactsSerializer final {
CertificateContactsSerializer() = delete;
public:
static std::string Serialize(std::vector<CertificateContact> const& constacts);
static std::vector<CertificateContact> Deserialize(
Azure::Core::Http::RawResponse const& rawResponse);
};
}}}}} // namespace Azure::Security::KeyVault::Certificates::_detail

View File

@ -179,6 +179,43 @@ namespace Azure {
EXPECT_EQ(adminLocal.LastName.Value(), adminRemote.LastName.Value());
EXPECT_EQ(adminLocal.PhoneNumber.Value(), adminRemote.PhoneNumber.Value());
}
static inline void CheckContactsCollections(
std::vector<CertificateContact> contacts,
std::vector<CertificateContact> results)
{
EXPECT_EQ(results.size(), contacts.size());
for (auto c2 : results)
{
bool found = false;
for (auto c1 : contacts)
{
if (c1.EmailAddress == c2.EmailAddress && c1.Name.HasValue() == c2.Name.HasValue()
&& c1.Phone.HasValue() == c2.Phone.HasValue())
{
found = true;
break;
}
}
EXPECT_TRUE(found);
}
for (auto c1 : contacts)
{
bool found = false;
for (auto c2 : results)
{
if (c1.EmailAddress == c2.EmailAddress && c1.Name.HasValue() == c2.Name.HasValue()
&& c1.Phone.HasValue() == c2.Phone.HasValue())
{
found = true;
break;
}
}
EXPECT_TRUE(found);
}
}
};
}}}}} // namespace Azure::Security::KeyVault::Certificates::Test

View File

@ -266,3 +266,130 @@ TEST_F(KeyVaultCertificateClientTest, UpdateIssuer)
CheckIssuers(result.Value, issuer);
}
}
TEST_F(KeyVaultCertificateClientTest, SetContacts)
{
auto const& client
= GetClientForTest(::testing::UnitTest::GetInstance()->current_test_info()->name());
std::vector<CertificateContact> contacts;
CertificateContact ctt;
ctt.EmailAddress = "one@two.org";
ctt.Name = "giqu"; // cspell:disable-line
ctt.Phone = "1234567890";
contacts.emplace_back(ctt);
CertificateContact ctt2;
ctt2.EmailAddress = "two@three.org";
ctt2.Name = "giqu2"; // cspell:disable-line
ctt2.Phone = "1234567891";
contacts.emplace_back(ctt2);
auto response = client.SetContacts(contacts);
CheckContactsCollections(contacts, response.Value);
auto response2 = client.DeleteContacts();
CheckContactsCollections(contacts, response2.Value);
}
TEST_F(KeyVaultCertificateClientTest, GetContacts)
{
auto const& client
= GetClientForTest(::testing::UnitTest::GetInstance()->current_test_info()->name());
std::vector<CertificateContact> contacts;
CertificateContact ctt;
ctt.EmailAddress = "one@two.org";
ctt.Name = "giqu"; // cspell:disable-line
ctt.Phone = "1234567890";
contacts.emplace_back(ctt);
CertificateContact ctt2;
ctt2.EmailAddress = "two@three.org";
ctt2.Name = "giqu2"; // cspell:disable-line
ctt2.Phone = "1234567891";
contacts.emplace_back(ctt2);
client.SetContacts(contacts);
auto response = client.GetContacts();
CheckContactsCollections(contacts, response.Value);
auto response2 = client.DeleteContacts();
CheckContactsCollections(contacts, response2.Value);
}
TEST_F(KeyVaultCertificateClientTest, GetContactsPartial)
{
auto const& client
= GetClientForTest(::testing::UnitTest::GetInstance()->current_test_info()->name());
std::vector<CertificateContact> contacts;
CertificateContact ctt;
ctt.EmailAddress = "one1@two.org";
contacts.emplace_back(ctt);
CertificateContact ctt2, ctt3;
ctt2.EmailAddress = "two2@three.org";
ctt2.Name = "giqu2"; // cspell:disable-line
contacts.emplace_back(ctt2);
ctt3.EmailAddress = "two3@three.org";
ctt3.Phone = "1234567891";
contacts.emplace_back(ctt3);
client.SetContacts(contacts);
auto response = client.GetContacts();
CheckContactsCollections(contacts, response.Value);
auto response2 = client.DeleteContacts();
CheckContactsCollections(contacts, response2.Value);
}
TEST_F(KeyVaultCertificateClientTest, GetContactsDuplicateEmail)
{
auto const& client
= GetClientForTest(::testing::UnitTest::GetInstance()->current_test_info()->name());
std::vector<CertificateContact> contacts;
CertificateContact ctt;
ctt.EmailAddress = "one1@two.org";
contacts.emplace_back(ctt);
CertificateContact ctt2, ctt3;
ctt2.EmailAddress = "two@three.org";
ctt2.Name = "giqu2"; // cspell:disable-line
contacts.emplace_back(ctt2);
ctt3.EmailAddress = "two@three.org";
ctt3.Phone = "1234567891";
contacts.emplace_back(ctt3);
client.SetContacts(contacts);
auto response = client.GetContacts();
CheckContactsCollections(contacts, response.Value);
auto response2 = client.DeleteContacts();
CheckContactsCollections(contacts, response2.Value);
}

View File

@ -0,0 +1,85 @@
{
"networkCallRecords": [
{
"Headers": {
"content-type": "application/json",
"user-agent": "azsdk-cpp-keyvault-certificates/4.0.0-beta.1 (Windows 10 Enterprise 6.3 19043 19041.1.amd64fre.vb_release.191206-1406)",
"x-ms-client-request-id": "cb835e83-7191-495b-63ef-d07366443a0c"
},
"Method": "PUT",
"Response": {
"BODY": "{\"id\":\"https://REDACTED.vault.azure.net/certificates/contacts\",\"contacts\":[{\"email\":\"one@two.org\",\"name\":\"giqu\",\"phone\":\"1234567890\"},{\"email\":\"two@three.org\",\"name\":\"giqu2\",\"phone\":\"1234567891\"}]}",
"STATUS_CODE": "200",
"cache-control": "no-cache",
"content-length": "202",
"content-type": "application/json; charset=utf-8",
"date": "Sun, 19 Sep 2021 19:21:46 GMT",
"expires": "-1",
"pragma": "no-cache",
"strict-transport-security": "max-age=31536000;includeSubDomains",
"x-content-type-options": "nosniff",
"x-ms-client-request-id": "cb835e83-7191-495b-63ef-d07366443a0c",
"x-ms-keyvault-network-info": "conn_type=Ipv4;addr=24.22.157.72;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region": "westus2",
"x-ms-keyvault-service-version": "1.9.79.2",
"x-ms-request-id": "f0d670d2-8cc8-49dc-8317-ba7021419d55",
"x-powered-by": "ASP.NET"
},
"Url": "https://REDACTED.vault.azure.net/certificates/contacts?api-version=7.2"
},
{
"Headers": {
"content-type": "application/json",
"user-agent": "azsdk-cpp-keyvault-certificates/4.0.0-beta.1 (Windows 10 Enterprise 6.3 19043 19041.1.amd64fre.vb_release.191206-1406)",
"x-ms-client-request-id": "f29dad38-641c-4c0e-49f3-6850a18624e3"
},
"Method": "GET",
"Response": {
"BODY": "{\"id\":\"https://REDACTED.vault.azure.net/certificates/contacts\",\"contacts\":[{\"email\":\"one@two.org\",\"name\":\"giqu\",\"phone\":\"1234567890\"},{\"email\":\"two@three.org\",\"name\":\"giqu2\",\"phone\":\"1234567891\"}]}",
"STATUS_CODE": "200",
"cache-control": "no-cache",
"content-length": "202",
"content-type": "application/json; charset=utf-8",
"date": "Sun, 19 Sep 2021 19:21:46 GMT",
"expires": "-1",
"pragma": "no-cache",
"strict-transport-security": "max-age=31536000;includeSubDomains",
"x-content-type-options": "nosniff",
"x-ms-client-request-id": "f29dad38-641c-4c0e-49f3-6850a18624e3",
"x-ms-keyvault-network-info": "conn_type=Ipv4;addr=24.22.157.72;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region": "westus2",
"x-ms-keyvault-service-version": "1.9.79.2",
"x-ms-request-id": "255653c0-ad75-4a67-8b86-f3a2dd609ce2",
"x-powered-by": "ASP.NET"
},
"Url": "https://REDACTED.vault.azure.net/certificates/contacts?api-version=7.2"
},
{
"Headers": {
"content-type": "application/json",
"user-agent": "azsdk-cpp-keyvault-certificates/4.0.0-beta.1 (Windows 10 Enterprise 6.3 19043 19041.1.amd64fre.vb_release.191206-1406)",
"x-ms-client-request-id": "8e1cb98e-014c-4146-42fa-230813e03d17"
},
"Method": "DELETE",
"Response": {
"BODY": "{\"id\":\"https://REDACTED.vault.azure.net/certificates/contacts\",\"contacts\":[{\"email\":\"one@two.org\",\"name\":\"giqu\",\"phone\":\"1234567890\"},{\"email\":\"two@three.org\",\"name\":\"giqu2\",\"phone\":\"1234567891\"}]}",
"STATUS_CODE": "200",
"cache-control": "no-cache",
"content-length": "202",
"content-type": "application/json; charset=utf-8",
"date": "Sun, 19 Sep 2021 19:21:46 GMT",
"expires": "-1",
"pragma": "no-cache",
"strict-transport-security": "max-age=31536000;includeSubDomains",
"x-content-type-options": "nosniff",
"x-ms-client-request-id": "8e1cb98e-014c-4146-42fa-230813e03d17",
"x-ms-keyvault-network-info": "conn_type=Ipv4;addr=24.22.157.72;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region": "westus2",
"x-ms-keyvault-service-version": "1.9.79.2",
"x-ms-request-id": "bbd2d766-037f-4cf4-a65e-db0b62bf9425",
"x-powered-by": "ASP.NET"
},
"Url": "https://REDACTED.vault.azure.net/certificates/contacts?api-version=7.2"
}
]
}

View File

@ -0,0 +1,85 @@
{
"networkCallRecords": [
{
"Headers": {
"content-type": "application/json",
"user-agent": "azsdk-cpp-keyvault-certificates/4.0.0-beta.1 (Windows 10 Enterprise 6.3 19043 19041.1.amd64fre.vb_release.191206-1406)",
"x-ms-client-request-id": "3d785e99-3d70-4951-52e5-70c235ac8471"
},
"Method": "PUT",
"Response": {
"BODY": "{\"id\":\"https://REDACTED.vault.azure.net/certificates/contacts\",\"contacts\":[{\"email\":\"one1@two.org\"},{\"email\":\"two@three.org\",\"name\":\"giqu2\"},{\"email\":\"two@three.org\",\"phone\":\"1234567891\"}]}",
"STATUS_CODE": "200",
"cache-control": "no-cache",
"content-length": "194",
"content-type": "application/json; charset=utf-8",
"date": "Wed, 06 Oct 2021 00:52:57 GMT",
"expires": "-1",
"pragma": "no-cache",
"strict-transport-security": "max-age=31536000;includeSubDomains",
"x-content-type-options": "nosniff",
"x-ms-client-request-id": "3d785e99-3d70-4951-52e5-70c235ac8471",
"x-ms-keyvault-network-info": "conn_type=Ipv4;addr=24.22.157.72;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region": "westus2",
"x-ms-keyvault-service-version": "1.9.132.3",
"x-ms-request-id": "1862182f-39d1-404a-ba52-7a5279ef4fc0",
"x-powered-by": "ASP.NET"
},
"Url": "https://REDACTED.vault.azure.net/certificates/contacts?api-version=7.2"
},
{
"Headers": {
"content-type": "application/json",
"user-agent": "azsdk-cpp-keyvault-certificates/4.0.0-beta.1 (Windows 10 Enterprise 6.3 19043 19041.1.amd64fre.vb_release.191206-1406)",
"x-ms-client-request-id": "1f3daa27-8294-4f95-53e4-b2690c5eb0db"
},
"Method": "GET",
"Response": {
"BODY": "{\"id\":\"https://REDACTED.vault.azure.net/certificates/contacts\",\"contacts\":[{\"email\":\"one1@two.org\"},{\"email\":\"two@three.org\",\"name\":\"giqu2\"},{\"email\":\"two@three.org\",\"phone\":\"1234567891\"}]}",
"STATUS_CODE": "200",
"cache-control": "no-cache",
"content-length": "194",
"content-type": "application/json; charset=utf-8",
"date": "Wed, 06 Oct 2021 00:52:57 GMT",
"expires": "-1",
"pragma": "no-cache",
"strict-transport-security": "max-age=31536000;includeSubDomains",
"x-content-type-options": "nosniff",
"x-ms-client-request-id": "1f3daa27-8294-4f95-53e4-b2690c5eb0db",
"x-ms-keyvault-network-info": "conn_type=Ipv4;addr=24.22.157.72;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region": "westus2",
"x-ms-keyvault-service-version": "1.9.132.3",
"x-ms-request-id": "58ddf982-40e9-45a4-bce4-49b5a35a008e",
"x-powered-by": "ASP.NET"
},
"Url": "https://REDACTED.vault.azure.net/certificates/contacts?api-version=7.2"
},
{
"Headers": {
"content-type": "application/json",
"user-agent": "azsdk-cpp-keyvault-certificates/4.0.0-beta.1 (Windows 10 Enterprise 6.3 19043 19041.1.amd64fre.vb_release.191206-1406)",
"x-ms-client-request-id": "37e206db-2ad6-4dc4-4f79-8aa54f786652"
},
"Method": "DELETE",
"Response": {
"BODY": "{\"id\":\"https://REDACTED.vault.azure.net/certificates/contacts\",\"contacts\":[{\"email\":\"one1@two.org\"},{\"email\":\"two@three.org\",\"name\":\"giqu2\"},{\"email\":\"two@three.org\",\"phone\":\"1234567891\"}]}",
"STATUS_CODE": "200",
"cache-control": "no-cache",
"content-length": "194",
"content-type": "application/json; charset=utf-8",
"date": "Wed, 06 Oct 2021 00:52:57 GMT",
"expires": "-1",
"pragma": "no-cache",
"strict-transport-security": "max-age=31536000;includeSubDomains",
"x-content-type-options": "nosniff",
"x-ms-client-request-id": "37e206db-2ad6-4dc4-4f79-8aa54f786652",
"x-ms-keyvault-network-info": "conn_type=Ipv4;addr=24.22.157.72;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region": "westus2",
"x-ms-keyvault-service-version": "1.9.132.3",
"x-ms-request-id": "c5cbe37f-c5dd-4be4-a475-e683f9fe25f9",
"x-powered-by": "ASP.NET"
},
"Url": "https://REDACTED.vault.azure.net/certificates/contacts?api-version=7.2"
}
]
}

View File

@ -0,0 +1,85 @@
{
"networkCallRecords": [
{
"Headers": {
"content-type": "application/json",
"user-agent": "azsdk-cpp-keyvault-certificates/4.0.0-beta.1 (Windows 10 Enterprise 6.3 19043 19041.1.amd64fre.vb_release.191206-1406)",
"x-ms-client-request-id": "80531cf7-0d91-4f2c-6d1d-b4bbdea36a30"
},
"Method": "PUT",
"Response": {
"BODY": "{\"id\":\"https://REDACTED.vault.azure.net/certificates/contacts\",\"contacts\":[{\"email\":\"one1@two.org\"},{\"email\":\"two2@three.org\",\"name\":\"giqu2\"},{\"email\":\"two3@three.org\",\"phone\":\"1234567891\"}]}",
"STATUS_CODE": "200",
"cache-control": "no-cache",
"content-length": "196",
"content-type": "application/json; charset=utf-8",
"date": "Tue, 05 Oct 2021 19:42:09 GMT",
"expires": "-1",
"pragma": "no-cache",
"strict-transport-security": "max-age=31536000;includeSubDomains",
"x-content-type-options": "nosniff",
"x-ms-client-request-id": "80531cf7-0d91-4f2c-6d1d-b4bbdea36a30",
"x-ms-keyvault-network-info": "conn_type=Ipv4;addr=24.22.157.72;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region": "westus2",
"x-ms-keyvault-service-version": "1.9.132.3",
"x-ms-request-id": "9331f3c8-71d1-4c16-8085-fef5a916d669",
"x-powered-by": "ASP.NET"
},
"Url": "https://REDACTED.vault.azure.net/certificates/contacts?api-version=7.2"
},
{
"Headers": {
"content-type": "application/json",
"user-agent": "azsdk-cpp-keyvault-certificates/4.0.0-beta.1 (Windows 10 Enterprise 6.3 19043 19041.1.amd64fre.vb_release.191206-1406)",
"x-ms-client-request-id": "90a2965b-6b4b-4a03-5ee6-48feca219008"
},
"Method": "GET",
"Response": {
"BODY": "{\"id\":\"https://REDACTED.vault.azure.net/certificates/contacts\",\"contacts\":[{\"email\":\"one1@two.org\"},{\"email\":\"two2@three.org\",\"name\":\"giqu2\"},{\"email\":\"two3@three.org\",\"phone\":\"1234567891\"}]}",
"STATUS_CODE": "200",
"cache-control": "no-cache",
"content-length": "196",
"content-type": "application/json; charset=utf-8",
"date": "Tue, 05 Oct 2021 19:42:09 GMT",
"expires": "-1",
"pragma": "no-cache",
"strict-transport-security": "max-age=31536000;includeSubDomains",
"x-content-type-options": "nosniff",
"x-ms-client-request-id": "90a2965b-6b4b-4a03-5ee6-48feca219008",
"x-ms-keyvault-network-info": "conn_type=Ipv4;addr=24.22.157.72;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region": "westus2",
"x-ms-keyvault-service-version": "1.9.132.3",
"x-ms-request-id": "d4888d0e-7200-4197-b723-f83754ad6be6",
"x-powered-by": "ASP.NET"
},
"Url": "https://REDACTED.vault.azure.net/certificates/contacts?api-version=7.2"
},
{
"Headers": {
"content-type": "application/json",
"user-agent": "azsdk-cpp-keyvault-certificates/4.0.0-beta.1 (Windows 10 Enterprise 6.3 19043 19041.1.amd64fre.vb_release.191206-1406)",
"x-ms-client-request-id": "7779f57d-a028-407a-59f9-cb5ca75477d1"
},
"Method": "DELETE",
"Response": {
"BODY": "{\"id\":\"https://REDACTED.vault.azure.net/certificates/contacts\",\"contacts\":[{\"email\":\"one1@two.org\"},{\"email\":\"two2@three.org\",\"name\":\"giqu2\"},{\"email\":\"two3@three.org\",\"phone\":\"1234567891\"}]}",
"STATUS_CODE": "200",
"cache-control": "no-cache",
"content-length": "196",
"content-type": "application/json; charset=utf-8",
"date": "Tue, 05 Oct 2021 19:42:09 GMT",
"expires": "-1",
"pragma": "no-cache",
"strict-transport-security": "max-age=31536000;includeSubDomains",
"x-content-type-options": "nosniff",
"x-ms-client-request-id": "7779f57d-a028-407a-59f9-cb5ca75477d1",
"x-ms-keyvault-network-info": "conn_type=Ipv4;addr=24.22.157.72;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region": "westus2",
"x-ms-keyvault-service-version": "1.9.132.3",
"x-ms-request-id": "b0566e3b-8aac-4798-8763-34f999145e1e",
"x-powered-by": "ASP.NET"
},
"Url": "https://REDACTED.vault.azure.net/certificates/contacts?api-version=7.2"
}
]
}

View File

@ -0,0 +1,58 @@
{
"networkCallRecords": [
{
"Headers": {
"content-type": "application/json",
"user-agent": "azsdk-cpp-keyvault-certificates/4.0.0-beta.1 (Windows 10 Enterprise 6.3 19043 19041.1.amd64fre.vb_release.191206-1406)",
"x-ms-client-request-id": "d7803f72-bca6-4073-4a0a-05b0f015ea72"
},
"Method": "PUT",
"Response": {
"BODY": "{\"id\":\"https://REDACTED.vault.azure.net/certificates/contacts\",\"contacts\":[{\"email\":\"one@two.org\",\"name\":\"giqu\",\"phone\":\"1234567890\"},{\"email\":\"two@three.org\",\"name\":\"giqu2\",\"phone\":\"1234567891\"}]}",
"STATUS_CODE": "200",
"cache-control": "no-cache",
"content-length": "202",
"content-type": "application/json; charset=utf-8",
"date": "Sun, 19 Sep 2021 19:21:46 GMT",
"expires": "-1",
"pragma": "no-cache",
"strict-transport-security": "max-age=31536000;includeSubDomains",
"x-content-type-options": "nosniff",
"x-ms-client-request-id": "d7803f72-bca6-4073-4a0a-05b0f015ea72",
"x-ms-keyvault-network-info": "conn_type=Ipv4;addr=24.22.157.72;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region": "westus2",
"x-ms-keyvault-service-version": "1.9.79.2",
"x-ms-request-id": "e73d3be7-feef-4581-8c29-f0f889df6190",
"x-powered-by": "ASP.NET"
},
"Url": "https://REDACTED.vault.azure.net/certificates/contacts?api-version=7.2"
},
{
"Headers": {
"content-type": "application/json",
"user-agent": "azsdk-cpp-keyvault-certificates/4.0.0-beta.1 (Windows 10 Enterprise 6.3 19043 19041.1.amd64fre.vb_release.191206-1406)",
"x-ms-client-request-id": "a8eefe63-08cd-4a04-5fd7-2168e15508cb"
},
"Method": "DELETE",
"Response": {
"BODY": "{\"id\":\"https://REDACTED.vault.azure.net/certificates/contacts\",\"contacts\":[{\"email\":\"one@two.org\",\"name\":\"giqu\",\"phone\":\"1234567890\"},{\"email\":\"two@three.org\",\"name\":\"giqu2\",\"phone\":\"1234567891\"}]}",
"STATUS_CODE": "200",
"cache-control": "no-cache",
"content-length": "202",
"content-type": "application/json; charset=utf-8",
"date": "Sun, 19 Sep 2021 19:21:46 GMT",
"expires": "-1",
"pragma": "no-cache",
"strict-transport-security": "max-age=31536000;includeSubDomains",
"x-content-type-options": "nosniff",
"x-ms-client-request-id": "a8eefe63-08cd-4a04-5fd7-2168e15508cb",
"x-ms-keyvault-network-info": "conn_type=Ipv4;addr=24.22.157.72;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region": "westus2",
"x-ms-keyvault-service-version": "1.9.79.2",
"x-ms-request-id": "7391cc51-6d1d-4a8e-a1ef-61c461668a18",
"x-powered-by": "ASP.NET"
},
"Url": "https://REDACTED.vault.azure.net/certificates/contacts?api-version=7.2"
}
]
}