Volcengine v0.0.46 published on Friday, Feb 27, 2026 by Volcengine
Volcengine v0.0.46 published on Friday, Feb 27, 2026 by Volcengine
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 getKeyMaterials
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 getKeyMaterials(args: GetKeyMaterialsArgs, opts?: InvokeOptions): Promise<GetKeyMaterialsResult>
function getKeyMaterialsOutput(args: GetKeyMaterialsOutputArgs, opts?: InvokeOptions): Output<GetKeyMaterialsResult>def get_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) -> GetKeyMaterialsResult
def get_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[GetKeyMaterialsResult]func GetKeyMaterials(ctx *Context, args *GetKeyMaterialsArgs, opts ...InvokeOption) (*GetKeyMaterialsResult, error)
func GetKeyMaterialsOutput(ctx *Context, args *GetKeyMaterialsOutputArgs, opts ...InvokeOption) GetKeyMaterialsResultOutput> Note: This function is named GetKeyMaterials in the Go SDK.
public static class GetKeyMaterials
{
public static Task<GetKeyMaterialsResult> InvokeAsync(GetKeyMaterialsArgs args, InvokeOptions? opts = null)
public static Output<GetKeyMaterialsResult> Invoke(GetKeyMaterialsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetKeyMaterialsResult> getKeyMaterials(GetKeyMaterialsArgs args, InvokeOptions options)
public static Output<GetKeyMaterialsResult> getKeyMaterials(GetKeyMaterialsArgs args, InvokeOptions options)
fn::invoke:
function: volcengine:kms/getKeyMaterials:getKeyMaterials
arguments:
# arguments dictionaryThe following arguments are supported:
- Key
Id string - The id of key. When key_id is not specified, both keyring_name and key_name must be specified.
- Key
Name string - The name of key.
- Keyring
Name string - The name of keyring.
- Output
File string - File name where to save data source results.
- Wrapping
Algorithm 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. - Wrapping
Key stringSpec - 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 string - The id of key. When key_id is not specified, both keyring_name and key_name must be specified.
- Key
Name string - The name of key.
- Keyring
Name string - The name of keyring.
- Output
File string - File name where to save data source results.
- Wrapping
Algorithm 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. - Wrapping
Key stringSpec - 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 String - The id of key. When key_id is not specified, both keyring_name and key_name must be specified.
- key
Name String - The name of key.
- keyring
Name String - The name of keyring.
- output
File String - File name where to save data source results.
- wrapping
Algorithm 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. - wrapping
Key StringSpec - 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 string - The id of key. When key_id is not specified, both keyring_name and key_name must be specified.
- key
Name string - The name of key.
- keyring
Name string - The name of keyring.
- output
File string - File name where to save data source results.
- wrapping
Algorithm 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. - wrapping
Key stringSpec - 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_ strspec - 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 String - The id of key. When key_id is not specified, both keyring_name and key_name must be specified.
- key
Name String - The name of key.
- keyring
Name String - The name of keyring.
- output
File String - File name where to save data source results.
- wrapping
Algorithm 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. - wrapping
Key StringSpec - 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.
getKeyMaterials Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Import
Parameters List<GetKey Materials Import Parameter> - The import parameters info.
- Total
Count int - The total count of query.
- Key
Id string - The id of key.
- Key
Name string - Keyring
Name string - Output
File string - Wrapping
Algorithm string - Wrapping
Key stringSpec
- Id string
- The provider-assigned unique ID for this managed resource.
- Import
Parameters []GetKey Materials Import Parameter - The import parameters info.
- Total
Count int - The total count of query.
- Key
Id string - The id of key.
- Key
Name string - Keyring
Name string - Output
File string - Wrapping
Algorithm string - Wrapping
Key stringSpec
- id String
- The provider-assigned unique ID for this managed resource.
- import
Parameters List<GetKey Materials Import Parameter> - The import parameters info.
- total
Count Integer - The total count of query.
- key
Id String - The id of key.
- key
Name String - keyring
Name String - output
File String - wrapping
Algorithm String - wrapping
Key StringSpec
- id string
- The provider-assigned unique ID for this managed resource.
- import
Parameters GetKey Materials Import Parameter[] - The import parameters info.
- total
Count number - The total count of query.
- key
Id string - The id of key.
- key
Name string - keyring
Name string - output
File string - wrapping
Algorithm string - wrapping
Key stringSpec
- id str
- The provider-assigned unique ID for this managed resource.
- import_
parameters Sequence[GetKey Materials Import Parameter] - 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_ strspec
- id String
- The provider-assigned unique ID for this managed resource.
- import
Parameters List<Property Map> - The import parameters info.
- total
Count Number - The total count of query.
- key
Id String - The id of key.
- key
Name String - keyring
Name String - output
File String - wrapping
Algorithm String - wrapping
Key StringSpec
Supporting Types
GetKeyMaterialsImportParameter
- Import
Token string - The import token, Base64 encoded.
- Key
Id string - The id of key. When key_id is not specified, both keyring_name and key_name must be specified.
- Keyring
Id string - The id of keyring.
- Public
Key string - The public key used to encrypt key materials, Base64 encoded.
- Token
Expire stringTime - The token expire time.
- Import
Token string - The import token, Base64 encoded.
- Key
Id string - The id of key. When key_id is not specified, both keyring_name and key_name must be specified.
- Keyring
Id string - The id of keyring.
- Public
Key string - The public key used to encrypt key materials, Base64 encoded.
- Token
Expire stringTime - The token expire time.
- import
Token String - The import token, Base64 encoded.
- key
Id String - The id of key. When key_id is not specified, both keyring_name and key_name must be specified.
- keyring
Id String - The id of keyring.
- public
Key String - The public key used to encrypt key materials, Base64 encoded.
- token
Expire StringTime - The token expire time.
- import
Token string - The import token, Base64 encoded.
- key
Id string - The id of key. When key_id is not specified, both keyring_name and key_name must be specified.
- keyring
Id string - The id of keyring.
- public
Key string - The public key used to encrypt key materials, Base64 encoded.
- token
Expire stringTime - 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_ strtime - The token expire time.
- import
Token String - The import token, Base64 encoded.
- key
Id String - The id of key. When key_id is not specified, both keyring_name and key_name must be specified.
- keyring
Id String - The id of keyring.
- public
Key String - The public key used to encrypt key materials, Base64 encoded.
- token
Expire StringTime - The token expire time.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengineTerraform Provider.
Volcengine v0.0.46 published on Friday, Feb 27, 2026 by Volcengine
