"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.endpointsOutput = exports.endpoints = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Use this data source to query detailed information of vedb mysql endpoints
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as volcengine from "@pulumi/volcengine";
 * import * as volcengine from "@volcengine/pulumi";
 *
 * 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?.[2]?.id),
 *     vpcId: fooVpc.id,
 * });
 * const fooInstance = new volcengine.vedb_mysql.Instance("fooInstance", {
 *     chargeType: "PostPaid",
 *     storageChargeType: "PostPaid",
 *     dbEngineVersion: "MySQL_8_0",
 *     dbMinorVersion: "3.0",
 *     nodeNumber: 2,
 *     nodeSpec: "vedb.mysql.x4.large",
 *     subnetId: fooSubnet.id,
 *     instanceName: "tf-test",
 *     projectName: "testA",
 *     tags: [
 *         {
 *             key: "tftest",
 *             value: "tftest",
 *         },
 *         {
 *             key: "tftest2",
 *             value: "tftest2",
 *         },
 *     ],
 * });
 * const fooInstances = volcengine.vedb_mysql.getInstancesOutput({
 *     instanceId: fooInstance.id,
 * });
 * const fooEndpoint = new volcengine.vedb_mysql.Endpoint("fooEndpoint", {
 *     endpointType: "Custom",
 *     instanceId: fooInstance.id,
 *     nodeIds: [
 *         fooInstances.apply(fooInstances => fooInstances.instances?.[0]?.nodes?.[0]?.nodeId),
 *         fooInstances.apply(fooInstances => fooInstances.instances?.[0]?.nodes?.[1]?.nodeId),
 *     ],
 *     readWriteMode: "ReadWrite",
 *     endpointName: "tf-test",
 *     description: "tf test",
 *     masterAcceptReadRequests: true,
 *     distributedTransaction: true,
 *     consistLevel: "Session",
 *     consistTimeout: 100000,
 *     consistTimeoutAction: "ReadMaster",
 * });
 * const fooEndpoints = volcengine.vedb_mysql.getEndpointsOutput({
 *     endpointId: fooEndpoint.endpointId,
 *     instanceId: fooInstance.id,
 * });
 * ```
 */
/** @deprecated volcengine.vedb_mysql.Endpoints has been deprecated in favor of volcengine.vedb_mysql.getEndpoints */
function endpoints(args, opts) {
    pulumi.log.warn("endpoints is deprecated: volcengine.vedb_mysql.Endpoints has been deprecated in favor of volcengine.vedb_mysql.getEndpoints");
    opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
    return pulumi.runtime.invoke("volcengine:vedb_mysql/endpoints:Endpoints", {
        "endpointId": args.endpointId,
        "instanceId": args.instanceId,
        "nameRegex": args.nameRegex,
        "outputFile": args.outputFile,
    }, opts);
}
exports.endpoints = endpoints;
/**
 * Use this data source to query detailed information of vedb mysql endpoints
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as volcengine from "@pulumi/volcengine";
 * import * as volcengine from "@volcengine/pulumi";
 *
 * 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?.[2]?.id),
 *     vpcId: fooVpc.id,
 * });
 * const fooInstance = new volcengine.vedb_mysql.Instance("fooInstance", {
 *     chargeType: "PostPaid",
 *     storageChargeType: "PostPaid",
 *     dbEngineVersion: "MySQL_8_0",
 *     dbMinorVersion: "3.0",
 *     nodeNumber: 2,
 *     nodeSpec: "vedb.mysql.x4.large",
 *     subnetId: fooSubnet.id,
 *     instanceName: "tf-test",
 *     projectName: "testA",
 *     tags: [
 *         {
 *             key: "tftest",
 *             value: "tftest",
 *         },
 *         {
 *             key: "tftest2",
 *             value: "tftest2",
 *         },
 *     ],
 * });
 * const fooInstances = volcengine.vedb_mysql.getInstancesOutput({
 *     instanceId: fooInstance.id,
 * });
 * const fooEndpoint = new volcengine.vedb_mysql.Endpoint("fooEndpoint", {
 *     endpointType: "Custom",
 *     instanceId: fooInstance.id,
 *     nodeIds: [
 *         fooInstances.apply(fooInstances => fooInstances.instances?.[0]?.nodes?.[0]?.nodeId),
 *         fooInstances.apply(fooInstances => fooInstances.instances?.[0]?.nodes?.[1]?.nodeId),
 *     ],
 *     readWriteMode: "ReadWrite",
 *     endpointName: "tf-test",
 *     description: "tf test",
 *     masterAcceptReadRequests: true,
 *     distributedTransaction: true,
 *     consistLevel: "Session",
 *     consistTimeout: 100000,
 *     consistTimeoutAction: "ReadMaster",
 * });
 * const fooEndpoints = volcengine.vedb_mysql.getEndpointsOutput({
 *     endpointId: fooEndpoint.endpointId,
 *     instanceId: fooInstance.id,
 * });
 * ```
 */
/** @deprecated volcengine.vedb_mysql.Endpoints has been deprecated in favor of volcengine.vedb_mysql.getEndpoints */
function endpointsOutput(args, opts) {
    return pulumi.output(args).apply((a) => endpoints(a, opts));
}
exports.endpointsOutput = endpointsOutput;
//# sourceMappingURL=endpoints.js.map