1. Packages
  2. Ibm Provider
  3. API Docs
  4. getIamAuthorizationPolicies
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.getIamAuthorizationPolicies

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Retrieve information about an IAM service authorization policy. For more information, about IAM service authorizations, see using authorizations to grant access between services.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const testaccDsAuthorizationPolicy = ibm.getIamAuthorizationPolicies({});
    
    import pulumi
    import pulumi_ibm as ibm
    
    testacc_ds_authorization_policy = ibm.get_iam_authorization_policies()
    
    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.GetIamAuthorizationPolicies(ctx, &ibm.GetIamAuthorizationPoliciesArgs{}, 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 testaccDsAuthorizationPolicy = Ibm.GetIamAuthorizationPolicies.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.GetIamAuthorizationPoliciesArgs;
    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 testaccDsAuthorizationPolicy = IbmFunctions.getIamAuthorizationPolicies();
    
        }
    }
    
    variables:
      testaccDsAuthorizationPolicy:
        fn::invoke:
          function: ibm:getIamAuthorizationPolicies
          arguments: {}
    

    Using getIamAuthorizationPolicies

    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 getIamAuthorizationPolicies(args: GetIamAuthorizationPoliciesArgs, opts?: InvokeOptions): Promise<GetIamAuthorizationPoliciesResult>
    function getIamAuthorizationPoliciesOutput(args: GetIamAuthorizationPoliciesOutputArgs, opts?: InvokeOptions): Output<GetIamAuthorizationPoliciesResult>
    def get_iam_authorization_policies(account_id: Optional[str] = None,
                                       id: Optional[str] = None,
                                       sort: Optional[str] = None,
                                       transaction_id: Optional[str] = None,
                                       opts: Optional[InvokeOptions] = None) -> GetIamAuthorizationPoliciesResult
    def get_iam_authorization_policies_output(account_id: Optional[pulumi.Input[str]] = None,
                                       id: Optional[pulumi.Input[str]] = None,
                                       sort: Optional[pulumi.Input[str]] = None,
                                       transaction_id: Optional[pulumi.Input[str]] = None,
                                       opts: Optional[InvokeOptions] = None) -> Output[GetIamAuthorizationPoliciesResult]
    func GetIamAuthorizationPolicies(ctx *Context, args *GetIamAuthorizationPoliciesArgs, opts ...InvokeOption) (*GetIamAuthorizationPoliciesResult, error)
    func GetIamAuthorizationPoliciesOutput(ctx *Context, args *GetIamAuthorizationPoliciesOutputArgs, opts ...InvokeOption) GetIamAuthorizationPoliciesResultOutput

    > Note: This function is named GetIamAuthorizationPolicies in the Go SDK.

    public static class GetIamAuthorizationPolicies 
    {
        public static Task<GetIamAuthorizationPoliciesResult> InvokeAsync(GetIamAuthorizationPoliciesArgs args, InvokeOptions? opts = null)
        public static Output<GetIamAuthorizationPoliciesResult> Invoke(GetIamAuthorizationPoliciesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIamAuthorizationPoliciesResult> getIamAuthorizationPolicies(GetIamAuthorizationPoliciesArgs args, InvokeOptions options)
    public static Output<GetIamAuthorizationPoliciesResult> getIamAuthorizationPolicies(GetIamAuthorizationPoliciesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getIamAuthorizationPolicies:getIamAuthorizationPolicies
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AccountId string
    An alpha-numeric value identifying the account ID.
    Id string
    (String) The unique identifier of the IAM user policy. The ID is composed of <account_id>/<authorization_policy_id>.
    Sort string
    TransactionId string
    The TransactionID can be passed to your request for the tracking calls.
    AccountId string
    An alpha-numeric value identifying the account ID.
    Id string
    (String) The unique identifier of the IAM user policy. The ID is composed of <account_id>/<authorization_policy_id>.
    Sort string
    TransactionId string
    The TransactionID can be passed to your request for the tracking calls.
    accountId String
    An alpha-numeric value identifying the account ID.
    id String
    (String) The unique identifier of the IAM user policy. The ID is composed of <account_id>/<authorization_policy_id>.
    sort String
    transactionId String
    The TransactionID can be passed to your request for the tracking calls.
    accountId string
    An alpha-numeric value identifying the account ID.
    id string
    (String) The unique identifier of the IAM user policy. The ID is composed of <account_id>/<authorization_policy_id>.
    sort string
    transactionId string
    The TransactionID can be passed to your request for the tracking calls.
    account_id str
    An alpha-numeric value identifying the account ID.
    id str
    (String) The unique identifier of the IAM user policy. The ID is composed of <account_id>/<authorization_policy_id>.
    sort str
    transaction_id str
    The TransactionID can be passed to your request for the tracking calls.
    accountId String
    An alpha-numeric value identifying the account ID.
    id String
    (String) The unique identifier of the IAM user policy. The ID is composed of <account_id>/<authorization_policy_id>.
    sort String
    transactionId String
    The TransactionID can be passed to your request for the tracking calls.

    getIamAuthorizationPolicies Result

    The following output properties are available:

    AccountId string
    Id string
    (String) The unique identifier of the IAM user policy. The ID is composed of <account_id>/<authorization_policy_id>.
    Policies List<GetIamAuthorizationPoliciesPolicy>
    (List) A nested block describes IAM Authorization Policies in an account.
    TransactionId string
    Sort string
    AccountId string
    Id string
    (String) The unique identifier of the IAM user policy. The ID is composed of <account_id>/<authorization_policy_id>.
    Policies []GetIamAuthorizationPoliciesPolicy
    (List) A nested block describes IAM Authorization Policies in an account.
    TransactionId string
    Sort string
    accountId String
    id String
    (String) The unique identifier of the IAM user policy. The ID is composed of <account_id>/<authorization_policy_id>.
    policies List<GetIamAuthorizationPoliciesPolicy>
    (List) A nested block describes IAM Authorization Policies in an account.
    transactionId String
    sort String
    accountId string
    id string
    (String) The unique identifier of the IAM user policy. The ID is composed of <account_id>/<authorization_policy_id>.
    policies GetIamAuthorizationPoliciesPolicy[]
    (List) A nested block describes IAM Authorization Policies in an account.
    transactionId string
    sort string
    account_id str
    id str
    (String) The unique identifier of the IAM user policy. The ID is composed of <account_id>/<authorization_policy_id>.
    policies Sequence[GetIamAuthorizationPoliciesPolicy]
    (List) A nested block describes IAM Authorization Policies in an account.
    transaction_id str
    sort str
    accountId String
    id String
    (String) The unique identifier of the IAM user policy. The ID is composed of <account_id>/<authorization_policy_id>.
    policies List<Property Map>
    (List) A nested block describes IAM Authorization Policies in an account.
    transactionId String
    sort String

    Supporting Types

    GetIamAuthorizationPoliciesPolicy

    Description string
    (String) The description of the IAM User Policy.
    Id string
    (String) The unique identifier of the IAM user policy. The ID is composed of <account_id>/<authorization_policy_id>.
    Roles List<string>
    (String) The roles that are assigned to the policy.
    SourceResourceGroupId string
    (string) The source resource group id.
    SourceResourceInstanceId string
    (string) The source resource instance id.
    SourceResourceType string
    (string) The resource type of source service.
    SourceServiceAccount string
    (string) The account GUID of source service.
    SourceServiceName string
    (string) The source service name.
    TargetResourceGroupId string
    (string) The target resource group id.
    TargetResourceInstanceId string
    (string) The target resource instance id.
    TargetResourceType string
    (string) The resource type of target service.
    TargetServiceName string
    (string) The target service name.
    Version string
    Description string
    (String) The description of the IAM User Policy.
    Id string
    (String) The unique identifier of the IAM user policy. The ID is composed of <account_id>/<authorization_policy_id>.
    Roles []string
    (String) The roles that are assigned to the policy.
    SourceResourceGroupId string
    (string) The source resource group id.
    SourceResourceInstanceId string
    (string) The source resource instance id.
    SourceResourceType string
    (string) The resource type of source service.
    SourceServiceAccount string
    (string) The account GUID of source service.
    SourceServiceName string
    (string) The source service name.
    TargetResourceGroupId string
    (string) The target resource group id.
    TargetResourceInstanceId string
    (string) The target resource instance id.
    TargetResourceType string
    (string) The resource type of target service.
    TargetServiceName string
    (string) The target service name.
    Version string
    description String
    (String) The description of the IAM User Policy.
    id String
    (String) The unique identifier of the IAM user policy. The ID is composed of <account_id>/<authorization_policy_id>.
    roles List<String>
    (String) The roles that are assigned to the policy.
    sourceResourceGroupId String
    (string) The source resource group id.
    sourceResourceInstanceId String
    (string) The source resource instance id.
    sourceResourceType String
    (string) The resource type of source service.
    sourceServiceAccount String
    (string) The account GUID of source service.
    sourceServiceName String
    (string) The source service name.
    targetResourceGroupId String
    (string) The target resource group id.
    targetResourceInstanceId String
    (string) The target resource instance id.
    targetResourceType String
    (string) The resource type of target service.
    targetServiceName String
    (string) The target service name.
    version String
    description string
    (String) The description of the IAM User Policy.
    id string
    (String) The unique identifier of the IAM user policy. The ID is composed of <account_id>/<authorization_policy_id>.
    roles string[]
    (String) The roles that are assigned to the policy.
    sourceResourceGroupId string
    (string) The source resource group id.
    sourceResourceInstanceId string
    (string) The source resource instance id.
    sourceResourceType string
    (string) The resource type of source service.
    sourceServiceAccount string
    (string) The account GUID of source service.
    sourceServiceName string
    (string) The source service name.
    targetResourceGroupId string
    (string) The target resource group id.
    targetResourceInstanceId string
    (string) The target resource instance id.
    targetResourceType string
    (string) The resource type of target service.
    targetServiceName string
    (string) The target service name.
    version string
    description str
    (String) The description of the IAM User Policy.
    id str
    (String) The unique identifier of the IAM user policy. The ID is composed of <account_id>/<authorization_policy_id>.
    roles Sequence[str]
    (String) The roles that are assigned to the policy.
    source_resource_group_id str
    (string) The source resource group id.
    source_resource_instance_id str
    (string) The source resource instance id.
    source_resource_type str
    (string) The resource type of source service.
    source_service_account str
    (string) The account GUID of source service.
    source_service_name str
    (string) The source service name.
    target_resource_group_id str
    (string) The target resource group id.
    target_resource_instance_id str
    (string) The target resource instance id.
    target_resource_type str
    (string) The resource type of target service.
    target_service_name str
    (string) The target service name.
    version str
    description String
    (String) The description of the IAM User Policy.
    id String
    (String) The unique identifier of the IAM user policy. The ID is composed of <account_id>/<authorization_policy_id>.
    roles List<String>
    (String) The roles that are assigned to the policy.
    sourceResourceGroupId String
    (string) The source resource group id.
    sourceResourceInstanceId String
    (string) The source resource instance id.
    sourceResourceType String
    (string) The resource type of source service.
    sourceServiceAccount String
    (string) The account GUID of source service.
    sourceServiceName String
    (string) The source service name.
    targetResourceGroupId String
    (string) The target resource group id.
    targetResourceInstanceId String
    (string) The target resource instance id.
    targetResourceType String
    (string) The resource type of target service.
    targetServiceName String
    (string) The target service name.
    version String

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud