getEnvironment function
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.
args Arguments passed to this invoke. Arguments for getEnvironment.
options Invoke options controlling this call.
Implementation
Future<GetEnvironmentResult> getEnvironment(
GetEnvironmentArgs args, {
pulumi.InvokeOptions? options,
}) async {
final deployment = pulumi.Deployment.instance;
final result = await deployment.invoke<Map<String, dynamic>>(
'pulumiservice:index:getEnvironment',
args.toMap(),
options: pulumi.toDeploymentInvokeOptions(options),
);
return GetEnvironmentResult.fromMap(result);
}