vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware
vcd.getGlobalRole
Explore with Pulumi AI
Provides a VMware Cloud Director global role data source. This can be used to read global roles.
Supported in provider v3.3+
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vcd from "@pulumi/vcd";
const vapp_author = vcd.getGlobalRole({
name: "vApp Author",
});
import pulumi
import pulumi_vcd as vcd
vapp_author = vcd.get_global_role(name="vApp Author")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/vcd/v3/vcd"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vcd.LookupGlobalRole(ctx, &vcd.LookupGlobalRoleArgs{
Name: "vApp Author",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vcd = Pulumi.Vcd;
return await Deployment.RunAsync(() =>
{
var vapp_author = Vcd.GetGlobalRole.Invoke(new()
{
Name = "vApp Author",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vcd.VcdFunctions;
import com.pulumi.vcd.inputs.GetGlobalRoleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var vapp-author = VcdFunctions.getGlobalRole(GetGlobalRoleArgs.builder()
.name("vApp Author")
.build());
}
}
variables:
vapp-author:
fn::invoke:
function: vcd:getGlobalRole
arguments:
name: vApp Author
Sample output:
global-role-vapp = {
"bundle_key" = "ROLE_VAPP_AUTHOR"
"description" = "Rights given to a user who uses catalogs and creates vApps"
"id" = "urn:vcloud:globalRole:1bf4457f-a253-3cf1-b163-f319f1a31802"
"name" = "vApp Author"
"publish_to_all_tenants" = true
"read_only" = false
"rights" = toset([
"Catalog: Add vApp from My Cloud",
"Catalog: View Private and Shared Catalogs",
"Organization vDC Compute Policy: View",
"Organization vDC Named Disk: Create",
"Organization vDC Named Disk: Delete",
"Organization vDC Named Disk: Edit Properties",
"Organization vDC Named Disk: View Encryption Status",
"Organization vDC Named Disk: View Properties",
"Organization vDC Network: View Properties",
"Organization vDC: VM-VM Affinity Edit",
"Organization: View",
"UI Plugins: View",
"VAPP_VM_METADATA_TO_VCENTER",
"vApp Template / Media: Copy",
"vApp Template / Media: Edit",
"vApp Template / Media: View",
"vApp Template: Checkout",
"vApp: Copy",
"vApp: Create / Reconfigure",
"vApp: Delete",
"vApp: Download",
"vApp: Edit Properties",
"vApp: Edit VM CPU",
"vApp: Edit VM Compute Policy",
"vApp: Edit VM Hard Disk",
"vApp: Edit VM Memory",
"vApp: Edit VM Network",
"vApp: Edit VM Properties",
"vApp: Manage VM Password Settings",
"vApp: Power Operations",
"vApp: Sharing",
"vApp: Snapshot Operations",
"vApp: Upload",
"vApp: Use Console",
"vApp: VM Boot Options",
"vApp: View ACL",
"vApp: View VM and VM's Disks Encryption Status",
"vApp: View VM metrics",
])
"tenants" = toset([
"org1",
"org2",
])
}
More information
See Roles management for a broader description of how global roles and rights work together.
Using getGlobalRole
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getGlobalRole(args: GetGlobalRoleArgs, opts?: InvokeOptions): Promise<GetGlobalRoleResult>
function getGlobalRoleOutput(args: GetGlobalRoleOutputArgs, opts?: InvokeOptions): Output<GetGlobalRoleResult>
def get_global_role(id: Optional[str] = None,
name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetGlobalRoleResult
def get_global_role_output(id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetGlobalRoleResult]
func LookupGlobalRole(ctx *Context, args *LookupGlobalRoleArgs, opts ...InvokeOption) (*LookupGlobalRoleResult, error)
func LookupGlobalRoleOutput(ctx *Context, args *LookupGlobalRoleOutputArgs, opts ...InvokeOption) LookupGlobalRoleResultOutput
> Note: This function is named LookupGlobalRole
in the Go SDK.
public static class GetGlobalRole
{
public static Task<GetGlobalRoleResult> InvokeAsync(GetGlobalRoleArgs args, InvokeOptions? opts = null)
public static Output<GetGlobalRoleResult> Invoke(GetGlobalRoleInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetGlobalRoleResult> getGlobalRole(GetGlobalRoleArgs args, InvokeOptions options)
public static Output<GetGlobalRoleResult> getGlobalRole(GetGlobalRoleArgs args, InvokeOptions options)
fn::invoke:
function: vcd:index/getGlobalRole:getGlobalRole
arguments:
# arguments dictionary
The following arguments are supported:
getGlobalRole Result
The following output properties are available:
- Bundle
Key string - Key used for internationalization.
- Description string
- A description of the global role
- Id string
- Name string
- Publish
To boolAll Tenants - When true, publishes the global role to all tenants
- Read
Only bool - Whether this global role is read-only
- Rights List<string>
- List of rights assigned to this role
- Tenants List<string>
- List of tenants to which this global role gets published. Ignored if
publish_to_all_tenants
is true.
- Bundle
Key string - Key used for internationalization.
- Description string
- A description of the global role
- Id string
- Name string
- Publish
To boolAll Tenants - When true, publishes the global role to all tenants
- Read
Only bool - Whether this global role is read-only
- Rights []string
- List of rights assigned to this role
- Tenants []string
- List of tenants to which this global role gets published. Ignored if
publish_to_all_tenants
is true.
- bundle
Key String - Key used for internationalization.
- description String
- A description of the global role
- id String
- name String
- publish
To BooleanAll Tenants - When true, publishes the global role to all tenants
- read
Only Boolean - Whether this global role is read-only
- rights List<String>
- List of rights assigned to this role
- tenants List<String>
- List of tenants to which this global role gets published. Ignored if
publish_to_all_tenants
is true.
- bundle
Key string - Key used for internationalization.
- description string
- A description of the global role
- id string
- name string
- publish
To booleanAll Tenants - When true, publishes the global role to all tenants
- read
Only boolean - Whether this global role is read-only
- rights string[]
- List of rights assigned to this role
- tenants string[]
- List of tenants to which this global role gets published. Ignored if
publish_to_all_tenants
is true.
- bundle_
key str - Key used for internationalization.
- description str
- A description of the global role
- id str
- name str
- publish_
to_ boolall_ tenants - When true, publishes the global role to all tenants
- read_
only bool - Whether this global role is read-only
- rights Sequence[str]
- List of rights assigned to this role
- tenants Sequence[str]
- List of tenants to which this global role gets published. Ignored if
publish_to_all_tenants
is true.
- bundle
Key String - Key used for internationalization.
- description String
- A description of the global role
- id String
- name String
- publish
To BooleanAll Tenants - When true, publishes the global role to all tenants
- read
Only Boolean - Whether this global role is read-only
- rights List<String>
- List of rights assigned to this role
- tenants List<String>
- List of tenants to which this global role gets published. Ignored if
publish_to_all_tenants
is true.
Package Details
- Repository
- vcd vmware/terraform-provider-vcd
- License
- Notes
- This Pulumi package is based on the
vcd
Terraform Provider.