Class Secret
This resouce used to create a secret and store its initial version.
NOTE: Available in 1.76.0+.
Inherited Members
Namespace: Pulumi.AliCloud.Kms
Assembly: Pulumi.AliCloud.dll
Syntax
public class Secret : CustomResource
Constructors
View SourceSecret(String, SecretArgs, CustomResourceOptions)
Create a Secret resource with the given unique name, arguments, and options.
Declaration
public Secret(string name, SecretArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| SecretArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceArn
The Alicloud Resource Name (ARN) of the secret.
Declaration
public Output<string> Arn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Description
The description of the secret.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
EncryptionKeyId
The ID of the KMS CMK that is used to encrypt the secret value. If you do not specify this parameter, Secrets Manager automatically creates an encryption key to encrypt the secret.
Declaration
public Output<string> EncryptionKeyId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ForceDeleteWithoutRecovery
Specifies whether to forcibly delete the secret. If this parameter is set to true, the secret cannot be recovered. Valid values: true, false. Default to: false.
Declaration
public Output<bool?> ForceDeleteWithoutRecovery { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
PlannedDeleteTime
The time when the secret is scheduled to be deleted.
Declaration
public Output<string> PlannedDeleteTime { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
RecoveryWindowInDays
Specifies the recovery period of the secret if you do not forcibly delete it. Default value: 30. It will be ignored when force_delete_without_recovery is true.
Declaration
public Output<int?> RecoveryWindowInDays { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
SecretData
The value of the secret that you want to create. Secrets Manager encrypts the secret value and stores it in the initial version.
Declaration
public Output<string> SecretData { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SecretDataType
The type of the secret value. Valid values: text, binary. Default to "text".
Declaration
public Output<string> SecretDataType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SecretName
The name of the secret.
Declaration
public Output<string> SecretName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Tags
A mapping of tags to assign to the resource.
Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
VersionId
The version number of the initial version. Version numbers are unique in each secret object.
Declaration
public Output<string> VersionId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
VersionStages
) The stage labels that mark the new secret version. If you do not specify this parameter, Secrets Manager marks it with "ACSCurrent".
Declaration
public Output<ImmutableArray<string>> VersionStages { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Methods
View SourceGet(String, Input<String>, SecretState, CustomResourceOptions)
Get an existing Secret resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Secret Get(string name, Input<string> id, SecretState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| SecretState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Secret |