UNPKG

@pulumi/pulumiservice

Version:

[![Slack](http://www.pulumi.com/images/docs/badges/slack.svg)](https://slack.pulumi.com) [![NPM version](https://badge.fury.io/js/%40pulumi%2Fpulumiservice.svg)](https://www.npmjs.com/package/@pulumi/pulumiservice) [![Python version](https://badge.fury.io

56 lines 2.4 kB
import * as pulumi from "@pulumi/pulumi"; /** * Looks up an existing ESC environment by name and returns its UUID. Use this to scope a custom RBAC role to a specific environment — pass the returned UUID into `buildEnvironmentScopedPermissions`, or use it as the `identity` field of a hand-rolled `PermissionLiteralExpressionEnvironment` in `OrganizationRole.permissions`. Errors when the environment is not found. */ export declare function getEnvironment(args: GetEnvironmentArgs, opts?: pulumi.InvokeOptions): Promise<GetEnvironmentResult>; export interface GetEnvironmentArgs { /** * The environment name. */ name: string; /** * The Pulumi Cloud organization that owns the environment. */ organizationName: string; /** * The ESC project name. Defaults to `default`. */ projectName?: string; } export interface GetEnvironmentResult { /** * The environment's UUID. Pass it to `buildEnvironmentScopedPermissions` (preferred) or use it as the `identity` field of a hand-rolled `PermissionLiteralExpressionEnvironment` in `OrganizationRole.permissions`. */ readonly environmentId: string; /** * The environment name. */ readonly name: string; /** * The Pulumi Cloud organization that owns the environment. */ readonly organizationName: string; /** * The ESC project the environment lives in. */ readonly projectName: string; } /** * Looks up an existing ESC environment by name and returns its UUID. Use this to scope a custom RBAC role to a specific environment — pass the returned UUID into `buildEnvironmentScopedPermissions`, or use it as the `identity` field of a hand-rolled `PermissionLiteralExpressionEnvironment` in `OrganizationRole.permissions`. Errors when the environment is not found. */ export declare function getEnvironmentOutput(args: GetEnvironmentOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetEnvironmentResult>; export interface GetEnvironmentOutputArgs { /** * The environment name. */ name: pulumi.Input<string>; /** * The Pulumi Cloud organization that owns the environment. */ organizationName: pulumi.Input<string>; /** * The ESC project name. Defaults to `default`. */ projectName?: pulumi.Input<string | undefined>; } //# sourceMappingURL=getEnvironment.d.ts.map