"use strict";
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.getAllowListsOutput = exports.getAllowLists = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Use this data source to query detailed information of redis allow lists
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as volcengine from "@pulumi/volcengine";
 * import * as volcengine from "@volcengine/pulumi";
 *
 * const fooAllowList = new volcengine.redis.AllowList("fooAllowList", {
 *     allowLists: ["192.168.0.0/24"],
 *     allowListName: "acc-test-allowlist",
 * });
 * const fooZones = volcengine.ecs.getZones({});
 * const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
 *     vpcName: "acc-test-vpc",
 *     cidrBlock: "172.16.0.0/16",
 * });
 * const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
 *     subnetName: "acc-test-subnet",
 *     cidrBlock: "172.16.0.0/24",
 *     zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
 *     vpcId: fooVpc.id,
 * });
 * const fooInstance = new volcengine.redis.Instance("fooInstance", {
 *     zoneIds: [fooZones.then(fooZones => fooZones.zones?.[0]?.id)],
 *     instanceName: "acc-test-tf-redis",
 *     shardedCluster: 1,
 *     password: "1qaz!QAZ12",
 *     nodeNumber: 2,
 *     shardCapacity: 1024,
 *     shardNumber: 2,
 *     engineVersion: "5.0",
 *     subnetId: fooSubnet.id,
 *     deletionProtection: "disabled",
 *     vpcAuthMode: "close",
 *     chargeType: "PostPaid",
 *     port: 6381,
 *     projectName: "default",
 * });
 * const fooAllowListAssociate = new volcengine.redis.AllowListAssociate("fooAllowListAssociate", {
 *     allowListId: fooAllowList.id,
 *     instanceId: fooInstance.id,
 * });
 * const fooAllowLists = volcengine.redis.getAllowListsOutput({
 *     instanceId: fooAllowListAssociate.instanceId,
 *     regionId: "cn-beijing",
 *     nameRegex: fooAllowList.allowListName,
 * });
 * ```
 */
function getAllowLists(args, opts) {
    opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
    return pulumi.runtime.invoke("volcengine:redis/getAllowLists:getAllowLists", {
        "instanceId": args.instanceId,
        "ipAddress": args.ipAddress,
        "ipSegment": args.ipSegment,
        "nameRegex": args.nameRegex,
        "outputFile": args.outputFile,
        "projectName": args.projectName,
        "queryDefault": args.queryDefault,
        "regionId": args.regionId,
    }, opts);
}
exports.getAllowLists = getAllowLists;
/**
 * Use this data source to query detailed information of redis allow lists
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as volcengine from "@pulumi/volcengine";
 * import * as volcengine from "@volcengine/pulumi";
 *
 * const fooAllowList = new volcengine.redis.AllowList("fooAllowList", {
 *     allowLists: ["192.168.0.0/24"],
 *     allowListName: "acc-test-allowlist",
 * });
 * const fooZones = volcengine.ecs.getZones({});
 * const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
 *     vpcName: "acc-test-vpc",
 *     cidrBlock: "172.16.0.0/16",
 * });
 * const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
 *     subnetName: "acc-test-subnet",
 *     cidrBlock: "172.16.0.0/24",
 *     zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
 *     vpcId: fooVpc.id,
 * });
 * const fooInstance = new volcengine.redis.Instance("fooInstance", {
 *     zoneIds: [fooZones.then(fooZones => fooZones.zones?.[0]?.id)],
 *     instanceName: "acc-test-tf-redis",
 *     shardedCluster: 1,
 *     password: "1qaz!QAZ12",
 *     nodeNumber: 2,
 *     shardCapacity: 1024,
 *     shardNumber: 2,
 *     engineVersion: "5.0",
 *     subnetId: fooSubnet.id,
 *     deletionProtection: "disabled",
 *     vpcAuthMode: "close",
 *     chargeType: "PostPaid",
 *     port: 6381,
 *     projectName: "default",
 * });
 * const fooAllowListAssociate = new volcengine.redis.AllowListAssociate("fooAllowListAssociate", {
 *     allowListId: fooAllowList.id,
 *     instanceId: fooInstance.id,
 * });
 * const fooAllowLists = volcengine.redis.getAllowListsOutput({
 *     instanceId: fooAllowListAssociate.instanceId,
 *     regionId: "cn-beijing",
 *     nameRegex: fooAllowList.allowListName,
 * });
 * ```
 */
function getAllowListsOutput(args, opts) {
    return pulumi.output(args).apply((a) => getAllowLists(a, opts));
}
exports.getAllowListsOutput = getAllowListsOutput;
//# sourceMappingURL=getAllowLists.js.map