@pulumi/pulumiservice
Version:
[](https://slack.pulumi.com) [](https://www.npmjs.com/package/@pulumi/pulumiservice) [: 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