Module iam

@pulumi/gcp > iam

function getRule

getRule(args: GetRuleArgs, opts?: pulumi.InvokeOptions): Promise<GetRuleResult>

Use this data source to get information about a Google IAM Role.

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const roleinfo = pulumi.output(gcp.iam.getRule({
    name: "roles/compute.viewer",

export const theRolePermissions = roleinfo.apply(roleinfo => roleinfo.includedPermissions);

interface GetRuleArgs

A collection of arguments for invoking getRule.

property name

name: string;

The name of the Role to lookup in the form roles/{ROLE_NAME}, organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME} or projects/{PROJECT_ID}/roles/{ROLE_NAME}

interface GetRuleResult

A collection of values returned by getRule.

property id

id: string;

id is the provider-assigned unique ID for this managed resource.

property includedPermissions

includedPermissions: string[];

specifies the list of one or more permissions to include in the custom role, such as - iam.roles.get

property stage

stage: string;

indicates the stage of a role in the launch lifecycle, such as GA, BETA or ALPHA.

property title

title: string;

is a friendly title for the role, such as “Role Viewer”