get Iam Custom Roles
Get information about Google Cloud IAM Custom Roles from a project. Note that you must have the roles/iam.roleViewer
. See the official documentation and API.
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const example = gcp.projects.getIamCustomRoles({
project: "your-project-id",
showDeleted: true,
view: "FULL",
});
import pulumi
import pulumi_gcp as gcp
example = gcp.projects.get_iam_custom_roles(project="your-project-id",
show_deleted=True,
view="FULL")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var example = Gcp.Projects.GetIamCustomRoles.Invoke(new()
{
Project = "your-project-id",
ShowDeleted = true,
View = "FULL",
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/projects"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := projects.GetIamCustomRoles(ctx, &projects.GetIamCustomRolesArgs{
Project: pulumi.StringRef("your-project-id"),
ShowDeleted: pulumi.BoolRef(true),
View: pulumi.StringRef("FULL"),
}, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.projects.ProjectsFunctions;
import com.pulumi.gcp.projects.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 = ProjectsFunctions.getIamCustomRoles(GetIamCustomRolesArgs.builder()
.project("your-project-id")
.showDeleted(true)
.view("FULL")
.build());
}
}
variables:
example:
fn::invoke:
function: gcp:projects:getIamCustomRoles
arguments:
project: your-project-id
showDeleted: true
view: FULL
Return
A collection of values returned by getIamCustomRoles.
Parameters
A collection of arguments for invoking getIamCustomRoles.
Return
A collection of values returned by getIamCustomRoles.
Parameters
The project were the custom role has been created in. Defaults to the provider project configuration.
Include Roles that have been deleted. Defaults to false
.
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
Return
A collection of values returned by getIamCustomRoles.
Parameters
Builder for com.pulumi.gcp.projects.kotlin.inputs.GetIamCustomRolesPlainArgs.