@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
131 lines (130 loc) • 3.92 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as outputs from "../types/output";
/**
* Use this data source to query detailed information of kms macs
* ## Example Usage
*
* ```typescript
* 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=",
* });
* ```
*/
export declare function getMacs(args: GetMacsArgs, opts?: pulumi.InvokeOptions): Promise<GetMacsResult>;
/**
* A collection of arguments for invoking getMacs.
*/
export interface GetMacsArgs {
/**
* The id of the key. When keyId is not specified, both keyringName and keyName must be specified.
*/
keyId?: string;
/**
* The name of the key.
*/
keyName?: string;
/**
* The name of the keyring.
*/
keyringName?: string;
/**
* The MAC algorithm. Valid values: `HMAC_SM3`, `HMAC_SHA_256`.
*/
macAlgorithm: 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.
*/
message: string;
/**
* File name where to save data source results.
*/
outputFile?: string;
}
/**
* A collection of values returned by getMacs.
*/
export interface GetMacsResult {
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
/**
* The key id.
*/
readonly keyId?: string;
readonly keyName?: string;
readonly keyringName?: string;
readonly macAlgorithm: string;
/**
* The MAC info.
*/
readonly macInfos: outputs.kms.GetMacsMacInfo[];
readonly message: string;
readonly outputFile?: string;
/**
* The total count of query.
*/
readonly totalCount: number;
}
/**
* Use this data source to query detailed information of kms macs
* ## Example Usage
*
* ```typescript
* 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=",
* });
* ```
*/
export declare function getMacsOutput(args: GetMacsOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetMacsResult>;
/**
* A collection of arguments for invoking getMacs.
*/
export interface GetMacsOutputArgs {
/**
* The id of the key. When keyId is not specified, both keyringName and keyName must be specified.
*/
keyId?: pulumi.Input<string>;
/**
* The name of the key.
*/
keyName?: pulumi.Input<string>;
/**
* The name of the keyring.
*/
keyringName?: pulumi.Input<string>;
/**
* The MAC algorithm. Valid values: `HMAC_SM3`, `HMAC_SHA_256`.
*/
macAlgorithm: pulumi.Input<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.
*/
message: pulumi.Input<string>;
/**
* File name where to save data source results.
*/
outputFile?: pulumi.Input<string>;
}