Rancher2

Pulumi Official
Package maintained by Pulumi
v3.8.0 published on Tuesday, May 31, 2022 by Pulumi

getPrincipal

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

Example Usage

using Pulumi;
using Rancher2 = Pulumi.Rancher2;

class MyStack : Stack
{
    public MyStack()
    {
        var foo = Output.Create(Rancher2.GetPrincipal.InvokeAsync(new Rancher2.GetPrincipalArgs
        {
            Name = "user@example.com",
        }));
    }

}
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.GetPrincipal(ctx, &GetPrincipalArgs{
			Name: "user@example.com",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_rancher2 as rancher2

foo = rancher2.get_principal(name="user@example.com")
import * as pulumi from "@pulumi/pulumi";
import * as rancher2 from "@pulumi/rancher2";

const foo = pulumi.output(rancher2.getPrincipal({
    name: "user@example.com",
}));

Coming soon!

Using getPrincipal

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 getPrincipal(args: GetPrincipalArgs, opts?: InvokeOptions): Promise<GetPrincipalResult>
function getPrincipalOutput(args: GetPrincipalOutputArgs, opts?: InvokeOptions): Output<GetPrincipalResult>
def get_principal(name: Optional[str] = None,
                  type: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetPrincipalResult
def get_principal_output(name: Optional[pulumi.Input[str]] = None,
                  type: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetPrincipalResult]
func GetPrincipal(ctx *Context, args *GetPrincipalArgs, opts ...InvokeOption) (*GetPrincipalResult, error)
func GetPrincipalOutput(ctx *Context, args *GetPrincipalOutputArgs, opts ...InvokeOption) GetPrincipalResultOutput

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

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

The following arguments are supported:

Name string

The full name of the principal (string)

Type string

The type of the identity (string). Defaults to user. Only user and group values are supported (string)

Name string

The full name of the principal (string)

Type string

The type of the identity (string). Defaults to user. Only user and group values are supported (string)

name String

The full name of the principal (string)

type String

The type of the identity (string). Defaults to user. Only user and group values are supported (string)

name string

The full name of the principal (string)

type string

The type of the identity (string). Defaults to user. Only user and group values are supported (string)

name str

The full name of the principal (string)

type str

The type of the identity (string). Defaults to user. Only user and group values are supported (string)

name String

The full name of the principal (string)

type String

The type of the identity (string). Defaults to user. Only user and group values are supported (string)

getPrincipal Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Name string
Type string
Id string

The provider-assigned unique ID for this managed resource.

Name string
Type string
id String

The provider-assigned unique ID for this managed resource.

name String
type String
id string

The provider-assigned unique ID for this managed resource.

name string
type string
id str

The provider-assigned unique ID for this managed resource.

name str
type str
id String

The provider-assigned unique ID for this managed resource.

name String
type String

Package Details

Repository
https://github.com/pulumi/pulumi-rancher2
License
Apache-2.0
Notes

This Pulumi package is based on the rancher2 Terraform Provider.