avi 31.1.1 published on Monday, Apr 14, 2025 by vmware
avi.getRole
Explore with Pulumi AI
<!–
Copyright 2021 VMware, Inc.
SPDX-License-Identifier: Mozilla Public License 2.0
–>
layout: “avi”
page_title: “AVI: avi.Role” sidebar_current: “docs-avi-datasource-role” description: |- Get information of Avi Role.
avi.Role
This data source is used to to get avi.Role objects.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as avi from "@pulumi/avi";
const fooRole = avi.getRole({
name: "foo",
uuid: "role-f9cf6b3e-a411-436f-95e2-2982ba2b217b",
});
import pulumi
import pulumi_avi as avi
foo_role = avi.get_role(name="foo",
uuid="role-f9cf6b3e-a411-436f-95e2-2982ba2b217b")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/avi/v31/avi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := avi.LookupRole(ctx, &avi.LookupRoleArgs{
Name: pulumi.StringRef("foo"),
Uuid: pulumi.StringRef("role-f9cf6b3e-a411-436f-95e2-2982ba2b217b"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Avi = Pulumi.Avi;
return await Deployment.RunAsync(() =>
{
var fooRole = Avi.GetRole.Invoke(new()
{
Name = "foo",
Uuid = "role-f9cf6b3e-a411-436f-95e2-2982ba2b217b",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.avi.AviFunctions;
import com.pulumi.avi.inputs.GetRoleArgs;
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 fooRole = AviFunctions.getRole(GetRoleArgs.builder()
.name("foo")
.uuid("role-f9cf6b3e-a411-436f-95e2-2982ba2b217b")
.build());
}
}
variables:
fooRole:
fn::invoke:
function: avi:getRole
arguments:
name: foo
uuid: role-f9cf6b3e-a411-436f-95e2-2982ba2b217b
Using getRole
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 getRole(args: GetRoleArgs, opts?: InvokeOptions): Promise<GetRoleResult>
function getRoleOutput(args: GetRoleOutputArgs, opts?: InvokeOptions): Output<GetRoleResult>
def get_role(id: Optional[str] = None,
name: Optional[str] = None,
tenant_ref: Optional[str] = None,
uuid: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRoleResult
def get_role_output(id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
tenant_ref: Optional[pulumi.Input[str]] = None,
uuid: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRoleResult]
func LookupRole(ctx *Context, args *LookupRoleArgs, opts ...InvokeOption) (*LookupRoleResult, error)
func LookupRoleOutput(ctx *Context, args *LookupRoleOutputArgs, opts ...InvokeOption) LookupRoleResultOutput
> Note: This function is named LookupRole
in the Go SDK.
public static class GetRole
{
public static Task<GetRoleResult> InvokeAsync(GetRoleArgs args, InvokeOptions? opts = null)
public static Output<GetRoleResult> Invoke(GetRoleInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRoleResult> getRole(GetRoleArgs args, InvokeOptions options)
public static Output<GetRoleResult> getRole(GetRoleArgs args, InvokeOptions options)
fn::invoke:
function: avi:index/getRole:getRole
arguments:
# arguments dictionary
The following arguments are supported:
- id str
- name str
- Search Role by name.
- tenant_
ref str - It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- uuid str
- Search Role by uuid.
getRole Result
The following output properties are available:
- Allow
Unlabelled stringAccess - Allow access to unlabelled objects. Field introduced in 20.1.5. Allowed with any value in enterprise, enterprise with cloud services edition.
- Configpb
Attributes List<GetRole Configpb Attribute> - Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- Filters
List<Get
Role Filter> - Filters for granular object access control based on object labels. Multiple filters are merged using the and operator. If empty, all objects according to the privileges will be accessible to the user. Field introduced in 20.1.3. Maximum of 4 items allowed. Allowed with any value in enterprise, enterprise with cloud services edition.
- Id string
- Name string
- Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- Privileges
List<Get
Role Privilege> - Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- Tenant
Ref string - It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- Uuid string
- Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- Allow
Unlabelled stringAccess - Allow access to unlabelled objects. Field introduced in 20.1.5. Allowed with any value in enterprise, enterprise with cloud services edition.
- Configpb
Attributes []GetRole Configpb Attribute - Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- Filters
[]Get
Role Filter - Filters for granular object access control based on object labels. Multiple filters are merged using the and operator. If empty, all objects according to the privileges will be accessible to the user. Field introduced in 20.1.3. Maximum of 4 items allowed. Allowed with any value in enterprise, enterprise with cloud services edition.
- Id string
- Name string
- Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- Privileges
[]Get
Role Privilege - Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- Tenant
Ref string - It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- Uuid string
- Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- allow
Unlabelled StringAccess - Allow access to unlabelled objects. Field introduced in 20.1.5. Allowed with any value in enterprise, enterprise with cloud services edition.
- configpb
Attributes List<GetRole Configpb Attribute> - Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- filters
List<Get
Role Filter> - Filters for granular object access control based on object labels. Multiple filters are merged using the and operator. If empty, all objects according to the privileges will be accessible to the user. Field introduced in 20.1.3. Maximum of 4 items allowed. Allowed with any value in enterprise, enterprise with cloud services edition.
- id String
- name String
- Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- privileges
List<Get
Role Privilege> - Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- tenant
Ref String - It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- uuid String
- Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- allow
Unlabelled stringAccess - Allow access to unlabelled objects. Field introduced in 20.1.5. Allowed with any value in enterprise, enterprise with cloud services edition.
- configpb
Attributes GetRole Configpb Attribute[] - Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- filters
Get
Role Filter[] - Filters for granular object access control based on object labels. Multiple filters are merged using the and operator. If empty, all objects according to the privileges will be accessible to the user. Field introduced in 20.1.3. Maximum of 4 items allowed. Allowed with any value in enterprise, enterprise with cloud services edition.
- id string
- name string
- Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- privileges
Get
Role Privilege[] - Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- tenant
Ref string - It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- uuid string
- Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- allow_
unlabelled_ straccess - Allow access to unlabelled objects. Field introduced in 20.1.5. Allowed with any value in enterprise, enterprise with cloud services edition.
- configpb_
attributes Sequence[GetRole Configpb Attribute] - Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- filters
Sequence[Get
Role Filter] - Filters for granular object access control based on object labels. Multiple filters are merged using the and operator. If empty, all objects according to the privileges will be accessible to the user. Field introduced in 20.1.3. Maximum of 4 items allowed. Allowed with any value in enterprise, enterprise with cloud services edition.
- id str
- name str
- Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- privileges
Sequence[Get
Role Privilege] - Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- tenant_
ref str - It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- uuid str
- Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- allow
Unlabelled StringAccess - Allow access to unlabelled objects. Field introduced in 20.1.5. Allowed with any value in enterprise, enterprise with cloud services edition.
- configpb
Attributes List<Property Map> - Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- filters List<Property Map>
- Filters for granular object access control based on object labels. Multiple filters are merged using the and operator. If empty, all objects according to the privileges will be accessible to the user. Field introduced in 20.1.3. Maximum of 4 items allowed. Allowed with any value in enterprise, enterprise with cloud services edition.
- id String
- name String
- Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- privileges List<Property Map>
- Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- tenant
Ref String - It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
- uuid String
- Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
Supporting Types
GetRoleConfigpbAttribute
- Version string
- Version string
- version String
- version string
- version str
- version String
GetRoleFilter
- Enabled string
- Match
Labels List<GetRole Filter Match Label> - Match
Operation string - Name string
- Search Role by name.
- Enabled string
- Match
Labels []GetRole Filter Match Label - Match
Operation string - Name string
- Search Role by name.
- enabled String
- match
Labels List<GetRole Filter Match Label> - match
Operation String - name String
- Search Role by name.
- enabled string
- match
Labels GetRole Filter Match Label[] - match
Operation string - name string
- Search Role by name.
- enabled str
- match_
labels Sequence[GetRole Filter Match Label] - match_
operation str - name str
- Search Role by name.
- enabled String
- match
Labels List<Property Map> - match
Operation String - name String
- Search Role by name.
GetRoleFilterMatchLabel
GetRolePrivilege
- Resource string
- Subresources
List<Get
Role Privilege Subresource> - Type string
- Resource string
- Subresources
[]Get
Role Privilege Subresource - Type string
- resource String
- subresources
List<Get
Role Privilege Subresource> - type String
- resource string
- subresources
Get
Role Privilege Subresource[] - type string
- resource String
- subresources List<Property Map>
- type String
GetRolePrivilegeSubresource
- Exclude
Subresources string - Subresources List<string>
- Exclude
Subresources string - Subresources []string
- exclude
Subresources String - subresources List<String>
- exclude
Subresources string - subresources string[]
- exclude_
subresources str - subresources Sequence[str]
- exclude
Subresources String - subresources List<String>
Package Details
- Repository
- avi vmware/terraform-provider-avi
- License
- Notes
- This Pulumi package is based on the
avi
Terraform Provider.