UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

78 lines 2.51 kB
"use strict"; // *** 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.getWorkspacesOutput = exports.getWorkspaces = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides the aliases, ARNs, and workspace IDs of Amazon Prometheus workspaces. * * ## Example Usage * * The following example returns all of the workspaces in a region: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.amp.getWorkspaces({}); * ``` * * The following example filters the workspaces by alias. Only the workspaces with * aliases that begin with the value of `aliasPrefix` will be returned: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.amp.getWorkspaces({ * aliasPrefix: "example", * }); * ``` */ function getWorkspaces(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("aws:amp/getWorkspaces:getWorkspaces", { "aliasPrefix": args.aliasPrefix, "region": args.region, }, opts); } exports.getWorkspaces = getWorkspaces; /** * Provides the aliases, ARNs, and workspace IDs of Amazon Prometheus workspaces. * * ## Example Usage * * The following example returns all of the workspaces in a region: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.amp.getWorkspaces({}); * ``` * * The following example filters the workspaces by alias. Only the workspaces with * aliases that begin with the value of `aliasPrefix` will be returned: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.amp.getWorkspaces({ * aliasPrefix: "example", * }); * ``` */ function getWorkspacesOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("aws:amp/getWorkspaces:getWorkspaces", { "aliasPrefix": args.aliasPrefix, "region": args.region, }, opts); } exports.getWorkspacesOutput = getWorkspacesOutput; //# sourceMappingURL=getWorkspaces.js.map