getGlobalRole

Use this data source to retrieve information about a Rancher v2 global role resource.

Example Usage

using Pulumi;
using Rancher2 = Pulumi.Rancher2;

class MyStack : Stack
{
    public MyStack()
    {
        var foo = Output.Create(Rancher2.GetGlobalRole.InvokeAsync(new Rancher2.GetGlobalRoleArgs
        {
            Name = "foo",
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-rancher2/sdk/v3/go/rancher2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := rancher2.LookupGlobalRole(ctx, &rancher2.LookupGlobalRoleArgs{
			Name: "foo",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_rancher2 as rancher2

foo = rancher2.get_global_role(name="foo")
import * as pulumi from "@pulumi/pulumi";
import * as rancher2 from "@pulumi/rancher2";

const foo = pulumi.output(rancher2.getGlobalRole({
    name: "foo",
}, { async: true }));

Using getGlobalRole

function getGlobalRole(args: GetGlobalRoleArgs, opts?: InvokeOptions): Promise<GetGlobalRoleResult>
def get_global_role(name: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetGlobalRoleResult
func LookupGlobalRole(ctx *Context, args *LookupGlobalRoleArgs, opts ...InvokeOption) (*LookupGlobalRoleResult, error)

Note: This function is named LookupGlobalRole in the Go SDK.

public static class GetGlobalRole {
    public static Task<GetGlobalRoleResult> InvokeAsync(GetGlobalRoleArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string
The name of the Global Role (string)
Name string
The name of the Global Role (string)
name string
The name of the Global Role (string)
name str
The name of the Global Role (string)

getGlobalRole Result

The following output properties are available:

Annotations Dictionary<string, object>
(Computed) Annotations for global role object (map)
Builtin bool
(Computed) Builtin global role (bool)
Description string
(Computed) Global role description (string)
Id string
The provider-assigned unique ID for this managed resource.
Labels Dictionary<string, object>
(Computed) Labels for global role object (map)
Name string
NewUserDefault bool
(Computed) Whether or not this role should be added to new users (bool)
Rules List<GetGlobalRoleRule>
(Computed) Global role policy rules (list)
Annotations map[string]interface{}
(Computed) Annotations for global role object (map)
Builtin bool
(Computed) Builtin global role (bool)
Description string
(Computed) Global role description (string)
Id string
The provider-assigned unique ID for this managed resource.
Labels map[string]interface{}
(Computed) Labels for global role object (map)
Name string
NewUserDefault bool
(Computed) Whether or not this role should be added to new users (bool)
Rules []GetGlobalRoleRule
(Computed) Global role policy rules (list)
annotations {[key: string]: any}
(Computed) Annotations for global role object (map)
builtin boolean
(Computed) Builtin global role (bool)
description string
(Computed) Global role description (string)
id string
The provider-assigned unique ID for this managed resource.
labels {[key: string]: any}
(Computed) Labels for global role object (map)
name string
newUserDefault boolean
(Computed) Whether or not this role should be added to new users (bool)
rules GetGlobalRoleRule[]
(Computed) Global role policy rules (list)
annotations Mapping[str, Any]
(Computed) Annotations for global role object (map)
builtin bool
(Computed) Builtin global role (bool)
description str
(Computed) Global role description (string)
id str
The provider-assigned unique ID for this managed resource.
labels Mapping[str, Any]
(Computed) Labels for global role object (map)
name str
new_user_default bool
(Computed) Whether or not this role should be added to new users (bool)
rules Sequence[GetGlobalRoleRule]
(Computed) Global role policy rules (list)

Supporting Types

GetGlobalRoleRule

ApiGroups List<string>
NonResourceUrls List<string>
ResourceNames List<string>
Resources List<string>
Verbs List<string>
ApiGroups []string
NonResourceUrls []string
ResourceNames []string
Resources []string
Verbs []string
apiGroups string[]
nonResourceUrls string[]
resourceNames string[]
resources string[]
verbs string[]
api_groups Sequence[str]
non_resource_urls Sequence[str]
resource_names Sequence[str]
resources Sequence[str]
verbs Sequence[str]

Package Details

Repository
https://github.com/pulumi/pulumi-rancher2
License
Apache-2.0
Notes
This Pulumi package is based on the rancher2 Terraform Provider.