published on Monday, Jul 27, 2026 by Byteplus
published on Monday, Jul 27, 2026 by Byteplus
Credential Manager is a credential management product based on the key management system. It is used to store sensitive credential information required by user business applications, such as AK/SK, account passwords, access keys, database passwords, and certificates. The product provides secure storage, access control, automatic rotation, and auditing capabilities. User business applications can securely and dynamically obtain credential information by integrating the KMS SDK or using the KMS OpenAPI, effectively preventing risks such as information leakage or unintended modification caused by storing sensitive information in plaintext
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as bytepluscc from "@byteplus/pulumi-bytepluscc";
const kMSSecretDemo = new bytepluscc.kms.Secret("KMSSecretDemo", {
secretName: "secret-ccapi-Generic",
versionName: "ccapi-v1",
projectName: "default",
description: "description test ccapi Generic",
secretType: "Generic",
encryptionKey: "trn:kms:cn-beijing:********:keyrings/ccapi-text/keys/ccapi-terraform-1101",
secretValue: JSON.stringify({
key1: "value1",
key2: "value2",
}),
});
import pulumi
import json
import pulumi_bytepluscc as bytepluscc
k_ms_secret_demo = bytepluscc.kms.Secret("KMSSecretDemo",
secret_name="secret-ccapi-Generic",
version_name="ccapi-v1",
project_name="default",
description="description test ccapi Generic",
secret_type="Generic",
encryption_key="trn:kms:cn-beijing:********:keyrings/ccapi-text/keys/ccapi-terraform-1101",
secret_value=json.dumps({
"key1": "value1",
"key2": "value2",
}))
package main
import (
"encoding/json"
"github.com/byteplus-sdk/pulumi-bytepluscc/sdk/go/bytepluscc/kms"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
tmpJSON0, err := json.Marshal(map[string]interface{}{
"key1": "value1",
"key2": "value2",
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
_, err = kms.NewSecret(ctx, "KMSSecretDemo", &kms.SecretArgs{
SecretName: pulumi.String("secret-ccapi-Generic"),
VersionName: pulumi.String("ccapi-v1"),
ProjectName: pulumi.String("default"),
Description: pulumi.String("description test ccapi Generic"),
SecretType: pulumi.String("Generic"),
EncryptionKey: pulumi.String("trn:kms:cn-beijing:********:keyrings/ccapi-text/keys/ccapi-terraform-1101"),
SecretValue: pulumi.String(json0),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Bytepluscc = Byteplus.Pulumi.Bytepluscc;
return await Deployment.RunAsync(() =>
{
var kMSSecretDemo = new Bytepluscc.Kms.Secret("KMSSecretDemo", new()
{
SecretName = "secret-ccapi-Generic",
VersionName = "ccapi-v1",
ProjectName = "default",
Description = "description test ccapi Generic",
SecretType = "Generic",
EncryptionKey = "trn:kms:cn-beijing:********:keyrings/ccapi-text/keys/ccapi-terraform-1101",
SecretValue = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["key1"] = "value1",
["key2"] = "value2",
}),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.byteplus.bytepluscc.kms.Secret;
import com.byteplus.bytepluscc.kms.SecretArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var kMSSecretDemo = new Secret("kMSSecretDemo", SecretArgs.builder()
.secretName("secret-ccapi-Generic")
.versionName("ccapi-v1")
.projectName("default")
.description("description test ccapi Generic")
.secretType("Generic")
.encryptionKey("trn:kms:cn-beijing:********:keyrings/ccapi-text/keys/ccapi-terraform-1101")
.secretValue(serializeJson(
jsonObject(
jsonProperty("key1", "value1"),
jsonProperty("key2", "value2")
)))
.build());
}
}
resources:
kMSSecretDemo:
type: bytepluscc:kms:Secret
name: KMSSecretDemo
properties:
secretName: secret-ccapi-Generic
versionName: ccapi-v1
projectName: default
description: description test ccapi Generic
secretType: Generic
encryptionKey: trn:kms:cn-beijing:********:keyrings/ccapi-text/keys/ccapi-terraform-1101
secretValue:
fn::toJSON:
key1: value1
key2: value2
pulumi {
required_providers {
bytepluscc = {
source = "pulumi/bytepluscc"
}
}
}
resource "bytepluscc_kms_secret" "KMSSecretDemo" {
secret_name = "secret-ccapi-Generic"
version_name = "ccapi-v1"
project_name = "default"
description = "description test ccapi Generic"
secret_type = "Generic"
encryption_key = "trn:kms:cn-beijing:********:keyrings/ccapi-text/keys/ccapi-terraform-1101"
secret_value = jsonencode({
"key1" = "value1"
"key2" = "value2"
})
}
Create Secret Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Secret(name: string, args: SecretArgs, opts?: CustomResourceOptions);@overload
def Secret(resource_name: str,
args: SecretArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Secret(resource_name: str,
opts: Optional[ResourceOptions] = None,
secret_name: Optional[str] = None,
secret_value: Optional[str] = None,
secret_type: Optional[str] = None,
encryption_key: Optional[str] = None,
extended_config: Optional[str] = None,
pending_window_in_days: Optional[int] = None,
project_name: Optional[str] = None,
rotation_interval: Optional[str] = None,
secret_backup: Optional[bool] = None,
automatic_rotation: Optional[bool] = None,
secret_restore: Optional[SecretSecretRestoreArgs] = None,
secret_rotate: Optional[bool] = None,
description: Optional[str] = None,
cancel_secret_deletion: Optional[bool] = None,
version_name: Optional[str] = None)func NewSecret(ctx *Context, name string, args SecretArgs, opts ...ResourceOption) (*Secret, error)public Secret(string name, SecretArgs args, CustomResourceOptions? opts = null)
public Secret(String name, SecretArgs args)
public Secret(String name, SecretArgs args, CustomResourceOptions options)
type: bytepluscc:kms:Secret
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "bytepluscc_kms_secret" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args SecretArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args SecretArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args SecretArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SecretArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SecretArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var secretResource = new Bytepluscc.Kms.Secret("secretResource", new()
{
SecretName = "string",
SecretValue = "string",
SecretType = "string",
EncryptionKey = "string",
ExtendedConfig = "string",
PendingWindowInDays = 0,
ProjectName = "string",
RotationInterval = "string",
SecretBackup = false,
AutomaticRotation = false,
SecretRestore = new Bytepluscc.Kms.Inputs.SecretSecretRestoreArgs
{
BackupData = "string",
SecretDataKey = "string",
Signature = "string",
},
SecretRotate = false,
Description = "string",
CancelSecretDeletion = false,
VersionName = "string",
});
example, err := kms.NewSecret(ctx, "secretResource", &kms.SecretArgs{
SecretName: pulumi.String("string"),
SecretValue: pulumi.String("string"),
SecretType: pulumi.String("string"),
EncryptionKey: pulumi.String("string"),
ExtendedConfig: pulumi.String("string"),
PendingWindowInDays: pulumi.Int(0),
ProjectName: pulumi.String("string"),
RotationInterval: pulumi.String("string"),
SecretBackup: pulumi.Bool(false),
AutomaticRotation: pulumi.Bool(false),
SecretRestore: &kms.SecretSecretRestoreArgs{
BackupData: pulumi.String("string"),
SecretDataKey: pulumi.String("string"),
Signature: pulumi.String("string"),
},
SecretRotate: pulumi.Bool(false),
Description: pulumi.String("string"),
CancelSecretDeletion: pulumi.Bool(false),
VersionName: pulumi.String("string"),
})
resource "bytepluscc_kms_secret" "secretResource" {
lifecycle {
create_before_destroy = true
}
secret_name = "string"
secret_value = "string"
secret_type = "string"
encryption_key = "string"
extended_config = "string"
pending_window_in_days = 0
project_name = "string"
rotation_interval = "string"
secret_backup = false
automatic_rotation = false
secret_restore = {
backup_data = "string"
secret_data_key = "string"
signature = "string"
}
secret_rotate = false
description = "string"
cancel_secret_deletion = false
version_name = "string"
}
var secretResource = new Secret("secretResource", SecretArgs.builder()
.secretName("string")
.secretValue("string")
.secretType("string")
.encryptionKey("string")
.extendedConfig("string")
.pendingWindowInDays(0)
.projectName("string")
.rotationInterval("string")
.secretBackup(false)
.automaticRotation(false)
.secretRestore(SecretSecretRestoreArgs.builder()
.backupData("string")
.secretDataKey("string")
.signature("string")
.build())
.secretRotate(false)
.description("string")
.cancelSecretDeletion(false)
.versionName("string")
.build());
secret_resource = bytepluscc.kms.Secret("secretResource",
secret_name="string",
secret_value="string",
secret_type="string",
encryption_key="string",
extended_config="string",
pending_window_in_days=0,
project_name="string",
rotation_interval="string",
secret_backup=False,
automatic_rotation=False,
secret_restore={
"backup_data": "string",
"secret_data_key": "string",
"signature": "string",
},
secret_rotate=False,
description="string",
cancel_secret_deletion=False,
version_name="string")
const secretResource = new bytepluscc.kms.Secret("secretResource", {
secretName: "string",
secretValue: "string",
secretType: "string",
encryptionKey: "string",
extendedConfig: "string",
pendingWindowInDays: 0,
projectName: "string",
rotationInterval: "string",
secretBackup: false,
automaticRotation: false,
secretRestore: {
backupData: "string",
secretDataKey: "string",
signature: "string",
},
secretRotate: false,
description: "string",
cancelSecretDeletion: false,
versionName: "string",
});
type: bytepluscc:kms:Secret
properties:
automaticRotation: false
cancelSecretDeletion: false
description: string
encryptionKey: string
extendedConfig: string
pendingWindowInDays: 0
projectName: string
rotationInterval: string
secretBackup: false
secretName: string
secretRestore:
backupData: string
secretDataKey: string
signature: string
secretRotate: false
secretType: string
secretValue: string
versionName: string
Secret Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Secret resource accepts the following input properties:
- Secret
Name string - Credential name. Valid characters: [a-zA-Z0-9/_+=.@-]
- Secret
Type string - Credential type. Currently supports Generic|IAM|RDS|Redis|ECS|PGSQL|SQLServer
- Secret
Value string - Credential value. When SecretType is Generic, users can customize it. It is recommended to use JSON key-value pairs
- Automatic
Rotation bool - Whether to enable automatic rotation. Applies only to credentials of type IAM|RDS|Redis|ECS
- Cancel
Secret boolDeletion - Trigger: When set to true, calls the KMS CancelSecretDeletion API to cancel the scheduled deletion of the credential.
- Description string
- Credential description, length: 0 ~ 8192 characters
- Encryption
Key string - KMS key TRN for encrypting credential value. If not specified, the default key of Credential Manager is used
- Extended
Config string - Credential extension configuration, used to specify properties for non-Generic credentials
- Pending
Window intIn Days - Credential pre-deletion period. During this time, you can revoke the deletion of credentials in pending deletion status; after the pre-deletion period, deletion cannot be revoked. Value range: 7 ~ 30. Unit: days. Default: 7. To cancel, use CancelSecretDeletion.
- Project
Name string - Credential project name. Default value: default
- Rotation
Interval string - Automatic rotation interval. Range: 1 ~ 365 days. Format: integer[unit], where integer is the duration and unit is the time unit. Unit value: d (days). For example: 7d means a 7-day interval
- Secret
Backup bool - Trigger: When set to true, calls the KMS BackupSecret API to back up the credential. The backup result is written to SecretRestoreRead. Please keep it safe.
- Secret
Restore Byteplus.Secret Secret Restore - Credential restore parameters. Only effective during creation. If provided, calls the KMS RestoreSecret API to restore the credential from backup data. Other creation parameters such as SecretValue, SecretType, and SecretName will not take effect.
- Secret
Rotate bool - Trigger: When set to true, calls the KMS RotateSecret API to manually rotate the credential.
- Version
Name string - Version alias. Valid characters: [a-zA-Z0-9/_+=.@-]
- Secret
Name string - Credential name. Valid characters: [a-zA-Z0-9/_+=.@-]
- Secret
Type string - Credential type. Currently supports Generic|IAM|RDS|Redis|ECS|PGSQL|SQLServer
- Secret
Value string - Credential value. When SecretType is Generic, users can customize it. It is recommended to use JSON key-value pairs
- Automatic
Rotation bool - Whether to enable automatic rotation. Applies only to credentials of type IAM|RDS|Redis|ECS
- Cancel
Secret boolDeletion - Trigger: When set to true, calls the KMS CancelSecretDeletion API to cancel the scheduled deletion of the credential.
- Description string
- Credential description, length: 0 ~ 8192 characters
- Encryption
Key string - KMS key TRN for encrypting credential value. If not specified, the default key of Credential Manager is used
- Extended
Config string - Credential extension configuration, used to specify properties for non-Generic credentials
- Pending
Window intIn Days - Credential pre-deletion period. During this time, you can revoke the deletion of credentials in pending deletion status; after the pre-deletion period, deletion cannot be revoked. Value range: 7 ~ 30. Unit: days. Default: 7. To cancel, use CancelSecretDeletion.
- Project
Name string - Credential project name. Default value: default
- Rotation
Interval string - Automatic rotation interval. Range: 1 ~ 365 days. Format: integer[unit], where integer is the duration and unit is the time unit. Unit value: d (days). For example: 7d means a 7-day interval
- Secret
Backup bool - Trigger: When set to true, calls the KMS BackupSecret API to back up the credential. The backup result is written to SecretRestoreRead. Please keep it safe.
- Secret
Restore SecretSecret Restore Args - Credential restore parameters. Only effective during creation. If provided, calls the KMS RestoreSecret API to restore the credential from backup data. Other creation parameters such as SecretValue, SecretType, and SecretName will not take effect.
- Secret
Rotate bool - Trigger: When set to true, calls the KMS RotateSecret API to manually rotate the credential.
- Version
Name string - Version alias. Valid characters: [a-zA-Z0-9/_+=.@-]
- secret_
name string - Credential name. Valid characters: [a-zA-Z0-9/_+=.@-]
- secret_
type string - Credential type. Currently supports Generic|IAM|RDS|Redis|ECS|PGSQL|SQLServer
- secret_
value string - Credential value. When SecretType is Generic, users can customize it. It is recommended to use JSON key-value pairs
- automatic_
rotation bool - Whether to enable automatic rotation. Applies only to credentials of type IAM|RDS|Redis|ECS
- cancel_
secret_ booldeletion - Trigger: When set to true, calls the KMS CancelSecretDeletion API to cancel the scheduled deletion of the credential.
- description string
- Credential description, length: 0 ~ 8192 characters
- encryption_
key string - KMS key TRN for encrypting credential value. If not specified, the default key of Credential Manager is used
- extended_
config string - Credential extension configuration, used to specify properties for non-Generic credentials
- pending_
window_ numberin_ days - Credential pre-deletion period. During this time, you can revoke the deletion of credentials in pending deletion status; after the pre-deletion period, deletion cannot be revoked. Value range: 7 ~ 30. Unit: days. Default: 7. To cancel, use CancelSecretDeletion.
- project_
name string - Credential project name. Default value: default
- rotation_
interval string - Automatic rotation interval. Range: 1 ~ 365 days. Format: integer[unit], where integer is the duration and unit is the time unit. Unit value: d (days). For example: 7d means a 7-day interval
- secret_
backup bool - Trigger: When set to true, calls the KMS BackupSecret API to back up the credential. The backup result is written to SecretRestoreRead. Please keep it safe.
- secret_
restore object - Credential restore parameters. Only effective during creation. If provided, calls the KMS RestoreSecret API to restore the credential from backup data. Other creation parameters such as SecretValue, SecretType, and SecretName will not take effect.
- secret_
rotate bool - Trigger: When set to true, calls the KMS RotateSecret API to manually rotate the credential.
- version_
name string - Version alias. Valid characters: [a-zA-Z0-9/_+=.@-]
- secret
Name String - Credential name. Valid characters: [a-zA-Z0-9/_+=.@-]
- secret
Type String - Credential type. Currently supports Generic|IAM|RDS|Redis|ECS|PGSQL|SQLServer
- secret
Value String - Credential value. When SecretType is Generic, users can customize it. It is recommended to use JSON key-value pairs
- automatic
Rotation Boolean - Whether to enable automatic rotation. Applies only to credentials of type IAM|RDS|Redis|ECS
- cancel
Secret BooleanDeletion - Trigger: When set to true, calls the KMS CancelSecretDeletion API to cancel the scheduled deletion of the credential.
- description String
- Credential description, length: 0 ~ 8192 characters
- encryption
Key String - KMS key TRN for encrypting credential value. If not specified, the default key of Credential Manager is used
- extended
Config String - Credential extension configuration, used to specify properties for non-Generic credentials
- pending
Window IntegerIn Days - Credential pre-deletion period. During this time, you can revoke the deletion of credentials in pending deletion status; after the pre-deletion period, deletion cannot be revoked. Value range: 7 ~ 30. Unit: days. Default: 7. To cancel, use CancelSecretDeletion.
- project
Name String - Credential project name. Default value: default
- rotation
Interval String - Automatic rotation interval. Range: 1 ~ 365 days. Format: integer[unit], where integer is the duration and unit is the time unit. Unit value: d (days). For example: 7d means a 7-day interval
- secret
Backup Boolean - Trigger: When set to true, calls the KMS BackupSecret API to back up the credential. The backup result is written to SecretRestoreRead. Please keep it safe.
- secret
Restore SecretSecret Restore - Credential restore parameters. Only effective during creation. If provided, calls the KMS RestoreSecret API to restore the credential from backup data. Other creation parameters such as SecretValue, SecretType, and SecretName will not take effect.
- secret
Rotate Boolean - Trigger: When set to true, calls the KMS RotateSecret API to manually rotate the credential.
- version
Name String - Version alias. Valid characters: [a-zA-Z0-9/_+=.@-]
- secret
Name string - Credential name. Valid characters: [a-zA-Z0-9/_+=.@-]
- secret
Type string - Credential type. Currently supports Generic|IAM|RDS|Redis|ECS|PGSQL|SQLServer
- secret
Value string - Credential value. When SecretType is Generic, users can customize it. It is recommended to use JSON key-value pairs
- automatic
Rotation boolean - Whether to enable automatic rotation. Applies only to credentials of type IAM|RDS|Redis|ECS
- cancel
Secret booleanDeletion - Trigger: When set to true, calls the KMS CancelSecretDeletion API to cancel the scheduled deletion of the credential.
- description string
- Credential description, length: 0 ~ 8192 characters
- encryption
Key string - KMS key TRN for encrypting credential value. If not specified, the default key of Credential Manager is used
- extended
Config string - Credential extension configuration, used to specify properties for non-Generic credentials
- pending
Window numberIn Days - Credential pre-deletion period. During this time, you can revoke the deletion of credentials in pending deletion status; after the pre-deletion period, deletion cannot be revoked. Value range: 7 ~ 30. Unit: days. Default: 7. To cancel, use CancelSecretDeletion.
- project
Name string - Credential project name. Default value: default
- rotation
Interval string - Automatic rotation interval. Range: 1 ~ 365 days. Format: integer[unit], where integer is the duration and unit is the time unit. Unit value: d (days). For example: 7d means a 7-day interval
- secret
Backup boolean - Trigger: When set to true, calls the KMS BackupSecret API to back up the credential. The backup result is written to SecretRestoreRead. Please keep it safe.
- secret
Restore SecretSecret Restore - Credential restore parameters. Only effective during creation. If provided, calls the KMS RestoreSecret API to restore the credential from backup data. Other creation parameters such as SecretValue, SecretType, and SecretName will not take effect.
- secret
Rotate boolean - Trigger: When set to true, calls the KMS RotateSecret API to manually rotate the credential.
- version
Name string - Version alias. Valid characters: [a-zA-Z0-9/_+=.@-]
- secret_
name str - Credential name. Valid characters: [a-zA-Z0-9/_+=.@-]
- secret_
type str - Credential type. Currently supports Generic|IAM|RDS|Redis|ECS|PGSQL|SQLServer
- secret_
value str - Credential value. When SecretType is Generic, users can customize it. It is recommended to use JSON key-value pairs
- automatic_
rotation bool - Whether to enable automatic rotation. Applies only to credentials of type IAM|RDS|Redis|ECS
- cancel_
secret_ booldeletion - Trigger: When set to true, calls the KMS CancelSecretDeletion API to cancel the scheduled deletion of the credential.
- description str
- Credential description, length: 0 ~ 8192 characters
- encryption_
key str - KMS key TRN for encrypting credential value. If not specified, the default key of Credential Manager is used
- extended_
config str - Credential extension configuration, used to specify properties for non-Generic credentials
- pending_
window_ intin_ days - Credential pre-deletion period. During this time, you can revoke the deletion of credentials in pending deletion status; after the pre-deletion period, deletion cannot be revoked. Value range: 7 ~ 30. Unit: days. Default: 7. To cancel, use CancelSecretDeletion.
- project_
name str - Credential project name. Default value: default
- rotation_
interval str - Automatic rotation interval. Range: 1 ~ 365 days. Format: integer[unit], where integer is the duration and unit is the time unit. Unit value: d (days). For example: 7d means a 7-day interval
- secret_
backup bool - Trigger: When set to true, calls the KMS BackupSecret API to back up the credential. The backup result is written to SecretRestoreRead. Please keep it safe.
- secret_
restore SecretSecret Restore Args - Credential restore parameters. Only effective during creation. If provided, calls the KMS RestoreSecret API to restore the credential from backup data. Other creation parameters such as SecretValue, SecretType, and SecretName will not take effect.
- secret_
rotate bool - Trigger: When set to true, calls the KMS RotateSecret API to manually rotate the credential.
- version_
name str - Version alias. Valid characters: [a-zA-Z0-9/_+=.@-]
- secret
Name String - Credential name. Valid characters: [a-zA-Z0-9/_+=.@-]
- secret
Type String - Credential type. Currently supports Generic|IAM|RDS|Redis|ECS|PGSQL|SQLServer
- secret
Value String - Credential value. When SecretType is Generic, users can customize it. It is recommended to use JSON key-value pairs
- automatic
Rotation Boolean - Whether to enable automatic rotation. Applies only to credentials of type IAM|RDS|Redis|ECS
- cancel
Secret BooleanDeletion - Trigger: When set to true, calls the KMS CancelSecretDeletion API to cancel the scheduled deletion of the credential.
- description String
- Credential description, length: 0 ~ 8192 characters
- encryption
Key String - KMS key TRN for encrypting credential value. If not specified, the default key of Credential Manager is used
- extended
Config String - Credential extension configuration, used to specify properties for non-Generic credentials
- pending
Window NumberIn Days - Credential pre-deletion period. During this time, you can revoke the deletion of credentials in pending deletion status; after the pre-deletion period, deletion cannot be revoked. Value range: 7 ~ 30. Unit: days. Default: 7. To cancel, use CancelSecretDeletion.
- project
Name String - Credential project name. Default value: default
- rotation
Interval String - Automatic rotation interval. Range: 1 ~ 365 days. Format: integer[unit], where integer is the duration and unit is the time unit. Unit value: d (days). For example: 7d means a 7-day interval
- secret
Backup Boolean - Trigger: When set to true, calls the KMS BackupSecret API to back up the credential. The backup result is written to SecretRestoreRead. Please keep it safe.
- secret
Restore Property Map - Credential restore parameters. Only effective during creation. If provided, calls the KMS RestoreSecret API to restore the credential from backup data. Other creation parameters such as SecretValue, SecretType, and SecretName will not take effect.
- secret
Rotate Boolean - Trigger: When set to true, calls the KMS RotateSecret API to manually rotate the credential.
- version
Name String - Version alias. Valid characters: [a-zA-Z0-9/_+=.@-]
Outputs
All input properties are implicitly available as output properties. Additionally, the Secret resource produces the following output properties:
- Created
Time int - Credential creation time
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Rotation stringTime - Credential last rotation time
- Managed bool
- Is managed credential
- Owning
Service string - Managed Cloud Service
- Rotation
Interval intRead - Automatic rotation interval, unit: seconds
- Rotation
State string - Rotation status: Enable: automatic rotation enabled, Disable: automatic rotation disabled, Rotating: automatic rotation in progress, None: automatic rotation not supported
- Schedule
Delete stringTime - Credential Scheduled Deletion Time
- Schedule
Rotation stringTime - Credential next rotation time
- Secret
Id string - Credential unique identifier, UUID format
- Secret
Restore Byteplus.Read Secret Secret Restore Read - Credential restore parameters. Returned only during backup.
- Secret
State stringValue - Credential status. Enable: enabled, Disable: disabled, PendingDelete: scheduled for deletion
- Secret
Versions List<Byteplus.Secret Secret Version> - Credential version information. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- Trn string
- Credential resource name. Format: trn:kms:${Region}:${AccountID}:secrets/${secret}
- Uid string
- Credential tenant ID
- Updated
Time int - Credential update date
- Created
Time int - Credential creation time
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Rotation stringTime - Credential last rotation time
- Managed bool
- Is managed credential
- Owning
Service string - Managed Cloud Service
- Rotation
Interval intRead - Automatic rotation interval, unit: seconds
- Rotation
State string - Rotation status: Enable: automatic rotation enabled, Disable: automatic rotation disabled, Rotating: automatic rotation in progress, None: automatic rotation not supported
- Schedule
Delete stringTime - Credential Scheduled Deletion Time
- Schedule
Rotation stringTime - Credential next rotation time
- Secret
Id string - Credential unique identifier, UUID format
- Secret
Restore SecretRead Secret Restore Read - Credential restore parameters. Returned only during backup.
- Secret
State string - Credential status. Enable: enabled, Disable: disabled, PendingDelete: scheduled for deletion
- Secret
Versions []SecretSecret Version - Credential version information. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- Trn string
- Credential resource name. Format: trn:kms:${Region}:${AccountID}:secrets/${secret}
- Uid string
- Credential tenant ID
- Updated
Time int - Credential update date
- created_
time number - Credential creation time
- id string
- The provider-assigned unique ID for this managed resource.
- last_
rotation_ stringtime - Credential last rotation time
- managed bool
- Is managed credential
- owning_
service string - Managed Cloud Service
- rotation_
interval_ numberread - Automatic rotation interval, unit: seconds
- rotation_
state string - Rotation status: Enable: automatic rotation enabled, Disable: automatic rotation disabled, Rotating: automatic rotation in progress, None: automatic rotation not supported
- schedule_
delete_ stringtime - Credential Scheduled Deletion Time
- schedule_
rotation_ stringtime - Credential next rotation time
- secret_
id string - Credential unique identifier, UUID format
- secret_
restore_ objectread - Credential restore parameters. Returned only during backup.
- secret_
state string - Credential status. Enable: enabled, Disable: disabled, PendingDelete: scheduled for deletion
- secret_
versions list(object) - Credential version information. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- trn string
- Credential resource name. Format: trn:kms:${Region}:${AccountID}:secrets/${secret}
- uid string
- Credential tenant ID
- updated_
time number - Credential update date
- created
Time Integer - Credential creation time
- id String
- The provider-assigned unique ID for this managed resource.
- last
Rotation StringTime - Credential last rotation time
- managed Boolean
- Is managed credential
- owning
Service String - Managed Cloud Service
- rotation
Interval IntegerRead - Automatic rotation interval, unit: seconds
- rotation
State String - Rotation status: Enable: automatic rotation enabled, Disable: automatic rotation disabled, Rotating: automatic rotation in progress, None: automatic rotation not supported
- schedule
Delete StringTime - Credential Scheduled Deletion Time
- schedule
Rotation StringTime - Credential next rotation time
- secret
Id String - Credential unique identifier, UUID format
- secret
Restore SecretRead Secret Restore Read - Credential restore parameters. Returned only during backup.
- secret
State String - Credential status. Enable: enabled, Disable: disabled, PendingDelete: scheduled for deletion
- secret
Versions List<SecretSecret Version> - Credential version information. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- trn String
- Credential resource name. Format: trn:kms:${Region}:${AccountID}:secrets/${secret}
- uid String
- Credential tenant ID
- updated
Time Integer - Credential update date
- created
Time number - Credential creation time
- id string
- The provider-assigned unique ID for this managed resource.
- last
Rotation stringTime - Credential last rotation time
- managed boolean
- Is managed credential
- owning
Service string - Managed Cloud Service
- rotation
Interval numberRead - Automatic rotation interval, unit: seconds
- rotation
State string - Rotation status: Enable: automatic rotation enabled, Disable: automatic rotation disabled, Rotating: automatic rotation in progress, None: automatic rotation not supported
- schedule
Delete stringTime - Credential Scheduled Deletion Time
- schedule
Rotation stringTime - Credential next rotation time
- secret
Id string - Credential unique identifier, UUID format
- secret
Restore SecretRead Secret Restore Read - Credential restore parameters. Returned only during backup.
- secret
State string - Credential status. Enable: enabled, Disable: disabled, PendingDelete: scheduled for deletion
- secret
Versions SecretSecret Version[] - Credential version information. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- trn string
- Credential resource name. Format: trn:kms:${Region}:${AccountID}:secrets/${secret}
- uid string
- Credential tenant ID
- updated
Time number - Credential update date
- created_
time int - Credential creation time
- id str
- The provider-assigned unique ID for this managed resource.
- last_
rotation_ strtime - Credential last rotation time
- managed bool
- Is managed credential
- owning_
service str - Managed Cloud Service
- rotation_
interval_ intread - Automatic rotation interval, unit: seconds
- rotation_
state str - Rotation status: Enable: automatic rotation enabled, Disable: automatic rotation disabled, Rotating: automatic rotation in progress, None: automatic rotation not supported
- schedule_
delete_ strtime - Credential Scheduled Deletion Time
- schedule_
rotation_ strtime - Credential next rotation time
- secret_
id str - Credential unique identifier, UUID format
- secret_
restore_ Secretread Secret Restore Read - Credential restore parameters. Returned only during backup.
- secret_
state str - Credential status. Enable: enabled, Disable: disabled, PendingDelete: scheduled for deletion
- secret_
versions Sequence[SecretSecret Version] - Credential version information. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- trn str
- Credential resource name. Format: trn:kms:${Region}:${AccountID}:secrets/${secret}
- uid str
- Credential tenant ID
- updated_
time int - Credential update date
- created
Time Number - Credential creation time
- id String
- The provider-assigned unique ID for this managed resource.
- last
Rotation StringTime - Credential last rotation time
- managed Boolean
- Is managed credential
- owning
Service String - Managed Cloud Service
- rotation
Interval NumberRead - Automatic rotation interval, unit: seconds
- rotation
State String - Rotation status: Enable: automatic rotation enabled, Disable: automatic rotation disabled, Rotating: automatic rotation in progress, None: automatic rotation not supported
- schedule
Delete StringTime - Credential Scheduled Deletion Time
- schedule
Rotation StringTime - Credential next rotation time
- secret
Id String - Credential unique identifier, UUID format
- secret
Restore Property MapRead - Credential restore parameters. Returned only during backup.
- secret
State String - Credential status. Enable: enabled, Disable: disabled, PendingDelete: scheduled for deletion
- secret
Versions List<Property Map> - Credential version information. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- trn String
- Credential resource name. Format: trn:kms:${Region}:${AccountID}:secrets/${secret}
- uid String
- Credential tenant ID
- updated
Time Number - Credential update date
Look up Existing Secret Resource
Get an existing Secret resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: SecretState, opts?: CustomResourceOptions): Secret@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
automatic_rotation: Optional[bool] = None,
cancel_secret_deletion: Optional[bool] = None,
created_time: Optional[int] = None,
description: Optional[str] = None,
encryption_key: Optional[str] = None,
extended_config: Optional[str] = None,
last_rotation_time: Optional[str] = None,
managed: Optional[bool] = None,
owning_service: Optional[str] = None,
pending_window_in_days: Optional[int] = None,
project_name: Optional[str] = None,
rotation_interval: Optional[str] = None,
rotation_interval_read: Optional[int] = None,
rotation_state: Optional[str] = None,
schedule_delete_time: Optional[str] = None,
schedule_rotation_time: Optional[str] = None,
secret_backup: Optional[bool] = None,
secret_id: Optional[str] = None,
secret_name: Optional[str] = None,
secret_restore: Optional[SecretSecretRestoreArgs] = None,
secret_restore_read: Optional[SecretSecretRestoreReadArgs] = None,
secret_rotate: Optional[bool] = None,
secret_state: Optional[str] = None,
secret_type: Optional[str] = None,
secret_value: Optional[str] = None,
secret_versions: Optional[Sequence[SecretSecretVersionArgs]] = None,
trn: Optional[str] = None,
uid: Optional[str] = None,
updated_time: Optional[int] = None,
version_name: Optional[str] = None) -> Secretfunc GetSecret(ctx *Context, name string, id IDInput, state *SecretState, opts ...ResourceOption) (*Secret, error)public static Secret Get(string name, Input<string> id, SecretState? state, CustomResourceOptions? opts = null)public static Secret get(String name, Output<String> id, SecretState state, CustomResourceOptions options)resources: _: type: bytepluscc:kms:Secret get: id: ${id}import {
to = bytepluscc_kms_secret.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Automatic
Rotation bool - Whether to enable automatic rotation. Applies only to credentials of type IAM|RDS|Redis|ECS
- Cancel
Secret boolDeletion - Trigger: When set to true, calls the KMS CancelSecretDeletion API to cancel the scheduled deletion of the credential.
- Created
Time int - Credential creation time
- Description string
- Credential description, length: 0 ~ 8192 characters
- Encryption
Key string - KMS key TRN for encrypting credential value. If not specified, the default key of Credential Manager is used
- Extended
Config string - Credential extension configuration, used to specify properties for non-Generic credentials
- Last
Rotation stringTime - Credential last rotation time
- Managed bool
- Is managed credential
- Owning
Service string - Managed Cloud Service
- Pending
Window intIn Days - Credential pre-deletion period. During this time, you can revoke the deletion of credentials in pending deletion status; after the pre-deletion period, deletion cannot be revoked. Value range: 7 ~ 30. Unit: days. Default: 7. To cancel, use CancelSecretDeletion.
- Project
Name string - Credential project name. Default value: default
- Rotation
Interval string - Automatic rotation interval. Range: 1 ~ 365 days. Format: integer[unit], where integer is the duration and unit is the time unit. Unit value: d (days). For example: 7d means a 7-day interval
- Rotation
Interval intRead - Automatic rotation interval, unit: seconds
- Rotation
State string - Rotation status: Enable: automatic rotation enabled, Disable: automatic rotation disabled, Rotating: automatic rotation in progress, None: automatic rotation not supported
- Schedule
Delete stringTime - Credential Scheduled Deletion Time
- Schedule
Rotation stringTime - Credential next rotation time
- Secret
Backup bool - Trigger: When set to true, calls the KMS BackupSecret API to back up the credential. The backup result is written to SecretRestoreRead. Please keep it safe.
- Secret
Id string - Credential unique identifier, UUID format
- Secret
Name string - Credential name. Valid characters: [a-zA-Z0-9/_+=.@-]
- Secret
Restore Byteplus.Secret Secret Restore - Credential restore parameters. Only effective during creation. If provided, calls the KMS RestoreSecret API to restore the credential from backup data. Other creation parameters such as SecretValue, SecretType, and SecretName will not take effect.
- Secret
Restore Byteplus.Read Secret Secret Restore Read - Credential restore parameters. Returned only during backup.
- Secret
Rotate bool - Trigger: When set to true, calls the KMS RotateSecret API to manually rotate the credential.
- Secret
State stringValue - Credential status. Enable: enabled, Disable: disabled, PendingDelete: scheduled for deletion
- Secret
Type string - Credential type. Currently supports Generic|IAM|RDS|Redis|ECS|PGSQL|SQLServer
- Secret
Value string - Credential value. When SecretType is Generic, users can customize it. It is recommended to use JSON key-value pairs
- Secret
Versions List<Byteplus.Secret Secret Version> - Credential version information. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- Trn string
- Credential resource name. Format: trn:kms:${Region}:${AccountID}:secrets/${secret}
- Uid string
- Credential tenant ID
- Updated
Time int - Credential update date
- Version
Name string - Version alias. Valid characters: [a-zA-Z0-9/_+=.@-]
- Automatic
Rotation bool - Whether to enable automatic rotation. Applies only to credentials of type IAM|RDS|Redis|ECS
- Cancel
Secret boolDeletion - Trigger: When set to true, calls the KMS CancelSecretDeletion API to cancel the scheduled deletion of the credential.
- Created
Time int - Credential creation time
- Description string
- Credential description, length: 0 ~ 8192 characters
- Encryption
Key string - KMS key TRN for encrypting credential value. If not specified, the default key of Credential Manager is used
- Extended
Config string - Credential extension configuration, used to specify properties for non-Generic credentials
- Last
Rotation stringTime - Credential last rotation time
- Managed bool
- Is managed credential
- Owning
Service string - Managed Cloud Service
- Pending
Window intIn Days - Credential pre-deletion period. During this time, you can revoke the deletion of credentials in pending deletion status; after the pre-deletion period, deletion cannot be revoked. Value range: 7 ~ 30. Unit: days. Default: 7. To cancel, use CancelSecretDeletion.
- Project
Name string - Credential project name. Default value: default
- Rotation
Interval string - Automatic rotation interval. Range: 1 ~ 365 days. Format: integer[unit], where integer is the duration and unit is the time unit. Unit value: d (days). For example: 7d means a 7-day interval
- Rotation
Interval intRead - Automatic rotation interval, unit: seconds
- Rotation
State string - Rotation status: Enable: automatic rotation enabled, Disable: automatic rotation disabled, Rotating: automatic rotation in progress, None: automatic rotation not supported
- Schedule
Delete stringTime - Credential Scheduled Deletion Time
- Schedule
Rotation stringTime - Credential next rotation time
- Secret
Backup bool - Trigger: When set to true, calls the KMS BackupSecret API to back up the credential. The backup result is written to SecretRestoreRead. Please keep it safe.
- Secret
Id string - Credential unique identifier, UUID format
- Secret
Name string - Credential name. Valid characters: [a-zA-Z0-9/_+=.@-]
- Secret
Restore SecretSecret Restore Args - Credential restore parameters. Only effective during creation. If provided, calls the KMS RestoreSecret API to restore the credential from backup data. Other creation parameters such as SecretValue, SecretType, and SecretName will not take effect.
- Secret
Restore SecretRead Secret Restore Read Args - Credential restore parameters. Returned only during backup.
- Secret
Rotate bool - Trigger: When set to true, calls the KMS RotateSecret API to manually rotate the credential.
- Secret
State string - Credential status. Enable: enabled, Disable: disabled, PendingDelete: scheduled for deletion
- Secret
Type string - Credential type. Currently supports Generic|IAM|RDS|Redis|ECS|PGSQL|SQLServer
- Secret
Value string - Credential value. When SecretType is Generic, users can customize it. It is recommended to use JSON key-value pairs
- Secret
Versions []SecretSecret Version Args - Credential version information. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- Trn string
- Credential resource name. Format: trn:kms:${Region}:${AccountID}:secrets/${secret}
- Uid string
- Credential tenant ID
- Updated
Time int - Credential update date
- Version
Name string - Version alias. Valid characters: [a-zA-Z0-9/_+=.@-]
- automatic_
rotation bool - Whether to enable automatic rotation. Applies only to credentials of type IAM|RDS|Redis|ECS
- cancel_
secret_ booldeletion - Trigger: When set to true, calls the KMS CancelSecretDeletion API to cancel the scheduled deletion of the credential.
- created_
time number - Credential creation time
- description string
- Credential description, length: 0 ~ 8192 characters
- encryption_
key string - KMS key TRN for encrypting credential value. If not specified, the default key of Credential Manager is used
- extended_
config string - Credential extension configuration, used to specify properties for non-Generic credentials
- last_
rotation_ stringtime - Credential last rotation time
- managed bool
- Is managed credential
- owning_
service string - Managed Cloud Service
- pending_
window_ numberin_ days - Credential pre-deletion period. During this time, you can revoke the deletion of credentials in pending deletion status; after the pre-deletion period, deletion cannot be revoked. Value range: 7 ~ 30. Unit: days. Default: 7. To cancel, use CancelSecretDeletion.
- project_
name string - Credential project name. Default value: default
- rotation_
interval string - Automatic rotation interval. Range: 1 ~ 365 days. Format: integer[unit], where integer is the duration and unit is the time unit. Unit value: d (days). For example: 7d means a 7-day interval
- rotation_
interval_ numberread - Automatic rotation interval, unit: seconds
- rotation_
state string - Rotation status: Enable: automatic rotation enabled, Disable: automatic rotation disabled, Rotating: automatic rotation in progress, None: automatic rotation not supported
- schedule_
delete_ stringtime - Credential Scheduled Deletion Time
- schedule_
rotation_ stringtime - Credential next rotation time
- secret_
backup bool - Trigger: When set to true, calls the KMS BackupSecret API to back up the credential. The backup result is written to SecretRestoreRead. Please keep it safe.
- secret_
id string - Credential unique identifier, UUID format
- secret_
name string - Credential name. Valid characters: [a-zA-Z0-9/_+=.@-]
- secret_
restore object - Credential restore parameters. Only effective during creation. If provided, calls the KMS RestoreSecret API to restore the credential from backup data. Other creation parameters such as SecretValue, SecretType, and SecretName will not take effect.
- secret_
restore_ objectread - Credential restore parameters. Returned only during backup.
- secret_
rotate bool - Trigger: When set to true, calls the KMS RotateSecret API to manually rotate the credential.
- secret_
state string - Credential status. Enable: enabled, Disable: disabled, PendingDelete: scheduled for deletion
- secret_
type string - Credential type. Currently supports Generic|IAM|RDS|Redis|ECS|PGSQL|SQLServer
- secret_
value string - Credential value. When SecretType is Generic, users can customize it. It is recommended to use JSON key-value pairs
- secret_
versions list(object) - Credential version information. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- trn string
- Credential resource name. Format: trn:kms:${Region}:${AccountID}:secrets/${secret}
- uid string
- Credential tenant ID
- updated_
time number - Credential update date
- version_
name string - Version alias. Valid characters: [a-zA-Z0-9/_+=.@-]
- automatic
Rotation Boolean - Whether to enable automatic rotation. Applies only to credentials of type IAM|RDS|Redis|ECS
- cancel
Secret BooleanDeletion - Trigger: When set to true, calls the KMS CancelSecretDeletion API to cancel the scheduled deletion of the credential.
- created
Time Integer - Credential creation time
- description String
- Credential description, length: 0 ~ 8192 characters
- encryption
Key String - KMS key TRN for encrypting credential value. If not specified, the default key of Credential Manager is used
- extended
Config String - Credential extension configuration, used to specify properties for non-Generic credentials
- last
Rotation StringTime - Credential last rotation time
- managed Boolean
- Is managed credential
- owning
Service String - Managed Cloud Service
- pending
Window IntegerIn Days - Credential pre-deletion period. During this time, you can revoke the deletion of credentials in pending deletion status; after the pre-deletion period, deletion cannot be revoked. Value range: 7 ~ 30. Unit: days. Default: 7. To cancel, use CancelSecretDeletion.
- project
Name String - Credential project name. Default value: default
- rotation
Interval String - Automatic rotation interval. Range: 1 ~ 365 days. Format: integer[unit], where integer is the duration and unit is the time unit. Unit value: d (days). For example: 7d means a 7-day interval
- rotation
Interval IntegerRead - Automatic rotation interval, unit: seconds
- rotation
State String - Rotation status: Enable: automatic rotation enabled, Disable: automatic rotation disabled, Rotating: automatic rotation in progress, None: automatic rotation not supported
- schedule
Delete StringTime - Credential Scheduled Deletion Time
- schedule
Rotation StringTime - Credential next rotation time
- secret
Backup Boolean - Trigger: When set to true, calls the KMS BackupSecret API to back up the credential. The backup result is written to SecretRestoreRead. Please keep it safe.
- secret
Id String - Credential unique identifier, UUID format
- secret
Name String - Credential name. Valid characters: [a-zA-Z0-9/_+=.@-]
- secret
Restore SecretSecret Restore - Credential restore parameters. Only effective during creation. If provided, calls the KMS RestoreSecret API to restore the credential from backup data. Other creation parameters such as SecretValue, SecretType, and SecretName will not take effect.
- secret
Restore SecretRead Secret Restore Read - Credential restore parameters. Returned only during backup.
- secret
Rotate Boolean - Trigger: When set to true, calls the KMS RotateSecret API to manually rotate the credential.
- secret
State String - Credential status. Enable: enabled, Disable: disabled, PendingDelete: scheduled for deletion
- secret
Type String - Credential type. Currently supports Generic|IAM|RDS|Redis|ECS|PGSQL|SQLServer
- secret
Value String - Credential value. When SecretType is Generic, users can customize it. It is recommended to use JSON key-value pairs
- secret
Versions List<SecretSecret Version> - Credential version information. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- trn String
- Credential resource name. Format: trn:kms:${Region}:${AccountID}:secrets/${secret}
- uid String
- Credential tenant ID
- updated
Time Integer - Credential update date
- version
Name String - Version alias. Valid characters: [a-zA-Z0-9/_+=.@-]
- automatic
Rotation boolean - Whether to enable automatic rotation. Applies only to credentials of type IAM|RDS|Redis|ECS
- cancel
Secret booleanDeletion - Trigger: When set to true, calls the KMS CancelSecretDeletion API to cancel the scheduled deletion of the credential.
- created
Time number - Credential creation time
- description string
- Credential description, length: 0 ~ 8192 characters
- encryption
Key string - KMS key TRN for encrypting credential value. If not specified, the default key of Credential Manager is used
- extended
Config string - Credential extension configuration, used to specify properties for non-Generic credentials
- last
Rotation stringTime - Credential last rotation time
- managed boolean
- Is managed credential
- owning
Service string - Managed Cloud Service
- pending
Window numberIn Days - Credential pre-deletion period. During this time, you can revoke the deletion of credentials in pending deletion status; after the pre-deletion period, deletion cannot be revoked. Value range: 7 ~ 30. Unit: days. Default: 7. To cancel, use CancelSecretDeletion.
- project
Name string - Credential project name. Default value: default
- rotation
Interval string - Automatic rotation interval. Range: 1 ~ 365 days. Format: integer[unit], where integer is the duration and unit is the time unit. Unit value: d (days). For example: 7d means a 7-day interval
- rotation
Interval numberRead - Automatic rotation interval, unit: seconds
- rotation
State string - Rotation status: Enable: automatic rotation enabled, Disable: automatic rotation disabled, Rotating: automatic rotation in progress, None: automatic rotation not supported
- schedule
Delete stringTime - Credential Scheduled Deletion Time
- schedule
Rotation stringTime - Credential next rotation time
- secret
Backup boolean - Trigger: When set to true, calls the KMS BackupSecret API to back up the credential. The backup result is written to SecretRestoreRead. Please keep it safe.
- secret
Id string - Credential unique identifier, UUID format
- secret
Name string - Credential name. Valid characters: [a-zA-Z0-9/_+=.@-]
- secret
Restore SecretSecret Restore - Credential restore parameters. Only effective during creation. If provided, calls the KMS RestoreSecret API to restore the credential from backup data. Other creation parameters such as SecretValue, SecretType, and SecretName will not take effect.
- secret
Restore SecretRead Secret Restore Read - Credential restore parameters. Returned only during backup.
- secret
Rotate boolean - Trigger: When set to true, calls the KMS RotateSecret API to manually rotate the credential.
- secret
State string - Credential status. Enable: enabled, Disable: disabled, PendingDelete: scheduled for deletion
- secret
Type string - Credential type. Currently supports Generic|IAM|RDS|Redis|ECS|PGSQL|SQLServer
- secret
Value string - Credential value. When SecretType is Generic, users can customize it. It is recommended to use JSON key-value pairs
- secret
Versions SecretSecret Version[] - Credential version information. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- trn string
- Credential resource name. Format: trn:kms:${Region}:${AccountID}:secrets/${secret}
- uid string
- Credential tenant ID
- updated
Time number - Credential update date
- version
Name string - Version alias. Valid characters: [a-zA-Z0-9/_+=.@-]
- automatic_
rotation bool - Whether to enable automatic rotation. Applies only to credentials of type IAM|RDS|Redis|ECS
- cancel_
secret_ booldeletion - Trigger: When set to true, calls the KMS CancelSecretDeletion API to cancel the scheduled deletion of the credential.
- created_
time int - Credential creation time
- description str
- Credential description, length: 0 ~ 8192 characters
- encryption_
key str - KMS key TRN for encrypting credential value. If not specified, the default key of Credential Manager is used
- extended_
config str - Credential extension configuration, used to specify properties for non-Generic credentials
- last_
rotation_ strtime - Credential last rotation time
- managed bool
- Is managed credential
- owning_
service str - Managed Cloud Service
- pending_
window_ intin_ days - Credential pre-deletion period. During this time, you can revoke the deletion of credentials in pending deletion status; after the pre-deletion period, deletion cannot be revoked. Value range: 7 ~ 30. Unit: days. Default: 7. To cancel, use CancelSecretDeletion.
- project_
name str - Credential project name. Default value: default
- rotation_
interval str - Automatic rotation interval. Range: 1 ~ 365 days. Format: integer[unit], where integer is the duration and unit is the time unit. Unit value: d (days). For example: 7d means a 7-day interval
- rotation_
interval_ intread - Automatic rotation interval, unit: seconds
- rotation_
state str - Rotation status: Enable: automatic rotation enabled, Disable: automatic rotation disabled, Rotating: automatic rotation in progress, None: automatic rotation not supported
- schedule_
delete_ strtime - Credential Scheduled Deletion Time
- schedule_
rotation_ strtime - Credential next rotation time
- secret_
backup bool - Trigger: When set to true, calls the KMS BackupSecret API to back up the credential. The backup result is written to SecretRestoreRead. Please keep it safe.
- secret_
id str - Credential unique identifier, UUID format
- secret_
name str - Credential name. Valid characters: [a-zA-Z0-9/_+=.@-]
- secret_
restore SecretSecret Restore Args - Credential restore parameters. Only effective during creation. If provided, calls the KMS RestoreSecret API to restore the credential from backup data. Other creation parameters such as SecretValue, SecretType, and SecretName will not take effect.
- secret_
restore_ Secretread Secret Restore Read Args - Credential restore parameters. Returned only during backup.
- secret_
rotate bool - Trigger: When set to true, calls the KMS RotateSecret API to manually rotate the credential.
- secret_
state str - Credential status. Enable: enabled, Disable: disabled, PendingDelete: scheduled for deletion
- secret_
type str - Credential type. Currently supports Generic|IAM|RDS|Redis|ECS|PGSQL|SQLServer
- secret_
value str - Credential value. When SecretType is Generic, users can customize it. It is recommended to use JSON key-value pairs
- secret_
versions Sequence[SecretSecret Version Args] - Credential version information. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- trn str
- Credential resource name. Format: trn:kms:${Region}:${AccountID}:secrets/${secret}
- uid str
- Credential tenant ID
- updated_
time int - Credential update date
- version_
name str - Version alias. Valid characters: [a-zA-Z0-9/_+=.@-]
- automatic
Rotation Boolean - Whether to enable automatic rotation. Applies only to credentials of type IAM|RDS|Redis|ECS
- cancel
Secret BooleanDeletion - Trigger: When set to true, calls the KMS CancelSecretDeletion API to cancel the scheduled deletion of the credential.
- created
Time Number - Credential creation time
- description String
- Credential description, length: 0 ~ 8192 characters
- encryption
Key String - KMS key TRN for encrypting credential value. If not specified, the default key of Credential Manager is used
- extended
Config String - Credential extension configuration, used to specify properties for non-Generic credentials
- last
Rotation StringTime - Credential last rotation time
- managed Boolean
- Is managed credential
- owning
Service String - Managed Cloud Service
- pending
Window NumberIn Days - Credential pre-deletion period. During this time, you can revoke the deletion of credentials in pending deletion status; after the pre-deletion period, deletion cannot be revoked. Value range: 7 ~ 30. Unit: days. Default: 7. To cancel, use CancelSecretDeletion.
- project
Name String - Credential project name. Default value: default
- rotation
Interval String - Automatic rotation interval. Range: 1 ~ 365 days. Format: integer[unit], where integer is the duration and unit is the time unit. Unit value: d (days). For example: 7d means a 7-day interval
- rotation
Interval NumberRead - Automatic rotation interval, unit: seconds
- rotation
State String - Rotation status: Enable: automatic rotation enabled, Disable: automatic rotation disabled, Rotating: automatic rotation in progress, None: automatic rotation not supported
- schedule
Delete StringTime - Credential Scheduled Deletion Time
- schedule
Rotation StringTime - Credential next rotation time
- secret
Backup Boolean - Trigger: When set to true, calls the KMS BackupSecret API to back up the credential. The backup result is written to SecretRestoreRead. Please keep it safe.
- secret
Id String - Credential unique identifier, UUID format
- secret
Name String - Credential name. Valid characters: [a-zA-Z0-9/_+=.@-]
- secret
Restore Property Map - Credential restore parameters. Only effective during creation. If provided, calls the KMS RestoreSecret API to restore the credential from backup data. Other creation parameters such as SecretValue, SecretType, and SecretName will not take effect.
- secret
Restore Property MapRead - Credential restore parameters. Returned only during backup.
- secret
Rotate Boolean - Trigger: When set to true, calls the KMS RotateSecret API to manually rotate the credential.
- secret
State String - Credential status. Enable: enabled, Disable: disabled, PendingDelete: scheduled for deletion
- secret
Type String - Credential type. Currently supports Generic|IAM|RDS|Redis|ECS|PGSQL|SQLServer
- secret
Value String - Credential value. When SecretType is Generic, users can customize it. It is recommended to use JSON key-value pairs
- secret
Versions List<Property Map> - Credential version information. Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- trn String
- Credential resource name. Format: trn:kms:${Region}:${AccountID}:secrets/${secret}
- uid String
- Credential tenant ID
- updated
Time Number - Credential update date
- version
Name String - Version alias. Valid characters: [a-zA-Z0-9/_+=.@-]
Supporting Types
SecretSecretRestore, SecretSecretRestoreArgs
- Backup
Data string - Complete credential data returned by backup, in JSON format.
- Secret
Data stringKey - Encrypted data key returned by backup, Base64 encoded.
- Signature string
- Signature of the backup data, Base64 encoded.
- Backup
Data string - Complete credential data returned by backup, in JSON format.
- Secret
Data stringKey - Encrypted data key returned by backup, Base64 encoded.
- Signature string
- Signature of the backup data, Base64 encoded.
- backup_
data string - Complete credential data returned by backup, in JSON format.
- secret_
data_ stringkey - Encrypted data key returned by backup, Base64 encoded.
- signature string
- Signature of the backup data, Base64 encoded.
- backup
Data String - Complete credential data returned by backup, in JSON format.
- secret
Data StringKey - Encrypted data key returned by backup, Base64 encoded.
- signature String
- Signature of the backup data, Base64 encoded.
- backup
Data string - Complete credential data returned by backup, in JSON format.
- secret
Data stringKey - Encrypted data key returned by backup, Base64 encoded.
- signature string
- Signature of the backup data, Base64 encoded.
- backup_
data str - Complete credential data returned by backup, in JSON format.
- secret_
data_ strkey - Encrypted data key returned by backup, Base64 encoded.
- signature str
- Signature of the backup data, Base64 encoded.
- backup
Data String - Complete credential data returned by backup, in JSON format.
- secret
Data StringKey - Encrypted data key returned by backup, Base64 encoded.
- signature String
- Signature of the backup data, Base64 encoded.
SecretSecretRestoreRead, SecretSecretRestoreReadArgs
- Backup
Data string - Complete credential data returned by backup, in JSON format.
- Secret
Data stringKey - Encrypted data key returned by backup, Base64 encoded.
- Signature string
- Signature of the backup data, Base64 encoded.
- Backup
Data string - Complete credential data returned by backup, in JSON format.
- Secret
Data stringKey - Encrypted data key returned by backup, Base64 encoded.
- Signature string
- Signature of the backup data, Base64 encoded.
- backup_
data string - Complete credential data returned by backup, in JSON format.
- secret_
data_ stringkey - Encrypted data key returned by backup, Base64 encoded.
- signature string
- Signature of the backup data, Base64 encoded.
- backup
Data String - Complete credential data returned by backup, in JSON format.
- secret
Data StringKey - Encrypted data key returned by backup, Base64 encoded.
- signature String
- Signature of the backup data, Base64 encoded.
- backup
Data string - Complete credential data returned by backup, in JSON format.
- secret
Data stringKey - Encrypted data key returned by backup, Base64 encoded.
- signature string
- Signature of the backup data, Base64 encoded.
- backup_
data str - Complete credential data returned by backup, in JSON format.
- secret_
data_ strkey - Encrypted data key returned by backup, Base64 encoded.
- signature str
- Signature of the backup data, Base64 encoded.
- backup
Data String - Complete credential data returned by backup, in JSON format.
- secret
Data StringKey - Encrypted data key returned by backup, Base64 encoded.
- signature String
- Signature of the backup data, Base64 encoded.
SecretSecretVersion, SecretSecretVersionArgs
- Creation
Date int - Credential version creation time.
- Version
Id string - Unique identifier for the credential version, in UUID format.
- Version
Stage string - Credential version tags.
- Creation
Date int - Credential version creation time.
- Version
Id string - Unique identifier for the credential version, in UUID format.
- Version
Stage string - Credential version tags.
- creation_
date number - Credential version creation time.
- version_
id string - Unique identifier for the credential version, in UUID format.
- version_
stage string - Credential version tags.
- creation
Date Integer - Credential version creation time.
- version
Id String - Unique identifier for the credential version, in UUID format.
- version
Stage String - Credential version tags.
- creation
Date number - Credential version creation time.
- version
Id string - Unique identifier for the credential version, in UUID format.
- version
Stage string - Credential version tags.
- creation_
date int - Credential version creation time.
- version_
id str - Unique identifier for the credential version, in UUID format.
- version_
stage str - Credential version tags.
- creation
Date Number - Credential version creation time.
- version
Id String - Unique identifier for the credential version, in UUID format.
- version
Stage String - Credential version tags.
Import
$ pulumi import bytepluscc:kms/secret:Secret example "secret_name"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- bytepluscc byteplus-sdk/pulumi-bytepluscc
- License
- MPL-2.0
- Notes
- This Pulumi package is based on the
byteplusccTerraform Provider.
published on Monday, Jul 27, 2026 by Byteplus