UNPKG

@pulumi/linode

Version:

A Pulumi package for creating and managing linode cloud resources.

136 lines 4.45 kB
"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.getDatabaseEnginesOutput = exports.getDatabaseEngines = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Provides information about Linode Managed Database engines that match a set of filters. * For more information, see the [Linode APIv4 docs](https://techdocs.akamai.com/linode-api/reference/get-databases-engines). * * ## Example Usage * * Get information about all Linode Managed Database engines: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as linode from "@pulumi/linode"; * * const all = linode.getDatabaseEngines({}); * export const engineIds = all.then(all => all.engines.map(__item => __item.id)); * ``` * * Get information about all Linode MySQL Database engines: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as linode from "@pulumi/linode"; * * const mysql = linode.getDatabaseEngines({ * filters: [{ * name: "engine", * values: ["mysql"], * }], * }); * export const engineIds = mysql.then(mysql => mysql.engines.map(__item => __item.id)); * ``` * * Create a Linode MySQL Database using the latest support MySQL version: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as linode from "@pulumi/linode"; * * const mysql = linode.getDatabaseEngines({ * latest: true, * filters: [{ * name: "engine", * values: ["mysql"], * }], * }); * const myDb = new linode.DatabaseMysql("my_db", { * label: "mydb", * engineId: mysql.then(mysql => mysql.engines?.[0]?.id), * region: "us-southeast", * type: "g6-nanode-1", * }); * ``` */ function getDatabaseEngines(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("linode:index/getDatabaseEngines:getDatabaseEngines", { "engines": args.engines, "filters": args.filters, "latest": args.latest, "order": args.order, "orderBy": args.orderBy, }, opts); } exports.getDatabaseEngines = getDatabaseEngines; /** * Provides information about Linode Managed Database engines that match a set of filters. * For more information, see the [Linode APIv4 docs](https://techdocs.akamai.com/linode-api/reference/get-databases-engines). * * ## Example Usage * * Get information about all Linode Managed Database engines: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as linode from "@pulumi/linode"; * * const all = linode.getDatabaseEngines({}); * export const engineIds = all.then(all => all.engines.map(__item => __item.id)); * ``` * * Get information about all Linode MySQL Database engines: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as linode from "@pulumi/linode"; * * const mysql = linode.getDatabaseEngines({ * filters: [{ * name: "engine", * values: ["mysql"], * }], * }); * export const engineIds = mysql.then(mysql => mysql.engines.map(__item => __item.id)); * ``` * * Create a Linode MySQL Database using the latest support MySQL version: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as linode from "@pulumi/linode"; * * const mysql = linode.getDatabaseEngines({ * latest: true, * filters: [{ * name: "engine", * values: ["mysql"], * }], * }); * const myDb = new linode.DatabaseMysql("my_db", { * label: "mydb", * engineId: mysql.then(mysql => mysql.engines?.[0]?.id), * region: "us-southeast", * type: "g6-nanode-1", * }); * ``` */ function getDatabaseEnginesOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("linode:index/getDatabaseEngines:getDatabaseEngines", { "engines": args.engines, "filters": args.filters, "latest": args.latest, "order": args.order, "orderBy": args.orderBy, }, opts); } exports.getDatabaseEnginesOutput = getDatabaseEnginesOutput; //# sourceMappingURL=getDatabaseEngines.js.map