azure-security-keyvault-secrets
keyvault_secret_properties.hpp
Go to the documentation of this file.
1 // Copyright (c) Microsoft Corporation. All rights reserved.
2 // SPDX-License-Identifier: MIT
3 
9 #pragma once
10 
11 #include <azure/core/datetime.hpp>
12 #include <azure/core/nullable.hpp>
13 #include <azure/core/url.hpp>
14 #include <unordered_map>
15 
16 namespace Azure { namespace Security { namespace KeyVault { namespace Secrets {
17 
22  struct SecretProperties final
23  {
28  Azure::Nullable<bool> Enabled;
29 
34  Azure::Nullable<Azure::DateTime> NotBefore;
35 
40  Azure::Nullable<Azure::DateTime> ExpiresOn;
41 
46  Azure::Nullable<Azure::DateTime> CreatedOn;
47 
52  Azure::Nullable<Azure::DateTime> UpdatedOn;
53 
59  Azure::Nullable<int64_t> RecoverableDays;
60 
68  Azure::Nullable<std::string> RecoveryLevel;
69 
74  Azure::Nullable<std::string> ContentType;
75 
81  Azure::Nullable<std::string> KeyId;
82 
87  std::unordered_map<std::string, std::string> Tags;
88 
94  bool Managed;
95 
100  std::string Id;
101 
106  std::string Name;
107 
112  std::string VaultUrl;
113 
118  std::string Version;
119 
124  SecretProperties() = default;
125 
130  SecretProperties(std::string const& name) : Name(name)
131  {
132  if (Name.empty())
133  {
134  throw std::invalid_argument("Name cannot be empty");
135  }
136  }
137 
142  static SecretProperties CreateFromURL(std::string const& url);
143  };
144 }}}} // namespace Azure::Security::KeyVault::Secrets
Azure::Security::KeyVault::Secrets::SecretProperties::Version
std::string Version
The version of the secret.
Definition: keyvault_secret_properties.hpp:118
Azure::Security::KeyVault::Secrets::SecretProperties::RecoverableDays
Azure::Nullable< int64_t > RecoverableDays
The number of days a secret is retained before being deleted for a soft delete-enabled Key Vault.
Definition: keyvault_secret_properties.hpp:59
Azure::Security::KeyVault::Secrets::SecretProperties::Name
std::string Name
The name of the secret.
Definition: keyvault_secret_properties.hpp:106
Azure::Security::KeyVault::Secrets::SecretProperties::NotBefore
Azure::Nullable< Azure::DateTime > NotBefore
Indicate when the secret will be valid and can be used for cryptographic operations.
Definition: keyvault_secret_properties.hpp:34
Azure::Security::KeyVault::Secrets::SecretProperties
The Secret attributes managed by the KeyVault service.
Definition: keyvault_secret_properties.hpp:23
Azure::Security::KeyVault::Secrets::SecretProperties::CreatedOn
Azure::Nullable< Azure::DateTime > CreatedOn
Indicate when the secret was created.
Definition: keyvault_secret_properties.hpp:46
Azure::Security::KeyVault::Secrets::SecretProperties::VaultUrl
std::string VaultUrl
The vault url of the secret.
Definition: keyvault_secret_properties.hpp:112
Azure::Security::KeyVault::Secrets::SecretProperties::KeyId
Azure::Nullable< std::string > KeyId
If this is a secret backing a KV certificate, then this field specifies the corresponding key backing...
Definition: keyvault_secret_properties.hpp:81
Azure::Security::KeyVault::Secrets::SecretProperties::Managed
bool Managed
True if the secret's lifetime is managed by key vault. If this is a secret backing a certificate,...
Definition: keyvault_secret_properties.hpp:94
Azure::Security::KeyVault::Secrets::SecretProperties::CreateFromURL
static SecretProperties CreateFromURL(std::string const &url)
Construct a new secret Properties object.
Definition: keyvault_secret_properties.cpp:14
Azure::Security::KeyVault::Secrets::SecretProperties::ContentType
Azure::Nullable< std::string > ContentType
The content type of the secret.
Definition: keyvault_secret_properties.hpp:74
Azure::Security::KeyVault::Secrets::SecretProperties::SecretProperties
SecretProperties(std::string const &name)
Construct a new secret Properties object.
Definition: keyvault_secret_properties.hpp:130
Azure::Security::KeyVault::Secrets::SecretProperties::RecoveryLevel
Azure::Nullable< std::string > RecoveryLevel
The recovery level currently in effect for secrets in the Key Vault.
Definition: keyvault_secret_properties.hpp:68
Azure::Security::KeyVault::Secrets::SecretProperties::Id
std::string Id
The secret id.
Definition: keyvault_secret_properties.hpp:100
Azure
Azure SDK abstractions.
Definition: dll_import_export.hpp:46
Azure::Security::KeyVault::Secrets::SecretProperties::Enabled
Azure::Nullable< bool > Enabled
Indicate whether the secret is enabled and useable for cryptographic operations.
Definition: keyvault_secret_properties.hpp:28
Azure::Security::KeyVault::Secrets::SecretProperties::Tags
std::unordered_map< std::string, std::string > Tags
Application specific metadata in the form of key-value pairs.
Definition: keyvault_secret_properties.hpp:87
Azure::Security::KeyVault::Secrets::SecretProperties::UpdatedOn
Azure::Nullable< Azure::DateTime > UpdatedOn
Indicate when the secret was updated.
Definition: keyvault_secret_properties.hpp:52
Azure::Security::KeyVault::Secrets::SecretProperties::SecretProperties
SecretProperties()=default
Construct a new secret Properties object.
Azure::Security::KeyVault::Secrets::SecretProperties::ExpiresOn
Azure::Nullable< Azure::DateTime > ExpiresOn
Indicate when the secret will expire and cannot be used for cryptographic operations.
Definition: keyvault_secret_properties.hpp:40