ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud
ibm.getIamPolicyAssignment
Explore with Pulumi AI
Provides a read-only data source to retrieve information about policy_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 policyAssignment = ibm.getIamPolicyAssignments({});
import pulumi
import pulumi_ibm as ibm
policy_assignment = ibm.get_iam_policy_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.GetIamPolicyAssignments(ctx, &ibm.GetIamPolicyAssignmentsArgs{}, 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 policyAssignment = Ibm.GetIamPolicyAssignments.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.GetIamPolicyAssignmentsArgs;
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 policyAssignment = IbmFunctions.getIamPolicyAssignments();
}
}
variables:
policyAssignment:
fn::invoke:
function: ibm:getIamPolicyAssignments
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 getIamPolicyAssignment
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 getIamPolicyAssignment(args: GetIamPolicyAssignmentArgs, opts?: InvokeOptions): Promise<GetIamPolicyAssignmentResult>
function getIamPolicyAssignmentOutput(args: GetIamPolicyAssignmentOutputArgs, opts?: InvokeOptions): Output<GetIamPolicyAssignmentResult>
def get_iam_policy_assignment(assignment_id: Optional[str] = None,
version: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetIamPolicyAssignmentResult
def get_iam_policy_assignment_output(assignment_id: Optional[pulumi.Input[str]] = None,
version: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetIamPolicyAssignmentResult]
func LookupIamPolicyAssignment(ctx *Context, args *LookupIamPolicyAssignmentArgs, opts ...InvokeOption) (*LookupIamPolicyAssignmentResult, error)
func LookupIamPolicyAssignmentOutput(ctx *Context, args *LookupIamPolicyAssignmentOutputArgs, opts ...InvokeOption) LookupIamPolicyAssignmentResultOutput
> Note: This function is named LookupIamPolicyAssignment
in the Go SDK.
public static class GetIamPolicyAssignment
{
public static Task<GetIamPolicyAssignmentResult> InvokeAsync(GetIamPolicyAssignmentArgs args, InvokeOptions? opts = null)
public static Output<GetIamPolicyAssignmentResult> Invoke(GetIamPolicyAssignmentInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetIamPolicyAssignmentResult> getIamPolicyAssignment(GetIamPolicyAssignmentArgs args, InvokeOptions options)
public static Output<GetIamPolicyAssignmentResult> getIamPolicyAssignment(GetIamPolicyAssignmentArgs args, InvokeOptions options)
fn::invoke:
function: ibm:index/getIamPolicyAssignment:getIamPolicyAssignment
arguments:
# arguments dictionary
The following arguments are supported:
- Assignment
Id string - (String) Passed in value to correlate with other assignments.
- Constraints: The maximum length is
50
characters. The minimum length is1
character.
- Constraints: The maximum length is
- Version string
- (String) The orchestrator template version.
- Assignment
Id string - (String) Passed in value to correlate with other assignments.
- Constraints: The maximum length is
50
characters. The minimum length is1
character.
- Constraints: The maximum length is
- Version string
- (String) The orchestrator template version.
- assignment
Id String - (String) Passed in value to correlate with other assignments.
- Constraints: The maximum length is
50
characters. The minimum length is1
character.
- Constraints: The maximum length is
- version String
- (String) The orchestrator template version.
- assignment
Id string - (String) Passed in value to correlate with other assignments.
- Constraints: The maximum length is
50
characters. The minimum length is1
character.
- Constraints: The maximum length is
- version string
- (String) The orchestrator template version.
- assignment_
id str - (String) Passed in value to correlate with other assignments.
- Constraints: The maximum length is
50
characters. The minimum length is1
character.
- Constraints: The maximum length is
- version str
- (String) The orchestrator template version.
- assignment
Id String - (String) Passed in value to correlate with other assignments.
- Constraints: The maximum length is
50
characters. The minimum length is1
character.
- Constraints: The maximum length is
- version String
- (String) The orchestrator template version.
getIamPolicyAssignment Result
The following output properties are available:
- Account
Id string - (String) Enterprise account ID where template will be created.
- Assignment
Id string - (String) Passed in value to correlate with other assignments.
- Constraints: The maximum length is
50
characters. The minimum length is1
character.
- Constraints: The maximum length is
- Created
At string - (String) The UTC timestamp when the policy assignment was created.
- Created
By stringId - (String) The iam ID of the entity that created the policy assignment.
- Href string
- (String) The href URL that links to the policies assignments API by policy assignment ID.
- Id string
- (String) The policy assignment template id.
- Last
Modified stringAt - (String) The UTC timestamp when the policy assignment was last modified.
- Last
Modified stringBy Id - (String) The iam ID of the entity that last modified the policy assignment.
- Resources
List<Get
Iam Policy Assignment Resource> - (List) Object for each account assigned.
- Constraints: The minimum length is
1
item. Nested schema for resources:
- Constraints: The minimum length is
- Subject Dictionary<string, string>
- Target Dictionary<string, string>
- (Map) assignment target details. Nested schema for target:
- Template Dictionary<string, string>
- (Map) template details Nested schema for template:
- Version string
- (String) The orchestrator template version.
- Account
Id string - (String) Enterprise account ID where template will be created.
- Assignment
Id string - (String) Passed in value to correlate with other assignments.
- Constraints: The maximum length is
50
characters. The minimum length is1
character.
- Constraints: The maximum length is
- Created
At string - (String) The UTC timestamp when the policy assignment was created.
- Created
By stringId - (String) The iam ID of the entity that created the policy assignment.
- Href string
- (String) The href URL that links to the policies assignments API by policy assignment ID.
- Id string
- (String) The policy assignment template id.
- Last
Modified stringAt - (String) The UTC timestamp when the policy assignment was last modified.
- Last
Modified stringBy Id - (String) The iam ID of the entity that last modified the policy assignment.
- Resources
[]Get
Iam Policy Assignment Resource - (List) Object for each account assigned.
- Constraints: The minimum length is
1
item. Nested schema for resources:
- Constraints: The minimum length is
- Subject map[string]string
- Target map[string]string
- (Map) assignment target details. Nested schema for target:
- Template map[string]string
- (Map) template details Nested schema for template:
- Version string
- (String) The orchestrator template version.
- account
Id String - (String) Enterprise account ID where template will be created.
- assignment
Id String - (String) Passed in value to correlate with other assignments.
- Constraints: The maximum length is
50
characters. The minimum length is1
character.
- Constraints: The maximum length is
- created
At String - (String) The UTC timestamp when the policy assignment was created.
- created
By StringId - (String) The iam ID of the entity that created the policy assignment.
- href String
- (String) The href URL that links to the policies assignments API by policy assignment ID.
- id String
- (String) The policy assignment template id.
- last
Modified StringAt - (String) The UTC timestamp when the policy assignment was last modified.
- last
Modified StringBy Id - (String) The iam ID of the entity that last modified the policy assignment.
- resources
List<Get
Iam Policy Assignment Resource> - (List) Object for each account assigned.
- Constraints: The minimum length is
1
item. Nested schema for resources:
- Constraints: The minimum length is
- subject Map<String,String>
- target Map<String,String>
- (Map) assignment target details. Nested schema for target:
- template Map<String,String>
- (Map) template details Nested schema for template:
- version String
- (String) The orchestrator template version.
- account
Id string - (String) Enterprise account ID where template will be created.
- assignment
Id string - (String) Passed in value to correlate with other assignments.
- Constraints: The maximum length is
50
characters. The minimum length is1
character.
- Constraints: The maximum length is
- created
At string - (String) The UTC timestamp when the policy assignment was created.
- created
By stringId - (String) The iam ID of the entity that created the policy assignment.
- href string
- (String) The href URL that links to the policies assignments API by policy assignment ID.
- id string
- (String) The policy assignment template id.
- last
Modified stringAt - (String) The UTC timestamp when the policy assignment was last modified.
- last
Modified stringBy Id - (String) The iam ID of the entity that last modified the policy assignment.
- resources
Get
Iam Policy Assignment Resource[] - (List) Object for each account assigned.
- Constraints: The minimum length is
1
item. Nested schema for resources:
- Constraints: The minimum length is
- subject {[key: string]: string}
- target {[key: string]: string}
- (Map) assignment target details. Nested schema for target:
- template {[key: string]: string}
- (Map) template details Nested schema for template:
- version string
- (String) The orchestrator template version.
- account_
id str - (String) Enterprise account ID where template will be created.
- assignment_
id str - (String) Passed in value to correlate with other assignments.
- Constraints: The maximum length is
50
characters. The minimum length is1
character.
- Constraints: The maximum length is
- created_
at str - (String) The UTC timestamp when the policy assignment was created.
- created_
by_ strid - (String) The iam ID of the entity that created the policy assignment.
- href str
- (String) The href URL that links to the policies assignments API by policy assignment ID.
- id str
- (String) The policy assignment template id.
- last_
modified_ strat - (String) The UTC timestamp when the policy assignment was last modified.
- last_
modified_ strby_ id - (String) The iam ID of the entity that last modified the policy assignment.
- resources
Sequence[Get
Iam Policy Assignment Resource] - (List) Object for each account assigned.
- Constraints: The minimum length is
1
item. Nested schema for resources:
- Constraints: The minimum length is
- subject Mapping[str, str]
- target Mapping[str, str]
- (Map) assignment target details. Nested schema for target:
- template Mapping[str, str]
- (Map) template details Nested schema for template:
- version str
- (String) The orchestrator template version.
- account
Id String - (String) Enterprise account ID where template will be created.
- assignment
Id String - (String) Passed in value to correlate with other assignments.
- Constraints: The maximum length is
50
characters. The minimum length is1
character.
- Constraints: The maximum length is
- created
At String - (String) The UTC timestamp when the policy assignment was created.
- created
By StringId - (String) The iam ID of the entity that created the policy assignment.
- href String
- (String) The href URL that links to the policies assignments API by policy assignment ID.
- id String
- (String) The policy assignment template id.
- last
Modified StringAt - (String) The UTC timestamp when the policy assignment was last modified.
- last
Modified StringBy Id - (String) The iam ID of the entity that last modified the policy assignment.
- resources List<Property Map>
- (List) Object for each account assigned.
- Constraints: The minimum length is
1
item. Nested schema for resources:
- Constraints: The minimum length is
- subject Map<String>
- target Map<String>
- (Map) assignment target details. Nested schema for target:
- template Map<String>
- (Map) template details Nested schema for template:
- version String
- (String) The orchestrator template version.
Supporting Types
GetIamPolicyAssignmentResource
- Policies
List<Get
Iam Policy Assignment Resource Policy> - (String) The conflicting policy id.
- Target Dictionary<string, string>
- (Map) assignment target details. Nested schema for target:
- Policies
[]Get
Iam Policy Assignment Resource Policy - (String) The conflicting policy id.
- Target map[string]string
- (Map) assignment target details. Nested schema for target:
- policies
List<Get
Iam Policy Assignment Resource Policy> - (String) The conflicting policy id.
- target Map<String,String>
- (Map) assignment target details. Nested schema for target:
- policies
Get
Iam Policy Assignment Resource Policy[] - (String) The conflicting policy id.
- target {[key: string]: string}
- (Map) assignment target details. Nested schema for target:
- policies
Sequence[Get
Iam Policy Assignment Resource Policy] - (String) The conflicting policy id.
- target Mapping[str, str]
- (Map) assignment target details. Nested schema for target:
- policies List<Property Map>
- (String) The conflicting policy id.
- target Map<String>
- (Map) assignment target details. Nested schema for target:
GetIamPolicyAssignmentResourcePolicy
- Error
Messages List<GetIam Policy Assignment Resource Policy Error Message> - (List) The error response from API. Nested schema for error_message:
- Resource
Createds List<GetIam Policy Assignment Resource Policy Resource Created> - (List) On success, includes the policy assigned. Nested schema for resource_created:
- Status string
- (String) The policy assignment status.
- Error
Messages []GetIam Policy Assignment Resource Policy Error Message - (List) The error response from API. Nested schema for error_message:
- Resource
Createds []GetIam Policy Assignment Resource Policy Resource Created - (List) On success, includes the policy assigned. Nested schema for resource_created:
- Status string
- (String) The policy assignment status.
- error
Messages List<GetIam Policy Assignment Resource Policy Error Message> - (List) The error response from API. Nested schema for error_message:
- resource
Createds List<GetIam Policy Assignment Resource Policy Resource Created> - (List) On success, includes the policy assigned. Nested schema for resource_created:
- status String
- (String) The policy assignment status.
- error
Messages GetIam Policy Assignment Resource Policy Error Message[] - (List) The error response from API. Nested schema for error_message:
- resource
Createds GetIam Policy Assignment Resource Policy Resource Created[] - (List) On success, includes the policy assigned. Nested schema for resource_created:
- status string
- (String) The policy assignment status.
- error_
messages Sequence[GetIam Policy Assignment Resource Policy Error Message] - (List) The error response from API. Nested schema for error_message:
- resource_
createds Sequence[GetIam Policy Assignment Resource Policy Resource Created] - (List) On success, includes the policy assigned. Nested schema for resource_created:
- status str
- (String) The policy assignment status.
- 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 policy assigned. Nested schema for resource_created:
- status String
- (String) The policy assignment status.
GetIamPolicyAssignmentResourcePolicyErrorMessage
- Errors
List<Get
Iam Policy Assignment Resource Policy Error Message Error> - (List) The errors encountered during the response. Nested schema for errors:
- Status
Code double - (Integer) The http error code of the response.
- Trace string
- (String) The unique transaction id for the request.
- Errors
[]Get
Iam Policy Assignment Resource Policy Error Message Error - (List) The errors encountered during the response. Nested schema for errors:
- Status
Code float64 - (Integer) The http error code of the response.
- Trace string
- (String) The unique transaction id for the request.
- errors
List<Get
Iam Policy Assignment Resource Policy Error Message Error> - (List) The errors encountered during the response. Nested schema for errors:
- status
Code Double - (Integer) The http error code of the response.
- trace String
- (String) The unique transaction id for the request.
- errors
Get
Iam Policy Assignment Resource Policy Error Message Error[] - (List) The errors encountered during the response. Nested schema for errors:
- status
Code number - (Integer) The http error code of the response.
- trace string
- (String) The unique transaction id for the request.
- errors
Sequence[Get
Iam Policy Assignment Resource Policy Error Message Error] - (List) The errors encountered during the response. Nested schema for errors:
- status_
code float - (Integer) The http error code of the response.
- trace str
- (String) The unique transaction id for the request.
- errors List<Property Map>
- (List) The errors encountered during the response. Nested schema for errors:
- status
Code Number - (Integer) The http error code of the response.
- trace String
- (String) The unique transaction id for the request.
GetIamPolicyAssignmentResourcePolicyErrorMessageError
- Code string
- (String) The API error code for the error.
- Details
List<Get
Iam Policy Assignment Resource Policy Error Message Error Detail> - (List) Additional error details. Nested schema for details: Nested schema for conflicts_with:
- Message string
- (String) The error message returned by the API.
- More
Info string - (String) Additional info for error.
- Code string
- (String) The API error code for the error.
- Details
[]Get
Iam Policy Assignment Resource Policy Error Message Error Detail - (List) Additional error details. Nested schema for details: Nested schema for conflicts_with:
- Message string
- (String) The error message returned by the API.
- More
Info string - (String) Additional info for error.
- code String
- (String) The API error code for the error.
- details
List<Get
Iam Policy Assignment Resource Policy Error Message Error Detail> - (List) Additional error details. Nested schema for details: Nested schema for conflicts_with:
- message String
- (String) The error message returned by the API.
- more
Info String - (String) Additional info for error.
- code string
- (String) The API error code for the error.
- details
Get
Iam Policy Assignment Resource Policy Error Message Error Detail[] - (List) Additional error details. Nested schema for details: Nested schema for conflicts_with:
- message string
- (String) The error message returned by the API.
- more
Info string - (String) Additional info for error.
- code str
- (String) The API error code for the error.
- details
Sequence[Get
Iam Policy Assignment Resource Policy Error Message Error Detail] - (List) Additional error details. Nested schema for details: Nested schema for conflicts_with:
- message str
- (String) The error message returned by the API.
- more_
info str - (String) Additional info for error.
- code String
- (String) The API error code for the error.
- details List<Property Map>
- (List) Additional error details. Nested schema for details: Nested schema for conflicts_with:
- message String
- (String) The error message returned by the API.
- more
Info String - (String) Additional info for error.
GetIamPolicyAssignmentResourcePolicyErrorMessageErrorDetail
GetIamPolicyAssignmentResourcePolicyErrorMessageErrorDetailConflictsWith
GetIamPolicyAssignmentResourcePolicyResourceCreated
- Id string
- (String) The policy assignment template id.
- Id string
- (String) The policy assignment template id.
- id String
- (String) The policy assignment template id.
- id string
- (String) The policy assignment template id.
- id str
- (String) The policy assignment template id.
- id String
- (String) The policy assignment template id.
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.