1. Packages
  2. Volcengine
  3. API Docs
  4. kms
  5. ReEncrypt
Volcengine v0.0.46 published on Friday, Feb 27, 2026 by Volcengine
volcengine logo
Volcengine v0.0.46 published on Friday, Feb 27, 2026 by Volcengine

    Provides a resource to manage kms re encrypt

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@volcengine/pulumi";
    
    const encryptStable = new volcengine.kms.Ciphertext("encryptStable", {
        keyId: "c44870c3-f33b-421a-****-a2bba37c993e",
        plaintext: "VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==",
    });
    const reEncryptStable = new volcengine.kms.ReEncrypt("reEncryptStable", {
        newKeyId: "33e6ae1f-62f6-415a-****-579f526274cc",
        sourceCiphertextBlob: encryptStable.ciphertextBlob,
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    encrypt_stable = volcengine.kms.Ciphertext("encryptStable",
        key_id="c44870c3-f33b-421a-****-a2bba37c993e",
        plaintext="VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==")
    re_encrypt_stable = volcengine.kms.ReEncrypt("reEncryptStable",
        new_key_id="33e6ae1f-62f6-415a-****-579f526274cc",
        source_ciphertext_blob=encrypt_stable.ciphertext_blob)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/kms"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		encryptStable, err := kms.NewCiphertext(ctx, "encryptStable", &kms.CiphertextArgs{
    			KeyId:     pulumi.String("c44870c3-f33b-421a-****-a2bba37c993e"),
    			Plaintext: pulumi.String("VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg=="),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = kms.NewReEncrypt(ctx, "reEncryptStable", &kms.ReEncryptArgs{
    			NewKeyId:             pulumi.String("33e6ae1f-62f6-415a-****-579f526274cc"),
    			SourceCiphertextBlob: encryptStable.CiphertextBlob,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var encryptStable = new Volcengine.Kms.Ciphertext("encryptStable", new()
        {
            KeyId = "c44870c3-f33b-421a-****-a2bba37c993e",
            Plaintext = "VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==",
        });
    
        var reEncryptStable = new Volcengine.Kms.ReEncrypt("reEncryptStable", new()
        {
            NewKeyId = "33e6ae1f-62f6-415a-****-579f526274cc",
            SourceCiphertextBlob = encryptStable.CiphertextBlob,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.kms.Ciphertext;
    import com.pulumi.volcengine.kms.CiphertextArgs;
    import com.pulumi.volcengine.kms.ReEncrypt;
    import com.pulumi.volcengine.kms.ReEncryptArgs;
    import java.util.List;
    import java.util.ArrayList;
    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 encryptStable = new Ciphertext("encryptStable", CiphertextArgs.builder()        
                .keyId("c44870c3-f33b-421a-****-a2bba37c993e")
                .plaintext("VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==")
                .build());
    
            var reEncryptStable = new ReEncrypt("reEncryptStable", ReEncryptArgs.builder()        
                .newKeyId("33e6ae1f-62f6-415a-****-579f526274cc")
                .sourceCiphertextBlob(encryptStable.ciphertextBlob())
                .build());
    
        }
    }
    
    resources:
      encryptStable:
        type: volcengine:kms:Ciphertext
        properties:
          keyId: c44870c3-f33b-421a-****-a2bba37c993e
          plaintext: VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==
      reEncryptStable:
        type: volcengine:kms:ReEncrypt
        properties:
          newKeyId: 33e6ae1f-62f6-415a-****-579f526274cc
          sourceCiphertextBlob: ${encryptStable.ciphertextBlob}
    

    Create ReEncrypt Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ReEncrypt(name: string, args: ReEncryptArgs, opts?: CustomResourceOptions);
    @overload
    def ReEncrypt(resource_name: str,
                  args: ReEncryptArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def ReEncrypt(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  source_ciphertext_blob: Optional[str] = None,
                  new_encryption_context: Optional[str] = None,
                  new_key_id: Optional[str] = None,
                  new_key_name: Optional[str] = None,
                  new_keyring_name: Optional[str] = None,
                  old_encryption_context: Optional[str] = None)
    func NewReEncrypt(ctx *Context, name string, args ReEncryptArgs, opts ...ResourceOption) (*ReEncrypt, error)
    public ReEncrypt(string name, ReEncryptArgs args, CustomResourceOptions? opts = null)
    public ReEncrypt(String name, ReEncryptArgs args)
    public ReEncrypt(String name, ReEncryptArgs args, CustomResourceOptions options)
    
    type: volcengine:kms:ReEncrypt
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ReEncryptArgs
    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 ReEncryptArgs
    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 ReEncryptArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ReEncryptArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ReEncryptArgs
    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 reEncryptResource = new Volcengine.Kms.ReEncrypt("reEncryptResource", new()
    {
        SourceCiphertextBlob = "string",
        NewEncryptionContext = "string",
        NewKeyId = "string",
        NewKeyName = "string",
        NewKeyringName = "string",
        OldEncryptionContext = "string",
    });
    
    example, err := kms.NewReEncrypt(ctx, "reEncryptResource", &kms.ReEncryptArgs{
    	SourceCiphertextBlob: pulumi.String("string"),
    	NewEncryptionContext: pulumi.String("string"),
    	NewKeyId:             pulumi.String("string"),
    	NewKeyName:           pulumi.String("string"),
    	NewKeyringName:       pulumi.String("string"),
    	OldEncryptionContext: pulumi.String("string"),
    })
    
    var reEncryptResource = new ReEncrypt("reEncryptResource", ReEncryptArgs.builder()
        .sourceCiphertextBlob("string")
        .newEncryptionContext("string")
        .newKeyId("string")
        .newKeyName("string")
        .newKeyringName("string")
        .oldEncryptionContext("string")
        .build());
    
    re_encrypt_resource = volcengine.kms.ReEncrypt("reEncryptResource",
        source_ciphertext_blob="string",
        new_encryption_context="string",
        new_key_id="string",
        new_key_name="string",
        new_keyring_name="string",
        old_encryption_context="string")
    
    const reEncryptResource = new volcengine.kms.ReEncrypt("reEncryptResource", {
        sourceCiphertextBlob: "string",
        newEncryptionContext: "string",
        newKeyId: "string",
        newKeyName: "string",
        newKeyringName: "string",
        oldEncryptionContext: "string",
    });
    
    type: volcengine:kms:ReEncrypt
    properties:
        newEncryptionContext: string
        newKeyId: string
        newKeyName: string
        newKeyringName: string
        oldEncryptionContext: string
        sourceCiphertextBlob: string
    

    ReEncrypt 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 ReEncrypt resource accepts the following input properties:

    SourceCiphertextBlob string
    The source ciphertext, Base64 encoded.
    NewEncryptionContext string
    The new encryption context JSON string.
    NewKeyId string
    The new key id. When new_key_id is not specified, both new_keyring_name and new_key_name must be specified.
    NewKeyName string
    The new key name.
    NewKeyringName string
    The new keyring name.
    OldEncryptionContext string
    The old encryption context JSON string.
    SourceCiphertextBlob string
    The source ciphertext, Base64 encoded.
    NewEncryptionContext string
    The new encryption context JSON string.
    NewKeyId string
    The new key id. When new_key_id is not specified, both new_keyring_name and new_key_name must be specified.
    NewKeyName string
    The new key name.
    NewKeyringName string
    The new keyring name.
    OldEncryptionContext string
    The old encryption context JSON string.
    sourceCiphertextBlob String
    The source ciphertext, Base64 encoded.
    newEncryptionContext String
    The new encryption context JSON string.
    newKeyId String
    The new key id. When new_key_id is not specified, both new_keyring_name and new_key_name must be specified.
    newKeyName String
    The new key name.
    newKeyringName String
    The new keyring name.
    oldEncryptionContext String
    The old encryption context JSON string.
    sourceCiphertextBlob string
    The source ciphertext, Base64 encoded.
    newEncryptionContext string
    The new encryption context JSON string.
    newKeyId string
    The new key id. When new_key_id is not specified, both new_keyring_name and new_key_name must be specified.
    newKeyName string
    The new key name.
    newKeyringName string
    The new keyring name.
    oldEncryptionContext string
    The old encryption context JSON string.
    source_ciphertext_blob str
    The source ciphertext, Base64 encoded.
    new_encryption_context str
    The new encryption context JSON string.
    new_key_id str
    The new key id. When new_key_id is not specified, both new_keyring_name and new_key_name must be specified.
    new_key_name str
    The new key name.
    new_keyring_name str
    The new keyring name.
    old_encryption_context str
    The old encryption context JSON string.
    sourceCiphertextBlob String
    The source ciphertext, Base64 encoded.
    newEncryptionContext String
    The new encryption context JSON string.
    newKeyId String
    The new key id. When new_key_id is not specified, both new_keyring_name and new_key_name must be specified.
    newKeyName String
    The new key name.
    newKeyringName String
    The new keyring name.
    oldEncryptionContext String
    The old encryption context JSON string.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ReEncrypt resource produces the following output properties:

    CiphertextBlob string
    The re-encrypted ciphertext, Base64 encoded. The data stays stable across applies. If a changing ciphertext is needed use the volcengine.kms.getReEncrypts data source.
    Id string
    The provider-assigned unique ID for this managed resource.
    CiphertextBlob string
    The re-encrypted ciphertext, Base64 encoded. The data stays stable across applies. If a changing ciphertext is needed use the volcengine.kms.getReEncrypts data source.
    Id string
    The provider-assigned unique ID for this managed resource.
    ciphertextBlob String
    The re-encrypted ciphertext, Base64 encoded. The data stays stable across applies. If a changing ciphertext is needed use the volcengine.kms.getReEncrypts data source.
    id String
    The provider-assigned unique ID for this managed resource.
    ciphertextBlob string
    The re-encrypted ciphertext, Base64 encoded. The data stays stable across applies. If a changing ciphertext is needed use the volcengine.kms.getReEncrypts data source.
    id string
    The provider-assigned unique ID for this managed resource.
    ciphertext_blob str
    The re-encrypted ciphertext, Base64 encoded. The data stays stable across applies. If a changing ciphertext is needed use the volcengine.kms.getReEncrypts data source.
    id str
    The provider-assigned unique ID for this managed resource.
    ciphertextBlob String
    The re-encrypted ciphertext, Base64 encoded. The data stays stable across applies. If a changing ciphertext is needed use the volcengine.kms.getReEncrypts data source.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ReEncrypt Resource

    Get an existing ReEncrypt 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?: ReEncryptState, opts?: CustomResourceOptions): ReEncrypt
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            ciphertext_blob: Optional[str] = None,
            new_encryption_context: Optional[str] = None,
            new_key_id: Optional[str] = None,
            new_key_name: Optional[str] = None,
            new_keyring_name: Optional[str] = None,
            old_encryption_context: Optional[str] = None,
            source_ciphertext_blob: Optional[str] = None) -> ReEncrypt
    func GetReEncrypt(ctx *Context, name string, id IDInput, state *ReEncryptState, opts ...ResourceOption) (*ReEncrypt, error)
    public static ReEncrypt Get(string name, Input<string> id, ReEncryptState? state, CustomResourceOptions? opts = null)
    public static ReEncrypt get(String name, Output<String> id, ReEncryptState state, CustomResourceOptions options)
    resources:  _:    type: volcengine:kms:ReEncrypt    get:      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.
    The following state arguments are supported:
    CiphertextBlob string
    The re-encrypted ciphertext, Base64 encoded. The data stays stable across applies. If a changing ciphertext is needed use the volcengine.kms.getReEncrypts data source.
    NewEncryptionContext string
    The new encryption context JSON string.
    NewKeyId string
    The new key id. When new_key_id is not specified, both new_keyring_name and new_key_name must be specified.
    NewKeyName string
    The new key name.
    NewKeyringName string
    The new keyring name.
    OldEncryptionContext string
    The old encryption context JSON string.
    SourceCiphertextBlob string
    The source ciphertext, Base64 encoded.
    CiphertextBlob string
    The re-encrypted ciphertext, Base64 encoded. The data stays stable across applies. If a changing ciphertext is needed use the volcengine.kms.getReEncrypts data source.
    NewEncryptionContext string
    The new encryption context JSON string.
    NewKeyId string
    The new key id. When new_key_id is not specified, both new_keyring_name and new_key_name must be specified.
    NewKeyName string
    The new key name.
    NewKeyringName string
    The new keyring name.
    OldEncryptionContext string
    The old encryption context JSON string.
    SourceCiphertextBlob string
    The source ciphertext, Base64 encoded.
    ciphertextBlob String
    The re-encrypted ciphertext, Base64 encoded. The data stays stable across applies. If a changing ciphertext is needed use the volcengine.kms.getReEncrypts data source.
    newEncryptionContext String
    The new encryption context JSON string.
    newKeyId String
    The new key id. When new_key_id is not specified, both new_keyring_name and new_key_name must be specified.
    newKeyName String
    The new key name.
    newKeyringName String
    The new keyring name.
    oldEncryptionContext String
    The old encryption context JSON string.
    sourceCiphertextBlob String
    The source ciphertext, Base64 encoded.
    ciphertextBlob string
    The re-encrypted ciphertext, Base64 encoded. The data stays stable across applies. If a changing ciphertext is needed use the volcengine.kms.getReEncrypts data source.
    newEncryptionContext string
    The new encryption context JSON string.
    newKeyId string
    The new key id. When new_key_id is not specified, both new_keyring_name and new_key_name must be specified.
    newKeyName string
    The new key name.
    newKeyringName string
    The new keyring name.
    oldEncryptionContext string
    The old encryption context JSON string.
    sourceCiphertextBlob string
    The source ciphertext, Base64 encoded.
    ciphertext_blob str
    The re-encrypted ciphertext, Base64 encoded. The data stays stable across applies. If a changing ciphertext is needed use the volcengine.kms.getReEncrypts data source.
    new_encryption_context str
    The new encryption context JSON string.
    new_key_id str
    The new key id. When new_key_id is not specified, both new_keyring_name and new_key_name must be specified.
    new_key_name str
    The new key name.
    new_keyring_name str
    The new keyring name.
    old_encryption_context str
    The old encryption context JSON string.
    source_ciphertext_blob str
    The source ciphertext, Base64 encoded.
    ciphertextBlob String
    The re-encrypted ciphertext, Base64 encoded. The data stays stable across applies. If a changing ciphertext is needed use the volcengine.kms.getReEncrypts data source.
    newEncryptionContext String
    The new encryption context JSON string.
    newKeyId String
    The new key id. When new_key_id is not specified, both new_keyring_name and new_key_name must be specified.
    newKeyName String
    The new key name.
    newKeyringName String
    The new keyring name.
    oldEncryptionContext String
    The old encryption context JSON string.
    sourceCiphertextBlob String
    The source ciphertext, Base64 encoded.

    Import

    The KmsReEncrypt is not support import.

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.46 published on Friday, Feb 27, 2026 by Volcengine
      Meet Neo: Your AI Platform Teammate