rancher2.getGlobalRole
Use this data source to retrieve information about a Rancher v2 global role resource.
Example Usage
using System.Collections.Generic;
using Pulumi;
using Rancher2 = Pulumi.Rancher2;
return await Deployment.RunAsync(() =>
{
var foo = Rancher2.GetGlobalRole.Invoke(new()
{
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
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.rancher2.Rancher2Functions;
import com.pulumi.rancher2.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 foo = Rancher2Functions.getGlobalRole(GetGlobalRoleArgs.builder()
.name("foo")
.build());
}
}
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 = rancher2.getGlobalRole({
name: "foo",
});
variables:
foo:
fn::invoke:
Function: rancher2:getGlobalRole
Arguments:
name: foo
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(name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetGlobalRoleResult
def get_global_role_output(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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: rancher2:index/getGlobalRole:getGlobalRole
arguments:
# arguments dictionary
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 string
The name of the Global Role (string)
- name str
The name of the Global Role (string)
- name String
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
- New
User boolDefault (Computed) Whether or not this role should be added to new users (bool)
- Rules
List<Get
Global Role Rule> (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
- New
User boolDefault (Computed) Whether or not this role should be added to new users (bool)
- Rules
[]Get
Global Role Rule (Computed) Global role policy rules (list)
- annotations Map<String,Object>
(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 Map<String,Object>
(Computed) Labels for global role object (map)
- name String
- new
User BooleanDefault (Computed) Whether or not this role should be added to new users (bool)
- rules
List<Get
Global Role Rule> (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
- new
User booleanDefault (Computed) Whether or not this role should be added to new users (bool)
- rules
Get
Global Role Rule[] (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_ booldefault (Computed) Whether or not this role should be added to new users (bool)
- rules
Sequence[Get
Global Role Rule] (Computed) Global role policy rules (list)
- annotations Map<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 Map<Any>
(Computed) Labels for global role object (map)
- name String
- new
User BooleanDefault (Computed) Whether or not this role should be added to new users (bool)
- rules List<Property Map>
(Computed) Global role policy rules (list)
Supporting Types
GetGlobalRoleRule
- Api
Groups List<string> - Non
Resource List<string>Urls - Resource
Names List<string> - Resources List<string>
- Verbs List<string>
- Api
Groups []string - Non
Resource []stringUrls - Resource
Names []string - Resources []string
- Verbs []string
- api
Groups List<String> - non
Resource List<String>Urls - resource
Names List<String> - resources List<String>
- verbs List<String>
- api
Groups string[] - non
Resource string[]Urls - resource
Names string[] - resources string[]
- verbs string[]
- api_
groups Sequence[str] - non_
resource_ Sequence[str]urls - resource_
names Sequence[str] - resources Sequence[str]
- verbs Sequence[str]
- api
Groups List<String> - non
Resource List<String>Urls - resource
Names List<String> - resources List<String>
- verbs List<String>
Package Details
- Repository
- Rancher2 pulumi/pulumi-rancher2
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
rancher2
Terraform Provider.