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

ibm.IamPolicyTemplateVersion

Explore with Pulumi AI

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

    Create, update, and delete a policy_template versions with this resource.

    Example Usage

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IamPolicyTemplateVersion;
    import com.pulumi.ibm.IamPolicyTemplateVersionArgs;
    import com.pulumi.ibm.inputs.IamPolicyTemplateVersionPolicyArgs;
    import com.pulumi.ibm.inputs.IamPolicyTemplateVersionPolicyResourceArgs;
    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 policyTemplateV2 = new IamPolicyTemplateVersion("policyTemplateV2", IamPolicyTemplateVersionArgs.builder()
                .templateId(ibm_iam_policy_template.policy_template_v1().template_id())
                .description("Template description")
                .policy(IamPolicyTemplateVersionPolicyArgs.builder()
                    .type("access")
                    .description("description")
                    .resource(IamPolicyTemplateVersionPolicyResourceArgs.builder()
                        .attributes(IamPolicyTemplateVersionPolicyResourceAttributeArgs.builder()
                            .key("key")
                            .operator("stringEquals")
                            .value("anything as a string")
                            .build())
                        .tags(IamPolicyTemplateVersionPolicyResourceTagArgs.builder()
                            .key("key")
                            .value("value")
                            .operator("stringEquals")
                            .build())
                        .build())
                    .pattern("pattern")
                    .rule(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
                    .roles("Viewer")
                    .build())
                .committed("true")
                .build());
    
        }
    }
    
    resources:
      policyTemplateV2:
        type: ibm:IamPolicyTemplateVersion
        properties:
          templateId: ${ibm_iam_policy_template.policy_template_v1.template_id}
          description: Template description
          policy:
            type: access
            description: description
            resource:
              attributes:
                - key: key
                  operator: stringEquals
                  value: anything as a string
              tags:
                - key: key
                  value: value
                  operator: stringEquals
            pattern: pattern
            rule:
              - key: key
                operator: timeLessThan
                value: anything as a string
            roles:
              - Viewer
          committed: 'true'
    

    Create IamPolicyTemplateVersion Resource

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

    Constructor syntax

    new IamPolicyTemplateVersion(name: string, args: IamPolicyTemplateVersionArgs, opts?: CustomResourceOptions);
    @overload
    def IamPolicyTemplateVersion(resource_name: str,
                                 args: IamPolicyTemplateVersionArgs,
                                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def IamPolicyTemplateVersion(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 policy: Optional[IamPolicyTemplateVersionPolicyArgs] = None,
                                 template_id: Optional[str] = None,
                                 committed: Optional[bool] = None,
                                 description: Optional[str] = None,
                                 iam_policy_template_version_id: Optional[str] = None,
                                 name: Optional[str] = None)
    func NewIamPolicyTemplateVersion(ctx *Context, name string, args IamPolicyTemplateVersionArgs, opts ...ResourceOption) (*IamPolicyTemplateVersion, error)
    public IamPolicyTemplateVersion(string name, IamPolicyTemplateVersionArgs args, CustomResourceOptions? opts = null)
    public IamPolicyTemplateVersion(String name, IamPolicyTemplateVersionArgs args)
    public IamPolicyTemplateVersion(String name, IamPolicyTemplateVersionArgs args, CustomResourceOptions options)
    
    type: ibm:IamPolicyTemplateVersion
    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 IamPolicyTemplateVersionArgs
    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 IamPolicyTemplateVersionArgs
    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 IamPolicyTemplateVersionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IamPolicyTemplateVersionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IamPolicyTemplateVersionArgs
    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 iamPolicyTemplateVersionResource = new Ibm.IamPolicyTemplateVersion("iamPolicyTemplateVersionResource", new()
    {
        Policy = new Ibm.Inputs.IamPolicyTemplateVersionPolicyArgs
        {
            Type = "string",
            Description = "string",
            Pattern = "string",
            Resource = new Ibm.Inputs.IamPolicyTemplateVersionPolicyResourceArgs
            {
                Attributes = new[]
                {
                    new Ibm.Inputs.IamPolicyTemplateVersionPolicyResourceAttributeArgs
                    {
                        Key = "string",
                        Operator = "string",
                        Value = "string",
                    },
                },
                Tags = new[]
                {
                    new Ibm.Inputs.IamPolicyTemplateVersionPolicyResourceTagArgs
                    {
                        Key = "string",
                        Operator = "string",
                        Value = "string",
                    },
                },
            },
            Roles = new[]
            {
                "string",
            },
            RuleConditions = new[]
            {
                new Ibm.Inputs.IamPolicyTemplateVersionPolicyRuleConditionArgs
                {
                    Operator = "string",
                    Conditions = new[]
                    {
                        new Ibm.Inputs.IamPolicyTemplateVersionPolicyRuleConditionConditionArgs
                        {
                            Key = "string",
                            Operator = "string",
                            Values = new[]
                            {
                                "string",
                            },
                        },
                    },
                    Key = "string",
                    Values = new[]
                    {
                        "string",
                    },
                },
            },
            RuleOperator = "string",
            Subjects = new[]
            {
                new Ibm.Inputs.IamPolicyTemplateVersionPolicySubjectArgs
                {
                    Attributes = new[]
                    {
                        new Ibm.Inputs.IamPolicyTemplateVersionPolicySubjectAttributeArgs
                        {
                            Key = "string",
                            Operator = "string",
                            Value = "string",
                        },
                    },
                },
            },
        },
        TemplateId = "string",
        Committed = false,
        Description = "string",
        IamPolicyTemplateVersionId = "string",
        Name = "string",
    });
    
    example, err := ibm.NewIamPolicyTemplateVersion(ctx, "iamPolicyTemplateVersionResource", &ibm.IamPolicyTemplateVersionArgs{
    	Policy: &ibm.IamPolicyTemplateVersionPolicyArgs{
    		Type:        pulumi.String("string"),
    		Description: pulumi.String("string"),
    		Pattern:     pulumi.String("string"),
    		Resource: &ibm.IamPolicyTemplateVersionPolicyResourceArgs{
    			Attributes: ibm.IamPolicyTemplateVersionPolicyResourceAttributeArray{
    				&ibm.IamPolicyTemplateVersionPolicyResourceAttributeArgs{
    					Key:      pulumi.String("string"),
    					Operator: pulumi.String("string"),
    					Value:    pulumi.String("string"),
    				},
    			},
    			Tags: ibm.IamPolicyTemplateVersionPolicyResourceTagArray{
    				&ibm.IamPolicyTemplateVersionPolicyResourceTagArgs{
    					Key:      pulumi.String("string"),
    					Operator: pulumi.String("string"),
    					Value:    pulumi.String("string"),
    				},
    			},
    		},
    		Roles: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		RuleConditions: ibm.IamPolicyTemplateVersionPolicyRuleConditionArray{
    			&ibm.IamPolicyTemplateVersionPolicyRuleConditionArgs{
    				Operator: pulumi.String("string"),
    				Conditions: ibm.IamPolicyTemplateVersionPolicyRuleConditionConditionArray{
    					&ibm.IamPolicyTemplateVersionPolicyRuleConditionConditionArgs{
    						Key:      pulumi.String("string"),
    						Operator: pulumi.String("string"),
    						Values: pulumi.StringArray{
    							pulumi.String("string"),
    						},
    					},
    				},
    				Key: pulumi.String("string"),
    				Values: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    			},
    		},
    		RuleOperator: pulumi.String("string"),
    		Subjects: ibm.IamPolicyTemplateVersionPolicySubjectArray{
    			&ibm.IamPolicyTemplateVersionPolicySubjectArgs{
    				Attributes: ibm.IamPolicyTemplateVersionPolicySubjectAttributeArray{
    					&ibm.IamPolicyTemplateVersionPolicySubjectAttributeArgs{
    						Key:      pulumi.String("string"),
    						Operator: pulumi.String("string"),
    						Value:    pulumi.String("string"),
    					},
    				},
    			},
    		},
    	},
    	TemplateId:                 pulumi.String("string"),
    	Committed:                  pulumi.Bool(false),
    	Description:                pulumi.String("string"),
    	IamPolicyTemplateVersionId: pulumi.String("string"),
    	Name:                       pulumi.String("string"),
    })
    
    var iamPolicyTemplateVersionResource = new IamPolicyTemplateVersion("iamPolicyTemplateVersionResource", IamPolicyTemplateVersionArgs.builder()
        .policy(IamPolicyTemplateVersionPolicyArgs.builder()
            .type("string")
            .description("string")
            .pattern("string")
            .resource(IamPolicyTemplateVersionPolicyResourceArgs.builder()
                .attributes(IamPolicyTemplateVersionPolicyResourceAttributeArgs.builder()
                    .key("string")
                    .operator("string")
                    .value("string")
                    .build())
                .tags(IamPolicyTemplateVersionPolicyResourceTagArgs.builder()
                    .key("string")
                    .operator("string")
                    .value("string")
                    .build())
                .build())
            .roles("string")
            .ruleConditions(IamPolicyTemplateVersionPolicyRuleConditionArgs.builder()
                .operator("string")
                .conditions(IamPolicyTemplateVersionPolicyRuleConditionConditionArgs.builder()
                    .key("string")
                    .operator("string")
                    .values("string")
                    .build())
                .key("string")
                .values("string")
                .build())
            .ruleOperator("string")
            .subjects(IamPolicyTemplateVersionPolicySubjectArgs.builder()
                .attributes(IamPolicyTemplateVersionPolicySubjectAttributeArgs.builder()
                    .key("string")
                    .operator("string")
                    .value("string")
                    .build())
                .build())
            .build())
        .templateId("string")
        .committed(false)
        .description("string")
        .iamPolicyTemplateVersionId("string")
        .name("string")
        .build());
    
    iam_policy_template_version_resource = ibm.IamPolicyTemplateVersion("iamPolicyTemplateVersionResource",
        policy={
            "type": "string",
            "description": "string",
            "pattern": "string",
            "resource": {
                "attributes": [{
                    "key": "string",
                    "operator": "string",
                    "value": "string",
                }],
                "tags": [{
                    "key": "string",
                    "operator": "string",
                    "value": "string",
                }],
            },
            "roles": ["string"],
            "rule_conditions": [{
                "operator": "string",
                "conditions": [{
                    "key": "string",
                    "operator": "string",
                    "values": ["string"],
                }],
                "key": "string",
                "values": ["string"],
            }],
            "rule_operator": "string",
            "subjects": [{
                "attributes": [{
                    "key": "string",
                    "operator": "string",
                    "value": "string",
                }],
            }],
        },
        template_id="string",
        committed=False,
        description="string",
        iam_policy_template_version_id="string",
        name="string")
    
    const iamPolicyTemplateVersionResource = new ibm.IamPolicyTemplateVersion("iamPolicyTemplateVersionResource", {
        policy: {
            type: "string",
            description: "string",
            pattern: "string",
            resource: {
                attributes: [{
                    key: "string",
                    operator: "string",
                    value: "string",
                }],
                tags: [{
                    key: "string",
                    operator: "string",
                    value: "string",
                }],
            },
            roles: ["string"],
            ruleConditions: [{
                operator: "string",
                conditions: [{
                    key: "string",
                    operator: "string",
                    values: ["string"],
                }],
                key: "string",
                values: ["string"],
            }],
            ruleOperator: "string",
            subjects: [{
                attributes: [{
                    key: "string",
                    operator: "string",
                    value: "string",
                }],
            }],
        },
        templateId: "string",
        committed: false,
        description: "string",
        iamPolicyTemplateVersionId: "string",
        name: "string",
    });
    
    type: ibm:IamPolicyTemplateVersion
    properties:
        committed: false
        description: string
        iamPolicyTemplateVersionId: string
        name: string
        policy:
            description: string
            pattern: string
            resource:
                attributes:
                    - key: string
                      operator: string
                      value: string
                tags:
                    - key: string
                      operator: string
                      value: string
            roles:
                - string
            ruleConditions:
                - conditions:
                    - key: string
                      operator: string
                      values:
                        - string
                  key: string
                  operator: string
                  values:
                    - string
            ruleOperator: string
            subjects:
                - attributes:
                    - key: string
                      operator: string
                      value: string
            type: string
        templateId: string
    

    IamPolicyTemplateVersion 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 IamPolicyTemplateVersion resource accepts the following input properties:

    Policy IamPolicyTemplateVersionPolicy
    The core set of properties associated with the template's policy objet. Nested schema for policy:
    TemplateId string
    Template id for the policy template to create a new version.
    Committed bool
    Committed status of the template version.
    Description string
    Description of the policy template. This is shown to users in the enterprise account. Use this to describe the purpose or context of the policy for enterprise users managing IAM templates.
    IamPolicyTemplateVersionId string
    The unique identifier of the policy_template. The ID is composed of <template_id>/<template_version>.
    Name string
    field when creating a new template. Otherwise this field is optional. If the field is included it will change the name value for all existing versions of the template.
    Policy IamPolicyTemplateVersionPolicyArgs
    The core set of properties associated with the template's policy objet. Nested schema for policy:
    TemplateId string
    Template id for the policy template to create a new version.
    Committed bool
    Committed status of the template version.
    Description string
    Description of the policy template. This is shown to users in the enterprise account. Use this to describe the purpose or context of the policy for enterprise users managing IAM templates.
    IamPolicyTemplateVersionId string
    The unique identifier of the policy_template. The ID is composed of <template_id>/<template_version>.
    Name string
    field when creating a new template. Otherwise this field is optional. If the field is included it will change the name value for all existing versions of the template.
    policy IamPolicyTemplateVersionPolicy
    The core set of properties associated with the template's policy objet. Nested schema for policy:
    templateId String
    Template id for the policy template to create a new version.
    committed Boolean
    Committed status of the template version.
    description String
    Description of the policy template. This is shown to users in the enterprise account. Use this to describe the purpose or context of the policy for enterprise users managing IAM templates.
    iamPolicyTemplateVersionId String
    The unique identifier of the policy_template. The ID is composed of <template_id>/<template_version>.
    name String
    field when creating a new template. Otherwise this field is optional. If the field is included it will change the name value for all existing versions of the template.
    policy IamPolicyTemplateVersionPolicy
    The core set of properties associated with the template's policy objet. Nested schema for policy:
    templateId string
    Template id for the policy template to create a new version.
    committed boolean
    Committed status of the template version.
    description string
    Description of the policy template. This is shown to users in the enterprise account. Use this to describe the purpose or context of the policy for enterprise users managing IAM templates.
    iamPolicyTemplateVersionId string
    The unique identifier of the policy_template. The ID is composed of <template_id>/<template_version>.
    name string
    field when creating a new template. Otherwise this field is optional. If the field is included it will change the name value for all existing versions of the template.
    policy IamPolicyTemplateVersionPolicyArgs
    The core set of properties associated with the template's policy objet. Nested schema for policy:
    template_id str
    Template id for the policy template to create a new version.
    committed bool
    Committed status of the template version.
    description str
    Description of the policy template. This is shown to users in the enterprise account. Use this to describe the purpose or context of the policy for enterprise users managing IAM templates.
    iam_policy_template_version_id str
    The unique identifier of the policy_template. The ID is composed of <template_id>/<template_version>.
    name str
    field when creating a new template. Otherwise this field is optional. If the field is included it will change the name value for all existing versions of the template.
    policy Property Map
    The core set of properties associated with the template's policy objet. Nested schema for policy:
    templateId String
    Template id for the policy template to create a new version.
    committed Boolean
    Committed status of the template version.
    description String
    Description of the policy template. This is shown to users in the enterprise account. Use this to describe the purpose or context of the policy for enterprise users managing IAM templates.
    iamPolicyTemplateVersionId String
    The unique identifier of the policy_template. The ID is composed of <template_id>/<template_version>.
    name String
    field when creating a new template. Otherwise this field is optional. If the field is included it will change the name value for all existing versions of the template.

    Outputs

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

    AccountId string
    (String) Enterprise account ID where template will be created.
    Id string
    The provider-assigned unique ID for this managed resource.
    Version string
    (String) The policy template version.
    AccountId string
    (String) Enterprise account ID where template will be created.
    Id string
    The provider-assigned unique ID for this managed resource.
    Version string
    (String) The policy template version.
    accountId String
    (String) Enterprise account ID where template will be created.
    id String
    The provider-assigned unique ID for this managed resource.
    version String
    (String) The policy template version.
    accountId string
    (String) Enterprise account ID where template will be created.
    id string
    The provider-assigned unique ID for this managed resource.
    version string
    (String) The policy template version.
    account_id str
    (String) Enterprise account ID where template will be created.
    id str
    The provider-assigned unique ID for this managed resource.
    version str
    (String) The policy template version.
    accountId String
    (String) Enterprise account ID where template will be created.
    id String
    The provider-assigned unique ID for this managed resource.
    version String
    (String) The policy template version.

    Look up Existing IamPolicyTemplateVersion Resource

    Get an existing IamPolicyTemplateVersion 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?: IamPolicyTemplateVersionState, opts?: CustomResourceOptions): IamPolicyTemplateVersion
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            committed: Optional[bool] = None,
            description: Optional[str] = None,
            iam_policy_template_version_id: Optional[str] = None,
            name: Optional[str] = None,
            policy: Optional[IamPolicyTemplateVersionPolicyArgs] = None,
            template_id: Optional[str] = None,
            version: Optional[str] = None) -> IamPolicyTemplateVersion
    func GetIamPolicyTemplateVersion(ctx *Context, name string, id IDInput, state *IamPolicyTemplateVersionState, opts ...ResourceOption) (*IamPolicyTemplateVersion, error)
    public static IamPolicyTemplateVersion Get(string name, Input<string> id, IamPolicyTemplateVersionState? state, CustomResourceOptions? opts = null)
    public static IamPolicyTemplateVersion get(String name, Output<String> id, IamPolicyTemplateVersionState state, CustomResourceOptions options)
    resources:  _:    type: ibm:IamPolicyTemplateVersion    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:
    AccountId string
    (String) Enterprise account ID where template will be created.
    Committed bool
    Committed status of the template version.
    Description string
    Description of the policy template. This is shown to users in the enterprise account. Use this to describe the purpose or context of the policy for enterprise users managing IAM templates.
    IamPolicyTemplateVersionId string
    The unique identifier of the policy_template. The ID is composed of <template_id>/<template_version>.
    Name string
    field when creating a new template. Otherwise this field is optional. If the field is included it will change the name value for all existing versions of the template.
    Policy IamPolicyTemplateVersionPolicy
    The core set of properties associated with the template's policy objet. Nested schema for policy:
    TemplateId string
    Template id for the policy template to create a new version.
    Version string
    (String) The policy template version.
    AccountId string
    (String) Enterprise account ID where template will be created.
    Committed bool
    Committed status of the template version.
    Description string
    Description of the policy template. This is shown to users in the enterprise account. Use this to describe the purpose or context of the policy for enterprise users managing IAM templates.
    IamPolicyTemplateVersionId string
    The unique identifier of the policy_template. The ID is composed of <template_id>/<template_version>.
    Name string
    field when creating a new template. Otherwise this field is optional. If the field is included it will change the name value for all existing versions of the template.
    Policy IamPolicyTemplateVersionPolicyArgs
    The core set of properties associated with the template's policy objet. Nested schema for policy:
    TemplateId string
    Template id for the policy template to create a new version.
    Version string
    (String) The policy template version.
    accountId String
    (String) Enterprise account ID where template will be created.
    committed Boolean
    Committed status of the template version.
    description String
    Description of the policy template. This is shown to users in the enterprise account. Use this to describe the purpose or context of the policy for enterprise users managing IAM templates.
    iamPolicyTemplateVersionId String
    The unique identifier of the policy_template. The ID is composed of <template_id>/<template_version>.
    name String
    field when creating a new template. Otherwise this field is optional. If the field is included it will change the name value for all existing versions of the template.
    policy IamPolicyTemplateVersionPolicy
    The core set of properties associated with the template's policy objet. Nested schema for policy:
    templateId String
    Template id for the policy template to create a new version.
    version String
    (String) The policy template version.
    accountId string
    (String) Enterprise account ID where template will be created.
    committed boolean
    Committed status of the template version.
    description string
    Description of the policy template. This is shown to users in the enterprise account. Use this to describe the purpose or context of the policy for enterprise users managing IAM templates.
    iamPolicyTemplateVersionId string
    The unique identifier of the policy_template. The ID is composed of <template_id>/<template_version>.
    name string
    field when creating a new template. Otherwise this field is optional. If the field is included it will change the name value for all existing versions of the template.
    policy IamPolicyTemplateVersionPolicy
    The core set of properties associated with the template's policy objet. Nested schema for policy:
    templateId string
    Template id for the policy template to create a new version.
    version string
    (String) The policy template version.
    account_id str
    (String) Enterprise account ID where template will be created.
    committed bool
    Committed status of the template version.
    description str
    Description of the policy template. This is shown to users in the enterprise account. Use this to describe the purpose or context of the policy for enterprise users managing IAM templates.
    iam_policy_template_version_id str
    The unique identifier of the policy_template. The ID is composed of <template_id>/<template_version>.
    name str
    field when creating a new template. Otherwise this field is optional. If the field is included it will change the name value for all existing versions of the template.
    policy IamPolicyTemplateVersionPolicyArgs
    The core set of properties associated with the template's policy objet. Nested schema for policy:
    template_id str
    Template id for the policy template to create a new version.
    version str
    (String) The policy template version.
    accountId String
    (String) Enterprise account ID where template will be created.
    committed Boolean
    Committed status of the template version.
    description String
    Description of the policy template. This is shown to users in the enterprise account. Use this to describe the purpose or context of the policy for enterprise users managing IAM templates.
    iamPolicyTemplateVersionId String
    The unique identifier of the policy_template. The ID is composed of <template_id>/<template_version>.
    name String
    field when creating a new template. Otherwise this field is optional. If the field is included it will change the name value for all existing versions of the template.
    policy Property Map
    The core set of properties associated with the template's policy objet. Nested schema for policy:
    templateId String
    Template id for the policy template to create a new version.
    version String
    (String) The policy template version.

    Supporting Types

    IamPolicyTemplateVersionPolicy, IamPolicyTemplateVersionPolicyArgs

    Type string
    The policy type: 'access'.
    Description string
    Description of the policy. This is shown in child accounts when an access group or trusted profile template uses the policy template to assign access.
    Pattern string
    Indicates pattern of rule, either 'time-based-conditions:once', 'time-based-conditions:weekly:all-day', or 'time-based-conditions:weekly:custom-hours'.
    Resource IamPolicyTemplateVersionPolicyResource
    The resource attributes to which the policy grants access. Nested schema for resource:
    Roles List<string>
    Role names of the policy definition
    RuleConditions List<IamPolicyTemplateVersionPolicyRuleCondition>
    Rule conditions enforced by the policy
    RuleOperator string
    Operator that multiple rule conditions are evaluated over
    Subjects List<IamPolicyTemplateVersionPolicySubject>
    The subject attributes for authorization type templates
    Type string
    The policy type: 'access'.
    Description string
    Description of the policy. This is shown in child accounts when an access group or trusted profile template uses the policy template to assign access.
    Pattern string
    Indicates pattern of rule, either 'time-based-conditions:once', 'time-based-conditions:weekly:all-day', or 'time-based-conditions:weekly:custom-hours'.
    Resource IamPolicyTemplateVersionPolicyResource
    The resource attributes to which the policy grants access. Nested schema for resource:
    Roles []string
    Role names of the policy definition
    RuleConditions []IamPolicyTemplateVersionPolicyRuleCondition
    Rule conditions enforced by the policy
    RuleOperator string
    Operator that multiple rule conditions are evaluated over
    Subjects []IamPolicyTemplateVersionPolicySubject
    The subject attributes for authorization type templates
    type String
    The policy type: 'access'.
    description String
    Description of the policy. This is shown in child accounts when an access group or trusted profile template uses the policy template to assign access.
    pattern String
    Indicates pattern of rule, either 'time-based-conditions:once', 'time-based-conditions:weekly:all-day', or 'time-based-conditions:weekly:custom-hours'.
    resource IamPolicyTemplateVersionPolicyResource
    The resource attributes to which the policy grants access. Nested schema for resource:
    roles List<String>
    Role names of the policy definition
    ruleConditions List<IamPolicyTemplateVersionPolicyRuleCondition>
    Rule conditions enforced by the policy
    ruleOperator String
    Operator that multiple rule conditions are evaluated over
    subjects List<IamPolicyTemplateVersionPolicySubject>
    The subject attributes for authorization type templates
    type string
    The policy type: 'access'.
    description string
    Description of the policy. This is shown in child accounts when an access group or trusted profile template uses the policy template to assign access.
    pattern string
    Indicates pattern of rule, either 'time-based-conditions:once', 'time-based-conditions:weekly:all-day', or 'time-based-conditions:weekly:custom-hours'.
    resource IamPolicyTemplateVersionPolicyResource
    The resource attributes to which the policy grants access. Nested schema for resource:
    roles string[]
    Role names of the policy definition
    ruleConditions IamPolicyTemplateVersionPolicyRuleCondition[]
    Rule conditions enforced by the policy
    ruleOperator string
    Operator that multiple rule conditions are evaluated over
    subjects IamPolicyTemplateVersionPolicySubject[]
    The subject attributes for authorization type templates
    type str
    The policy type: 'access'.
    description str
    Description of the policy. This is shown in child accounts when an access group or trusted profile template uses the policy template to assign access.
    pattern str
    Indicates pattern of rule, either 'time-based-conditions:once', 'time-based-conditions:weekly:all-day', or 'time-based-conditions:weekly:custom-hours'.
    resource IamPolicyTemplateVersionPolicyResource
    The resource attributes to which the policy grants access. Nested schema for resource:
    roles Sequence[str]
    Role names of the policy definition
    rule_conditions Sequence[IamPolicyTemplateVersionPolicyRuleCondition]
    Rule conditions enforced by the policy
    rule_operator str
    Operator that multiple rule conditions are evaluated over
    subjects Sequence[IamPolicyTemplateVersionPolicySubject]
    The subject attributes for authorization type templates
    type String
    The policy type: 'access'.
    description String
    Description of the policy. This is shown in child accounts when an access group or trusted profile template uses the policy template to assign access.
    pattern String
    Indicates pattern of rule, either 'time-based-conditions:once', 'time-based-conditions:weekly:all-day', or 'time-based-conditions:weekly:custom-hours'.
    resource Property Map
    The resource attributes to which the policy grants access. Nested schema for resource:
    roles List<String>
    Role names of the policy definition
    ruleConditions List<Property Map>
    Rule conditions enforced by the policy
    ruleOperator String
    Operator that multiple rule conditions are evaluated over
    subjects List<Property Map>
    The subject attributes for authorization type templates

    IamPolicyTemplateVersionPolicyResource, IamPolicyTemplateVersionPolicyResourceArgs

    Attributes List<IamPolicyTemplateVersionPolicyResourceAttribute>
    List of resource attributes to which the policy grants access. Nested schema for attributes:
    Tags List<IamPolicyTemplateVersionPolicyResourceTag>
    Optional list of resource tags to which the policy grants access. Nested schema for tags:
    Attributes []IamPolicyTemplateVersionPolicyResourceAttribute
    List of resource attributes to which the policy grants access. Nested schema for attributes:
    Tags []IamPolicyTemplateVersionPolicyResourceTag
    Optional list of resource tags to which the policy grants access. Nested schema for tags:
    attributes List<IamPolicyTemplateVersionPolicyResourceAttribute>
    List of resource attributes to which the policy grants access. Nested schema for attributes:
    tags List<IamPolicyTemplateVersionPolicyResourceTag>
    Optional list of resource tags to which the policy grants access. Nested schema for tags:
    attributes IamPolicyTemplateVersionPolicyResourceAttribute[]
    List of resource attributes to which the policy grants access. Nested schema for attributes:
    tags IamPolicyTemplateVersionPolicyResourceTag[]
    Optional list of resource tags to which the policy grants access. Nested schema for tags:
    attributes Sequence[IamPolicyTemplateVersionPolicyResourceAttribute]
    List of resource attributes to which the policy grants access. Nested schema for attributes:
    tags Sequence[IamPolicyTemplateVersionPolicyResourceTag]
    Optional list of resource tags to which the policy grants access. Nested schema for tags:
    attributes List<Property Map>
    List of resource attributes to which the policy grants access. Nested schema for attributes:
    tags List<Property Map>
    Optional list of resource tags to which the policy grants access. Nested schema for tags:

    IamPolicyTemplateVersionPolicyResourceAttribute, IamPolicyTemplateVersionPolicyResourceAttributeArgs

    Key string
    The name of a resource attribute.
    Operator string
    The operator of an attribute.
    Value string
    The value of a rule or resource attribute; can be boolean or string for resource attribute. Can be string or an array of strings (e.g., array of days to permit access) for rule attribute.
    Key string
    The name of a resource attribute.
    Operator string
    The operator of an attribute.
    Value string
    The value of a rule or resource attribute; can be boolean or string for resource attribute. Can be string or an array of strings (e.g., array of days to permit access) for rule attribute.
    key String
    The name of a resource attribute.
    operator String
    The operator of an attribute.
    value String
    The value of a rule or resource attribute; can be boolean or string for resource attribute. Can be string or an array of strings (e.g., array of days to permit access) for rule attribute.
    key string
    The name of a resource attribute.
    operator string
    The operator of an attribute.
    value string
    The value of a rule or resource attribute; can be boolean or string for resource attribute. Can be string or an array of strings (e.g., array of days to permit access) for rule attribute.
    key str
    The name of a resource attribute.
    operator str
    The operator of an attribute.
    value str
    The value of a rule or resource attribute; can be boolean or string for resource attribute. Can be string or an array of strings (e.g., array of days to permit access) for rule attribute.
    key String
    The name of a resource attribute.
    operator String
    The operator of an attribute.
    value String
    The value of a rule or resource attribute; can be boolean or string for resource attribute. Can be string or an array of strings (e.g., array of days to permit access) for rule attribute.

    IamPolicyTemplateVersionPolicyResourceTag, IamPolicyTemplateVersionPolicyResourceTagArgs

    Key string
    The name of an access management tag.
    Operator string
    The operator of an access management tag.
    Value string
    The value of an access management tag.
    Key string
    The name of an access management tag.
    Operator string
    The operator of an access management tag.
    Value string
    The value of an access management tag.
    key String
    The name of an access management tag.
    operator String
    The operator of an access management tag.
    value String
    The value of an access management tag.
    key string
    The name of an access management tag.
    operator string
    The operator of an access management tag.
    value string
    The value of an access management tag.
    key str
    The name of an access management tag.
    operator str
    The operator of an access management tag.
    value str
    The value of an access management tag.
    key String
    The name of an access management tag.
    operator String
    The operator of an access management tag.
    value String
    The value of an access management tag.

    IamPolicyTemplateVersionPolicyRuleCondition, IamPolicyTemplateVersionPolicyRuleConditionArgs

    Operator string
    Operator of the condition
    Conditions List<IamPolicyTemplateVersionPolicyRuleConditionCondition>
    Additional Rule conditions enforced by the policy
    Key string
    Key of the condition
    Values List<string>
    Value of the condition
    Operator string
    Operator of the condition
    Conditions []IamPolicyTemplateVersionPolicyRuleConditionCondition
    Additional Rule conditions enforced by the policy
    Key string
    Key of the condition
    Values []string
    Value of the condition
    operator String
    Operator of the condition
    conditions List<IamPolicyTemplateVersionPolicyRuleConditionCondition>
    Additional Rule conditions enforced by the policy
    key String
    Key of the condition
    values List<String>
    Value of the condition
    operator string
    Operator of the condition
    conditions IamPolicyTemplateVersionPolicyRuleConditionCondition[]
    Additional Rule conditions enforced by the policy
    key string
    Key of the condition
    values string[]
    Value of the condition
    operator str
    Operator of the condition
    conditions Sequence[IamPolicyTemplateVersionPolicyRuleConditionCondition]
    Additional Rule conditions enforced by the policy
    key str
    Key of the condition
    values Sequence[str]
    Value of the condition
    operator String
    Operator of the condition
    conditions List<Property Map>
    Additional Rule conditions enforced by the policy
    key String
    Key of the condition
    values List<String>
    Value of the condition

    IamPolicyTemplateVersionPolicyRuleConditionCondition, IamPolicyTemplateVersionPolicyRuleConditionConditionArgs

    Key string
    Key of the condition
    Operator string
    Operator of the condition
    Values List<string>
    Value of the condition
    Key string
    Key of the condition
    Operator string
    Operator of the condition
    Values []string
    Value of the condition
    key String
    Key of the condition
    operator String
    Operator of the condition
    values List<String>
    Value of the condition
    key string
    Key of the condition
    operator string
    Operator of the condition
    values string[]
    Value of the condition
    key str
    Key of the condition
    operator str
    Operator of the condition
    values Sequence[str]
    Value of the condition
    key String
    Key of the condition
    operator String
    Operator of the condition
    values List<String>
    Value of the condition

    IamPolicyTemplateVersionPolicySubject, IamPolicyTemplateVersionPolicySubjectArgs

    Attributes List<IamPolicyTemplateVersionPolicySubjectAttribute>
    List of resource attributes to which the policy grants access.
    Attributes []IamPolicyTemplateVersionPolicySubjectAttribute
    List of resource attributes to which the policy grants access.
    attributes List<IamPolicyTemplateVersionPolicySubjectAttribute>
    List of resource attributes to which the policy grants access.
    attributes IamPolicyTemplateVersionPolicySubjectAttribute[]
    List of resource attributes to which the policy grants access.
    attributes Sequence[IamPolicyTemplateVersionPolicySubjectAttribute]
    List of resource attributes to which the policy grants access.
    attributes List<Property Map>
    List of resource attributes to which the policy grants access.

    IamPolicyTemplateVersionPolicySubjectAttribute, IamPolicyTemplateVersionPolicySubjectAttributeArgs

    Key string
    The name of a resource attribute.
    Operator string
    The operator of an attribute.
    Value string
    The value of a rule or resource attribute; can be boolean or string for resource attribute. Can be string or an array of strings (e.g., array of days to permit access) for rule attribute.
    Key string
    The name of a resource attribute.
    Operator string
    The operator of an attribute.
    Value string
    The value of a rule or resource attribute; can be boolean or string for resource attribute. Can be string or an array of strings (e.g., array of days to permit access) for rule attribute.
    key String
    The name of a resource attribute.
    operator String
    The operator of an attribute.
    value String
    The value of a rule or resource attribute; can be boolean or string for resource attribute. Can be string or an array of strings (e.g., array of days to permit access) for rule attribute.
    key string
    The name of a resource attribute.
    operator string
    The operator of an attribute.
    value string
    The value of a rule or resource attribute; can be boolean or string for resource attribute. Can be string or an array of strings (e.g., array of days to permit access) for rule attribute.
    key str
    The name of a resource attribute.
    operator str
    The operator of an attribute.
    value str
    The value of a rule or resource attribute; can be boolean or string for resource attribute. Can be string or an array of strings (e.g., array of days to permit access) for rule attribute.
    key String
    The name of a resource attribute.
    operator String
    The operator of an attribute.
    value String
    The value of a rule or resource attribute; can be boolean or string for resource attribute. Can be string or an array of strings (e.g., array of days to permit access) for rule attribute.

    Import

    Syntax

    bash

    $ pulumi import ibm:index/iamPolicyTemplateVersion:IamPolicyTemplateVersion policy_template $template_id/$version
    

    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.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud