Viewing docs for Google Cloud v9.16.0
published on Thursday, Mar 19, 2026 by Pulumi
published on Thursday, Mar 19, 2026 by Pulumi
Viewing docs for Google Cloud v9.16.0
published on Thursday, Mar 19, 2026 by Pulumi
published on Thursday, Mar 19, 2026 by Pulumi
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",
});
import pulumi
import pulumi_gcp as gcp
example = gcp.organizations.get_iam_custom_roles(org_id="1234567890",
show_deleted=True,
view="FULL")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/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
})
}
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",
});
});
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());
}
}
variables:
example:
fn::invoke:
function: gcp:organizations:getIamCustomRoles
arguments:
orgId: '1234567890'
showDeleted: true
view: FULL
Using getIamCustomRoles
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 getIamCustomRoles(args: GetIamCustomRolesArgs, opts?: InvokeOptions): Promise<GetIamCustomRolesResult>
function getIamCustomRolesOutput(args: GetIamCustomRolesOutputArgs, opts?: InvokeOptions): Output<GetIamCustomRolesResult>def get_iam_custom_roles(org_id: Optional[str] = None,
show_deleted: Optional[bool] = None,
view: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetIamCustomRolesResult
def get_iam_custom_roles_output(org_id: Optional[pulumi.Input[str]] = None,
show_deleted: Optional[pulumi.Input[bool]] = None,
view: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetIamCustomRolesResult]func GetIamCustomRoles(ctx *Context, args *GetIamCustomRolesArgs, opts ...InvokeOption) (*GetIamCustomRolesResult, error)
func GetIamCustomRolesOutput(ctx *Context, args *GetIamCustomRolesOutputArgs, opts ...InvokeOption) GetIamCustomRolesResultOutput> Note: This function is named GetIamCustomRoles in the Go SDK.
public static class GetIamCustomRoles
{
public static Task<GetIamCustomRolesResult> InvokeAsync(GetIamCustomRolesArgs args, InvokeOptions? opts = null)
public static Output<GetIamCustomRolesResult> Invoke(GetIamCustomRolesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetIamCustomRolesResult> getIamCustomRoles(GetIamCustomRolesArgs args, InvokeOptions options)
public static Output<GetIamCustomRolesResult> getIamCustomRoles(GetIamCustomRolesArgs args, InvokeOptions options)
fn::invoke:
function: gcp:organizations/getIamCustomRoles:getIamCustomRoles
arguments:
# arguments dictionaryThe following arguments are supported:
- Org
Id string - The numeric ID of the organization.
- Show
Deleted bool - Include Roles that have been deleted. Defaults to
false. - View string
- When
"FULL"is specified, thepermissionsfield is returned, which includes a list of all permissions in the role. The default value is"BASIC", which does not return thepermissions.
- Org
Id string - The numeric ID of the organization.
- Show
Deleted bool - Include Roles that have been deleted. Defaults to
false. - View string
- When
"FULL"is specified, thepermissionsfield is returned, which includes a list of all permissions in the role. The default value is"BASIC", which does not return thepermissions.
- org
Id String - The numeric ID of the organization.
- show
Deleted Boolean - Include Roles that have been deleted. Defaults to
false. - view String
- When
"FULL"is specified, thepermissionsfield is returned, which includes a list of all permissions in the role. The default value is"BASIC", which does not return thepermissions.
- org
Id string - The numeric ID of the organization.
- show
Deleted boolean - Include Roles that have been deleted. Defaults to
false. - view string
- When
"FULL"is specified, thepermissionsfield is returned, which includes a list of all permissions in the role. The default value is"BASIC", which does not return thepermissions.
- org_
id str - The numeric ID of the organization.
- show_
deleted bool - Include Roles that have been deleted. Defaults to
false. - view str
- When
"FULL"is specified, thepermissionsfield is returned, which includes a list of all permissions in the role. The default value is"BASIC", which does not return thepermissions.
- org
Id String - The numeric ID of the organization.
- show
Deleted Boolean - Include Roles that have been deleted. Defaults to
false. - view String
- When
"FULL"is specified, thepermissionsfield is returned, which includes a list of all permissions in the role. The default value is"BASIC", which does not return thepermissions.
getIamCustomRoles Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Roles
List<Get
Iam Custom Roles Role> - A list of all retrieved custom roles roles. Structure is defined below.
- Org
Id string - Show
Deleted bool - View string
- Id string
- The provider-assigned unique ID for this managed resource.
- Roles
[]Get
Iam Custom Roles Role - A list of all retrieved custom roles roles. Structure is defined below.
- Org
Id string - Show
Deleted bool - View string
- id String
- The provider-assigned unique ID for this managed resource.
- roles
List<Get
Iam Custom Roles Role> - A list of all retrieved custom roles roles. Structure is defined below.
- org
Id String - show
Deleted Boolean - view String
- id string
- The provider-assigned unique ID for this managed resource.
- roles
Get
Iam Custom Roles Role[] - A list of all retrieved custom roles roles. Structure is defined below.
- org
Id string - show
Deleted boolean - view string
- id str
- The provider-assigned unique ID for this managed resource.
- roles
Sequence[Get
Iam Custom Roles Role] - A list of all retrieved custom roles roles. Structure is defined below.
- org_
id str - show_
deleted bool - view str
- id String
- The provider-assigned unique ID for this managed resource.
- roles List<Property Map>
- A list of all retrieved custom roles roles. Structure is defined below.
- org
Id String - show
Deleted Boolean - view String
Supporting Types
GetIamCustomRolesRole
- Deleted bool
- The current deleted state of the role.
- Description string
- A human-readable description for the role.
- Id string
- an identifier for the resource with the format
organizations/{{org_id}}/roles/{{role_id}}. - Name string
- The name of the role in the format
organizations/{{org_id}}/roles/{{role_id}}. Likeid, this field can be used as a reference in other resources such as IAM role bindings. - Permissions List<string>
- The names of the permissions this role grants when bound in an IAM policy.
- Role
Id string - The camel case role id used for this role.
- Stage string
- The current launch stage of the role. List of possible stages is here.
- Title string
- A human-readable title for the role.
- Deleted bool
- The current deleted state of the role.
- Description string
- A human-readable description for the role.
- Id string
- an identifier for the resource with the format
organizations/{{org_id}}/roles/{{role_id}}. - Name string
- The name of the role in the format
organizations/{{org_id}}/roles/{{role_id}}. Likeid, this field can be used as a reference in other resources such as IAM role bindings. - Permissions []string
- The names of the permissions this role grants when bound in an IAM policy.
- Role
Id string - The camel case role id used for this role.
- Stage string
- The current launch stage of the role. List of possible stages is here.
- Title string
- A human-readable title for the role.
- deleted Boolean
- The current deleted state of the role.
- description String
- A human-readable description for the role.
- id String
- an identifier for the resource with the format
organizations/{{org_id}}/roles/{{role_id}}. - name String
- The name of the role in the format
organizations/{{org_id}}/roles/{{role_id}}. Likeid, this field can be used as a reference in other resources such as IAM role bindings. - permissions List<String>
- The names of the permissions this role grants when bound in an IAM policy.
- role
Id String - The camel case role id used for this role.
- stage String
- The current launch stage of the role. List of possible stages is here.
- title String
- A human-readable title for the role.
- deleted boolean
- The current deleted state of the role.
- description string
- A human-readable description for the role.
- id string
- an identifier for the resource with the format
organizations/{{org_id}}/roles/{{role_id}}. - name string
- The name of the role in the format
organizations/{{org_id}}/roles/{{role_id}}. Likeid, this field can be used as a reference in other resources such as IAM role bindings. - permissions string[]
- The names of the permissions this role grants when bound in an IAM policy.
- role
Id string - The camel case role id used for this role.
- stage string
- The current launch stage of the role. List of possible stages is here.
- title string
- A human-readable title for the role.
- deleted bool
- The current deleted state of the role.
- description str
- A human-readable description for the role.
- id str
- an identifier for the resource with the format
organizations/{{org_id}}/roles/{{role_id}}. - name str
- The name of the role in the format
organizations/{{org_id}}/roles/{{role_id}}. Likeid, this field can be used as a reference in other resources such as IAM role bindings. - permissions Sequence[str]
- The names of the permissions this role grants when bound in an IAM policy.
- role_
id str - The camel case role id used for this role.
- stage str
- The current launch stage of the role. List of possible stages is here.
- title str
- A human-readable title for the role.
- deleted Boolean
- The current deleted state of the role.
- description String
- A human-readable description for the role.
- id String
- an identifier for the resource with the format
organizations/{{org_id}}/roles/{{role_id}}. - name String
- The name of the role in the format
organizations/{{org_id}}/roles/{{role_id}}. Likeid, this field can be used as a reference in other resources such as IAM role bindings. - permissions List<String>
- The names of the permissions this role grants when bound in an IAM policy.
- role
Id String - The camel case role id used for this role.
- stage String
- The current launch stage of the role. List of possible stages is here.
- title String
- A human-readable title for the role.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.
Viewing docs for Google Cloud v9.16.0
published on Thursday, Mar 19, 2026 by Pulumi
published on Thursday, Mar 19, 2026 by Pulumi
