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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@pulumi/volcengine";
    
    const encrypted = volcengine.kms.getCiphertexts({
        keyId: "c44870c3-f33b-421a-****-a2bba37c993e",
        plaintext: "VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==",
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    encrypted = volcengine.kms.get_ciphertexts(key_id="c44870c3-f33b-421a-****-a2bba37c993e",
        plaintext="VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==")
    
    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 {
    		_, err := kms.GetCiphertexts(ctx, &kms.GetCiphertextsArgs{
    			KeyId:     pulumi.StringRef("c44870c3-f33b-421a-****-a2bba37c993e"),
    			Plaintext: "VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==",
    		}, nil)
    		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 encrypted = Volcengine.Kms.GetCiphertexts.Invoke(new()
        {
            KeyId = "c44870c3-f33b-421a-****-a2bba37c993e",
            Plaintext = "VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.kms.KmsFunctions;
    import com.pulumi.volcengine.kms.inputs.GetCiphertextsArgs;
    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) {
            final var encrypted = KmsFunctions.getCiphertexts(GetCiphertextsArgs.builder()
                .keyId("c44870c3-f33b-421a-****-a2bba37c993e")
                .plaintext("VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==")
                .build());
    
        }
    }
    
    variables:
      encrypted:
        fn::invoke:
          Function: volcengine:kms:getCiphertexts
          Arguments:
            keyId: c44870c3-f33b-421a-****-a2bba37c993e
            plaintext: VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==
    

    Using getCiphertexts

    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 getCiphertexts(args: GetCiphertextsArgs, opts?: InvokeOptions): Promise<GetCiphertextsResult>
    function getCiphertextsOutput(args: GetCiphertextsOutputArgs, opts?: InvokeOptions): Output<GetCiphertextsResult>
    def get_ciphertexts(encryption_context: Optional[str] = None,
                        key_id: Optional[str] = None,
                        key_name: Optional[str] = None,
                        keyring_name: Optional[str] = None,
                        output_file: Optional[str] = None,
                        plaintext: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetCiphertextsResult
    def get_ciphertexts_output(encryption_context: Optional[pulumi.Input[str]] = None,
                        key_id: Optional[pulumi.Input[str]] = None,
                        key_name: Optional[pulumi.Input[str]] = None,
                        keyring_name: Optional[pulumi.Input[str]] = None,
                        output_file: Optional[pulumi.Input[str]] = None,
                        plaintext: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetCiphertextsResult]
    func GetCiphertexts(ctx *Context, args *GetCiphertextsArgs, opts ...InvokeOption) (*GetCiphertextsResult, error)
    func GetCiphertextsOutput(ctx *Context, args *GetCiphertextsOutputArgs, opts ...InvokeOption) GetCiphertextsResultOutput

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

    public static class GetCiphertexts 
    {
        public static Task<GetCiphertextsResult> InvokeAsync(GetCiphertextsArgs args, InvokeOptions? opts = null)
        public static Output<GetCiphertextsResult> Invoke(GetCiphertextsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCiphertextsResult> getCiphertexts(GetCiphertextsArgs args, InvokeOptions options)
    public static Output<GetCiphertextsResult> getCiphertexts(GetCiphertextsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: volcengine:kms/getCiphertexts:getCiphertexts
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Plaintext string
    The plaintext to be encrypted, Base64 encoded.
    EncryptionContext string
    The JSON string of key/value pairs.
    KeyId string
    The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
    KeyName string
    The name of the key.
    KeyringName string
    The name of the keyring.
    OutputFile string
    File name where to save data source results.
    Plaintext string
    The plaintext to be encrypted, Base64 encoded.
    EncryptionContext string
    The JSON string of key/value pairs.
    KeyId string
    The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
    KeyName string
    The name of the key.
    KeyringName string
    The name of the keyring.
    OutputFile string
    File name where to save data source results.
    plaintext String
    The plaintext to be encrypted, Base64 encoded.
    encryptionContext String
    The JSON string of key/value pairs.
    keyId String
    The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
    keyName String
    The name of the key.
    keyringName String
    The name of the keyring.
    outputFile String
    File name where to save data source results.
    plaintext string
    The plaintext to be encrypted, Base64 encoded.
    encryptionContext string
    The JSON string of key/value pairs.
    keyId string
    The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
    keyName string
    The name of the key.
    keyringName string
    The name of the keyring.
    outputFile string
    File name where to save data source results.
    plaintext str
    The plaintext to be encrypted, Base64 encoded.
    encryption_context str
    The JSON string of key/value pairs.
    key_id str
    The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
    key_name str
    The name of the key.
    keyring_name str
    The name of the keyring.
    output_file str
    File name where to save data source results.
    plaintext String
    The plaintext to be encrypted, Base64 encoded.
    encryptionContext String
    The JSON string of key/value pairs.
    keyId String
    The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
    keyName String
    The name of the key.
    keyringName String
    The name of the keyring.
    outputFile String
    File name where to save data source results.

    getCiphertexts Result

    The following output properties are available:

    CiphertextInfos List<GetCiphertextsCiphertextInfo>
    The information about the ciphertext.
    Id string
    The provider-assigned unique ID for this managed resource.
    Plaintext string
    TotalCount int
    The total count of query.
    EncryptionContext string
    KeyId string
    KeyName string
    KeyringName string
    OutputFile string
    CiphertextInfos []GetCiphertextsCiphertextInfo
    The information about the ciphertext.
    Id string
    The provider-assigned unique ID for this managed resource.
    Plaintext string
    TotalCount int
    The total count of query.
    EncryptionContext string
    KeyId string
    KeyName string
    KeyringName string
    OutputFile string
    ciphertextInfos List<GetCiphertextsCiphertextInfo>
    The information about the ciphertext.
    id String
    The provider-assigned unique ID for this managed resource.
    plaintext String
    totalCount Integer
    The total count of query.
    encryptionContext String
    keyId String
    keyName String
    keyringName String
    outputFile String
    ciphertextInfos GetCiphertextsCiphertextInfo[]
    The information about the ciphertext.
    id string
    The provider-assigned unique ID for this managed resource.
    plaintext string
    totalCount number
    The total count of query.
    encryptionContext string
    keyId string
    keyName string
    keyringName string
    outputFile string
    ciphertext_infos Sequence[GetCiphertextsCiphertextInfo]
    The information about the ciphertext.
    id str
    The provider-assigned unique ID for this managed resource.
    plaintext str
    total_count int
    The total count of query.
    encryption_context str
    key_id str
    key_name str
    keyring_name str
    output_file str
    ciphertextInfos List<Property Map>
    The information about the ciphertext.
    id String
    The provider-assigned unique ID for this managed resource.
    plaintext String
    totalCount Number
    The total count of query.
    encryptionContext String
    keyId String
    keyName String
    keyringName String
    outputFile String

    Supporting Types

    GetCiphertextsCiphertextInfo

    CiphertextBlob string
    The ciphertext, Base64 encoded. The plaintext gets re-encrypted on each apply, resulting in a changed ciphertext_blob. If a stable ciphertext is needed use the volcengine.kms.Ciphertext resource.
    CiphertextBlob string
    The ciphertext, Base64 encoded. The plaintext gets re-encrypted on each apply, resulting in a changed ciphertext_blob. If a stable ciphertext is needed use the volcengine.kms.Ciphertext resource.
    ciphertextBlob String
    The ciphertext, Base64 encoded. The plaintext gets re-encrypted on each apply, resulting in a changed ciphertext_blob. If a stable ciphertext is needed use the volcengine.kms.Ciphertext resource.
    ciphertextBlob string
    The ciphertext, Base64 encoded. The plaintext gets re-encrypted on each apply, resulting in a changed ciphertext_blob. If a stable ciphertext is needed use the volcengine.kms.Ciphertext resource.
    ciphertext_blob str
    The ciphertext, Base64 encoded. The plaintext gets re-encrypted on each apply, resulting in a changed ciphertext_blob. If a stable ciphertext is needed use the volcengine.kms.Ciphertext resource.
    ciphertextBlob String
    The ciphertext, Base64 encoded. The plaintext gets re-encrypted on each apply, resulting in a changed ciphertext_blob. If a stable ciphertext is needed use the volcengine.kms.Ciphertext 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