@pulumi/linode
Version:
A Pulumi package for creating and managing linode cloud resources.
112 lines • 3.36 kB
JavaScript
// *** 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.getPlacementGroupsOutput = exports.getPlacementGroups = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Provides information about a list of Linode Placement Groups that match a set of filters.
* For more information, see the [Linode APIv4 docs](https://techdocs.akamai.com/linode-api/reference/get-placement-groups).
*
* ## Example Usage
*
* The following example shows how one might use this data source to list Placement Groups.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as linode from "@pulumi/linode";
*
* export = async () => {
* const all = await linode.getPlacementGroups({});
* const filtered = await linode.getPlacementGroups({
* filters: [{
* name: "label",
* values: ["my-label"],
* }],
* });
* return {
* "all-pgs": all.placementGroups,
* "filtered-pgs": filtered.placementGroups,
* };
* }
* ```
*
* ## Filterable Fields
*
* * `id`
*
* * `label`
*
* * `region`
*
* * `placementGroupType`
*
* * `placementGroupPolicy`
*
* * `isCompliant`
*/
function getPlacementGroups(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("linode:index/getPlacementGroups:getPlacementGroups", {
"filters": args.filters,
"order": args.order,
"orderBy": args.orderBy,
"placementGroups": args.placementGroups,
}, opts);
}
exports.getPlacementGroups = getPlacementGroups;
/**
* Provides information about a list of Linode Placement Groups that match a set of filters.
* For more information, see the [Linode APIv4 docs](https://techdocs.akamai.com/linode-api/reference/get-placement-groups).
*
* ## Example Usage
*
* The following example shows how one might use this data source to list Placement Groups.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as linode from "@pulumi/linode";
*
* export = async () => {
* const all = await linode.getPlacementGroups({});
* const filtered = await linode.getPlacementGroups({
* filters: [{
* name: "label",
* values: ["my-label"],
* }],
* });
* return {
* "all-pgs": all.placementGroups,
* "filtered-pgs": filtered.placementGroups,
* };
* }
* ```
*
* ## Filterable Fields
*
* * `id`
*
* * `label`
*
* * `region`
*
* * `placementGroupType`
*
* * `placementGroupPolicy`
*
* * `isCompliant`
*/
function getPlacementGroupsOutput(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("linode:index/getPlacementGroups:getPlacementGroups", {
"filters": args.filters,
"order": args.order,
"orderBy": args.orderBy,
"placementGroups": args.placementGroups,
}, opts);
}
exports.getPlacementGroupsOutput = getPlacementGroupsOutput;
//# sourceMappingURL=getPlacementGroups.js.map
;