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 data keys
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
const dataKey = volcengine.kms.getDataKeys({
keyId: "c44870c3-f33b-421a-****-a2bba37c993e",
numberOfBytes: 1024,
});
const default = dataKey.then(dataKey => volcengine.kms.getPlaintexts({
ciphertextBlob: dataKey.dataKeyInfos?.[0]?.ciphertextBlob,
}));
import pulumi
import pulumi_volcengine as volcengine
data_key = volcengine.kms.get_data_keys(key_id="c44870c3-f33b-421a-****-a2bba37c993e",
number_of_bytes=1024)
default = volcengine.kms.get_plaintexts(ciphertext_blob=data_key.data_key_infos[0].ciphertext_blob)
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 {
dataKey, err := kms.GetDataKeys(ctx, &kms.GetDataKeysArgs{
KeyId: pulumi.StringRef("c44870c3-f33b-421a-****-a2bba37c993e"),
NumberOfBytes: pulumi.IntRef(1024),
}, nil)
if err != nil {
return err
}
_, err = kms.GetPlaintexts(ctx, &kms.GetPlaintextsArgs{
CiphertextBlob: dataKey.DataKeyInfos[0].CiphertextBlob,
}, 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 dataKey = Volcengine.Kms.GetDataKeys.Invoke(new()
{
KeyId = "c44870c3-f33b-421a-****-a2bba37c993e",
NumberOfBytes = 1024,
});
var @default = Volcengine.Kms.GetPlaintexts.Invoke(new()
{
CiphertextBlob = dataKey.Apply(getDataKeysResult => getDataKeysResult.DataKeyInfos[0]?.CiphertextBlob),
});
});
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.GetDataKeysArgs;
import com.pulumi.volcengine.kms.inputs.GetPlaintextsArgs;
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 dataKey = KmsFunctions.getDataKeys(GetDataKeysArgs.builder()
.keyId("c44870c3-f33b-421a-****-a2bba37c993e")
.numberOfBytes(1024)
.build());
final var default = KmsFunctions.getPlaintexts(GetPlaintextsArgs.builder()
.ciphertextBlob(dataKey.applyValue(getDataKeysResult -> getDataKeysResult.dataKeyInfos()[0].ciphertextBlob()))
.build());
}
}
variables:
dataKey:
fn::invoke:
Function: volcengine:kms:getDataKeys
Arguments:
keyId: c44870c3-f33b-421a-****-a2bba37c993e
numberOfBytes: 1024
default:
fn::invoke:
Function: volcengine:kms:getPlaintexts
Arguments:
ciphertextBlob: ${dataKey.dataKeyInfos[0].ciphertextBlob}
Using getDataKeys
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 getDataKeys(args: GetDataKeysArgs, opts?: InvokeOptions): Promise<GetDataKeysResult>
function getDataKeysOutput(args: GetDataKeysOutputArgs, opts?: InvokeOptions): Output<GetDataKeysResult>def get_data_keys(encryption_context: Optional[str] = None,
key_id: Optional[str] = None,
key_name: Optional[str] = None,
keyring_name: Optional[str] = None,
number_of_bytes: Optional[int] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDataKeysResult
def get_data_keys_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,
number_of_bytes: Optional[pulumi.Input[int]] = None,
output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDataKeysResult]func GetDataKeys(ctx *Context, args *GetDataKeysArgs, opts ...InvokeOption) (*GetDataKeysResult, error)
func GetDataKeysOutput(ctx *Context, args *GetDataKeysOutputArgs, opts ...InvokeOption) GetDataKeysResultOutput> Note: This function is named GetDataKeys in the Go SDK.
public static class GetDataKeys
{
public static Task<GetDataKeysResult> InvokeAsync(GetDataKeysArgs args, InvokeOptions? opts = null)
public static Output<GetDataKeysResult> Invoke(GetDataKeysInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDataKeysResult> getDataKeys(GetDataKeysArgs args, InvokeOptions options)
public static Output<GetDataKeysResult> getDataKeys(GetDataKeysArgs args, InvokeOptions options)
fn::invoke:
function: volcengine:kms/getDataKeys:getDataKeys
arguments:
# arguments dictionaryThe following arguments are supported:
- Encryption
Context string - The JSON string of key/value pairs.
- Key
Id string - The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
- Key
Name string - The name of the key. Only symmetric key is supported.
- Keyring
Name string - The name of the keyring.
- Number
Of intBytes - The length of data key to generate.
- Output
File string - File name where to save data source results.
- Encryption
Context string - The JSON string of key/value pairs.
- Key
Id string - The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
- Key
Name string - The name of the key. Only symmetric key is supported.
- Keyring
Name string - The name of the keyring.
- Number
Of intBytes - The length of data key to generate.
- Output
File string - File name where to save data source results.
- encryption
Context String - The JSON string of key/value pairs.
- key
Id String - The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
- key
Name String - The name of the key. Only symmetric key is supported.
- keyring
Name String - The name of the keyring.
- number
Of IntegerBytes - The length of data key to generate.
- output
File String - File name where to save data source results.
- encryption
Context string - The JSON string of key/value pairs.
- key
Id string - The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
- key
Name string - The name of the key. Only symmetric key is supported.
- keyring
Name string - The name of the keyring.
- number
Of numberBytes - The length of data key to generate.
- output
File string - File name where to save data source results.
- 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. Only symmetric key is supported.
- keyring_
name str - The name of the keyring.
- number_
of_ intbytes - The length of data key to generate.
- output_
file str - File name where to save data source results.
- encryption
Context String - The JSON string of key/value pairs.
- key
Id String - The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
- key
Name String - The name of the key. Only symmetric key is supported.
- keyring
Name String - The name of the keyring.
- number
Of NumberBytes - The length of data key to generate.
- output
File String - File name where to save data source results.
getDataKeys Result
The following output properties are available:
- Data
Key List<GetInfos Data Keys Data Key Info> - The data key info.
- Id string
- The provider-assigned unique ID for this managed resource.
- Total
Count int - The total count of query.
- Encryption
Context string - Key
Id string - Key
Name string - Keyring
Name string - Number
Of intBytes - Output
File string
- Data
Key []GetInfos Data Keys Data Key Info - The data key info.
- Id string
- The provider-assigned unique ID for this managed resource.
- Total
Count int - The total count of query.
- Encryption
Context string - Key
Id string - Key
Name string - Keyring
Name string - Number
Of intBytes - Output
File string
- data
Key List<GetInfos Data Keys Data Key Info> - The data key info.
- id String
- The provider-assigned unique ID for this managed resource.
- total
Count Integer - The total count of query.
- encryption
Context String - key
Id String - key
Name String - keyring
Name String - number
Of IntegerBytes - output
File String
- data
Key GetInfos Data Keys Data Key Info[] - The data key info.
- id string
- The provider-assigned unique ID for this managed resource.
- total
Count number - The total count of query.
- encryption
Context string - key
Id string - key
Name string - keyring
Name string - number
Of numberBytes - output
File string
- data_
key_ Sequence[Getinfos Data Keys Data Key Info] - The data key info.
- id str
- The provider-assigned unique ID for this managed resource.
- total_
count int - The total count of query.
- encryption_
context str - key_
id str - key_
name str - keyring_
name str - number_
of_ intbytes - output_
file str
- data
Key List<Property Map>Infos - The data key info.
- id String
- The provider-assigned unique ID for this managed resource.
- total
Count Number - The total count of query.
- encryption
Context String - key
Id String - key
Name String - keyring
Name String - number
Of NumberBytes - output
File String
Supporting Types
GetDataKeysDataKeyInfo
- Ciphertext
Blob string - The generated ciphertext, Base64 encoded.
- Plaintext string
- The generated plaintext, Base64 encoded.
- Ciphertext
Blob string - The generated ciphertext, Base64 encoded.
- Plaintext string
- The generated plaintext, Base64 encoded.
- ciphertext
Blob String - The generated ciphertext, Base64 encoded.
- plaintext String
- The generated plaintext, Base64 encoded.
- ciphertext
Blob string - The generated ciphertext, Base64 encoded.
- plaintext string
- The generated plaintext, Base64 encoded.
- ciphertext_
blob str - The generated ciphertext, Base64 encoded.
- plaintext str
- The generated plaintext, Base64 encoded.
- ciphertext
Blob String - The generated ciphertext, Base64 encoded.
- plaintext String
- The generated plaintext, Base64 encoded.
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
