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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@pulumi/volcengine";
    
    const encrypt1 = volcengine.kms.getAsymmetricCiphertexts({
        algorithm: "RSAES_OAEP_SHA_256",
        keyId: "9601e1af-ad69-42df-****-eaf10ce6a3e9",
        plaintext: "VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==",
    });
    const encrypt2 = volcengine.kms.getAsymmetricCiphertexts({
        algorithm: "SM2PKE",
        keyName: "ec-sm2",
        keyringName: "Tf-test",
        plaintext: "VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==",
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    encrypt1 = volcengine.kms.get_asymmetric_ciphertexts(algorithm="RSAES_OAEP_SHA_256",
        key_id="9601e1af-ad69-42df-****-eaf10ce6a3e9",
        plaintext="VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==")
    encrypt2 = volcengine.kms.get_asymmetric_ciphertexts(algorithm="SM2PKE",
        key_name="ec-sm2",
        keyring_name="Tf-test",
        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.GetAsymmetricCiphertexts(ctx, &kms.GetAsymmetricCiphertextsArgs{
    			Algorithm: "RSAES_OAEP_SHA_256",
    			KeyId:     pulumi.StringRef("9601e1af-ad69-42df-****-eaf10ce6a3e9"),
    			Plaintext: "VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = kms.GetAsymmetricCiphertexts(ctx, &kms.GetAsymmetricCiphertextsArgs{
    			Algorithm:   "SM2PKE",
    			KeyName:     pulumi.StringRef("ec-sm2"),
    			KeyringName: pulumi.StringRef("Tf-test"),
    			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 encrypt1 = Volcengine.Kms.GetAsymmetricCiphertexts.Invoke(new()
        {
            Algorithm = "RSAES_OAEP_SHA_256",
            KeyId = "9601e1af-ad69-42df-****-eaf10ce6a3e9",
            Plaintext = "VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==",
        });
    
        var encrypt2 = Volcengine.Kms.GetAsymmetricCiphertexts.Invoke(new()
        {
            Algorithm = "SM2PKE",
            KeyName = "ec-sm2",
            KeyringName = "Tf-test",
            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.GetAsymmetricCiphertextsArgs;
    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 encrypt1 = KmsFunctions.getAsymmetricCiphertexts(GetAsymmetricCiphertextsArgs.builder()
                .algorithm("RSAES_OAEP_SHA_256")
                .keyId("9601e1af-ad69-42df-****-eaf10ce6a3e9")
                .plaintext("VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==")
                .build());
    
            final var encrypt2 = KmsFunctions.getAsymmetricCiphertexts(GetAsymmetricCiphertextsArgs.builder()
                .algorithm("SM2PKE")
                .keyName("ec-sm2")
                .keyringName("Tf-test")
                .plaintext("VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==")
                .build());
    
        }
    }
    
    variables:
      encrypt1:
        fn::invoke:
          Function: volcengine:kms:getAsymmetricCiphertexts
          Arguments:
            algorithm: RSAES_OAEP_SHA_256
            keyId: 9601e1af-ad69-42df-****-eaf10ce6a3e9
            plaintext: VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==
      encrypt2:
        fn::invoke:
          Function: volcengine:kms:getAsymmetricCiphertexts
          Arguments:
            algorithm: SM2PKE
            keyName: ec-sm2
            keyringName: Tf-test
            plaintext: VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==
    

    Using getAsymmetricCiphertexts

    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 getAsymmetricCiphertexts(args: GetAsymmetricCiphertextsArgs, opts?: InvokeOptions): Promise<GetAsymmetricCiphertextsResult>
    function getAsymmetricCiphertextsOutput(args: GetAsymmetricCiphertextsOutputArgs, opts?: InvokeOptions): Output<GetAsymmetricCiphertextsResult>
    def get_asymmetric_ciphertexts(algorithm: 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) -> GetAsymmetricCiphertextsResult
    def get_asymmetric_ciphertexts_output(algorithm: 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[GetAsymmetricCiphertextsResult]
    func GetAsymmetricCiphertexts(ctx *Context, args *GetAsymmetricCiphertextsArgs, opts ...InvokeOption) (*GetAsymmetricCiphertextsResult, error)
    func GetAsymmetricCiphertextsOutput(ctx *Context, args *GetAsymmetricCiphertextsOutputArgs, opts ...InvokeOption) GetAsymmetricCiphertextsResultOutput

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

    public static class GetAsymmetricCiphertexts 
    {
        public static Task<GetAsymmetricCiphertextsResult> InvokeAsync(GetAsymmetricCiphertextsArgs args, InvokeOptions? opts = null)
        public static Output<GetAsymmetricCiphertextsResult> Invoke(GetAsymmetricCiphertextsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAsymmetricCiphertextsResult> getAsymmetricCiphertexts(GetAsymmetricCiphertextsArgs args, InvokeOptions options)
    public static Output<GetAsymmetricCiphertextsResult> getAsymmetricCiphertexts(GetAsymmetricCiphertextsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: volcengine:kms/getAsymmetricCiphertexts:getAsymmetricCiphertexts
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Algorithm string
    The encryption algorithm. valid values: RSAES_OAEP_SHA_256, SM2PKE.
    Plaintext string
    The plaintext to be encrypted, Base64 encoded.
    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.
    Algorithm string
    The encryption algorithm. valid values: RSAES_OAEP_SHA_256, SM2PKE.
    Plaintext string
    The plaintext to be encrypted, Base64 encoded.
    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.
    algorithm String
    The encryption algorithm. valid values: RSAES_OAEP_SHA_256, SM2PKE.
    plaintext String
    The plaintext to be encrypted, Base64 encoded.
    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.
    algorithm string
    The encryption algorithm. valid values: RSAES_OAEP_SHA_256, SM2PKE.
    plaintext string
    The plaintext to be encrypted, Base64 encoded.
    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.
    algorithm str
    The encryption algorithm. valid values: RSAES_OAEP_SHA_256, SM2PKE.
    plaintext str
    The plaintext to be encrypted, Base64 encoded.
    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.
    algorithm String
    The encryption algorithm. valid values: RSAES_OAEP_SHA_256, SM2PKE.
    plaintext String
    The plaintext to be encrypted, Base64 encoded.
    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.

    getAsymmetricCiphertexts Result

    The following output properties are available:

    Algorithm string
    CiphertextInfos List<GetAsymmetricCiphertextsCiphertextInfo>
    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.
    KeyId string
    KeyName string
    KeyringName string
    OutputFile string
    Algorithm string
    CiphertextInfos []GetAsymmetricCiphertextsCiphertextInfo
    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.
    KeyId string
    KeyName string
    KeyringName string
    OutputFile string
    algorithm String
    ciphertextInfos List<GetAsymmetricCiphertextsCiphertextInfo>
    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.
    keyId String
    keyName String
    keyringName String
    outputFile String
    algorithm string
    ciphertextInfos GetAsymmetricCiphertextsCiphertextInfo[]
    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.
    keyId string
    keyName string
    keyringName string
    outputFile string
    algorithm str
    ciphertext_infos Sequence[GetAsymmetricCiphertextsCiphertextInfo]
    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.
    key_id str
    key_name str
    keyring_name str
    output_file str
    algorithm String
    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.
    keyId String
    keyName String
    keyringName String
    outputFile String

    Supporting Types

    GetAsymmetricCiphertextsCiphertextInfo

    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.AsymmetricCiphertext 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.AsymmetricCiphertext 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.AsymmetricCiphertext 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.AsymmetricCiphertext 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.AsymmetricCiphertext 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.AsymmetricCiphertext 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