get Iam Custom Roles
Get information about a Google Cloud Organization IAM Custom Roles. Note that you must have the roles/iam.organizationRoleViewer. See the official documentation and API.
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const example = gcp.organizations.getIamCustomRoles({
orgId: "1234567890",
showDeleted: true,
view: "FULL",
});Content copied to clipboard
import pulumi
import pulumi_gcp as gcp
example = gcp.organizations.get_iam_custom_roles(org_id="1234567890",
show_deleted=True,
view="FULL")Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var example = Gcp.Organizations.GetIamCustomRoles.Invoke(new()
{
OrgId = "1234567890",
ShowDeleted = true,
View = "FULL",
});
});Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := organizations.GetIamCustomRoles(ctx, &organizations.GetIamCustomRolesArgs{
OrgId: pulumi.StringRef("1234567890"),
ShowDeleted: pulumi.BoolRef(true),
View: pulumi.StringRef("FULL"),
}, nil)
if err != nil {
return err
}
return nil
})
}Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetIamCustomRolesArgs;
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 example = OrganizationsFunctions.getIamCustomRoles(GetIamCustomRolesArgs.builder()
.orgId("1234567890")
.showDeleted(true)
.view("FULL")
.build());
}
}Content copied to clipboard
variables:
example:
fn::invoke:
function: gcp:organizations:getIamCustomRoles
arguments:
orgId: '1234567890'
showDeleted: true
view: FULLContent copied to clipboard
Return
A collection of values returned by getIamCustomRoles.
Parameters
argument
A collection of arguments for invoking getIamCustomRoles.
suspend fun getIamCustomRoles(orgId: String? = null, showDeleted: Boolean? = null, view: String? = null): GetIamCustomRolesResult
Return
A collection of values returned by getIamCustomRoles.
Parameters
org Id
The numeric ID of the organization.
show Deleted
Include Roles that have been deleted. Defaults to false.
view
When "FULL" is specified, the permissions field is returned, which includes a list of all permissions in the role. The default value is "BASIC", which does not return the permissions.
See also
suspend fun getIamCustomRoles(argument: suspend GetIamCustomRolesPlainArgsBuilder.() -> Unit): GetIamCustomRolesResult
Return
A collection of values returned by getIamCustomRoles.
Parameters
argument
Builder for com.pulumi.gcp.organizations.kotlin.inputs.GetIamCustomRolesPlainArgs.