1. Packages
  2. Ibm Provider
  3. API Docs
  4. IamPolicyAssignment
ibm 1.81.1 published on Wednesday, Aug 6, 2025 by ibm-cloud

ibm.IamPolicyAssignment

Explore with Pulumi AI

ibm logo
ibm 1.81.1 published on Wednesday, Aug 6, 2025 by ibm-cloud

    Create, update, and delete policy_assignments with this resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const policyS2sTemplate = new ibm.IamPolicyTemplate("policyS2sTemplate", {
        policy: {
            type: "authorization",
            description: "description",
            resources: [{
                attributes: [{
                    key: "serviceName",
                    operator: "stringEquals",
                    value: "kms",
                }],
            }],
            subjects: [{
                attributes: [{
                    key: "serviceName",
                    operator: "stringEquals",
                    value: "compliance",
                }],
            }],
            roles: ["Reader"],
        },
        committed: true,
    });
    const templateVersion = new ibm.IamPolicyTemplateVersion("templateVersion", {
        templateId: policyS2sTemplate.templateId,
        policy: {
            type: "authorization",
            description: "description",
            resource: {
                attributes: [{
                    key: "serviceName",
                    operator: "stringEquals",
                    value: "appid",
                }],
            },
            subjects: [{
                attributes: [{
                    key: "serviceName",
                    operator: "stringEquals",
                    value: "compliance",
                }],
            }],
            roles: ["Reader"],
        },
        committed: true,
    });
    const policyAssignmentIamPolicyAssignment = new ibm.IamPolicyAssignment("policyAssignmentIamPolicyAssignment", {
        version: "1.0",
        target: {
            type: "Account",
            id: "<target-accountId>",
        },
        templates: {
            id: policyS2sTemplate.templateId,
            version: policyS2sTemplate.version,
        },
        templateVersion: templateVersion.version,
    });
    const policyAssignmentIndex_iamPolicyAssignmentIamPolicyAssignment = new ibm.IamPolicyAssignment("policyAssignmentIndex/iamPolicyAssignmentIamPolicyAssignment", {
        version: "1.0",
        target: {
            type: "Account Group",
            id: "<target-accountgroupId>",
        },
        templates: {
            id: policyS2sTemplate.templateId,
            version: policyS2sTemplate.version,
        },
        templateVersion: templateVersion.version,
    });
    const policyAssignmentIbmIndex_iamPolicyAssignmentIamPolicyAssignment = new ibm.IamPolicyAssignment("policyAssignmentIbmIndex/iamPolicyAssignmentIamPolicyAssignment", {
        version: "1.0",
        target: {
            type: "Enterprise",
            id: "<target-enterpriseId>",
        },
        templates: {
            id: policyS2sTemplate.templateId,
            version: policyS2sTemplate.version,
        },
        templateVersion: templateVersion.version,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    policy_s2s_template = ibm.IamPolicyTemplate("policyS2sTemplate",
        policy={
            "type": "authorization",
            "description": "description",
            "resources": [{
                "attributes": [{
                    "key": "serviceName",
                    "operator": "stringEquals",
                    "value": "kms",
                }],
            }],
            "subjects": [{
                "attributes": [{
                    "key": "serviceName",
                    "operator": "stringEquals",
                    "value": "compliance",
                }],
            }],
            "roles": ["Reader"],
        },
        committed=True)
    template_version = ibm.IamPolicyTemplateVersion("templateVersion",
        template_id=policy_s2s_template.template_id,
        policy={
            "type": "authorization",
            "description": "description",
            "resource": {
                "attributes": [{
                    "key": "serviceName",
                    "operator": "stringEquals",
                    "value": "appid",
                }],
            },
            "subjects": [{
                "attributes": [{
                    "key": "serviceName",
                    "operator": "stringEquals",
                    "value": "compliance",
                }],
            }],
            "roles": ["Reader"],
        },
        committed=True)
    policy_assignment_iam_policy_assignment = ibm.IamPolicyAssignment("policyAssignmentIamPolicyAssignment",
        version="1.0",
        target={
            "type": "Account",
            "id": "<target-accountId>",
        },
        templates={
            "id": policy_s2s_template.template_id,
            "version": policy_s2s_template.version,
        },
        template_version=template_version.version)
    policy_assignment_index_iam_policy_assignment_iam_policy_assignment = ibm.IamPolicyAssignment("policyAssignmentIndex/iamPolicyAssignmentIamPolicyAssignment",
        version="1.0",
        target={
            "type": "Account Group",
            "id": "<target-accountgroupId>",
        },
        templates={
            "id": policy_s2s_template.template_id,
            "version": policy_s2s_template.version,
        },
        template_version=template_version.version)
    policy_assignment_ibm_index_iam_policy_assignment_iam_policy_assignment = ibm.IamPolicyAssignment("policyAssignmentIbmIndex/iamPolicyAssignmentIamPolicyAssignment",
        version="1.0",
        target={
            "type": "Enterprise",
            "id": "<target-enterpriseId>",
        },
        templates={
            "id": policy_s2s_template.template_id,
            "version": policy_s2s_template.version,
        },
        template_version=template_version.version)
    
    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 {
    		policyS2sTemplate, err := ibm.NewIamPolicyTemplate(ctx, "policyS2sTemplate", &ibm.IamPolicyTemplateArgs{
    			Policy: &ibm.IamPolicyTemplatePolicyArgs{
    				Type:        pulumi.String("authorization"),
    				Description: pulumi.String("description"),
    				Resources: ibm.IamPolicyTemplatePolicyResourceArray{
    					&ibm.IamPolicyTemplatePolicyResourceArgs{
    						Attributes: ibm.IamPolicyTemplatePolicyResourceAttributeArray{
    							&ibm.IamPolicyTemplatePolicyResourceAttributeArgs{
    								Key:      pulumi.String("serviceName"),
    								Operator: pulumi.String("stringEquals"),
    								Value:    pulumi.String("kms"),
    							},
    						},
    					},
    				},
    				Subjects: ibm.IamPolicyTemplatePolicySubjectArray{
    					&ibm.IamPolicyTemplatePolicySubjectArgs{
    						Attributes: ibm.IamPolicyTemplatePolicySubjectAttributeArray{
    							&ibm.IamPolicyTemplatePolicySubjectAttributeArgs{
    								Key:      pulumi.String("serviceName"),
    								Operator: pulumi.String("stringEquals"),
    								Value:    pulumi.String("compliance"),
    							},
    						},
    					},
    				},
    				Roles: pulumi.StringArray{
    					pulumi.String("Reader"),
    				},
    			},
    			Committed: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		templateVersion, err := ibm.NewIamPolicyTemplateVersion(ctx, "templateVersion", &ibm.IamPolicyTemplateVersionArgs{
    			TemplateId: policyS2sTemplate.TemplateId,
    			Policy: &ibm.IamPolicyTemplateVersionPolicyArgs{
    				Type:        pulumi.String("authorization"),
    				Description: pulumi.String("description"),
    				Resource: &ibm.IamPolicyTemplateVersionPolicyResourceArgs{
    					Attributes: ibm.IamPolicyTemplateVersionPolicyResourceAttributeArray{
    						&ibm.IamPolicyTemplateVersionPolicyResourceAttributeArgs{
    							Key:      pulumi.String("serviceName"),
    							Operator: pulumi.String("stringEquals"),
    							Value:    pulumi.String("appid"),
    						},
    					},
    				},
    				Subjects: ibm.IamPolicyTemplateVersionPolicySubjectArray{
    					&ibm.IamPolicyTemplateVersionPolicySubjectArgs{
    						Attributes: ibm.IamPolicyTemplateVersionPolicySubjectAttributeArray{
    							&ibm.IamPolicyTemplateVersionPolicySubjectAttributeArgs{
    								Key:      pulumi.String("serviceName"),
    								Operator: pulumi.String("stringEquals"),
    								Value:    pulumi.String("compliance"),
    							},
    						},
    					},
    				},
    				Roles: pulumi.StringArray{
    					pulumi.String("Reader"),
    				},
    			},
    			Committed: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ibm.NewIamPolicyAssignment(ctx, "policyAssignmentIamPolicyAssignment", &ibm.IamPolicyAssignmentArgs{
    			Version: pulumi.String("1.0"),
    			Target: pulumi.StringMap{
    				"type": pulumi.String("Account"),
    				"id":   pulumi.String("<target-accountId>"),
    			},
    			Templates: &ibm.IamPolicyAssignmentTemplatesArgs{
    				Id:      policyS2sTemplate.TemplateId,
    				Version: policyS2sTemplate.Version,
    			},
    			TemplateVersion: templateVersion.Version,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ibm.NewIamPolicyAssignment(ctx, "policyAssignmentIndex/iamPolicyAssignmentIamPolicyAssignment", &ibm.IamPolicyAssignmentArgs{
    			Version: pulumi.String("1.0"),
    			Target: pulumi.StringMap{
    				"type": pulumi.String("Account Group"),
    				"id":   pulumi.String("<target-accountgroupId>"),
    			},
    			Templates: &ibm.IamPolicyAssignmentTemplatesArgs{
    				Id:      policyS2sTemplate.TemplateId,
    				Version: policyS2sTemplate.Version,
    			},
    			TemplateVersion: templateVersion.Version,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ibm.NewIamPolicyAssignment(ctx, "policyAssignmentIbmIndex/iamPolicyAssignmentIamPolicyAssignment", &ibm.IamPolicyAssignmentArgs{
    			Version: pulumi.String("1.0"),
    			Target: pulumi.StringMap{
    				"type": pulumi.String("Enterprise"),
    				"id":   pulumi.String("<target-enterpriseId>"),
    			},
    			Templates: &ibm.IamPolicyAssignmentTemplatesArgs{
    				Id:      policyS2sTemplate.TemplateId,
    				Version: policyS2sTemplate.Version,
    			},
    			TemplateVersion: templateVersion.Version,
    		})
    		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 policyS2sTemplate = new Ibm.IamPolicyTemplate("policyS2sTemplate", new()
        {
            Policy = new Ibm.Inputs.IamPolicyTemplatePolicyArgs
            {
                Type = "authorization",
                Description = "description",
                Resources = new[]
                {
                    new Ibm.Inputs.IamPolicyTemplatePolicyResourceArgs
                    {
                        Attributes = new[]
                        {
                            new Ibm.Inputs.IamPolicyTemplatePolicyResourceAttributeArgs
                            {
                                Key = "serviceName",
                                Operator = "stringEquals",
                                Value = "kms",
                            },
                        },
                    },
                },
                Subjects = new[]
                {
                    new Ibm.Inputs.IamPolicyTemplatePolicySubjectArgs
                    {
                        Attributes = new[]
                        {
                            new Ibm.Inputs.IamPolicyTemplatePolicySubjectAttributeArgs
                            {
                                Key = "serviceName",
                                Operator = "stringEquals",
                                Value = "compliance",
                            },
                        },
                    },
                },
                Roles = new[]
                {
                    "Reader",
                },
            },
            Committed = true,
        });
    
        var templateVersion = new Ibm.IamPolicyTemplateVersion("templateVersion", new()
        {
            TemplateId = policyS2sTemplate.TemplateId,
            Policy = new Ibm.Inputs.IamPolicyTemplateVersionPolicyArgs
            {
                Type = "authorization",
                Description = "description",
                Resource = new Ibm.Inputs.IamPolicyTemplateVersionPolicyResourceArgs
                {
                    Attributes = new[]
                    {
                        new Ibm.Inputs.IamPolicyTemplateVersionPolicyResourceAttributeArgs
                        {
                            Key = "serviceName",
                            Operator = "stringEquals",
                            Value = "appid",
                        },
                    },
                },
                Subjects = new[]
                {
                    new Ibm.Inputs.IamPolicyTemplateVersionPolicySubjectArgs
                    {
                        Attributes = new[]
                        {
                            new Ibm.Inputs.IamPolicyTemplateVersionPolicySubjectAttributeArgs
                            {
                                Key = "serviceName",
                                Operator = "stringEquals",
                                Value = "compliance",
                            },
                        },
                    },
                },
                Roles = new[]
                {
                    "Reader",
                },
            },
            Committed = true,
        });
    
        var policyAssignmentIamPolicyAssignment = new Ibm.IamPolicyAssignment("policyAssignmentIamPolicyAssignment", new()
        {
            Version = "1.0",
            Target = 
            {
                { "type", "Account" },
                { "id", "<target-accountId>" },
            },
            Templates = new Ibm.Inputs.IamPolicyAssignmentTemplatesArgs
            {
                Id = policyS2sTemplate.TemplateId,
                Version = policyS2sTemplate.Version,
            },
            TemplateVersion = templateVersion.Version,
        });
    
        var policyAssignmentIndex_iamPolicyAssignmentIamPolicyAssignment = new Ibm.IamPolicyAssignment("policyAssignmentIndex/iamPolicyAssignmentIamPolicyAssignment", new()
        {
            Version = "1.0",
            Target = 
            {
                { "type", "Account Group" },
                { "id", "<target-accountgroupId>" },
            },
            Templates = new Ibm.Inputs.IamPolicyAssignmentTemplatesArgs
            {
                Id = policyS2sTemplate.TemplateId,
                Version = policyS2sTemplate.Version,
            },
            TemplateVersion = templateVersion.Version,
        });
    
        var policyAssignmentIbmIndex_iamPolicyAssignmentIamPolicyAssignment = new Ibm.IamPolicyAssignment("policyAssignmentIbmIndex/iamPolicyAssignmentIamPolicyAssignment", new()
        {
            Version = "1.0",
            Target = 
            {
                { "type", "Enterprise" },
                { "id", "<target-enterpriseId>" },
            },
            Templates = new Ibm.Inputs.IamPolicyAssignmentTemplatesArgs
            {
                Id = policyS2sTemplate.TemplateId,
                Version = policyS2sTemplate.Version,
            },
            TemplateVersion = templateVersion.Version,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IamPolicyTemplate;
    import com.pulumi.ibm.IamPolicyTemplateArgs;
    import com.pulumi.ibm.inputs.IamPolicyTemplatePolicyArgs;
    import com.pulumi.ibm.IamPolicyTemplateVersion;
    import com.pulumi.ibm.IamPolicyTemplateVersionArgs;
    import com.pulumi.ibm.inputs.IamPolicyTemplateVersionPolicyArgs;
    import com.pulumi.ibm.inputs.IamPolicyTemplateVersionPolicyResourceArgs;
    import com.pulumi.ibm.IamPolicyAssignment;
    import com.pulumi.ibm.IamPolicyAssignmentArgs;
    import com.pulumi.ibm.inputs.IamPolicyAssignmentTemplatesArgs;
    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) {
            var policyS2sTemplate = new IamPolicyTemplate("policyS2sTemplate", IamPolicyTemplateArgs.builder()
                .policy(IamPolicyTemplatePolicyArgs.builder()
                    .type("authorization")
                    .description("description")
                    .resources(IamPolicyTemplatePolicyResourceArgs.builder()
                        .attributes(IamPolicyTemplatePolicyResourceAttributeArgs.builder()
                            .key("serviceName")
                            .operator("stringEquals")
                            .value("kms")
                            .build())
                        .build())
                    .subjects(IamPolicyTemplatePolicySubjectArgs.builder()
                        .attributes(IamPolicyTemplatePolicySubjectAttributeArgs.builder()
                            .key("serviceName")
                            .operator("stringEquals")
                            .value("compliance")
                            .build())
                        .build())
                    .roles("Reader")
                    .build())
                .committed(true)
                .build());
    
            var templateVersion = new IamPolicyTemplateVersion("templateVersion", IamPolicyTemplateVersionArgs.builder()
                .templateId(policyS2sTemplate.templateId())
                .policy(IamPolicyTemplateVersionPolicyArgs.builder()
                    .type("authorization")
                    .description("description")
                    .resource(IamPolicyTemplateVersionPolicyResourceArgs.builder()
                        .attributes(IamPolicyTemplateVersionPolicyResourceAttributeArgs.builder()
                            .key("serviceName")
                            .operator("stringEquals")
                            .value("appid")
                            .build())
                        .build())
                    .subjects(IamPolicyTemplateVersionPolicySubjectArgs.builder()
                        .attributes(IamPolicyTemplateVersionPolicySubjectAttributeArgs.builder()
                            .key("serviceName")
                            .operator("stringEquals")
                            .value("compliance")
                            .build())
                        .build())
                    .roles("Reader")
                    .build())
                .committed(true)
                .build());
    
            var policyAssignmentIamPolicyAssignment = new IamPolicyAssignment("policyAssignmentIamPolicyAssignment", IamPolicyAssignmentArgs.builder()
                .version("1.0")
                .target(Map.ofEntries(
                    Map.entry("type", "Account"),
                    Map.entry("id", "<target-accountId>")
                ))
                .templates(IamPolicyAssignmentTemplatesArgs.builder()
                    .id(policyS2sTemplate.templateId())
                    .version(policyS2sTemplate.version())
                    .build())
                .templateVersion(templateVersion.version())
                .build());
    
            var policyAssignmentIndex_iamPolicyAssignmentIamPolicyAssignment = new IamPolicyAssignment("policyAssignmentIndex/iamPolicyAssignmentIamPolicyAssignment", IamPolicyAssignmentArgs.builder()
                .version("1.0")
                .target(Map.ofEntries(
                    Map.entry("type", "Account Group"),
                    Map.entry("id", "<target-accountgroupId>")
                ))
                .templates(IamPolicyAssignmentTemplatesArgs.builder()
                    .id(policyS2sTemplate.templateId())
                    .version(policyS2sTemplate.version())
                    .build())
                .templateVersion(templateVersion.version())
                .build());
    
            var policyAssignmentIbmIndex_iamPolicyAssignmentIamPolicyAssignment = new IamPolicyAssignment("policyAssignmentIbmIndex/iamPolicyAssignmentIamPolicyAssignment", IamPolicyAssignmentArgs.builder()
                .version("1.0")
                .target(Map.ofEntries(
                    Map.entry("type", "Enterprise"),
                    Map.entry("id", "<target-enterpriseId>")
                ))
                .templates(IamPolicyAssignmentTemplatesArgs.builder()
                    .id(policyS2sTemplate.templateId())
                    .version(policyS2sTemplate.version())
                    .build())
                .templateVersion(templateVersion.version())
                .build());
    
        }
    }
    
    resources:
      policyS2sTemplate:
        type: ibm:IamPolicyTemplate
        properties:
          policy:
            type: authorization
            description: description
            resources:
              - attributes:
                  - key: serviceName
                    operator: stringEquals
                    value: kms
            subjects:
              - attributes:
                  - key: serviceName
                    operator: stringEquals
                    value: compliance
            roles:
              - Reader
          committed: true
      templateVersion:
        type: ibm:IamPolicyTemplateVersion
        properties:
          templateId: ${policyS2sTemplate.templateId}
          policy:
            type: authorization
            description: description
            resource:
              attributes:
                - key: serviceName
                  operator: stringEquals
                  value: appid
            subjects:
              - attributes:
                  - key: serviceName
                    operator: stringEquals
                    value: compliance
            roles:
              - Reader
          committed: true
      policyAssignmentIamPolicyAssignment:
        type: ibm:IamPolicyAssignment
        properties:
          version: '1.0'
          target:
            type: Account
            id: <target-accountId>
          templates:
            id: ${policyS2sTemplate.templateId}
            version: ${policyS2sTemplate.version}
          templateVersion: ${templateVersion.version}
      policyAssignmentIndex/iamPolicyAssignmentIamPolicyAssignment:
        type: ibm:IamPolicyAssignment
        properties:
          version: '1.0'
          target:
            type: Account Group
            id: <target-accountgroupId>
          templates:
            id: ${policyS2sTemplate.templateId}
            version: ${policyS2sTemplate.version}
          templateVersion: ${templateVersion.version}
      policyAssignmentIbmIndex/iamPolicyAssignmentIamPolicyAssignment:
        type: ibm:IamPolicyAssignment
        properties:
          version: '1.0'
          target:
            type: Enterprise
            id: <target-enterpriseId>
          templates:
            id: ${policyS2sTemplate.templateId}
            version: ${policyS2sTemplate.version}
          templateVersion: ${templateVersion.version}
    

    Note: Above configuration is to create policy template versions and assign to a target enterprise account. Update this parameter(template_version) and pulumi up again to update the assignment

    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.

    Create IamPolicyAssignment Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new IamPolicyAssignment(name: string, args: IamPolicyAssignmentArgs, opts?: CustomResourceOptions);
    @overload
    def IamPolicyAssignment(resource_name: str,
                            args: IamPolicyAssignmentArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def IamPolicyAssignment(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            target: Optional[Mapping[str, str]] = None,
                            templates: Optional[IamPolicyAssignmentTemplatesArgs] = None,
                            version: Optional[str] = None,
                            accept_language: Optional[str] = None,
                            iam_policy_assignment_id: Optional[str] = None,
                            template_version: Optional[str] = None,
                            timeouts: Optional[IamPolicyAssignmentTimeoutsArgs] = None)
    func NewIamPolicyAssignment(ctx *Context, name string, args IamPolicyAssignmentArgs, opts ...ResourceOption) (*IamPolicyAssignment, error)
    public IamPolicyAssignment(string name, IamPolicyAssignmentArgs args, CustomResourceOptions? opts = null)
    public IamPolicyAssignment(String name, IamPolicyAssignmentArgs args)
    public IamPolicyAssignment(String name, IamPolicyAssignmentArgs args, CustomResourceOptions options)
    
    type: ibm:IamPolicyAssignment
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args IamPolicyAssignmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args IamPolicyAssignmentArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args IamPolicyAssignmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IamPolicyAssignmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IamPolicyAssignmentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var iamPolicyAssignmentResource = new Ibm.IamPolicyAssignment("iamPolicyAssignmentResource", new()
    {
        Target = 
        {
            { "string", "string" },
        },
        Templates = new Ibm.Inputs.IamPolicyAssignmentTemplatesArgs
        {
            Id = "string",
            Version = "string",
        },
        Version = "string",
        AcceptLanguage = "string",
        IamPolicyAssignmentId = "string",
        TemplateVersion = "string",
        Timeouts = new Ibm.Inputs.IamPolicyAssignmentTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Update = "string",
        },
    });
    
    example, err := ibm.NewIamPolicyAssignment(ctx, "iamPolicyAssignmentResource", &ibm.IamPolicyAssignmentArgs{
    	Target: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Templates: &ibm.IamPolicyAssignmentTemplatesArgs{
    		Id:      pulumi.String("string"),
    		Version: pulumi.String("string"),
    	},
    	Version:               pulumi.String("string"),
    	AcceptLanguage:        pulumi.String("string"),
    	IamPolicyAssignmentId: pulumi.String("string"),
    	TemplateVersion:       pulumi.String("string"),
    	Timeouts: &ibm.IamPolicyAssignmentTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    })
    
    var iamPolicyAssignmentResource = new IamPolicyAssignment("iamPolicyAssignmentResource", IamPolicyAssignmentArgs.builder()
        .target(Map.of("string", "string"))
        .templates(IamPolicyAssignmentTemplatesArgs.builder()
            .id("string")
            .version("string")
            .build())
        .version("string")
        .acceptLanguage("string")
        .iamPolicyAssignmentId("string")
        .templateVersion("string")
        .timeouts(IamPolicyAssignmentTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .update("string")
            .build())
        .build());
    
    iam_policy_assignment_resource = ibm.IamPolicyAssignment("iamPolicyAssignmentResource",
        target={
            "string": "string",
        },
        templates={
            "id": "string",
            "version": "string",
        },
        version="string",
        accept_language="string",
        iam_policy_assignment_id="string",
        template_version="string",
        timeouts={
            "create": "string",
            "delete": "string",
            "update": "string",
        })
    
    const iamPolicyAssignmentResource = new ibm.IamPolicyAssignment("iamPolicyAssignmentResource", {
        target: {
            string: "string",
        },
        templates: {
            id: "string",
            version: "string",
        },
        version: "string",
        acceptLanguage: "string",
        iamPolicyAssignmentId: "string",
        templateVersion: "string",
        timeouts: {
            create: "string",
            "delete": "string",
            update: "string",
        },
    });
    
    type: ibm:IamPolicyAssignment
    properties:
        acceptLanguage: string
        iamPolicyAssignmentId: string
        target:
            string: string
        templateVersion: string
        templates:
            id: string
            version: string
        timeouts:
            create: string
            delete: string
            update: string
        version: string
    

    IamPolicyAssignment Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The IamPolicyAssignment resource accepts the following input properties:

    Target Dictionary<string, string>
    assignment target account and type. Nested schema for target:
    Templates IamPolicyAssignmentTemplates
    The set of properties required for a policy assignment. Nested schema for templates:
    Version string
    specify version of response body format.

    • Constraints: Allowable values are: 1.0. The minimum length is 1 character.
    AcceptLanguage string
    Language code for translations* default - English* de - German (Standard)* en - English* es - Spanish (Spain)* fr - French (Standard)* it - Italian (Standard)* ja - Japanese* ko - Korean* pt-br - Portuguese (Brazil)* zh-cn - Chinese (Simplified, PRC)* zh-tw - (Chinese, Taiwan).

    • Constraints: The default value is default. The minimum length is 1 character.
    IamPolicyAssignmentId string
    (String) policy template id.

    • Constraints: The maximum length is 51 characters. The minimum length is 1 character. The value must match regular expression /^policyTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
    TemplateVersion string
    The policy template version.
    Timeouts IamPolicyAssignmentTimeouts
    Target map[string]string
    assignment target account and type. Nested schema for target:
    Templates IamPolicyAssignmentTemplatesArgs
    The set of properties required for a policy assignment. Nested schema for templates:
    Version string
    specify version of response body format.

    • Constraints: Allowable values are: 1.0. The minimum length is 1 character.
    AcceptLanguage string
    Language code for translations* default - English* de - German (Standard)* en - English* es - Spanish (Spain)* fr - French (Standard)* it - Italian (Standard)* ja - Japanese* ko - Korean* pt-br - Portuguese (Brazil)* zh-cn - Chinese (Simplified, PRC)* zh-tw - (Chinese, Taiwan).

    • Constraints: The default value is default. The minimum length is 1 character.
    IamPolicyAssignmentId string
    (String) policy template id.

    • Constraints: The maximum length is 51 characters. The minimum length is 1 character. The value must match regular expression /^policyTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
    TemplateVersion string
    The policy template version.
    Timeouts IamPolicyAssignmentTimeoutsArgs
    target Map<String,String>
    assignment target account and type. Nested schema for target:
    templates IamPolicyAssignmentTemplates
    The set of properties required for a policy assignment. Nested schema for templates:
    version String
    specify version of response body format.

    • Constraints: Allowable values are: 1.0. The minimum length is 1 character.
    acceptLanguage String
    Language code for translations* default - English* de - German (Standard)* en - English* es - Spanish (Spain)* fr - French (Standard)* it - Italian (Standard)* ja - Japanese* ko - Korean* pt-br - Portuguese (Brazil)* zh-cn - Chinese (Simplified, PRC)* zh-tw - (Chinese, Taiwan).

    • Constraints: The default value is default. The minimum length is 1 character.
    iamPolicyAssignmentId String
    (String) policy template id.

    • Constraints: The maximum length is 51 characters. The minimum length is 1 character. The value must match regular expression /^policyTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
    templateVersion String
    The policy template version.
    timeouts IamPolicyAssignmentTimeouts
    target {[key: string]: string}
    assignment target account and type. Nested schema for target:
    templates IamPolicyAssignmentTemplates
    The set of properties required for a policy assignment. Nested schema for templates:
    version string
    specify version of response body format.

    • Constraints: Allowable values are: 1.0. The minimum length is 1 character.
    acceptLanguage string
    Language code for translations* default - English* de - German (Standard)* en - English* es - Spanish (Spain)* fr - French (Standard)* it - Italian (Standard)* ja - Japanese* ko - Korean* pt-br - Portuguese (Brazil)* zh-cn - Chinese (Simplified, PRC)* zh-tw - (Chinese, Taiwan).

    • Constraints: The default value is default. The minimum length is 1 character.
    iamPolicyAssignmentId string
    (String) policy template id.

    • Constraints: The maximum length is 51 characters. The minimum length is 1 character. The value must match regular expression /^policyTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
    templateVersion string
    The policy template version.
    timeouts IamPolicyAssignmentTimeouts
    target Mapping[str, str]
    assignment target account and type. Nested schema for target:
    templates IamPolicyAssignmentTemplatesArgs
    The set of properties required for a policy assignment. Nested schema for templates:
    version str
    specify version of response body format.

    • Constraints: Allowable values are: 1.0. The minimum length is 1 character.
    accept_language str
    Language code for translations* default - English* de - German (Standard)* en - English* es - Spanish (Spain)* fr - French (Standard)* it - Italian (Standard)* ja - Japanese* ko - Korean* pt-br - Portuguese (Brazil)* zh-cn - Chinese (Simplified, PRC)* zh-tw - (Chinese, Taiwan).

    • Constraints: The default value is default. The minimum length is 1 character.
    iam_policy_assignment_id str
    (String) policy template id.

    • Constraints: The maximum length is 51 characters. The minimum length is 1 character. The value must match regular expression /^policyTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
    template_version str
    The policy template version.
    timeouts IamPolicyAssignmentTimeoutsArgs
    target Map<String>
    assignment target account and type. Nested schema for target:
    templates Property Map
    The set of properties required for a policy assignment. Nested schema for templates:
    version String
    specify version of response body format.

    • Constraints: Allowable values are: 1.0. The minimum length is 1 character.
    acceptLanguage String
    Language code for translations* default - English* de - German (Standard)* en - English* es - Spanish (Spain)* fr - French (Standard)* it - Italian (Standard)* ja - Japanese* ko - Korean* pt-br - Portuguese (Brazil)* zh-cn - Chinese (Simplified, PRC)* zh-tw - (Chinese, Taiwan).

    • Constraints: The default value is default. The minimum length is 1 character.
    iamPolicyAssignmentId String
    (String) policy template id.

    • Constraints: The maximum length is 51 characters. The minimum length is 1 character. The value must match regular expression /^policyTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
    templateVersion String
    The policy template version.
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the IamPolicyAssignment resource produces the following output properties:

    AccountId string
    (String) The account GUID that the policies assignments belong to..
    CreatedAt string
    (String) The UTC timestamp when the policy assignment was created.
    CreatedById string
    (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
    The provider-assigned unique ID for this managed resource.
    LastModifiedAt string
    (String) The UTC timestamp when the policy assignment was last modified.
    LastModifiedById string
    (String) The iam ID of the entity that last modified the policy assignment.
    Resources List<IamPolicyAssignmentResource>
    (List) Object for each account assigned.

    • Constraints: The maximum length is 1 item. The minimum length is 1 item. Nested schema for resources:
    Status string
    (String) The policy assignment status.

    • Constraints: Allowable values are: in_progress, succeeded, succeed_with_errors, failed.
    Template Dictionary<string, string>
    (List) policy template details. Nested schema for template:
    AccountId string
    (String) The account GUID that the policies assignments belong to..
    CreatedAt string
    (String) The UTC timestamp when the policy assignment was created.
    CreatedById string
    (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
    The provider-assigned unique ID for this managed resource.
    LastModifiedAt string
    (String) The UTC timestamp when the policy assignment was last modified.
    LastModifiedById string
    (String) The iam ID of the entity that last modified the policy assignment.
    Resources []IamPolicyAssignmentResource
    (List) Object for each account assigned.

    • Constraints: The maximum length is 1 item. The minimum length is 1 item. Nested schema for resources:
    Status string
    (String) The policy assignment status.

    • Constraints: Allowable values are: in_progress, succeeded, succeed_with_errors, failed.
    Template map[string]string
    (List) policy template details. Nested schema for template:
    accountId String
    (String) The account GUID that the policies assignments belong to..
    createdAt String
    (String) The UTC timestamp when the policy assignment was created.
    createdById String
    (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
    The provider-assigned unique ID for this managed resource.
    lastModifiedAt String
    (String) The UTC timestamp when the policy assignment was last modified.
    lastModifiedById String
    (String) The iam ID of the entity that last modified the policy assignment.
    resources List<IamPolicyAssignmentResource>
    (List) Object for each account assigned.

    • Constraints: The maximum length is 1 item. The minimum length is 1 item. Nested schema for resources:
    status String
    (String) The policy assignment status.

    • Constraints: Allowable values are: in_progress, succeeded, succeed_with_errors, failed.
    template Map<String,String>
    (List) policy template details. Nested schema for template:
    accountId string
    (String) The account GUID that the policies assignments belong to..
    createdAt string
    (String) The UTC timestamp when the policy assignment was created.
    createdById string
    (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
    The provider-assigned unique ID for this managed resource.
    lastModifiedAt string
    (String) The UTC timestamp when the policy assignment was last modified.
    lastModifiedById string
    (String) The iam ID of the entity that last modified the policy assignment.
    resources IamPolicyAssignmentResource[]
    (List) Object for each account assigned.

    • Constraints: The maximum length is 1 item. The minimum length is 1 item. Nested schema for resources:
    status string
    (String) The policy assignment status.

    • Constraints: Allowable values are: in_progress, succeeded, succeed_with_errors, failed.
    template {[key: string]: string}
    (List) policy template details. Nested schema for template:
    account_id str
    (String) The account GUID that the policies assignments belong to..
    created_at str
    (String) The UTC timestamp when the policy assignment was created.
    created_by_id str
    (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
    The provider-assigned unique ID for this managed resource.
    last_modified_at str
    (String) The UTC timestamp when the policy assignment was last modified.
    last_modified_by_id str
    (String) The iam ID of the entity that last modified the policy assignment.
    resources Sequence[IamPolicyAssignmentResource]
    (List) Object for each account assigned.

    • Constraints: The maximum length is 1 item. The minimum length is 1 item. Nested schema for resources:
    status str
    (String) The policy assignment status.

    • Constraints: Allowable values are: in_progress, succeeded, succeed_with_errors, failed.
    template Mapping[str, str]
    (List) policy template details. Nested schema for template:
    accountId String
    (String) The account GUID that the policies assignments belong to..
    createdAt String
    (String) The UTC timestamp when the policy assignment was created.
    createdById String
    (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
    The provider-assigned unique ID for this managed resource.
    lastModifiedAt String
    (String) The UTC timestamp when the policy assignment was last modified.
    lastModifiedById String
    (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 maximum length is 1 item. The minimum length is 1 item. Nested schema for resources:
    status String
    (String) The policy assignment status.

    • Constraints: Allowable values are: in_progress, succeeded, succeed_with_errors, failed.
    template Map<String>
    (List) policy template details. Nested schema for template:

    Look up Existing IamPolicyAssignment Resource

    Get an existing IamPolicyAssignment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: IamPolicyAssignmentState, opts?: CustomResourceOptions): IamPolicyAssignment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            accept_language: Optional[str] = None,
            account_id: Optional[str] = None,
            created_at: Optional[str] = None,
            created_by_id: Optional[str] = None,
            href: Optional[str] = None,
            iam_policy_assignment_id: Optional[str] = None,
            last_modified_at: Optional[str] = None,
            last_modified_by_id: Optional[str] = None,
            resources: Optional[Sequence[IamPolicyAssignmentResourceArgs]] = None,
            status: Optional[str] = None,
            target: Optional[Mapping[str, str]] = None,
            template: Optional[Mapping[str, str]] = None,
            template_version: Optional[str] = None,
            templates: Optional[IamPolicyAssignmentTemplatesArgs] = None,
            timeouts: Optional[IamPolicyAssignmentTimeoutsArgs] = None,
            version: Optional[str] = None) -> IamPolicyAssignment
    func GetIamPolicyAssignment(ctx *Context, name string, id IDInput, state *IamPolicyAssignmentState, opts ...ResourceOption) (*IamPolicyAssignment, error)
    public static IamPolicyAssignment Get(string name, Input<string> id, IamPolicyAssignmentState? state, CustomResourceOptions? opts = null)
    public static IamPolicyAssignment get(String name, Output<String> id, IamPolicyAssignmentState state, CustomResourceOptions options)
    resources:  _:    type: ibm:IamPolicyAssignment    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AcceptLanguage string
    Language code for translations* default - English* de - German (Standard)* en - English* es - Spanish (Spain)* fr - French (Standard)* it - Italian (Standard)* ja - Japanese* ko - Korean* pt-br - Portuguese (Brazil)* zh-cn - Chinese (Simplified, PRC)* zh-tw - (Chinese, Taiwan).

    • Constraints: The default value is default. The minimum length is 1 character.
    AccountId string
    (String) The account GUID that the policies assignments belong to..
    CreatedAt string
    (String) The UTC timestamp when the policy assignment was created.
    CreatedById string
    (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.
    IamPolicyAssignmentId string
    (String) policy template id.

    • Constraints: The maximum length is 51 characters. The minimum length is 1 character. The value must match regular expression /^policyTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
    LastModifiedAt string
    (String) The UTC timestamp when the policy assignment was last modified.
    LastModifiedById string
    (String) The iam ID of the entity that last modified the policy assignment.
    Resources List<IamPolicyAssignmentResource>
    (List) Object for each account assigned.

    • Constraints: The maximum length is 1 item. The minimum length is 1 item. Nested schema for resources:
    Status string
    (String) The policy assignment status.

    • Constraints: Allowable values are: in_progress, succeeded, succeed_with_errors, failed.
    Target Dictionary<string, string>
    assignment target account and type. Nested schema for target:
    Template Dictionary<string, string>
    (List) policy template details. Nested schema for template:
    TemplateVersion string
    The policy template version.
    Templates IamPolicyAssignmentTemplates
    The set of properties required for a policy assignment. Nested schema for templates:
    Timeouts IamPolicyAssignmentTimeouts
    Version string
    specify version of response body format.

    • Constraints: Allowable values are: 1.0. The minimum length is 1 character.
    AcceptLanguage string
    Language code for translations* default - English* de - German (Standard)* en - English* es - Spanish (Spain)* fr - French (Standard)* it - Italian (Standard)* ja - Japanese* ko - Korean* pt-br - Portuguese (Brazil)* zh-cn - Chinese (Simplified, PRC)* zh-tw - (Chinese, Taiwan).

    • Constraints: The default value is default. The minimum length is 1 character.
    AccountId string
    (String) The account GUID that the policies assignments belong to..
    CreatedAt string
    (String) The UTC timestamp when the policy assignment was created.
    CreatedById string
    (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.
    IamPolicyAssignmentId string
    (String) policy template id.

    • Constraints: The maximum length is 51 characters. The minimum length is 1 character. The value must match regular expression /^policyTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
    LastModifiedAt string
    (String) The UTC timestamp when the policy assignment was last modified.
    LastModifiedById string
    (String) The iam ID of the entity that last modified the policy assignment.
    Resources []IamPolicyAssignmentResourceArgs
    (List) Object for each account assigned.

    • Constraints: The maximum length is 1 item. The minimum length is 1 item. Nested schema for resources:
    Status string
    (String) The policy assignment status.

    • Constraints: Allowable values are: in_progress, succeeded, succeed_with_errors, failed.
    Target map[string]string
    assignment target account and type. Nested schema for target:
    Template map[string]string
    (List) policy template details. Nested schema for template:
    TemplateVersion string
    The policy template version.
    Templates IamPolicyAssignmentTemplatesArgs
    The set of properties required for a policy assignment. Nested schema for templates:
    Timeouts IamPolicyAssignmentTimeoutsArgs
    Version string
    specify version of response body format.

    • Constraints: Allowable values are: 1.0. The minimum length is 1 character.
    acceptLanguage String
    Language code for translations* default - English* de - German (Standard)* en - English* es - Spanish (Spain)* fr - French (Standard)* it - Italian (Standard)* ja - Japanese* ko - Korean* pt-br - Portuguese (Brazil)* zh-cn - Chinese (Simplified, PRC)* zh-tw - (Chinese, Taiwan).

    • Constraints: The default value is default. The minimum length is 1 character.
    accountId String
    (String) The account GUID that the policies assignments belong to..
    createdAt String
    (String) The UTC timestamp when the policy assignment was created.
    createdById String
    (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.
    iamPolicyAssignmentId String
    (String) policy template id.

    • Constraints: The maximum length is 51 characters. The minimum length is 1 character. The value must match regular expression /^policyTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
    lastModifiedAt String
    (String) The UTC timestamp when the policy assignment was last modified.
    lastModifiedById String
    (String) The iam ID of the entity that last modified the policy assignment.
    resources List<IamPolicyAssignmentResource>
    (List) Object for each account assigned.

    • Constraints: The maximum length is 1 item. The minimum length is 1 item. Nested schema for resources:
    status String
    (String) The policy assignment status.

    • Constraints: Allowable values are: in_progress, succeeded, succeed_with_errors, failed.
    target Map<String,String>
    assignment target account and type. Nested schema for target:
    template Map<String,String>
    (List) policy template details. Nested schema for template:
    templateVersion String
    The policy template version.
    templates IamPolicyAssignmentTemplates
    The set of properties required for a policy assignment. Nested schema for templates:
    timeouts IamPolicyAssignmentTimeouts
    version String
    specify version of response body format.

    • Constraints: Allowable values are: 1.0. The minimum length is 1 character.
    acceptLanguage string
    Language code for translations* default - English* de - German (Standard)* en - English* es - Spanish (Spain)* fr - French (Standard)* it - Italian (Standard)* ja - Japanese* ko - Korean* pt-br - Portuguese (Brazil)* zh-cn - Chinese (Simplified, PRC)* zh-tw - (Chinese, Taiwan).

    • Constraints: The default value is default. The minimum length is 1 character.
    accountId string
    (String) The account GUID that the policies assignments belong to..
    createdAt string
    (String) The UTC timestamp when the policy assignment was created.
    createdById string
    (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.
    iamPolicyAssignmentId string
    (String) policy template id.

    • Constraints: The maximum length is 51 characters. The minimum length is 1 character. The value must match regular expression /^policyTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
    lastModifiedAt string
    (String) The UTC timestamp when the policy assignment was last modified.
    lastModifiedById string
    (String) The iam ID of the entity that last modified the policy assignment.
    resources IamPolicyAssignmentResource[]
    (List) Object for each account assigned.

    • Constraints: The maximum length is 1 item. The minimum length is 1 item. Nested schema for resources:
    status string
    (String) The policy assignment status.

    • Constraints: Allowable values are: in_progress, succeeded, succeed_with_errors, failed.
    target {[key: string]: string}
    assignment target account and type. Nested schema for target:
    template {[key: string]: string}
    (List) policy template details. Nested schema for template:
    templateVersion string
    The policy template version.
    templates IamPolicyAssignmentTemplates
    The set of properties required for a policy assignment. Nested schema for templates:
    timeouts IamPolicyAssignmentTimeouts
    version string
    specify version of response body format.

    • Constraints: Allowable values are: 1.0. The minimum length is 1 character.
    accept_language str
    Language code for translations* default - English* de - German (Standard)* en - English* es - Spanish (Spain)* fr - French (Standard)* it - Italian (Standard)* ja - Japanese* ko - Korean* pt-br - Portuguese (Brazil)* zh-cn - Chinese (Simplified, PRC)* zh-tw - (Chinese, Taiwan).

    • Constraints: The default value is default. The minimum length is 1 character.
    account_id str
    (String) The account GUID that the policies assignments belong to..
    created_at str
    (String) The UTC timestamp when the policy assignment was created.
    created_by_id str
    (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.
    iam_policy_assignment_id str
    (String) policy template id.

    • Constraints: The maximum length is 51 characters. The minimum length is 1 character. The value must match regular expression /^policyTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
    last_modified_at str
    (String) The UTC timestamp when the policy assignment was last modified.
    last_modified_by_id str
    (String) The iam ID of the entity that last modified the policy assignment.
    resources Sequence[IamPolicyAssignmentResourceArgs]
    (List) Object for each account assigned.

    • Constraints: The maximum length is 1 item. The minimum length is 1 item. Nested schema for resources:
    status str
    (String) The policy assignment status.

    • Constraints: Allowable values are: in_progress, succeeded, succeed_with_errors, failed.
    target Mapping[str, str]
    assignment target account and type. Nested schema for target:
    template Mapping[str, str]
    (List) policy template details. Nested schema for template:
    template_version str
    The policy template version.
    templates IamPolicyAssignmentTemplatesArgs
    The set of properties required for a policy assignment. Nested schema for templates:
    timeouts IamPolicyAssignmentTimeoutsArgs
    version str
    specify version of response body format.

    • Constraints: Allowable values are: 1.0. The minimum length is 1 character.
    acceptLanguage String
    Language code for translations* default - English* de - German (Standard)* en - English* es - Spanish (Spain)* fr - French (Standard)* it - Italian (Standard)* ja - Japanese* ko - Korean* pt-br - Portuguese (Brazil)* zh-cn - Chinese (Simplified, PRC)* zh-tw - (Chinese, Taiwan).

    • Constraints: The default value is default. The minimum length is 1 character.
    accountId String
    (String) The account GUID that the policies assignments belong to..
    createdAt String
    (String) The UTC timestamp when the policy assignment was created.
    createdById String
    (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.
    iamPolicyAssignmentId String
    (String) policy template id.

    • Constraints: The maximum length is 51 characters. The minimum length is 1 character. The value must match regular expression /^policyTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
    lastModifiedAt String
    (String) The UTC timestamp when the policy assignment was last modified.
    lastModifiedById String
    (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 maximum length is 1 item. The minimum length is 1 item. Nested schema for resources:
    status String
    (String) The policy assignment status.

    • Constraints: Allowable values are: in_progress, succeeded, succeed_with_errors, failed.
    target Map<String>
    assignment target account and type. Nested schema for target:
    template Map<String>
    (List) policy template details. Nested schema for template:
    templateVersion String
    The policy template version.
    templates Property Map
    The set of properties required for a policy assignment. Nested schema for templates:
    timeouts Property Map
    version String
    specify version of response body format.

    • Constraints: Allowable values are: 1.0. The minimum length is 1 character.

    Supporting Types

    IamPolicyAssignmentResource, IamPolicyAssignmentResourceArgs

    Policies List<IamPolicyAssignmentResourcePolicy>
    (String) The conflicting policy id.
    Target Dictionary<string, string>
    assignment target account and type. Nested schema for target:
    Policies []IamPolicyAssignmentResourcePolicy
    (String) The conflicting policy id.
    Target map[string]string
    assignment target account and type. Nested schema for target:
    policies List<IamPolicyAssignmentResourcePolicy>
    (String) The conflicting policy id.
    target Map<String,String>
    assignment target account and type. Nested schema for target:
    policies IamPolicyAssignmentResourcePolicy[]
    (String) The conflicting policy id.
    target {[key: string]: string}
    assignment target account and type. Nested schema for target:
    policies Sequence[IamPolicyAssignmentResourcePolicy]
    (String) The conflicting policy id.
    target Mapping[str, str]
    assignment target account and type. Nested schema for target:
    policies List<Property Map>
    (String) The conflicting policy id.
    target Map<String>
    assignment target account and type. Nested schema for target:

    IamPolicyAssignmentResourcePolicy, IamPolicyAssignmentResourcePolicyArgs

    ErrorMessages List<IamPolicyAssignmentResourcePolicyErrorMessage>
    (List) The error response from API. Nested schema for error_message:
    ResourceCreateds List<IamPolicyAssignmentResourcePolicyResourceCreated>
    (List) On success, includes the policy assigned. Nested schema for resource_created:
    Status string
    (String) The policy assignment status.

    • Constraints: Allowable values are: in_progress, succeeded, succeed_with_errors, failed.
    ErrorMessages []IamPolicyAssignmentResourcePolicyErrorMessage
    (List) The error response from API. Nested schema for error_message:
    ResourceCreateds []IamPolicyAssignmentResourcePolicyResourceCreated
    (List) On success, includes the policy assigned. Nested schema for resource_created:
    Status string
    (String) The policy assignment status.

    • Constraints: Allowable values are: in_progress, succeeded, succeed_with_errors, failed.
    errorMessages List<IamPolicyAssignmentResourcePolicyErrorMessage>
    (List) The error response from API. Nested schema for error_message:
    resourceCreateds List<IamPolicyAssignmentResourcePolicyResourceCreated>
    (List) On success, includes the policy assigned. Nested schema for resource_created:
    status String
    (String) The policy assignment status.

    • Constraints: Allowable values are: in_progress, succeeded, succeed_with_errors, failed.
    errorMessages IamPolicyAssignmentResourcePolicyErrorMessage[]
    (List) The error response from API. Nested schema for error_message:
    resourceCreateds IamPolicyAssignmentResourcePolicyResourceCreated[]
    (List) On success, includes the policy assigned. Nested schema for resource_created:
    status string
    (String) The policy assignment status.

    • Constraints: Allowable values are: in_progress, succeeded, succeed_with_errors, failed.
    error_messages Sequence[IamPolicyAssignmentResourcePolicyErrorMessage]
    (List) The error response from API. Nested schema for error_message:
    resource_createds Sequence[IamPolicyAssignmentResourcePolicyResourceCreated]
    (List) On success, includes the policy assigned. Nested schema for resource_created:
    status str
    (String) The policy assignment status.

    • Constraints: Allowable values are: in_progress, succeeded, succeed_with_errors, failed.
    errorMessages List<Property Map>
    (List) The error response from API. Nested schema for error_message:
    resourceCreateds List<Property Map>
    (List) On success, includes the policy assigned. Nested schema for resource_created:
    status String
    (String) The policy assignment status.

    • Constraints: Allowable values are: in_progress, succeeded, succeed_with_errors, failed.

    IamPolicyAssignmentResourcePolicyErrorMessage, IamPolicyAssignmentResourcePolicyErrorMessageArgs

    Code string
    (String) error code.
    ErrorCode string
    Errors List<IamPolicyAssignmentResourcePolicyErrorMessageError>
    (List) The errors encountered during the response.

    • Constraints: The maximum length is 1 item. The minimum length is 1 item. 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.
    StatusCode double
    (Integer) The http error code of the response.
    Trace string
    Code string
    (String) error code.
    ErrorCode string
    Errors []IamPolicyAssignmentResourcePolicyErrorMessageError
    (List) The errors encountered during the response.

    • Constraints: The maximum length is 1 item. The minimum length is 1 item. 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.
    StatusCode float64
    (Integer) The http error code of the response.
    Trace string
    code String
    (String) error code.
    errorCode String
    errors List<IamPolicyAssignmentResourcePolicyErrorMessageError>
    (List) The errors encountered during the response.

    • Constraints: The maximum length is 1 item. The minimum length is 1 item. 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.
    statusCode Double
    (Integer) The http error code of the response.
    trace String
    code string
    (String) error code.
    errorCode string
    errors IamPolicyAssignmentResourcePolicyErrorMessageError[]
    (List) The errors encountered during the response.

    • Constraints: The maximum length is 1 item. The minimum length is 1 item. 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.
    statusCode number
    (Integer) The http error code of the response.
    trace string
    code str
    (String) error code.
    error_code str
    errors Sequence[IamPolicyAssignmentResourcePolicyErrorMessageError]
    (List) The errors encountered during the response.

    • Constraints: The maximum length is 1 item. The minimum length is 1 item. 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
    code String
    (String) error code.
    errorCode String
    errors List<Property Map>
    (List) The errors encountered during the response.

    • Constraints: The maximum length is 1 item. The minimum length is 1 item. 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.
    statusCode Number
    (Integer) The http error code of the response.
    trace String

    IamPolicyAssignmentResourcePolicyErrorMessageError, IamPolicyAssignmentResourcePolicyErrorMessageErrorArgs

    Code string
    (String) error code.
    Details List<IamPolicyAssignmentResourcePolicyErrorMessageErrorDetail>
    (List) Additional error details. Nested schema for details:
    Message string
    (String) Error message detailing the nature of the error.
    MoreInfo string
    (String) Additional info for error.
    Code string
    (String) error code.
    Details []IamPolicyAssignmentResourcePolicyErrorMessageErrorDetail
    (List) Additional error details. Nested schema for details:
    Message string
    (String) Error message detailing the nature of the error.
    MoreInfo string
    (String) Additional info for error.
    code String
    (String) error code.
    details List<IamPolicyAssignmentResourcePolicyErrorMessageErrorDetail>
    (List) Additional error details. Nested schema for details:
    message String
    (String) Error message detailing the nature of the error.
    moreInfo String
    (String) Additional info for error.
    code string
    (String) error code.
    details IamPolicyAssignmentResourcePolicyErrorMessageErrorDetail[]
    (List) Additional error details. Nested schema for details:
    message string
    (String) Error message detailing the nature of the error.
    moreInfo string
    (String) Additional info for error.
    code str
    (String) error code.
    details Sequence[IamPolicyAssignmentResourcePolicyErrorMessageErrorDetail]
    (List) Additional error details. Nested schema for details:
    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:
    message String
    (String) Error message detailing the nature of the error.
    moreInfo String
    (String) Additional info for error.

    IamPolicyAssignmentResourcePolicyErrorMessageErrorDetail, IamPolicyAssignmentResourcePolicyErrorMessageErrorDetailArgs

    ConflictsWiths List<IamPolicyAssignmentResourcePolicyErrorMessageErrorDetailConflictsWith>
    (List) Details of conflicting resource. Nested schema for conflicts_with:
    ConflictsWiths []IamPolicyAssignmentResourcePolicyErrorMessageErrorDetailConflictsWith
    (List) Details of conflicting resource. Nested schema for conflicts_with:
    conflictsWiths List<IamPolicyAssignmentResourcePolicyErrorMessageErrorDetailConflictsWith>
    (List) Details of conflicting resource. Nested schema for conflicts_with:
    conflictsWiths IamPolicyAssignmentResourcePolicyErrorMessageErrorDetailConflictsWith[]
    (List) Details of conflicting resource. Nested schema for conflicts_with:
    conflicts_withs Sequence[IamPolicyAssignmentResourcePolicyErrorMessageErrorDetailConflictsWith]
    (List) Details of conflicting resource. Nested schema for conflicts_with:
    conflictsWiths List<Property Map>
    (List) Details of conflicting resource. Nested schema for conflicts_with:

    IamPolicyAssignmentResourcePolicyErrorMessageErrorDetailConflictsWith, IamPolicyAssignmentResourcePolicyErrorMessageErrorDetailConflictsWithArgs

    Etag string
    (String) The revision number of the resource.
    Policy string
    (String) The conflicting policy id.
    Role string
    (String) The conflicting role id.
    Etag string
    (String) The revision number of the resource.
    Policy string
    (String) The conflicting policy id.
    Role string
    (String) The conflicting role id.
    etag String
    (String) The revision number of the resource.
    policy String
    (String) The conflicting policy id.
    role String
    (String) The conflicting role id.
    etag string
    (String) The revision number of the resource.
    policy string
    (String) The conflicting policy id.
    role string
    (String) The conflicting role id.
    etag str
    (String) The revision number of the resource.
    policy str
    (String) The conflicting policy id.
    role str
    (String) The conflicting role id.
    etag String
    (String) The revision number of the resource.
    policy String
    (String) The conflicting policy id.
    role String
    (String) The conflicting role id.

    IamPolicyAssignmentResourcePolicyResourceCreated, IamPolicyAssignmentResourcePolicyResourceCreatedArgs

    Id string
    (String) policy template id.

    • Constraints: The maximum length is 51 characters. The minimum length is 1 character. The value must match regular expression /^policyTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
    Id string
    (String) policy template id.

    • Constraints: The maximum length is 51 characters. The minimum length is 1 character. The value must match regular expression /^policyTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
    id String
    (String) policy template id.

    • Constraints: The maximum length is 51 characters. The minimum length is 1 character. The value must match regular expression /^policyTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
    id string
    (String) policy template id.

    • Constraints: The maximum length is 51 characters. The minimum length is 1 character. The value must match regular expression /^policyTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
    id str
    (String) policy template id.

    • Constraints: The maximum length is 51 characters. The minimum length is 1 character. The value must match regular expression /^policyTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
    id String
    (String) policy template id.

    • Constraints: The maximum length is 51 characters. The minimum length is 1 character. The value must match regular expression /^policyTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.

    IamPolicyAssignmentTemplates, IamPolicyAssignmentTemplatesArgs

    Id string
    ID of the template.

    • Constraints: The maximum length is 51 characters. The minimum length is 1 character. The value must match regular expression /^policyTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
    Version string
    template version .

    • Constraints: The maximum length is 2 characters. The minimum length is 1 character. The value must match regular expression /^[0-9]*$/.
    Id string
    ID of the template.

    • Constraints: The maximum length is 51 characters. The minimum length is 1 character. The value must match regular expression /^policyTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
    Version string
    template version .

    • Constraints: The maximum length is 2 characters. The minimum length is 1 character. The value must match regular expression /^[0-9]*$/.
    id String
    ID of the template.

    • Constraints: The maximum length is 51 characters. The minimum length is 1 character. The value must match regular expression /^policyTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
    version String
    template version .

    • Constraints: The maximum length is 2 characters. The minimum length is 1 character. The value must match regular expression /^[0-9]*$/.
    id string
    ID of the template.

    • Constraints: The maximum length is 51 characters. The minimum length is 1 character. The value must match regular expression /^policyTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
    version string
    template version .

    • Constraints: The maximum length is 2 characters. The minimum length is 1 character. The value must match regular expression /^[0-9]*$/.
    id str
    ID of the template.

    • Constraints: The maximum length is 51 characters. The minimum length is 1 character. The value must match regular expression /^policyTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
    version str
    template version .

    • Constraints: The maximum length is 2 characters. The minimum length is 1 character. The value must match regular expression /^[0-9]*$/.
    id String
    ID of the template.

    • Constraints: The maximum length is 51 characters. The minimum length is 1 character. The value must match regular expression /^policyTemplate-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.
    version String
    template version .

    • Constraints: The maximum length is 2 characters. The minimum length is 1 character. The value must match regular expression /^[0-9]*$/.

    IamPolicyAssignmentTimeouts, IamPolicyAssignmentTimeoutsArgs

    Create string
    Delete string
    Update string
    Create string
    Delete string
    Update string
    create String
    delete String
    update String
    create string
    delete string
    update string
    create str
    delete str
    update str
    create String
    delete String
    update String

    Import

    You can import the ibm_iam_policy_assignment resource by using id. Policy assignment ID.

    Syntax

    
    ```sh
    $ pulumi import ibm:index/iamPolicyAssignment:IamPolicyAssignment policy_assignment <id>
    ```
    
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.81.1 published on Wednesday, Aug 6, 2025 by ibm-cloud