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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@volcengine/pulumi";
    
    const encrypt1 = new volcengine.kms.AsymmetricCiphertext("encrypt1", {
        algorithm: "RSAES_OAEP_SHA_256",
        keyId: "9601e1af-ad69-42df-****-eaf10ce6a3e9",
        plaintext: "VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==",
    });
    const encrypt2 = new volcengine.kms.AsymmetricCiphertext("encrypt2", {
        algorithm: "SM2PKE",
        keyName: "ec-sm2",
        keyringName: "Tf-test",
        plaintext: "VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==",
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    encrypt1 = volcengine.kms.AsymmetricCiphertext("encrypt1",
        algorithm="RSAES_OAEP_SHA_256",
        key_id="9601e1af-ad69-42df-****-eaf10ce6a3e9",
        plaintext="VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==")
    encrypt2 = volcengine.kms.AsymmetricCiphertext("encrypt2",
        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.NewAsymmetricCiphertext(ctx, "encrypt1", &kms.AsymmetricCiphertextArgs{
    			Algorithm: pulumi.String("RSAES_OAEP_SHA_256"),
    			KeyId:     pulumi.String("9601e1af-ad69-42df-****-eaf10ce6a3e9"),
    			Plaintext: pulumi.String("VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg=="),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = kms.NewAsymmetricCiphertext(ctx, "encrypt2", &kms.AsymmetricCiphertextArgs{
    			Algorithm:   pulumi.String("SM2PKE"),
    			KeyName:     pulumi.String("ec-sm2"),
    			KeyringName: pulumi.String("Tf-test"),
    			Plaintext:   pulumi.String("VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg=="),
    		})
    		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 = new Volcengine.Kms.AsymmetricCiphertext("encrypt1", new()
        {
            Algorithm = "RSAES_OAEP_SHA_256",
            KeyId = "9601e1af-ad69-42df-****-eaf10ce6a3e9",
            Plaintext = "VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==",
        });
    
        var encrypt2 = new Volcengine.Kms.AsymmetricCiphertext("encrypt2", 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.AsymmetricCiphertext;
    import com.pulumi.volcengine.kms.AsymmetricCiphertextArgs;
    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 encrypt1 = new AsymmetricCiphertext("encrypt1", AsymmetricCiphertextArgs.builder()        
                .algorithm("RSAES_OAEP_SHA_256")
                .keyId("9601e1af-ad69-42df-****-eaf10ce6a3e9")
                .plaintext("VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==")
                .build());
    
            var encrypt2 = new AsymmetricCiphertext("encrypt2", AsymmetricCiphertextArgs.builder()        
                .algorithm("SM2PKE")
                .keyName("ec-sm2")
                .keyringName("Tf-test")
                .plaintext("VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==")
                .build());
    
        }
    }
    
    resources:
      encrypt1:
        type: volcengine:kms:AsymmetricCiphertext
        properties:
          algorithm: RSAES_OAEP_SHA_256
          keyId: 9601e1af-ad69-42df-****-eaf10ce6a3e9
          plaintext: VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==
      encrypt2:
        type: volcengine:kms:AsymmetricCiphertext
        properties:
          algorithm: SM2PKE
          keyName: ec-sm2
          keyringName: Tf-test
          plaintext: VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==
    

    Create AsymmetricCiphertext Resource

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

    Constructor syntax

    new AsymmetricCiphertext(name: string, args: AsymmetricCiphertextArgs, opts?: CustomResourceOptions);
    @overload
    def AsymmetricCiphertext(resource_name: str,
                             args: AsymmetricCiphertextArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def AsymmetricCiphertext(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             algorithm: Optional[str] = None,
                             plaintext: Optional[str] = None,
                             key_id: Optional[str] = None,
                             key_name: Optional[str] = None,
                             keyring_name: Optional[str] = None)
    func NewAsymmetricCiphertext(ctx *Context, name string, args AsymmetricCiphertextArgs, opts ...ResourceOption) (*AsymmetricCiphertext, error)
    public AsymmetricCiphertext(string name, AsymmetricCiphertextArgs args, CustomResourceOptions? opts = null)
    public AsymmetricCiphertext(String name, AsymmetricCiphertextArgs args)
    public AsymmetricCiphertext(String name, AsymmetricCiphertextArgs args, CustomResourceOptions options)
    
    type: volcengine:kms:AsymmetricCiphertext
    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 AsymmetricCiphertextArgs
    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 AsymmetricCiphertextArgs
    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 AsymmetricCiphertextArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AsymmetricCiphertextArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AsymmetricCiphertextArgs
    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 asymmetricCiphertextResource = new Volcengine.Kms.AsymmetricCiphertext("asymmetricCiphertextResource", new()
    {
        Algorithm = "string",
        Plaintext = "string",
        KeyId = "string",
        KeyName = "string",
        KeyringName = "string",
    });
    
    example, err := kms.NewAsymmetricCiphertext(ctx, "asymmetricCiphertextResource", &kms.AsymmetricCiphertextArgs{
    	Algorithm:   pulumi.String("string"),
    	Plaintext:   pulumi.String("string"),
    	KeyId:       pulumi.String("string"),
    	KeyName:     pulumi.String("string"),
    	KeyringName: pulumi.String("string"),
    })
    
    var asymmetricCiphertextResource = new AsymmetricCiphertext("asymmetricCiphertextResource", AsymmetricCiphertextArgs.builder()
        .algorithm("string")
        .plaintext("string")
        .keyId("string")
        .keyName("string")
        .keyringName("string")
        .build());
    
    asymmetric_ciphertext_resource = volcengine.kms.AsymmetricCiphertext("asymmetricCiphertextResource",
        algorithm="string",
        plaintext="string",
        key_id="string",
        key_name="string",
        keyring_name="string")
    
    const asymmetricCiphertextResource = new volcengine.kms.AsymmetricCiphertext("asymmetricCiphertextResource", {
        algorithm: "string",
        plaintext: "string",
        keyId: "string",
        keyName: "string",
        keyringName: "string",
    });
    
    type: volcengine:kms:AsymmetricCiphertext
    properties:
        algorithm: string
        keyId: string
        keyName: string
        keyringName: string
        plaintext: string
    

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

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

    Outputs

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

    CiphertextBlob string
    The ciphertext, Base64 encoded. The produced ciphertext_blob stays stable across applies. If the plaintext should be re-encrypted on each apply use the volcengine.kms.getAsymmetricCiphertexts data source.
    Id string
    The provider-assigned unique ID for this managed resource.
    CiphertextBlob string
    The ciphertext, Base64 encoded. The produced ciphertext_blob stays stable across applies. If the plaintext should be re-encrypted on each apply use the volcengine.kms.getAsymmetricCiphertexts data source.
    Id string
    The provider-assigned unique ID for this managed resource.
    ciphertextBlob String
    The ciphertext, Base64 encoded. The produced ciphertext_blob stays stable across applies. If the plaintext should be re-encrypted on each apply use the volcengine.kms.getAsymmetricCiphertexts data source.
    id String
    The provider-assigned unique ID for this managed resource.
    ciphertextBlob string
    The ciphertext, Base64 encoded. The produced ciphertext_blob stays stable across applies. If the plaintext should be re-encrypted on each apply use the volcengine.kms.getAsymmetricCiphertexts data source.
    id string
    The provider-assigned unique ID for this managed resource.
    ciphertext_blob str
    The ciphertext, Base64 encoded. The produced ciphertext_blob stays stable across applies. If the plaintext should be re-encrypted on each apply use the volcengine.kms.getAsymmetricCiphertexts data source.
    id str
    The provider-assigned unique ID for this managed resource.
    ciphertextBlob String
    The ciphertext, Base64 encoded. The produced ciphertext_blob stays stable across applies. If the plaintext should be re-encrypted on each apply use the volcengine.kms.getAsymmetricCiphertexts data source.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing AsymmetricCiphertext Resource

    Get an existing AsymmetricCiphertext 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?: AsymmetricCiphertextState, opts?: CustomResourceOptions): AsymmetricCiphertext
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            algorithm: Optional[str] = None,
            ciphertext_blob: Optional[str] = None,
            key_id: Optional[str] = None,
            key_name: Optional[str] = None,
            keyring_name: Optional[str] = None,
            plaintext: Optional[str] = None) -> AsymmetricCiphertext
    func GetAsymmetricCiphertext(ctx *Context, name string, id IDInput, state *AsymmetricCiphertextState, opts ...ResourceOption) (*AsymmetricCiphertext, error)
    public static AsymmetricCiphertext Get(string name, Input<string> id, AsymmetricCiphertextState? state, CustomResourceOptions? opts = null)
    public static AsymmetricCiphertext get(String name, Output<String> id, AsymmetricCiphertextState state, CustomResourceOptions options)
    resources:  _:    type: volcengine:kms:AsymmetricCiphertext    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:
    Algorithm string
    The encryption algorithm. valid values: RSAES_OAEP_SHA_256, SM2PKE.
    CiphertextBlob string
    The ciphertext, Base64 encoded. The produced ciphertext_blob stays stable across applies. If the plaintext should be re-encrypted on each apply use the volcengine.kms.getAsymmetricCiphertexts data source.
    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.
    Plaintext string
    The plaintext to be encrypted, Base64 encoded.
    Algorithm string
    The encryption algorithm. valid values: RSAES_OAEP_SHA_256, SM2PKE.
    CiphertextBlob string
    The ciphertext, Base64 encoded. The produced ciphertext_blob stays stable across applies. If the plaintext should be re-encrypted on each apply use the volcengine.kms.getAsymmetricCiphertexts data source.
    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.
    Plaintext string
    The plaintext to be encrypted, Base64 encoded.
    algorithm String
    The encryption algorithm. valid values: RSAES_OAEP_SHA_256, SM2PKE.
    ciphertextBlob String
    The ciphertext, Base64 encoded. The produced ciphertext_blob stays stable across applies. If the plaintext should be re-encrypted on each apply use the volcengine.kms.getAsymmetricCiphertexts data source.
    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.
    plaintext String
    The plaintext to be encrypted, Base64 encoded.
    algorithm string
    The encryption algorithm. valid values: RSAES_OAEP_SHA_256, SM2PKE.
    ciphertextBlob string
    The ciphertext, Base64 encoded. The produced ciphertext_blob stays stable across applies. If the plaintext should be re-encrypted on each apply use the volcengine.kms.getAsymmetricCiphertexts data source.
    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.
    plaintext string
    The plaintext to be encrypted, Base64 encoded.
    algorithm str
    The encryption algorithm. valid values: RSAES_OAEP_SHA_256, SM2PKE.
    ciphertext_blob str
    The ciphertext, Base64 encoded. The produced ciphertext_blob stays stable across applies. If the plaintext should be re-encrypted on each apply use the volcengine.kms.getAsymmetricCiphertexts data source.
    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.
    plaintext str
    The plaintext to be encrypted, Base64 encoded.
    algorithm String
    The encryption algorithm. valid values: RSAES_OAEP_SHA_256, SM2PKE.
    ciphertextBlob String
    The ciphertext, Base64 encoded. The produced ciphertext_blob stays stable across applies. If the plaintext should be re-encrypted on each apply use the volcengine.kms.getAsymmetricCiphertexts data source.
    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.
    plaintext String
    The plaintext to be encrypted, Base64 encoded.

    Import

    The KmsAsymmetricCiphertext 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