1. Packages
  2. Volcengine
  3. API Docs
  4. kms
  5. getReEncrypts
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

    Use this data source to query detailed information of kms re encrypts

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@pulumi/volcengine";
    import * as volcengine from "@volcengine/pulumi";
    
    const encryptStable = new volcengine.kms.Ciphertext("encryptStable", {
        keyId: "c44870c3-f33b-421a-****-a2bba37c993e",
        plaintext: "VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==",
    });
    const reEncryptChanging = volcengine.kms.getReEncryptsOutput({
        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_changing = volcengine.kms.get_re_encrypts_output(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
    		}
    		_ = kms.GetReEncryptsOutput(ctx, kms.GetReEncryptsOutputArgs{
    			NewKeyId:             pulumi.String("33e6ae1f-62f6-415a-****-579f526274cc"),
    			SourceCiphertextBlob: encryptStable.CiphertextBlob,
    		}, nil)
    		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 reEncryptChanging = Volcengine.Kms.GetReEncrypts.Invoke(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.KmsFunctions;
    import com.pulumi.volcengine.kms.inputs.GetReEncryptsArgs;
    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());
    
            final var reEncryptChanging = KmsFunctions.getReEncrypts(GetReEncryptsArgs.builder()
                .newKeyId("33e6ae1f-62f6-415a-****-579f526274cc")
                .sourceCiphertextBlob(encryptStable.ciphertextBlob())
                .build());
    
        }
    }
    
    resources:
      encryptStable:
        type: volcengine:kms:Ciphertext
        properties:
          keyId: c44870c3-f33b-421a-****-a2bba37c993e
          plaintext: VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==
    variables:
      reEncryptChanging:
        fn::invoke:
          Function: volcengine:kms:getReEncrypts
          Arguments:
            newKeyId: 33e6ae1f-62f6-415a-****-579f526274cc
            sourceCiphertextBlob: ${encryptStable.ciphertextBlob}
    

    Using getReEncrypts

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getReEncrypts(args: GetReEncryptsArgs, opts?: InvokeOptions): Promise<GetReEncryptsResult>
    function getReEncryptsOutput(args: GetReEncryptsOutputArgs, opts?: InvokeOptions): Output<GetReEncryptsResult>
    def get_re_encrypts(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,
                        output_file: Optional[str] = None,
                        source_ciphertext_blob: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetReEncryptsResult
    def get_re_encrypts_output(new_encryption_context: Optional[pulumi.Input[str]] = None,
                        new_key_id: Optional[pulumi.Input[str]] = None,
                        new_key_name: Optional[pulumi.Input[str]] = None,
                        new_keyring_name: Optional[pulumi.Input[str]] = None,
                        old_encryption_context: Optional[pulumi.Input[str]] = None,
                        output_file: Optional[pulumi.Input[str]] = None,
                        source_ciphertext_blob: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetReEncryptsResult]
    func GetReEncrypts(ctx *Context, args *GetReEncryptsArgs, opts ...InvokeOption) (*GetReEncryptsResult, error)
    func GetReEncryptsOutput(ctx *Context, args *GetReEncryptsOutputArgs, opts ...InvokeOption) GetReEncryptsResultOutput

    > Note: This function is named GetReEncrypts in the Go SDK.

    public static class GetReEncrypts 
    {
        public static Task<GetReEncryptsResult> InvokeAsync(GetReEncryptsArgs args, InvokeOptions? opts = null)
        public static Output<GetReEncryptsResult> Invoke(GetReEncryptsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetReEncryptsResult> getReEncrypts(GetReEncryptsArgs args, InvokeOptions options)
    public static Output<GetReEncryptsResult> getReEncrypts(GetReEncryptsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: volcengine:kms/getReEncrypts:getReEncrypts
      arguments:
        # arguments dictionary

    The following arguments are supported:

    SourceCiphertextBlob string
    The ciphertext data to be re-encrypted, Base64 encoded.
    NewEncryptionContext string
    The new encryption context JSON string of key/value pairs.
    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 of key/value pairs.
    OutputFile string
    File name where to save data source results.
    SourceCiphertextBlob string
    The ciphertext data to be re-encrypted, Base64 encoded.
    NewEncryptionContext string
    The new encryption context JSON string of key/value pairs.
    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 of key/value pairs.
    OutputFile string
    File name where to save data source results.
    sourceCiphertextBlob String
    The ciphertext data to be re-encrypted, Base64 encoded.
    newEncryptionContext String
    The new encryption context JSON string of key/value pairs.
    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 of key/value pairs.
    outputFile String
    File name where to save data source results.
    sourceCiphertextBlob string
    The ciphertext data to be re-encrypted, Base64 encoded.
    newEncryptionContext string
    The new encryption context JSON string of key/value pairs.
    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 of key/value pairs.
    outputFile string
    File name where to save data source results.
    source_ciphertext_blob str
    The ciphertext data to be re-encrypted, Base64 encoded.
    new_encryption_context str
    The new encryption context JSON string of key/value pairs.
    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 of key/value pairs.
    output_file str
    File name where to save data source results.
    sourceCiphertextBlob String
    The ciphertext data to be re-encrypted, Base64 encoded.
    newEncryptionContext String
    The new encryption context JSON string of key/value pairs.
    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 of key/value pairs.
    outputFile String
    File name where to save data source results.

    getReEncrypts Result

    The following output properties are available:

    CiphertextInfos List<GetReEncryptsCiphertextInfo>
    The information about the ciphertext.
    Id string
    The provider-assigned unique ID for this managed resource.
    SourceCiphertextBlob string
    TotalCount int
    The total count of query.
    NewEncryptionContext string
    NewKeyId string
    NewKeyName string
    NewKeyringName string
    OldEncryptionContext string
    OutputFile string
    CiphertextInfos []GetReEncryptsCiphertextInfo
    The information about the ciphertext.
    Id string
    The provider-assigned unique ID for this managed resource.
    SourceCiphertextBlob string
    TotalCount int
    The total count of query.
    NewEncryptionContext string
    NewKeyId string
    NewKeyName string
    NewKeyringName string
    OldEncryptionContext string
    OutputFile string
    ciphertextInfos List<GetReEncryptsCiphertextInfo>
    The information about the ciphertext.
    id String
    The provider-assigned unique ID for this managed resource.
    sourceCiphertextBlob String
    totalCount Integer
    The total count of query.
    newEncryptionContext String
    newKeyId String
    newKeyName String
    newKeyringName String
    oldEncryptionContext String
    outputFile String
    ciphertextInfos GetReEncryptsCiphertextInfo[]
    The information about the ciphertext.
    id string
    The provider-assigned unique ID for this managed resource.
    sourceCiphertextBlob string
    totalCount number
    The total count of query.
    newEncryptionContext string
    newKeyId string
    newKeyName string
    newKeyringName string
    oldEncryptionContext string
    outputFile string
    ciphertext_infos Sequence[GetReEncryptsCiphertextInfo]
    The information about the ciphertext.
    id str
    The provider-assigned unique ID for this managed resource.
    source_ciphertext_blob str
    total_count int
    The total count of query.
    new_encryption_context str
    new_key_id str
    new_key_name str
    new_keyring_name str
    old_encryption_context str
    output_file str
    ciphertextInfos List<Property Map>
    The information about the ciphertext.
    id String
    The provider-assigned unique ID for this managed resource.
    sourceCiphertextBlob String
    totalCount Number
    The total count of query.
    newEncryptionContext String
    newKeyId String
    newKeyName String
    newKeyringName String
    oldEncryptionContext String
    outputFile String

    Supporting Types

    GetReEncryptsCiphertextInfo

    CiphertextBlob string
    The re-encrypted ciphertext, Base64 encoded. The data gets re-encrypted on each apply, resulting in a changed ciphertext_blob. If a stable ciphertext is needed use the volcengine.kms.ReEncrypt resource.
    CiphertextBlob string
    The re-encrypted ciphertext, Base64 encoded. The data gets re-encrypted on each apply, resulting in a changed ciphertext_blob. If a stable ciphertext is needed use the volcengine.kms.ReEncrypt resource.
    ciphertextBlob String
    The re-encrypted ciphertext, Base64 encoded. The data gets re-encrypted on each apply, resulting in a changed ciphertext_blob. If a stable ciphertext is needed use the volcengine.kms.ReEncrypt resource.
    ciphertextBlob string
    The re-encrypted ciphertext, Base64 encoded. The data gets re-encrypted on each apply, resulting in a changed ciphertext_blob. If a stable ciphertext is needed use the volcengine.kms.ReEncrypt resource.
    ciphertext_blob str
    The re-encrypted ciphertext, Base64 encoded. The data gets re-encrypted on each apply, resulting in a changed ciphertext_blob. If a stable ciphertext is needed use the volcengine.kms.ReEncrypt resource.
    ciphertextBlob String
    The re-encrypted ciphertext, Base64 encoded. The data gets re-encrypted on each apply, resulting in a changed ciphertext_blob. If a stable ciphertext is needed use the volcengine.kms.ReEncrypt resource.

    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