UNPKG

@pulumi/linode

Version:

A Pulumi package for creating and managing linode cloud resources.

150 lines 3.95 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.getImagesOutput = exports.getImages = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Provides information about Linode images that match a set of filters. * For more information, see the [Linode APIv4 docs](https://techdocs.akamai.com/linode-api/reference/get-images). * * ## Example Usage * * Get information about all Linode images with a certain label and visibility: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as linode from "@pulumi/linode"; * * const specific_images = linode.getImages({ * filters: [ * { * name: "label", * values: ["Debian 12"], * }, * { * name: "is_public", * values: ["true"], * }, * ], * }); * export const imageId = specific_images.then(specific_images => specific_images.images?.[0]?.id); * ``` * * Get information about all Linode images associated with the current token: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as linode from "@pulumi/linode"; * * const all_images = linode.getImages({}); * export const imageIds = all_images.then(all_images => all_images.images.map(__item => __item.id)); * ``` * * ## Filterable Fields * * * `createdBy` * * * `deprecated` * * * `description` * * * `id` * * * `isPublic` * * * `label` * * * `size` * * * `status` * * * `vendor` * * * `tags` */ function getImages(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("linode:index/getImages:getImages", { "filters": args.filters, "images": args.images, "latest": args.latest, "order": args.order, "orderBy": args.orderBy, }, opts); } exports.getImages = getImages; /** * Provides information about Linode images that match a set of filters. * For more information, see the [Linode APIv4 docs](https://techdocs.akamai.com/linode-api/reference/get-images). * * ## Example Usage * * Get information about all Linode images with a certain label and visibility: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as linode from "@pulumi/linode"; * * const specific_images = linode.getImages({ * filters: [ * { * name: "label", * values: ["Debian 12"], * }, * { * name: "is_public", * values: ["true"], * }, * ], * }); * export const imageId = specific_images.then(specific_images => specific_images.images?.[0]?.id); * ``` * * Get information about all Linode images associated with the current token: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as linode from "@pulumi/linode"; * * const all_images = linode.getImages({}); * export const imageIds = all_images.then(all_images => all_images.images.map(__item => __item.id)); * ``` * * ## Filterable Fields * * * `createdBy` * * * `deprecated` * * * `description` * * * `id` * * * `isPublic` * * * `label` * * * `size` * * * `status` * * * `vendor` * * * `tags` */ function getImagesOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("linode:index/getImages:getImages", { "filters": args.filters, "images": args.images, "latest": args.latest, "order": args.order, "orderBy": args.orderBy, }, opts); } exports.getImagesOutput = getImagesOutput; //# sourceMappingURL=getImages.js.map