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

    Use this data source to query detailed information of kms mac verifications

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@pulumi/volcengine";
    
    const mac = volcengine.kms.getMacs({
        keyId: "68093dd1-d1a9-44ce-832a****-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-832a****-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-832a****-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-832a****-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-832a****-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-832a****-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 getMacVerifications

    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 getMacVerifications(args: GetMacVerificationsArgs, opts?: InvokeOptions): Promise<GetMacVerificationsResult>
    function getMacVerificationsOutput(args: GetMacVerificationsOutputArgs, opts?: InvokeOptions): Output<GetMacVerificationsResult>
    def get_mac_verifications(key_id: Optional[str] = None,
                              key_name: Optional[str] = None,
                              keyring_name: Optional[str] = None,
                              mac: Optional[str] = None,
                              mac_algorithm: Optional[str] = None,
                              message: Optional[str] = None,
                              output_file: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetMacVerificationsResult
    def get_mac_verifications_output(key_id: Optional[pulumi.Input[str]] = None,
                              key_name: Optional[pulumi.Input[str]] = None,
                              keyring_name: Optional[pulumi.Input[str]] = None,
                              mac: 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[GetMacVerificationsResult]
    func GetMacVerifications(ctx *Context, args *GetMacVerificationsArgs, opts ...InvokeOption) (*GetMacVerificationsResult, error)
    func GetMacVerificationsOutput(ctx *Context, args *GetMacVerificationsOutputArgs, opts ...InvokeOption) GetMacVerificationsResultOutput

    > Note: This function is named GetMacVerifications in the Go SDK.

    public static class GetMacVerifications 
    {
        public static Task<GetMacVerificationsResult> InvokeAsync(GetMacVerificationsArgs args, InvokeOptions? opts = null)
        public static Output<GetMacVerificationsResult> Invoke(GetMacVerificationsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetMacVerificationsResult> getMacVerifications(GetMacVerificationsArgs args, InvokeOptions options)
    public static Output<GetMacVerificationsResult> getMacVerifications(GetMacVerificationsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: volcengine:kms/getMacVerifications:getMacVerifications
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Mac string
    The MAC to verify, Base64 encoded. Verify the Hash-based Message Authentication Code (HMAC), HMAC KMS key, and MAC algorithm for the specified message.
    MacAlgorithm string
    The MAC algorithm. Valid values: HMAC_SM3, HMAC_SHA_256.
    Message string
    The message to verify, 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.
    OutputFile string
    File name where to save data source results.
    Mac string
    The MAC to verify, Base64 encoded. Verify the Hash-based Message Authentication Code (HMAC), HMAC KMS key, and MAC algorithm for the specified message.
    MacAlgorithm string
    The MAC algorithm. Valid values: HMAC_SM3, HMAC_SHA_256.
    Message string
    The message to verify, 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.
    OutputFile string
    File name where to save data source results.
    mac String
    The MAC to verify, Base64 encoded. Verify the Hash-based Message Authentication Code (HMAC), HMAC KMS key, and MAC algorithm for the specified message.
    macAlgorithm String
    The MAC algorithm. Valid values: HMAC_SM3, HMAC_SHA_256.
    message String
    The message to verify, 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.
    outputFile String
    File name where to save data source results.
    mac string
    The MAC to verify, Base64 encoded. Verify the Hash-based Message Authentication Code (HMAC), HMAC KMS key, and MAC algorithm for the specified message.
    macAlgorithm string
    The MAC algorithm. Valid values: HMAC_SM3, HMAC_SHA_256.
    message string
    The message to verify, 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.
    outputFile string
    File name where to save data source results.
    mac str
    The MAC to verify, Base64 encoded. Verify the Hash-based Message Authentication Code (HMAC), HMAC KMS key, and MAC algorithm for the specified message.
    mac_algorithm str
    The MAC algorithm. Valid values: HMAC_SM3, HMAC_SHA_256.
    message str
    The message to verify, 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.
    output_file str
    File name where to save data source results.
    mac String
    The MAC to verify, Base64 encoded. Verify the Hash-based Message Authentication Code (HMAC), HMAC KMS key, and MAC algorithm for the specified message.
    macAlgorithm String
    The MAC algorithm. Valid values: HMAC_SM3, HMAC_SHA_256.
    message String
    The message to verify, 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.
    outputFile String
    File name where to save data source results.

    getMacVerifications Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Mac string
    MacAlgorithm string
    MacVerificationInfos List<GetMacVerificationsMacVerificationInfo>
    The MAC verification info.
    Message string
    TotalCount int
    The total count of query.
    KeyId string
    The key id.
    KeyName string
    KeyringName string
    OutputFile string
    Id string
    The provider-assigned unique ID for this managed resource.
    Mac string
    MacAlgorithm string
    MacVerificationInfos []GetMacVerificationsMacVerificationInfo
    The MAC verification info.
    Message string
    TotalCount int
    The total count of query.
    KeyId string
    The key id.
    KeyName string
    KeyringName string
    OutputFile string
    id String
    The provider-assigned unique ID for this managed resource.
    mac String
    macAlgorithm String
    macVerificationInfos List<GetMacVerificationsMacVerificationInfo>
    The MAC verification info.
    message String
    totalCount Integer
    The total count of query.
    keyId String
    The key id.
    keyName String
    keyringName String
    outputFile String
    id string
    The provider-assigned unique ID for this managed resource.
    mac string
    macAlgorithm string
    macVerificationInfos GetMacVerificationsMacVerificationInfo[]
    The MAC verification info.
    message string
    totalCount number
    The total count of query.
    keyId string
    The key id.
    keyName string
    keyringName string
    outputFile string
    id str
    The provider-assigned unique ID for this managed resource.
    mac str
    mac_algorithm str
    mac_verification_infos Sequence[GetMacVerificationsMacVerificationInfo]
    The MAC verification 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 String
    macAlgorithm String
    macVerificationInfos List<Property Map>
    The MAC verification info.
    message String
    totalCount Number
    The total count of query.
    keyId String
    The key id.
    keyName String
    keyringName String
    outputFile String

    Supporting Types

    GetMacVerificationsMacVerificationInfo

    KeyId string
    The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
    MacValid bool
    Whether the MAC is valid.
    KeyId string
    The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
    MacValid bool
    Whether the MAC is valid.
    keyId String
    The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
    macValid Boolean
    Whether the MAC is valid.
    keyId string
    The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
    macValid boolean
    Whether the MAC is valid.
    key_id str
    The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
    mac_valid bool
    Whether the MAC is valid.
    keyId String
    The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
    macValid Boolean
    Whether the MAC is valid.

    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