UNPKG

@pulumi/sumologic

Version:

A Pulumi package for creating and managing sumologic cloud resources.

100 lines 3.21 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.getRoleOutput = exports.getRole = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Provides a way to retrieve Sumo Logic role details (id, names, etc) for a role. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as sumologic from "@pulumi/sumologic"; * * const _this = sumologic.getRole({ * name: "MyRole", * }); * ``` * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as sumologic from "@pulumi/sumologic"; * * const that = sumologic.getRole({ * id: "1234567890", * }); * ``` * * A role can be looked up by either `id` or `name`. One of those attributes needs to be specified. * * If both `id` and `name` have been specified, `id` takes precedence. * * ## Attributes reference * * The following attributes are exported: * * - `id` - The internal ID of the role. This can be used to create users having that role. * - `name` - The name of the role. * - `description` - The description of the role. * - `filterPredicate` - The search filter to restrict access to specific logs. * - `capabilities` - The list of capabilities associated with the role. */ function getRole(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("sumologic:index/getRole:getRole", { "id": args.id, "name": args.name, }, opts); } exports.getRole = getRole; /** * Provides a way to retrieve Sumo Logic role details (id, names, etc) for a role. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as sumologic from "@pulumi/sumologic"; * * const _this = sumologic.getRole({ * name: "MyRole", * }); * ``` * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as sumologic from "@pulumi/sumologic"; * * const that = sumologic.getRole({ * id: "1234567890", * }); * ``` * * A role can be looked up by either `id` or `name`. One of those attributes needs to be specified. * * If both `id` and `name` have been specified, `id` takes precedence. * * ## Attributes reference * * The following attributes are exported: * * - `id` - The internal ID of the role. This can be used to create users having that role. * - `name` - The name of the role. * - `description` - The description of the role. * - `filterPredicate` - The search filter to restrict access to specific logs. * - `capabilities` - The list of capabilities associated with the role. */ function getRoleOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("sumologic:index/getRole:getRole", { "id": args.id, "name": args.name, }, opts); } exports.getRoleOutput = getRoleOutput; //# sourceMappingURL=getRole.js.map