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

    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 decrypt = volcengine.kms.getPlaintextsOutput({
        ciphertextBlob: encryptStable.ciphertextBlob,
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    encrypt_stable = volcengine.kms.Ciphertext("encryptStable",
        key_id="c44870c3-f33b-421a-****-a2bba37c993e",
        plaintext="VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==")
    decrypt = volcengine.kms.get_plaintexts_output(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.GetPlaintextsOutput(ctx, kms.GetPlaintextsOutputArgs{
    			CiphertextBlob: 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 decrypt = Volcengine.Kms.GetPlaintexts.Invoke(new()
        {
            CiphertextBlob = 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.GetPlaintextsArgs;
    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 decrypt = KmsFunctions.getPlaintexts(GetPlaintextsArgs.builder()
                .ciphertextBlob(encryptStable.ciphertextBlob())
                .build());
    
        }
    }
    
    resources:
      encryptStable:
        type: volcengine:kms:Ciphertext
        properties:
          keyId: c44870c3-f33b-421a-****-a2bba37c993e
          plaintext: VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==
    variables:
      decrypt:
        fn::invoke:
          Function: volcengine:kms:getPlaintexts
          Arguments:
            ciphertextBlob: ${encryptStable.ciphertextBlob}
    

    Using getPlaintexts

    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 getPlaintexts(args: GetPlaintextsArgs, opts?: InvokeOptions): Promise<GetPlaintextsResult>
    function getPlaintextsOutput(args: GetPlaintextsOutputArgs, opts?: InvokeOptions): Output<GetPlaintextsResult>
    def get_plaintexts(ciphertext_blob: Optional[str] = None,
                       encryption_context: Optional[str] = None,
                       output_file: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetPlaintextsResult
    def get_plaintexts_output(ciphertext_blob: Optional[pulumi.Input[str]] = None,
                       encryption_context: Optional[pulumi.Input[str]] = None,
                       output_file: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetPlaintextsResult]
    func GetPlaintexts(ctx *Context, args *GetPlaintextsArgs, opts ...InvokeOption) (*GetPlaintextsResult, error)
    func GetPlaintextsOutput(ctx *Context, args *GetPlaintextsOutputArgs, opts ...InvokeOption) GetPlaintextsResultOutput

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

    public static class GetPlaintexts 
    {
        public static Task<GetPlaintextsResult> InvokeAsync(GetPlaintextsArgs args, InvokeOptions? opts = null)
        public static Output<GetPlaintextsResult> Invoke(GetPlaintextsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPlaintextsResult> getPlaintexts(GetPlaintextsArgs args, InvokeOptions options)
    public static Output<GetPlaintextsResult> getPlaintexts(GetPlaintextsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: volcengine:kms/getPlaintexts:getPlaintexts
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CiphertextBlob string
    The ciphertext to be decrypted.
    EncryptionContext string
    The JSON string of key/value pairs.
    OutputFile string
    File name where to save data source results.
    CiphertextBlob string
    The ciphertext to be decrypted.
    EncryptionContext string
    The JSON string of key/value pairs.
    OutputFile string
    File name where to save data source results.
    ciphertextBlob String
    The ciphertext to be decrypted.
    encryptionContext String
    The JSON string of key/value pairs.
    outputFile String
    File name where to save data source results.
    ciphertextBlob string
    The ciphertext to be decrypted.
    encryptionContext string
    The JSON string of key/value pairs.
    outputFile string
    File name where to save data source results.
    ciphertext_blob str
    The ciphertext to be decrypted.
    encryption_context str
    The JSON string of key/value pairs.
    output_file str
    File name where to save data source results.
    ciphertextBlob String
    The ciphertext to be decrypted.
    encryptionContext String
    The JSON string of key/value pairs.
    outputFile String
    File name where to save data source results.

    getPlaintexts Result

    The following output properties are available:

    CiphertextBlob string
    Id string
    The provider-assigned unique ID for this managed resource.
    PlaintextInfos List<GetPlaintextsPlaintextInfo>
    The decrypted plaintext.
    TotalCount int
    The total count of query.
    EncryptionContext string
    OutputFile string
    CiphertextBlob string
    Id string
    The provider-assigned unique ID for this managed resource.
    PlaintextInfos []GetPlaintextsPlaintextInfo
    The decrypted plaintext.
    TotalCount int
    The total count of query.
    EncryptionContext string
    OutputFile string
    ciphertextBlob String
    id String
    The provider-assigned unique ID for this managed resource.
    plaintextInfos List<GetPlaintextsPlaintextInfo>
    The decrypted plaintext.
    totalCount Integer
    The total count of query.
    encryptionContext String
    outputFile String
    ciphertextBlob string
    id string
    The provider-assigned unique ID for this managed resource.
    plaintextInfos GetPlaintextsPlaintextInfo[]
    The decrypted plaintext.
    totalCount number
    The total count of query.
    encryptionContext string
    outputFile string
    ciphertext_blob str
    id str
    The provider-assigned unique ID for this managed resource.
    plaintext_infos Sequence[GetPlaintextsPlaintextInfo]
    The decrypted plaintext.
    total_count int
    The total count of query.
    encryption_context str
    output_file str
    ciphertextBlob String
    id String
    The provider-assigned unique ID for this managed resource.
    plaintextInfos List<Property Map>
    The decrypted plaintext.
    totalCount Number
    The total count of query.
    encryptionContext String
    outputFile String

    Supporting Types

    GetPlaintextsPlaintextInfo

    Plaintext string
    The decrypted plaintext, Base64 encoded.
    Plaintext string
    The decrypted plaintext, Base64 encoded.
    plaintext String
    The decrypted plaintext, Base64 encoded.
    plaintext string
    The decrypted plaintext, Base64 encoded.
    plaintext str
    The decrypted plaintext, Base64 encoded.
    plaintext String
    The decrypted plaintext, Base64 encoded.

    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