Class CreateSecretDetails
The details of the secret that you want to create.
Inherited Members
Namespace: Oci.VaultService.Models
Assembly: OCI.DotNetSDK.Vault.dll
Syntax
public class CreateSecretDetails
Properties
CompartmentId
Declaration
[Required(ErrorMessage = "CompartmentId is required.")]
[JsonProperty(PropertyName = "compartmentId")]
public string CompartmentId { get; set; }
Property Value
Type | Description |
---|---|
string | The OCID of the compartment where you want to create the secret. |
Remarks
Required
DefinedTags
Declaration
[JsonProperty(PropertyName = "definedTags")]
public Dictionary<string, Dictionary<string, object>> DefinedTags { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<string, Dictionary<string, object>> | Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations": {"CostCenter": "42"}} |
Description
Declaration
[JsonProperty(PropertyName = "description")]
public string Description { get; set; }
Property Value
Type | Description |
---|---|
string | A brief description of the secret. Avoid entering confidential information. |
EnableAutoGeneration
Declaration
[JsonProperty(PropertyName = "enableAutoGeneration")]
public bool? EnableAutoGeneration { get; set; }
Property Value
Type | Description |
---|---|
bool? | The value of this flag determines whether or not secret content will be generated automatically. If not set, it defaults to false. |
FreeformTags
Declaration
[JsonProperty(PropertyName = "freeformTags")]
public Dictionary<string, string> FreeformTags { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<string, string> | Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"} |
KeyId
Declaration
[Required(ErrorMessage = "KeyId is required.")]
[JsonProperty(PropertyName = "keyId")]
public string KeyId { get; set; }
Property Value
Type | Description |
---|---|
string | The OCID of the master encryption key that is used to encrypt the secret. You must specify a symmetric key to encrypt the secret during import to the vault. You cannot encrypt secrets with asymmetric keys. Furthermore, the key must exist in the vault that you specify. |
Remarks
Required
Metadata
Declaration
[JsonProperty(PropertyName = "metadata")]
public Dictionary<string, object> Metadata { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<string, object> | Additional metadata that you can use to provide context about how to use the secret during rotation or other administrative tasks. For example, for a secret that you use to connect to a database, the additional metadata might specify the connection endpoint and the connection string. Provide additional metadata as key-value pairs. |
RotationConfig
Declaration
[JsonProperty(PropertyName = "rotationConfig")]
public RotationConfig RotationConfig { get; set; }
Property Value
Type | Description |
---|---|
RotationConfig |
SecretContent
Declaration
[JsonProperty(PropertyName = "secretContent")]
public SecretContentDetails SecretContent { get; set; }
Property Value
Type | Description |
---|---|
SecretContentDetails |
SecretGenerationContext
Declaration
[JsonProperty(PropertyName = "secretGenerationContext")]
public SecretGenerationContext SecretGenerationContext { get; set; }
Property Value
Type | Description |
---|---|
SecretGenerationContext |
SecretName
Declaration
[Required(ErrorMessage = "SecretName is required.")]
[JsonProperty(PropertyName = "secretName")]
public string SecretName { get; set; }
Property Value
Type | Description |
---|---|
string | A user-friendly name for the secret. Secret names should be unique within a vault. Avoid entering confidential information. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods. |
Remarks
Required
SecretRules
Declaration
[JsonProperty(PropertyName = "secretRules")]
public List<SecretRule> SecretRules { get; set; }
Property Value
Type | Description |
---|---|
List<SecretRule> | A list of rules to control how the secret is used and managed. |
VaultId
Declaration
[Required(ErrorMessage = "VaultId is required.")]
[JsonProperty(PropertyName = "vaultId")]
public string VaultId { get; set; }
Property Value
Type | Description |
---|---|
string | The OCID of the vault where you want to create the secret. |
Remarks
Required