ibm 1.86.0 published on Wednesday, Dec 3, 2025 by ibm-cloud
ibm 1.86.0 published on Wednesday, Dec 3, 2025 by ibm-cloud
Provides a read-only data source to retrieve information about role_assignments. You can then reference the fields of the data source in other resources within the same configuration by using interpolation syntax.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const roleAssignment = ibm.getIamRoleAssignments({});
import pulumi
import pulumi_ibm as ibm
role_assignment = ibm.get_iam_role_assignments()
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ibm.GetIamRoleAssignments(ctx, &ibm.GetIamRoleAssignmentsArgs{}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;
return await Deployment.RunAsync(() =>
{
var roleAssignment = Ibm.GetIamRoleAssignments.Invoke();
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IbmFunctions;
import com.pulumi.ibm.inputs.GetIamRoleAssignmentsArgs;
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 roleAssignment = IbmFunctions.getIamRoleAssignments(GetIamRoleAssignmentsArgs.builder()
.build());
}
}
variables:
roleAssignment:
fn::invoke:
function: ibm:getIamRoleAssignments
arguments: {}
Timeouts section
The resource includes default timeout settings for the following operations:
create- (Timeout) Defaults to 30 minutes.update- (Timeout) Defaults to 30 minutes.delete- (Timeout) Defaults to 30 minutes.
Using getIamRoleAssignments
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 getIamRoleAssignments(args: GetIamRoleAssignmentsArgs, opts?: InvokeOptions): Promise<GetIamRoleAssignmentsResult>
function getIamRoleAssignmentsOutput(args: GetIamRoleAssignmentsOutputArgs, opts?: InvokeOptions): Output<GetIamRoleAssignmentsResult>def get_iam_role_assignments(id: Optional[str] = None,
template_id: Optional[str] = None,
template_version: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetIamRoleAssignmentsResult
def get_iam_role_assignments_output(id: Optional[pulumi.Input[str]] = None,
template_id: Optional[pulumi.Input[str]] = None,
template_version: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetIamRoleAssignmentsResult]func GetIamRoleAssignments(ctx *Context, args *GetIamRoleAssignmentsArgs, opts ...InvokeOption) (*GetIamRoleAssignmentsResult, error)
func GetIamRoleAssignmentsOutput(ctx *Context, args *GetIamRoleAssignmentsOutputArgs, opts ...InvokeOption) GetIamRoleAssignmentsResultOutput> Note: This function is named GetIamRoleAssignments in the Go SDK.
public static class GetIamRoleAssignments
{
public static Task<GetIamRoleAssignmentsResult> InvokeAsync(GetIamRoleAssignmentsArgs args, InvokeOptions? opts = null)
public static Output<GetIamRoleAssignmentsResult> Invoke(GetIamRoleAssignmentsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetIamRoleAssignmentsResult> getIamRoleAssignments(GetIamRoleAssignmentsArgs args, InvokeOptions options)
public static Output<GetIamRoleAssignmentsResult> getIamRoleAssignments(GetIamRoleAssignmentsArgs args, InvokeOptions options)
fn::invoke:
function: ibm:index/getIamRoleAssignments:getIamRoleAssignments
arguments:
# arguments dictionaryThe following arguments are supported:
- Id string
- (String) The role assignment template id.
- Template
Id string - Template
Version string
- Id string
- (String) The role assignment template id.
- Template
Id string - Template
Version string
- id String
- (String) The role assignment template id.
- template
Id String - template
Version String
- id string
- (String) The role assignment template id.
- template
Id string - template
Version string
- id str
- (String) The role assignment template id.
- template_
id str - template_
version str
- id String
- (String) The role assignment template id.
- template
Id String - template
Version String
getIamRoleAssignments Result
The following output properties are available:
- Assignments
List<Get
Iam Role Assignments Assignment> - (List) List of role assignments.
- Constraints: The minimum length is
0items. Nested schema for assignments:
- Constraints: The minimum length is
- Id string
- (String) The role assignment template id.
- Template
Id string - Template
Version string
- Assignments
[]Get
Iam Role Assignments Assignment - (List) List of role assignments.
- Constraints: The minimum length is
0items. Nested schema for assignments:
- Constraints: The minimum length is
- Id string
- (String) The role assignment template id.
- Template
Id string - Template
Version string
- assignments
List<Get
Iam Role Assignments Assignment> - (List) List of role assignments.
- Constraints: The minimum length is
0items. Nested schema for assignments:
- Constraints: The minimum length is
- id String
- (String) The role assignment template id.
- template
Id String - template
Version String
- assignments
Get
Iam Role Assignments Assignment[] - (List) List of role assignments.
- Constraints: The minimum length is
0items. Nested schema for assignments:
- Constraints: The minimum length is
- id string
- (String) The role assignment template id.
- template
Id string - template
Version string
- assignments
Sequence[Get
Iam Role Assignments Assignment] - (List) List of role assignments.
- Constraints: The minimum length is
0items. Nested schema for assignments:
- Constraints: The minimum length is
- id str
- (String) The role assignment template id.
- template_
id str - template_
version str
- assignments List<Property Map>
- (List) List of role assignments.
- Constraints: The minimum length is
0items. Nested schema for assignments:
- Constraints: The minimum length is
- id String
- (String) The role assignment template id.
- template
Id String - template
Version String
Supporting Types
GetIamRoleAssignmentsAssignment
- Account
Id string - (String) Enterprise account ID where template will be created.
- Created
At string - (String) The UTC timestamp when the role assignment was created.
- Created
By stringId - (String) The iam ID of the entity that created the role assignment.
- Href string
- (String) The href URL that links to the policies assignments API by role assignment ID.
- Id string
- (String) The role assignment template id.
- Last
Modified stringAt - (String) The UTC timestamp when the role assignment was last modified.
- Last
Modified stringBy Id - (String) The iam ID of the entity that last modified the role assignment.
- Operation string
- Resources
List<Get
Iam Role Assignments Assignment Resource> - (List) Object for each account assigned.
- Constraints: The minimum length is
1item. Nested schema for resources:
- Constraints: The minimum length is
- Status string
- (String) The role assignment status.
- Targets
List<Get
Iam Role Assignments Assignment Target> - (Map) assignment target details. Nested schema for target:
- Templates
List<Get
Iam Role Assignments Assignment Template> - (Map) template details Nested schema for template:
- Account
Id string - (String) Enterprise account ID where template will be created.
- Created
At string - (String) The UTC timestamp when the role assignment was created.
- Created
By stringId - (String) The iam ID of the entity that created the role assignment.
- Href string
- (String) The href URL that links to the policies assignments API by role assignment ID.
- Id string
- (String) The role assignment template id.
- Last
Modified stringAt - (String) The UTC timestamp when the role assignment was last modified.
- Last
Modified stringBy Id - (String) The iam ID of the entity that last modified the role assignment.
- Operation string
- Resources
[]Get
Iam Role Assignments Assignment Resource - (List) Object for each account assigned.
- Constraints: The minimum length is
1item. Nested schema for resources:
- Constraints: The minimum length is
- Status string
- (String) The role assignment status.
- Targets
[]Get
Iam Role Assignments Assignment Target - (Map) assignment target details. Nested schema for target:
- Templates
[]Get
Iam Role Assignments Assignment Template - (Map) template details Nested schema for template:
- account
Id String - (String) Enterprise account ID where template will be created.
- created
At String - (String) The UTC timestamp when the role assignment was created.
- created
By StringId - (String) The iam ID of the entity that created the role assignment.
- href String
- (String) The href URL that links to the policies assignments API by role assignment ID.
- id String
- (String) The role assignment template id.
- last
Modified StringAt - (String) The UTC timestamp when the role assignment was last modified.
- last
Modified StringBy Id - (String) The iam ID of the entity that last modified the role assignment.
- operation String
- resources
List<Get
Iam Role Assignments Assignment Resource> - (List) Object for each account assigned.
- Constraints: The minimum length is
1item. Nested schema for resources:
- Constraints: The minimum length is
- status String
- (String) The role assignment status.
- targets
List<Get
Iam Role Assignments Assignment Target> - (Map) assignment target details. Nested schema for target:
- templates
List<Get
Iam Role Assignments Assignment Template> - (Map) template details Nested schema for template:
- account
Id string - (String) Enterprise account ID where template will be created.
- created
At string - (String) The UTC timestamp when the role assignment was created.
- created
By stringId - (String) The iam ID of the entity that created the role assignment.
- href string
- (String) The href URL that links to the policies assignments API by role assignment ID.
- id string
- (String) The role assignment template id.
- last
Modified stringAt - (String) The UTC timestamp when the role assignment was last modified.
- last
Modified stringBy Id - (String) The iam ID of the entity that last modified the role assignment.
- operation string
- resources
Get
Iam Role Assignments Assignment Resource[] - (List) Object for each account assigned.
- Constraints: The minimum length is
1item. Nested schema for resources:
- Constraints: The minimum length is
- status string
- (String) The role assignment status.
- targets
Get
Iam Role Assignments Assignment Target[] - (Map) assignment target details. Nested schema for target:
- templates
Get
Iam Role Assignments Assignment Template[] - (Map) template details Nested schema for template:
- account_
id str - (String) Enterprise account ID where template will be created.
- created_
at str - (String) The UTC timestamp when the role assignment was created.
- created_
by_ strid - (String) The iam ID of the entity that created the role assignment.
- href str
- (String) The href URL that links to the policies assignments API by role assignment ID.
- id str
- (String) The role assignment template id.
- last_
modified_ strat - (String) The UTC timestamp when the role assignment was last modified.
- last_
modified_ strby_ id - (String) The iam ID of the entity that last modified the role assignment.
- operation str
- resources
Sequence[Get
Iam Role Assignments Assignment Resource] - (List) Object for each account assigned.
- Constraints: The minimum length is
1item. Nested schema for resources:
- Constraints: The minimum length is
- status str
- (String) The role assignment status.
- targets
Sequence[Get
Iam Role Assignments Assignment Target] - (Map) assignment target details. Nested schema for target:
- templates
Sequence[Get
Iam Role Assignments Assignment Template] - (Map) template details Nested schema for template:
- account
Id String - (String) Enterprise account ID where template will be created.
- created
At String - (String) The UTC timestamp when the role assignment was created.
- created
By StringId - (String) The iam ID of the entity that created the role assignment.
- href String
- (String) The href URL that links to the policies assignments API by role assignment ID.
- id String
- (String) The role assignment template id.
- last
Modified StringAt - (String) The UTC timestamp when the role assignment was last modified.
- last
Modified StringBy Id - (String) The iam ID of the entity that last modified the role assignment.
- operation String
- resources List<Property Map>
- (List) Object for each account assigned.
- Constraints: The minimum length is
1item. Nested schema for resources:
- Constraints: The minimum length is
- status String
- (String) The role assignment status.
- targets List<Property Map>
- (Map) assignment target details. Nested schema for target:
- templates List<Property Map>
- (Map) template details Nested schema for template:
GetIamRoleAssignmentsAssignmentResource
- Roles
List<Get
Iam Role Assignments Assignment Resource Role> - (String) The conflicting role id.
- Targets
List<Get
Iam Role Assignments Assignment Resource Target> - (Map) assignment target details. Nested schema for target:
- Roles
[]Get
Iam Role Assignments Assignment Resource Role - (String) The conflicting role id.
- Targets
[]Get
Iam Role Assignments Assignment Resource Target - (Map) assignment target details. Nested schema for target:
- roles
List<Get
Iam Role Assignments Assignment Resource Role> - (String) The conflicting role id.
- targets
List<Get
Iam Role Assignments Assignment Resource Target> - (Map) assignment target details. Nested schema for target:
- roles
Get
Iam Role Assignments Assignment Resource Role[] - (String) The conflicting role id.
- targets
Get
Iam Role Assignments Assignment Resource Target[] - (Map) assignment target details. Nested schema for target:
- roles
Sequence[Get
Iam Role Assignments Assignment Resource Role] - (String) The conflicting role id.
- targets
Sequence[Get
Iam Role Assignments Assignment Resource Target] - (Map) assignment target details. Nested schema for target:
- roles List<Property Map>
- (String) The conflicting role id.
- targets List<Property Map>
- (Map) assignment target details. Nested schema for target:
GetIamRoleAssignmentsAssignmentResourceRole
- Error
Messages List<GetIam Role Assignments Assignment Resource Role Error Message> - (List) The error response from API. Nested schema for error_message:
- Resource
Createds List<GetIam Role Assignments Assignment Resource Role Resource Created> - (List) On success, includes the role assigned. Nested schema for resource_created:
- Error
Messages []GetIam Role Assignments Assignment Resource Role Error Message - (List) The error response from API. Nested schema for error_message:
- Resource
Createds []GetIam Role Assignments Assignment Resource Role Resource Created - (List) On success, includes the role assigned. Nested schema for resource_created:
- error
Messages List<GetIam Role Assignments Assignment Resource Role Error Message> - (List) The error response from API. Nested schema for error_message:
- resource
Createds List<GetIam Role Assignments Assignment Resource Role Resource Created> - (List) On success, includes the role assigned. Nested schema for resource_created:
- error
Messages GetIam Role Assignments Assignment Resource Role Error Message[] - (List) The error response from API. Nested schema for error_message:
- resource
Createds GetIam Role Assignments Assignment Resource Role Resource Created[] - (List) On success, includes the role assigned. Nested schema for resource_created:
- error_
messages Sequence[GetIam Role Assignments Assignment Resource Role Error Message] - (List) The error response from API. Nested schema for error_message:
- resource_
createds Sequence[GetIam Role Assignments Assignment Resource Role Resource Created] - (List) On success, includes the role assigned. Nested schema for resource_created:
- error
Messages List<Property Map> - (List) The error response from API. Nested schema for error_message:
- resource
Createds List<Property Map> - (List) On success, includes the role assigned. Nested schema for resource_created:
GetIamRoleAssignmentsAssignmentResourceRoleErrorMessage
- Code string
- (String) error code.
- Error
Code string - Errors
List<Get
Iam Role Assignments Assignment Resource Role Error Message Error> - (List) The errors encountered during the response. Nested schema for errors:
- Message string
- (String) Error message detailing the nature of the error.
- Name string
- (String) Name of the error.
errorCode- (String) error code.
- Status
Code double - (Integer) The http error code of the response.
- Trace string
- (String) The unique transaction id for the request.
- Code string
- (String) error code.
- Error
Code string - Errors
[]Get
Iam Role Assignments Assignment Resource Role Error Message Error - (List) The errors encountered during the response. Nested schema for errors:
- Message string
- (String) Error message detailing the nature of the error.
- Name string
- (String) Name of the error.
errorCode- (String) error code.
- Status
Code float64 - (Integer) The http error code of the response.
- Trace string
- (String) The unique transaction id for the request.
- code String
- (String) error code.
- error
Code String - errors
List<Get
Iam Role Assignments Assignment Resource Role Error Message Error> - (List) The errors encountered during the response. Nested schema for errors:
- message String
- (String) Error message detailing the nature of the error.
- name String
- (String) Name of the error.
errorCode- (String) error code.
- status
Code Double - (Integer) The http error code of the response.
- trace String
- (String) The unique transaction id for the request.
- code string
- (String) error code.
- error
Code string - errors
Get
Iam Role Assignments Assignment Resource Role Error Message Error[] - (List) The errors encountered during the response. Nested schema for errors:
- message string
- (String) Error message detailing the nature of the error.
- name string
- (String) Name of the error.
errorCode- (String) error code.
- status
Code number - (Integer) The http error code of the response.
- trace string
- (String) The unique transaction id for the request.
- code str
- (String) error code.
- error_
code str - errors
Sequence[Get
Iam Role Assignments Assignment Resource Role Error Message Error] - (List) The errors encountered during the response. Nested schema for errors:
- message str
- (String) Error message detailing the nature of the error.
- name str
- (String) Name of the error.
errorCode- (String) error code.
- status_
code float - (Integer) The http error code of the response.
- trace str
- (String) The unique transaction id for the request.
- code String
- (String) error code.
- error
Code String - errors List<Property Map>
- (List) The errors encountered during the response. Nested schema for errors:
- message String
- (String) Error message detailing the nature of the error.
- name String
- (String) Name of the error.
errorCode- (String) error code.
- status
Code Number - (Integer) The http error code of the response.
- trace String
- (String) The unique transaction id for the request.
GetIamRoleAssignmentsAssignmentResourceRoleErrorMessageError
- Code string
- (String) error code.
- Details
List<Get
Iam Role Assignments Assignment Resource Role Error Message Error Detail> - (List) Additional error details. Nested schema for details: Nested schema for conflicts_with:
- Message string
- (String) Error message detailing the nature of the error.
- More
Info string - (String) Additional info for error.
- Code string
- (String) error code.
- Details
[]Get
Iam Role Assignments Assignment Resource Role Error Message Error Detail - (List) Additional error details. Nested schema for details: Nested schema for conflicts_with:
- Message string
- (String) Error message detailing the nature of the error.
- More
Info string - (String) Additional info for error.
- code String
- (String) error code.
- details
List<Get
Iam Role Assignments Assignment Resource Role Error Message Error Detail> - (List) Additional error details. Nested schema for details: Nested schema for conflicts_with:
- message String
- (String) Error message detailing the nature of the error.
- more
Info String - (String) Additional info for error.
- code string
- (String) error code.
- details
Get
Iam Role Assignments Assignment Resource Role Error Message Error Detail[] - (List) Additional error details. Nested schema for details: Nested schema for conflicts_with:
- message string
- (String) Error message detailing the nature of the error.
- more
Info string - (String) Additional info for error.
- code str
- (String) error code.
- details
Sequence[Get
Iam Role Assignments Assignment Resource Role Error Message Error Detail] - (List) Additional error details. Nested schema for details: Nested schema for conflicts_with:
- message str
- (String) Error message detailing the nature of the error.
- more_
info str - (String) Additional info for error.
- code String
- (String) error code.
- details List<Property Map>
- (List) Additional error details. Nested schema for details: Nested schema for conflicts_with:
- message String
- (String) Error message detailing the nature of the error.
- more
Info String - (String) Additional info for error.
GetIamRoleAssignmentsAssignmentResourceRoleErrorMessageErrorDetail
GetIamRoleAssignmentsAssignmentResourceRoleErrorMessageErrorDetailConflictsWith
GetIamRoleAssignmentsAssignmentResourceRoleResourceCreated
- Id string
- (String) The role assignment template id.
- Id string
- (String) The role assignment template id.
- id String
- (String) The role assignment template id.
- id string
- (String) The role assignment template id.
- id str
- (String) The role assignment template id.
- id String
- (String) The role assignment template id.
GetIamRoleAssignmentsAssignmentResourceTarget
GetIamRoleAssignmentsAssignmentTarget
GetIamRoleAssignmentsAssignmentTemplate
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibmTerraform Provider.
ibm 1.86.0 published on Wednesday, Dec 3, 2025 by ibm-cloud
