UNPKG

@pulumi/linode

Version:

A Pulumi package for creating and managing linode cloud resources.

128 lines 3.64 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.getInstanceTypesOutput = exports.getInstanceTypes = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Provides information about Linode Instance types that match a set of filters. * For more information, see the [Linode APIv4 docs](https://techdocs.akamai.com/linode-api/reference/get-linode-types). * * ## Example Usage * * Get information about all Linode Instance types with a certain number of VCPUs: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as linode from "@pulumi/linode"; * * const specific_types = linode.getInstanceTypes({ * filters: [{ * name: "vcpus", * values: ["2"], * }], * }); * export const typeIds = specific_types.then(specific_types => specific_types.types.map(__item => __item.id)); * ``` * * Get information about all Linode Instance types: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as linode from "@pulumi/linode"; * * const all_types = linode.getInstanceTypes({}); * export const typeIds = all_types.then(all_types => all_types.types.map(__item => __item.id)); * ``` * * ## Filterable Fields * * * `class` * * * `disk` * * * `gpus` * * * `label` * * * `memory` * * * `networkOut` * * * `transfer` * * * `vcpus` */ function getInstanceTypes(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("linode:index/getInstanceTypes:getInstanceTypes", { "filters": args.filters, "order": args.order, "orderBy": args.orderBy, "types": args.types, }, opts); } exports.getInstanceTypes = getInstanceTypes; /** * Provides information about Linode Instance types that match a set of filters. * For more information, see the [Linode APIv4 docs](https://techdocs.akamai.com/linode-api/reference/get-linode-types). * * ## Example Usage * * Get information about all Linode Instance types with a certain number of VCPUs: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as linode from "@pulumi/linode"; * * const specific_types = linode.getInstanceTypes({ * filters: [{ * name: "vcpus", * values: ["2"], * }], * }); * export const typeIds = specific_types.then(specific_types => specific_types.types.map(__item => __item.id)); * ``` * * Get information about all Linode Instance types: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as linode from "@pulumi/linode"; * * const all_types = linode.getInstanceTypes({}); * export const typeIds = all_types.then(all_types => all_types.types.map(__item => __item.id)); * ``` * * ## Filterable Fields * * * `class` * * * `disk` * * * `gpus` * * * `label` * * * `memory` * * * `networkOut` * * * `transfer` * * * `vcpus` */ function getInstanceTypesOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("linode:index/getInstanceTypes:getInstanceTypes", { "filters": args.filters, "order": args.order, "orderBy": args.orderBy, "types": args.types, }, opts); } exports.getInstanceTypesOutput = getInstanceTypesOutput; //# sourceMappingURL=getInstanceTypes.js.map