Volcengine v0.0.46 published on Friday, Feb 27, 2026 by Volcengine
Volcengine v0.0.46 published on Friday, Feb 27, 2026 by Volcengine
Deprecated: volcengine.kms.Macs has been deprecated in favor of volcengine.kms.getMacs
Use this data source to query detailed information of kms macs
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
const mac = volcengine.kms.getMacs({
keyId: "68093dd1-d1a9-44ce-****-5a88c4bc31ab",
macAlgorithm: "HMAC_SHA_256",
message: "VGhpcyBpcyBhIHRlc3QgTWVzc2FnZS4=",
});
const verify = volcengine.kms.getMacVerifications({
keyId: "68093dd1-d1a9-44ce-****-5a88c4bc31ab",
mac: "Vm0D9fk6uDRZD6k9QZE9+d9gpgy6ESSPt0bfaA2p05w=",
macAlgorithm: "HMAC_SHA_256",
message: "VGhpcyBpcyBhIHRlc3QgTWVzc2FnZS4=",
});
import pulumi
import pulumi_volcengine as volcengine
mac = volcengine.kms.get_macs(key_id="68093dd1-d1a9-44ce-****-5a88c4bc31ab",
mac_algorithm="HMAC_SHA_256",
message="VGhpcyBpcyBhIHRlc3QgTWVzc2FnZS4=")
verify = volcengine.kms.get_mac_verifications(key_id="68093dd1-d1a9-44ce-****-5a88c4bc31ab",
mac="Vm0D9fk6uDRZD6k9QZE9+d9gpgy6ESSPt0bfaA2p05w=",
mac_algorithm="HMAC_SHA_256",
message="VGhpcyBpcyBhIHRlc3QgTWVzc2FnZS4=")
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.GetMacs(ctx, &kms.GetMacsArgs{
KeyId: pulumi.StringRef("68093dd1-d1a9-44ce-****-5a88c4bc31ab"),
MacAlgorithm: "HMAC_SHA_256",
Message: "VGhpcyBpcyBhIHRlc3QgTWVzc2FnZS4=",
}, nil)
if err != nil {
return err
}
_, err = kms.GetMacVerifications(ctx, &kms.GetMacVerificationsArgs{
KeyId: pulumi.StringRef("68093dd1-d1a9-44ce-****-5a88c4bc31ab"),
Mac: "Vm0D9fk6uDRZD6k9QZE9+d9gpgy6ESSPt0bfaA2p05w=",
MacAlgorithm: "HMAC_SHA_256",
Message: "VGhpcyBpcyBhIHRlc3QgTWVzc2FnZS4=",
}, 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 mac = Volcengine.Kms.GetMacs.Invoke(new()
{
KeyId = "68093dd1-d1a9-44ce-****-5a88c4bc31ab",
MacAlgorithm = "HMAC_SHA_256",
Message = "VGhpcyBpcyBhIHRlc3QgTWVzc2FnZS4=",
});
var verify = Volcengine.Kms.GetMacVerifications.Invoke(new()
{
KeyId = "68093dd1-d1a9-44ce-****-5a88c4bc31ab",
Mac = "Vm0D9fk6uDRZD6k9QZE9+d9gpgy6ESSPt0bfaA2p05w=",
MacAlgorithm = "HMAC_SHA_256",
Message = "VGhpcyBpcyBhIHRlc3QgTWVzc2FnZS4=",
});
});
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.GetMacsArgs;
import com.pulumi.volcengine.kms.inputs.GetMacVerificationsArgs;
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 mac = KmsFunctions.getMacs(GetMacsArgs.builder()
.keyId("68093dd1-d1a9-44ce-****-5a88c4bc31ab")
.macAlgorithm("HMAC_SHA_256")
.message("VGhpcyBpcyBhIHRlc3QgTWVzc2FnZS4=")
.build());
final var verify = KmsFunctions.getMacVerifications(GetMacVerificationsArgs.builder()
.keyId("68093dd1-d1a9-44ce-****-5a88c4bc31ab")
.mac("Vm0D9fk6uDRZD6k9QZE9+d9gpgy6ESSPt0bfaA2p05w=")
.macAlgorithm("HMAC_SHA_256")
.message("VGhpcyBpcyBhIHRlc3QgTWVzc2FnZS4=")
.build());
}
}
variables:
mac:
fn::invoke:
Function: volcengine:kms:getMacs
Arguments:
keyId: 68093dd1-d1a9-44ce-****-5a88c4bc31ab
macAlgorithm: HMAC_SHA_256
message: VGhpcyBpcyBhIHRlc3QgTWVzc2FnZS4=
verify:
fn::invoke:
Function: volcengine:kms:getMacVerifications
Arguments:
keyId: 68093dd1-d1a9-44ce-****-5a88c4bc31ab
mac: Vm0D9fk6uDRZD6k9QZE9+d9gpgy6ESSPt0bfaA2p05w=
macAlgorithm: HMAC_SHA_256
message: VGhpcyBpcyBhIHRlc3QgTWVzc2FnZS4=
Using Macs
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 macs(args: MacsArgs, opts?: InvokeOptions): Promise<MacsResult>
function macsOutput(args: MacsOutputArgs, opts?: InvokeOptions): Output<MacsResult>def macs(key_id: Optional[str] = None,
key_name: Optional[str] = None,
keyring_name: Optional[str] = None,
mac_algorithm: Optional[str] = None,
message: Optional[str] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> MacsResult
def macs_output(key_id: Optional[pulumi.Input[str]] = None,
key_name: Optional[pulumi.Input[str]] = None,
keyring_name: Optional[pulumi.Input[str]] = None,
mac_algorithm: Optional[pulumi.Input[str]] = None,
message: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[MacsResult]func Macs(ctx *Context, args *MacsArgs, opts ...InvokeOption) (*MacsResult, error)
func MacsOutput(ctx *Context, args *MacsOutputArgs, opts ...InvokeOption) MacsResultOutputpublic static class Macs
{
public static Task<MacsResult> InvokeAsync(MacsArgs args, InvokeOptions? opts = null)
public static Output<MacsResult> Invoke(MacsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<MacsResult> macs(MacsArgs args, InvokeOptions options)
public static Output<MacsResult> macs(MacsArgs args, InvokeOptions options)
fn::invoke:
function: volcengine:kms:Macs
arguments:
# arguments dictionaryThe following arguments are supported:
- Mac
Algorithm string - The MAC algorithm. Valid values:
HMAC_SM3,HMAC_SHA_256. - Message string
- The message, Base64 encoded. Generate a Hash-based Message Authentication Code (HMAC) for a message using an HMAC KMS key and a MAC algorithm supported by the key.
- 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.
- Keyring
Name string - The name of the keyring.
- Output
File string - File name where to save data source results.
- Mac
Algorithm string - The MAC algorithm. Valid values:
HMAC_SM3,HMAC_SHA_256. - Message string
- The message, Base64 encoded. Generate a Hash-based Message Authentication Code (HMAC) for a message using an HMAC KMS key and a MAC algorithm supported by the key.
- 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.
- Keyring
Name string - The name of the keyring.
- Output
File string - File name where to save data source results.
- mac
Algorithm String - The MAC algorithm. Valid values:
HMAC_SM3,HMAC_SHA_256. - message String
- The message, Base64 encoded. Generate a Hash-based Message Authentication Code (HMAC) for a message using an HMAC KMS key and a MAC algorithm supported by the key.
- 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.
- keyring
Name String - The name of the keyring.
- output
File String - File name where to save data source results.
- mac
Algorithm string - The MAC algorithm. Valid values:
HMAC_SM3,HMAC_SHA_256. - message string
- The message, Base64 encoded. Generate a Hash-based Message Authentication Code (HMAC) for a message using an HMAC KMS key and a MAC algorithm supported by the key.
- 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.
- keyring
Name string - The name of the keyring.
- output
File string - File name where to save data source results.
- mac_
algorithm str - The MAC algorithm. Valid values:
HMAC_SM3,HMAC_SHA_256. - message str
- The message, Base64 encoded. Generate a Hash-based Message Authentication Code (HMAC) for a message using an HMAC KMS key and a MAC algorithm supported by the key.
- 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.
- mac
Algorithm String - The MAC algorithm. Valid values:
HMAC_SM3,HMAC_SHA_256. - message String
- The message, Base64 encoded. Generate a Hash-based Message Authentication Code (HMAC) for a message using an HMAC KMS key and a MAC algorithm supported by the key.
- 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.
- keyring
Name String - The name of the keyring.
- output
File String - File name where to save data source results.
Macs Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Mac
Algorithm string - Mac
Infos List<MacsMac Info> - The MAC info.
- Message string
- Total
Count int - The total count of query.
- Key
Id string - The key id.
- Key
Name string - Keyring
Name string - Output
File string
- Id string
- The provider-assigned unique ID for this managed resource.
- Mac
Algorithm string - Mac
Infos []MacsMac Info - The MAC info.
- Message string
- Total
Count int - The total count of query.
- Key
Id string - The key id.
- Key
Name string - Keyring
Name string - Output
File string
- id String
- The provider-assigned unique ID for this managed resource.
- mac
Algorithm String - mac
Infos List<MacsMac Info> - The MAC info.
- message String
- total
Count Integer - The total count of query.
- key
Id String - The key id.
- key
Name String - keyring
Name String - output
File String
- id string
- The provider-assigned unique ID for this managed resource.
- mac
Algorithm string - mac
Infos MacsMac Info[] - The MAC info.
- message string
- total
Count number - The total count of query.
- key
Id string - The key id.
- key
Name string - keyring
Name string - output
File string
- id str
- The provider-assigned unique ID for this managed resource.
- mac_
algorithm str - mac_
infos Sequence[MacsMac Info] - The MAC info.
- message str
- total_
count int - The total count of query.
- key_
id str - The key id.
- key_
name str - keyring_
name str - output_
file str
- id String
- The provider-assigned unique ID for this managed resource.
- mac
Algorithm String - mac
Infos List<Property Map> - The MAC info.
- message String
- total
Count Number - The total count of query.
- key
Id String - The key id.
- key
Name String - keyring
Name String - output
File String
Supporting Types
MacsMacInfo
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
