Rancher2

Pulumi Official
Package maintained by Pulumi
v3.7.0 published on Wednesday, Apr 20, 2022 by Pulumi

getRoleTemplate

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

Example Usage

using Pulumi;
using Rancher2 = Pulumi.Rancher2;

class MyStack : Stack
{
    public MyStack()
    {
        var foo = Output.Create(Rancher2.GetRoleTemplate.InvokeAsync(new Rancher2.GetRoleTemplateArgs
        {
            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.LookupRoleTemplate(ctx, &GetRoleTemplateArgs{
			Name: "foo",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_rancher2 as rancher2

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

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

Coming soon!

Using getRoleTemplate

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 getRoleTemplate(args: GetRoleTemplateArgs, opts?: InvokeOptions): Promise<GetRoleTemplateResult>
function getRoleTemplateOutput(args: GetRoleTemplateOutputArgs, opts?: InvokeOptions): Output<GetRoleTemplateResult>
def get_role_template(context: Optional[str] = None,
                      name: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetRoleTemplateResult
def get_role_template_output(context: Optional[pulumi.Input[str]] = None,
                      name: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetRoleTemplateResult]
func LookupRoleTemplate(ctx *Context, args *LookupRoleTemplateArgs, opts ...InvokeOption) (*LookupRoleTemplateResult, error)
func LookupRoleTemplateOutput(ctx *Context, args *LookupRoleTemplateOutputArgs, opts ...InvokeOption) LookupRoleTemplateResultOutput

> Note: This function is named LookupRoleTemplate in the Go SDK.

public static class GetRoleTemplate 
{
    public static Task<GetRoleTemplateResult> InvokeAsync(GetRoleTemplateArgs args, InvokeOptions? opts = null)
    public static Output<GetRoleTemplateResult> Invoke(GetRoleTemplateInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRoleTemplateResult> getRoleTemplate(GetRoleTemplateArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: rancher2:index/getRoleTemplate:getRoleTemplate
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Name string

The name of the Role Template (string)

Context string

Role template context. cluster and project values are supported (string)

Name string

The name of the Role Template (string)

Context string

Role template context. cluster and project values are supported (string)

name String

The name of the Role Template (string)

context String

Role template context. cluster and project values are supported (string)

name string

The name of the Role Template (string)

context string

Role template context. cluster and project values are supported (string)

name str

The name of the Role Template (string)

context str

Role template context. cluster and project values are supported (string)

name String

The name of the Role Template (string)

context String

Role template context. cluster and project values are supported (string)

getRoleTemplate Result

The following output properties are available:

Administrative bool

(Computed) Administrative role template (bool)

Annotations Dictionary<string, object>

(Computed) Annotations for role template object (map)

Builtin bool

(Computed) Builtin role template (string)

Context string
DefaultRole bool

(Computed) Default role template for new created cluster or project (bool)

Description string

(Computed) Role template description (string)

External bool

(Computed) External role template (bool)

Hidden bool

(Computed) Hidden role template (bool)

Id string

The provider-assigned unique ID for this managed resource.

Labels Dictionary<string, object>

(Computed) Labels for role template object (map)

Locked bool

(Computed) Locked role template (bool)

Name string
RoleTemplateIds List<string>

(Computed) Inherit role template IDs (list)

Rules List<GetRoleTemplateRule>

(Computed) Role template policy rules (list)

Administrative bool

(Computed) Administrative role template (bool)

Annotations map[string]interface{}

(Computed) Annotations for role template object (map)

Builtin bool

(Computed) Builtin role template (string)

Context string
DefaultRole bool

(Computed) Default role template for new created cluster or project (bool)

Description string

(Computed) Role template description (string)

External bool

(Computed) External role template (bool)

Hidden bool

(Computed) Hidden role template (bool)

Id string

The provider-assigned unique ID for this managed resource.

Labels map[string]interface{}

(Computed) Labels for role template object (map)

Locked bool

(Computed) Locked role template (bool)

Name string
RoleTemplateIds []string

(Computed) Inherit role template IDs (list)

Rules []GetRoleTemplateRule

(Computed) Role template policy rules (list)

administrative Boolean

(Computed) Administrative role template (bool)

annotations Map

(Computed) Annotations for role template object (map)

builtin Boolean

(Computed) Builtin role template (string)

context String
defaultRole Boolean

(Computed) Default role template for new created cluster or project (bool)

description String

(Computed) Role template description (string)

external Boolean

(Computed) External role template (bool)

hidden Boolean

(Computed) Hidden role template (bool)

id String

The provider-assigned unique ID for this managed resource.

labels Map

(Computed) Labels for role template object (map)

locked Boolean

(Computed) Locked role template (bool)

name String
roleTemplateIds List

(Computed) Inherit role template IDs (list)

rules ListRoleTemplateRule>

(Computed) Role template policy rules (list)

administrative boolean

(Computed) Administrative role template (bool)

annotations {[key: string]: any}

(Computed) Annotations for role template object (map)

builtin boolean

(Computed) Builtin role template (string)

context string
defaultRole boolean

(Computed) Default role template for new created cluster or project (bool)

description string

(Computed) Role template description (string)

external boolean

(Computed) External role template (bool)

hidden boolean

(Computed) Hidden role template (bool)

id string

The provider-assigned unique ID for this managed resource.

labels {[key: string]: any}

(Computed) Labels for role template object (map)

locked boolean

(Computed) Locked role template (bool)

name string
roleTemplateIds string[]

(Computed) Inherit role template IDs (list)

rules GetRoleTemplateRule[]

(Computed) Role template policy rules (list)

administrative bool

(Computed) Administrative role template (bool)

annotations Mapping[str, Any]

(Computed) Annotations for role template object (map)

builtin bool

(Computed) Builtin role template (string)

context str
default_role bool

(Computed) Default role template for new created cluster or project (bool)

description str

(Computed) Role template description (string)

external bool

(Computed) External role template (bool)

hidden bool

(Computed) Hidden role template (bool)

id str

The provider-assigned unique ID for this managed resource.

labels Mapping[str, Any]

(Computed) Labels for role template object (map)

locked bool

(Computed) Locked role template (bool)

name str
role_template_ids Sequence[str]

(Computed) Inherit role template IDs (list)

rules Sequence[GetRoleTemplateRule]

(Computed) Role template policy rules (list)

administrative Boolean

(Computed) Administrative role template (bool)

annotations Map

(Computed) Annotations for role template object (map)

builtin Boolean

(Computed) Builtin role template (string)

context String
defaultRole Boolean

(Computed) Default role template for new created cluster or project (bool)

description String

(Computed) Role template description (string)

external Boolean

(Computed) External role template (bool)

hidden Boolean

(Computed) Hidden role template (bool)

id String

The provider-assigned unique ID for this managed resource.

labels Map

(Computed) Labels for role template object (map)

locked Boolean

(Computed) Locked role template (bool)

name String
roleTemplateIds List

(Computed) Inherit role template IDs (list)

rules List

(Computed) Role template policy rules (list)

Supporting Types

GetRoleTemplateRule

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.