@pulumi/scm
Version:
A Pulumi package for managing resources on Strata Cloud Manager.. Based on terraform-provider-scm: version v0.2.1
86 lines • 2.9 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.getVariableListOutput = exports.getVariableList = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Retrieves a listing of config items.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scm from "@pulumi/scm";
*
* //
* // Data source to retrieve a list of all variables in a folder.
* //
* // Example 1: Fetch a list of all variables in the "Global" aka "All" folder.
* const allGlobal = scm.getVariableList({
* folder: "All",
* });
* export const scmVariableListGlobal = allGlobal.then(allGlobal => allGlobal.datas);
* // Example 2: Use pagination to get the first variables by name.
* const paginated = scm.getVariableList({
* folder: "All",
* limit: 5,
* offset: 0,
* });
* export const scmVariableListPaginated = paginated.then(paginated => paginated.datas);
* ```
*/
function getVariableList(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("scm:index/getVariableList:getVariableList", {
"device": args.device,
"folder": args.folder,
"limit": args.limit,
"name": args.name,
"offset": args.offset,
"snippet": args.snippet,
}, opts);
}
exports.getVariableList = getVariableList;
/**
* Retrieves a listing of config items.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scm from "@pulumi/scm";
*
* //
* // Data source to retrieve a list of all variables in a folder.
* //
* // Example 1: Fetch a list of all variables in the "Global" aka "All" folder.
* const allGlobal = scm.getVariableList({
* folder: "All",
* });
* export const scmVariableListGlobal = allGlobal.then(allGlobal => allGlobal.datas);
* // Example 2: Use pagination to get the first variables by name.
* const paginated = scm.getVariableList({
* folder: "All",
* limit: 5,
* offset: 0,
* });
* export const scmVariableListPaginated = paginated.then(paginated => paginated.datas);
* ```
*/
function getVariableListOutput(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("scm:index/getVariableList:getVariableList", {
"device": args.device,
"folder": args.folder,
"limit": args.limit,
"name": args.name,
"offset": args.offset,
"snippet": args.snippet,
}, opts);
}
exports.getVariableListOutput = getVariableListOutput;
//# sourceMappingURL=getVariableList.js.map