1. Packages
  2. Volcengine
  3. API Docs
  4. kms
  5. KeyMaterials
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
    Deprecated: volcengine.kms.KeyMaterials has been deprecated in favor of volcengine.kms.getKeyMaterials

    Use this data source to query detailed information of kms key materials

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@pulumi/volcengine";
    
    const default = volcengine.kms.getKeyMaterials({
        keyName: "Test-3",
        keyringName: "Tf-test-1",
        wrappingAlgorithm: "RSAES_OAEP_SHA_256",
        wrappingKeySpec: "RSA_2048",
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    default = volcengine.kms.get_key_materials(key_name="Test-3",
        keyring_name="Tf-test-1",
        wrapping_algorithm="RSAES_OAEP_SHA_256",
        wrapping_key_spec="RSA_2048")
    
    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.GetKeyMaterials(ctx, &kms.GetKeyMaterialsArgs{
    			KeyName:           pulumi.StringRef("Test-3"),
    			KeyringName:       pulumi.StringRef("Tf-test-1"),
    			WrappingAlgorithm: pulumi.StringRef("RSAES_OAEP_SHA_256"),
    			WrappingKeySpec:   pulumi.StringRef("RSA_2048"),
    		}, 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 @default = Volcengine.Kms.GetKeyMaterials.Invoke(new()
        {
            KeyName = "Test-3",
            KeyringName = "Tf-test-1",
            WrappingAlgorithm = "RSAES_OAEP_SHA_256",
            WrappingKeySpec = "RSA_2048",
        });
    
    });
    
    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.GetKeyMaterialsArgs;
    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 default = KmsFunctions.getKeyMaterials(GetKeyMaterialsArgs.builder()
                .keyName("Test-3")
                .keyringName("Tf-test-1")
                .wrappingAlgorithm("RSAES_OAEP_SHA_256")
                .wrappingKeySpec("RSA_2048")
                .build());
    
        }
    }
    
    variables:
      default:
        fn::invoke:
          Function: volcengine:kms:getKeyMaterials
          Arguments:
            keyName: Test-3
            keyringName: Tf-test-1
            wrappingAlgorithm: RSAES_OAEP_SHA_256
            wrappingKeySpec: RSA_2048
    

    Using KeyMaterials

    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 keyMaterials(args: KeyMaterialsArgs, opts?: InvokeOptions): Promise<KeyMaterialsResult>
    function keyMaterialsOutput(args: KeyMaterialsOutputArgs, opts?: InvokeOptions): Output<KeyMaterialsResult>
    def key_materials(key_id: Optional[str] = None,
                      key_name: Optional[str] = None,
                      keyring_name: Optional[str] = None,
                      output_file: Optional[str] = None,
                      wrapping_algorithm: Optional[str] = None,
                      wrapping_key_spec: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> KeyMaterialsResult
    def key_materials_output(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,
                      wrapping_algorithm: Optional[pulumi.Input[str]] = None,
                      wrapping_key_spec: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[KeyMaterialsResult]
    func KeyMaterials(ctx *Context, args *KeyMaterialsArgs, opts ...InvokeOption) (*KeyMaterialsResult, error)
    func KeyMaterialsOutput(ctx *Context, args *KeyMaterialsOutputArgs, opts ...InvokeOption) KeyMaterialsResultOutput
    public static class KeyMaterials 
    {
        public static Task<KeyMaterialsResult> InvokeAsync(KeyMaterialsArgs args, InvokeOptions? opts = null)
        public static Output<KeyMaterialsResult> Invoke(KeyMaterialsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<KeyMaterialsResult> keyMaterials(KeyMaterialsArgs args, InvokeOptions options)
    public static Output<KeyMaterialsResult> keyMaterials(KeyMaterialsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: volcengine:kms:KeyMaterials
      arguments:
        # arguments dictionary

    The following arguments are supported:

    KeyId string
    The id of key. When key_id is not specified, both keyring_name and key_name must be specified.
    KeyName string
    The name of key.
    KeyringName string
    The name of keyring.
    OutputFile string
    File name where to save data source results.
    WrappingAlgorithm string
    The wrapping algorithm. Valid values: RSAES_OAEP_SHA_256, RSAES_OAEP_SHA_1, RSAES_PKCS1_V1_5, SM2PKE. Default value: RSAES_OAEP_SHA_256. When the wrapping_key_spec is EC_SM2, only SM2PKE is supported.
    WrappingKeySpec string
    The wrapping key spec. Valid values: RSA_2048, EC_SM2. Default value: RSA_2048. When the user's master key protection level is SOFTWARE, selecting EC_SM2 is prohibited.
    KeyId string
    The id of key. When key_id is not specified, both keyring_name and key_name must be specified.
    KeyName string
    The name of key.
    KeyringName string
    The name of keyring.
    OutputFile string
    File name where to save data source results.
    WrappingAlgorithm string
    The wrapping algorithm. Valid values: RSAES_OAEP_SHA_256, RSAES_OAEP_SHA_1, RSAES_PKCS1_V1_5, SM2PKE. Default value: RSAES_OAEP_SHA_256. When the wrapping_key_spec is EC_SM2, only SM2PKE is supported.
    WrappingKeySpec string
    The wrapping key spec. Valid values: RSA_2048, EC_SM2. Default value: RSA_2048. When the user's master key protection level is SOFTWARE, selecting EC_SM2 is prohibited.
    keyId String
    The id of key. When key_id is not specified, both keyring_name and key_name must be specified.
    keyName String
    The name of key.
    keyringName String
    The name of keyring.
    outputFile String
    File name where to save data source results.
    wrappingAlgorithm String
    The wrapping algorithm. Valid values: RSAES_OAEP_SHA_256, RSAES_OAEP_SHA_1, RSAES_PKCS1_V1_5, SM2PKE. Default value: RSAES_OAEP_SHA_256. When the wrapping_key_spec is EC_SM2, only SM2PKE is supported.
    wrappingKeySpec String
    The wrapping key spec. Valid values: RSA_2048, EC_SM2. Default value: RSA_2048. When the user's master key protection level is SOFTWARE, selecting EC_SM2 is prohibited.
    keyId string
    The id of key. When key_id is not specified, both keyring_name and key_name must be specified.
    keyName string
    The name of key.
    keyringName string
    The name of keyring.
    outputFile string
    File name where to save data source results.
    wrappingAlgorithm string
    The wrapping algorithm. Valid values: RSAES_OAEP_SHA_256, RSAES_OAEP_SHA_1, RSAES_PKCS1_V1_5, SM2PKE. Default value: RSAES_OAEP_SHA_256. When the wrapping_key_spec is EC_SM2, only SM2PKE is supported.
    wrappingKeySpec string
    The wrapping key spec. Valid values: RSA_2048, EC_SM2. Default value: RSA_2048. When the user's master key protection level is SOFTWARE, selecting EC_SM2 is prohibited.
    key_id str
    The id of key. When key_id is not specified, both keyring_name and key_name must be specified.
    key_name str
    The name of key.
    keyring_name str
    The name of keyring.
    output_file str
    File name where to save data source results.
    wrapping_algorithm str
    The wrapping algorithm. Valid values: RSAES_OAEP_SHA_256, RSAES_OAEP_SHA_1, RSAES_PKCS1_V1_5, SM2PKE. Default value: RSAES_OAEP_SHA_256. When the wrapping_key_spec is EC_SM2, only SM2PKE is supported.
    wrapping_key_spec str
    The wrapping key spec. Valid values: RSA_2048, EC_SM2. Default value: RSA_2048. When the user's master key protection level is SOFTWARE, selecting EC_SM2 is prohibited.
    keyId String
    The id of key. When key_id is not specified, both keyring_name and key_name must be specified.
    keyName String
    The name of key.
    keyringName String
    The name of keyring.
    outputFile String
    File name where to save data source results.
    wrappingAlgorithm String
    The wrapping algorithm. Valid values: RSAES_OAEP_SHA_256, RSAES_OAEP_SHA_1, RSAES_PKCS1_V1_5, SM2PKE. Default value: RSAES_OAEP_SHA_256. When the wrapping_key_spec is EC_SM2, only SM2PKE is supported.
    wrappingKeySpec String
    The wrapping key spec. Valid values: RSA_2048, EC_SM2. Default value: RSA_2048. When the user's master key protection level is SOFTWARE, selecting EC_SM2 is prohibited.

    KeyMaterials Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    ImportParameters List<KeyMaterialsImportParameter>
    The import parameters info.
    TotalCount int
    The total count of query.
    KeyId string
    The id of key.
    KeyName string
    KeyringName string
    OutputFile string
    WrappingAlgorithm string
    WrappingKeySpec string
    Id string
    The provider-assigned unique ID for this managed resource.
    ImportParameters []KeyMaterialsImportParameter
    The import parameters info.
    TotalCount int
    The total count of query.
    KeyId string
    The id of key.
    KeyName string
    KeyringName string
    OutputFile string
    WrappingAlgorithm string
    WrappingKeySpec string
    id String
    The provider-assigned unique ID for this managed resource.
    importParameters List<KeyMaterialsImportParameter>
    The import parameters info.
    totalCount Integer
    The total count of query.
    keyId String
    The id of key.
    keyName String
    keyringName String
    outputFile String
    wrappingAlgorithm String
    wrappingKeySpec String
    id string
    The provider-assigned unique ID for this managed resource.
    importParameters KeyMaterialsImportParameter[]
    The import parameters info.
    totalCount number
    The total count of query.
    keyId string
    The id of key.
    keyName string
    keyringName string
    outputFile string
    wrappingAlgorithm string
    wrappingKeySpec string
    id str
    The provider-assigned unique ID for this managed resource.
    import_parameters Sequence[KeyMaterialsImportParameter]
    The import parameters info.
    total_count int
    The total count of query.
    key_id str
    The id of key.
    key_name str
    keyring_name str
    output_file str
    wrapping_algorithm str
    wrapping_key_spec str
    id String
    The provider-assigned unique ID for this managed resource.
    importParameters List<Property Map>
    The import parameters info.
    totalCount Number
    The total count of query.
    keyId String
    The id of key.
    keyName String
    keyringName String
    outputFile String
    wrappingAlgorithm String
    wrappingKeySpec String

    Supporting Types

    KeyMaterialsImportParameter

    ImportToken string
    The import token, Base64 encoded.
    KeyId string
    The id of key. When key_id is not specified, both keyring_name and key_name must be specified.
    KeyringId string
    The id of keyring.
    PublicKey string
    The public key used to encrypt key materials, Base64 encoded.
    TokenExpireTime string
    The token expire time.
    ImportToken string
    The import token, Base64 encoded.
    KeyId string
    The id of key. When key_id is not specified, both keyring_name and key_name must be specified.
    KeyringId string
    The id of keyring.
    PublicKey string
    The public key used to encrypt key materials, Base64 encoded.
    TokenExpireTime string
    The token expire time.
    importToken String
    The import token, Base64 encoded.
    keyId String
    The id of key. When key_id is not specified, both keyring_name and key_name must be specified.
    keyringId String
    The id of keyring.
    publicKey String
    The public key used to encrypt key materials, Base64 encoded.
    tokenExpireTime String
    The token expire time.
    importToken string
    The import token, Base64 encoded.
    keyId string
    The id of key. When key_id is not specified, both keyring_name and key_name must be specified.
    keyringId string
    The id of keyring.
    publicKey string
    The public key used to encrypt key materials, Base64 encoded.
    tokenExpireTime string
    The token expire time.
    import_token str
    The import token, Base64 encoded.
    key_id str
    The id of key. When key_id is not specified, both keyring_name and key_name must be specified.
    keyring_id str
    The id of keyring.
    public_key str
    The public key used to encrypt key materials, Base64 encoded.
    token_expire_time str
    The token expire time.
    importToken String
    The import token, Base64 encoded.
    keyId String
    The id of key. When key_id is not specified, both keyring_name and key_name must be specified.
    keyringId String
    The id of keyring.
    publicKey String
    The public key used to encrypt key materials, Base64 encoded.
    tokenExpireTime String
    The token expire time.

    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