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

ibm.CbrRule

Explore with Pulumi AI

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

    Create, update, and delete cbr_rules with this resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const cbrRuleInstance = new ibm.CbrRule("cbrRuleInstance", {
        contexts: [{
            attributes: [
                {
                    name: "networkZoneId",
                    value: "559052eb8f43302824e7ae490c0281eb, bf823d4f45b64ceaa4671bee0479346e",
                },
                {
                    name: "mfa",
                    value: "LEVEL1",
                },
                {
                    name: "endpointType",
                    value: "private",
                },
            ],
        }],
        description: "this is an example of rule with one context two zones",
        enforcementMode: "enabled",
        operations: {
            apiTypes: [{
                apiTypeId: "api_type_id",
            }],
        },
        resources: [{
            attributes: [
                {
                    name: "accountId",
                    value: "12ab34cd56ef78ab90cd12ef34ab56cd",
                },
                {
                    name: "serviceName",
                    value: "network-policy-enabled",
                },
            ],
            tags: [{
                name: "tag_name",
                value: "tag_value",
            }],
        }],
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    cbr_rule_instance = ibm.CbrRule("cbrRuleInstance",
        contexts=[{
            "attributes": [
                {
                    "name": "networkZoneId",
                    "value": "559052eb8f43302824e7ae490c0281eb, bf823d4f45b64ceaa4671bee0479346e",
                },
                {
                    "name": "mfa",
                    "value": "LEVEL1",
                },
                {
                    "name": "endpointType",
                    "value": "private",
                },
            ],
        }],
        description="this is an example of rule with one context two zones",
        enforcement_mode="enabled",
        operations={
            "api_types": [{
                "api_type_id": "api_type_id",
            }],
        },
        resources=[{
            "attributes": [
                {
                    "name": "accountId",
                    "value": "12ab34cd56ef78ab90cd12ef34ab56cd",
                },
                {
                    "name": "serviceName",
                    "value": "network-policy-enabled",
                },
            ],
            "tags": [{
                "name": "tag_name",
                "value": "tag_value",
            }],
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.NewCbrRule(ctx, "cbrRuleInstance", &ibm.CbrRuleArgs{
    			Contexts: ibm.CbrRuleContextArray{
    				&ibm.CbrRuleContextArgs{
    					Attributes: ibm.CbrRuleContextAttributeArray{
    						&ibm.CbrRuleContextAttributeArgs{
    							Name:  pulumi.String("networkZoneId"),
    							Value: pulumi.String("559052eb8f43302824e7ae490c0281eb, bf823d4f45b64ceaa4671bee0479346e"),
    						},
    						&ibm.CbrRuleContextAttributeArgs{
    							Name:  pulumi.String("mfa"),
    							Value: pulumi.String("LEVEL1"),
    						},
    						&ibm.CbrRuleContextAttributeArgs{
    							Name:  pulumi.String("endpointType"),
    							Value: pulumi.String("private"),
    						},
    					},
    				},
    			},
    			Description:     pulumi.String("this is an example of rule with one context two zones"),
    			EnforcementMode: pulumi.String("enabled"),
    			Operations: &ibm.CbrRuleOperationsArgs{
    				ApiTypes: ibm.CbrRuleOperationsApiTypeArray{
    					&ibm.CbrRuleOperationsApiTypeArgs{
    						ApiTypeId: pulumi.String("api_type_id"),
    					},
    				},
    			},
    			Resources: ibm.CbrRuleResourceArray{
    				&ibm.CbrRuleResourceArgs{
    					Attributes: ibm.CbrRuleResourceAttributeArray{
    						&ibm.CbrRuleResourceAttributeArgs{
    							Name:  pulumi.String("accountId"),
    							Value: pulumi.String("12ab34cd56ef78ab90cd12ef34ab56cd"),
    						},
    						&ibm.CbrRuleResourceAttributeArgs{
    							Name:  pulumi.String("serviceName"),
    							Value: pulumi.String("network-policy-enabled"),
    						},
    					},
    					Tags: ibm.CbrRuleResourceTagArray{
    						&ibm.CbrRuleResourceTagArgs{
    							Name:  pulumi.String("tag_name"),
    							Value: pulumi.String("tag_value"),
    						},
    					},
    				},
    			},
    		})
    		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 cbrRuleInstance = new Ibm.CbrRule("cbrRuleInstance", new()
        {
            Contexts = new[]
            {
                new Ibm.Inputs.CbrRuleContextArgs
                {
                    Attributes = new[]
                    {
                        new Ibm.Inputs.CbrRuleContextAttributeArgs
                        {
                            Name = "networkZoneId",
                            Value = "559052eb8f43302824e7ae490c0281eb, bf823d4f45b64ceaa4671bee0479346e",
                        },
                        new Ibm.Inputs.CbrRuleContextAttributeArgs
                        {
                            Name = "mfa",
                            Value = "LEVEL1",
                        },
                        new Ibm.Inputs.CbrRuleContextAttributeArgs
                        {
                            Name = "endpointType",
                            Value = "private",
                        },
                    },
                },
            },
            Description = "this is an example of rule with one context two zones",
            EnforcementMode = "enabled",
            Operations = new Ibm.Inputs.CbrRuleOperationsArgs
            {
                ApiTypes = new[]
                {
                    new Ibm.Inputs.CbrRuleOperationsApiTypeArgs
                    {
                        ApiTypeId = "api_type_id",
                    },
                },
            },
            Resources = new[]
            {
                new Ibm.Inputs.CbrRuleResourceArgs
                {
                    Attributes = new[]
                    {
                        new Ibm.Inputs.CbrRuleResourceAttributeArgs
                        {
                            Name = "accountId",
                            Value = "12ab34cd56ef78ab90cd12ef34ab56cd",
                        },
                        new Ibm.Inputs.CbrRuleResourceAttributeArgs
                        {
                            Name = "serviceName",
                            Value = "network-policy-enabled",
                        },
                    },
                    Tags = new[]
                    {
                        new Ibm.Inputs.CbrRuleResourceTagArgs
                        {
                            Name = "tag_name",
                            Value = "tag_value",
                        },
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.CbrRule;
    import com.pulumi.ibm.CbrRuleArgs;
    import com.pulumi.ibm.inputs.CbrRuleContextArgs;
    import com.pulumi.ibm.inputs.CbrRuleOperationsArgs;
    import com.pulumi.ibm.inputs.CbrRuleResourceArgs;
    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 cbrRuleInstance = new CbrRule("cbrRuleInstance", CbrRuleArgs.builder()
                .contexts(CbrRuleContextArgs.builder()
                    .attributes(                
                        CbrRuleContextAttributeArgs.builder()
                            .name("networkZoneId")
                            .value("559052eb8f43302824e7ae490c0281eb, bf823d4f45b64ceaa4671bee0479346e")
                            .build(),
                        CbrRuleContextAttributeArgs.builder()
                            .name("mfa")
                            .value("LEVEL1")
                            .build(),
                        CbrRuleContextAttributeArgs.builder()
                            .name("endpointType")
                            .value("private")
                            .build())
                    .build())
                .description("this is an example of rule with one context two zones")
                .enforcementMode("enabled")
                .operations(CbrRuleOperationsArgs.builder()
                    .apiTypes(CbrRuleOperationsApiTypeArgs.builder()
                        .apiTypeId("api_type_id")
                        .build())
                    .build())
                .resources(CbrRuleResourceArgs.builder()
                    .attributes(                
                        CbrRuleResourceAttributeArgs.builder()
                            .name("accountId")
                            .value("12ab34cd56ef78ab90cd12ef34ab56cd")
                            .build(),
                        CbrRuleResourceAttributeArgs.builder()
                            .name("serviceName")
                            .value("network-policy-enabled")
                            .build())
                    .tags(CbrRuleResourceTagArgs.builder()
                        .name("tag_name")
                        .value("tag_value")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      cbrRuleInstance:
        type: ibm:CbrRule
        properties:
          contexts:
            - attributes:
                - name: networkZoneId
                  value: 559052eb8f43302824e7ae490c0281eb, bf823d4f45b64ceaa4671bee0479346e
                - name: mfa
                  value: LEVEL1
                - name: endpointType
                  value: private
          description: this is an example of rule with one context two zones
          enforcementMode: enabled
          operations:
            apiTypes:
              - apiTypeId: api_type_id
          resources:
            - attributes:
                - name: accountId
                  value: 12ab34cd56ef78ab90cd12ef34ab56cd
                - name: serviceName
                  value: network-policy-enabled
              tags:
                - name: tag_name
                  value: tag_value
    

    To Create A Rule With Two Contexts

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const cbrRuleInstance = new ibm.CbrRule("cbrRuleInstance", {
        contexts: [
            {
                attributes: [
                    {
                        name: "networkZoneId",
                        value: "559052eb8f43302824e7ae490c0281eb",
                    },
                    {
                        name: "endpointType",
                        value: "private",
                    },
                ],
            },
            {
                attributes: [
                    {
                        name: "networkZoneId",
                        value: "bf823d4f45b64ceaa4671bee0479346e",
                    },
                    {
                        name: "endpointType",
                        value: "public",
                    },
                ],
            },
        ],
        description: "this is an example of rule with two contexts",
        enforcementMode: "enabled",
        operations: {
            apiTypes: [{
                apiTypeId: "api_type_id",
            }],
        },
        resources: [{
            attributes: [
                {
                    name: "accountId",
                    value: "12ab34cd56ef78ab90cd12ef34ab56cd",
                },
                {
                    name: "serviceName",
                    value: "network-policy-enabled",
                },
            ],
            tags: [{
                name: "tag_name",
                value: "tag_value",
            }],
        }],
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    cbr_rule_instance = ibm.CbrRule("cbrRuleInstance",
        contexts=[
            {
                "attributes": [
                    {
                        "name": "networkZoneId",
                        "value": "559052eb8f43302824e7ae490c0281eb",
                    },
                    {
                        "name": "endpointType",
                        "value": "private",
                    },
                ],
            },
            {
                "attributes": [
                    {
                        "name": "networkZoneId",
                        "value": "bf823d4f45b64ceaa4671bee0479346e",
                    },
                    {
                        "name": "endpointType",
                        "value": "public",
                    },
                ],
            },
        ],
        description="this is an example of rule with two contexts",
        enforcement_mode="enabled",
        operations={
            "api_types": [{
                "api_type_id": "api_type_id",
            }],
        },
        resources=[{
            "attributes": [
                {
                    "name": "accountId",
                    "value": "12ab34cd56ef78ab90cd12ef34ab56cd",
                },
                {
                    "name": "serviceName",
                    "value": "network-policy-enabled",
                },
            ],
            "tags": [{
                "name": "tag_name",
                "value": "tag_value",
            }],
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.NewCbrRule(ctx, "cbrRuleInstance", &ibm.CbrRuleArgs{
    			Contexts: ibm.CbrRuleContextArray{
    				&ibm.CbrRuleContextArgs{
    					Attributes: ibm.CbrRuleContextAttributeArray{
    						&ibm.CbrRuleContextAttributeArgs{
    							Name:  pulumi.String("networkZoneId"),
    							Value: pulumi.String("559052eb8f43302824e7ae490c0281eb"),
    						},
    						&ibm.CbrRuleContextAttributeArgs{
    							Name:  pulumi.String("endpointType"),
    							Value: pulumi.String("private"),
    						},
    					},
    				},
    				&ibm.CbrRuleContextArgs{
    					Attributes: ibm.CbrRuleContextAttributeArray{
    						&ibm.CbrRuleContextAttributeArgs{
    							Name:  pulumi.String("networkZoneId"),
    							Value: pulumi.String("bf823d4f45b64ceaa4671bee0479346e"),
    						},
    						&ibm.CbrRuleContextAttributeArgs{
    							Name:  pulumi.String("endpointType"),
    							Value: pulumi.String("public"),
    						},
    					},
    				},
    			},
    			Description:     pulumi.String("this is an example of rule with two contexts"),
    			EnforcementMode: pulumi.String("enabled"),
    			Operations: &ibm.CbrRuleOperationsArgs{
    				ApiTypes: ibm.CbrRuleOperationsApiTypeArray{
    					&ibm.CbrRuleOperationsApiTypeArgs{
    						ApiTypeId: pulumi.String("api_type_id"),
    					},
    				},
    			},
    			Resources: ibm.CbrRuleResourceArray{
    				&ibm.CbrRuleResourceArgs{
    					Attributes: ibm.CbrRuleResourceAttributeArray{
    						&ibm.CbrRuleResourceAttributeArgs{
    							Name:  pulumi.String("accountId"),
    							Value: pulumi.String("12ab34cd56ef78ab90cd12ef34ab56cd"),
    						},
    						&ibm.CbrRuleResourceAttributeArgs{
    							Name:  pulumi.String("serviceName"),
    							Value: pulumi.String("network-policy-enabled"),
    						},
    					},
    					Tags: ibm.CbrRuleResourceTagArray{
    						&ibm.CbrRuleResourceTagArgs{
    							Name:  pulumi.String("tag_name"),
    							Value: pulumi.String("tag_value"),
    						},
    					},
    				},
    			},
    		})
    		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 cbrRuleInstance = new Ibm.CbrRule("cbrRuleInstance", new()
        {
            Contexts = new[]
            {
                new Ibm.Inputs.CbrRuleContextArgs
                {
                    Attributes = new[]
                    {
                        new Ibm.Inputs.CbrRuleContextAttributeArgs
                        {
                            Name = "networkZoneId",
                            Value = "559052eb8f43302824e7ae490c0281eb",
                        },
                        new Ibm.Inputs.CbrRuleContextAttributeArgs
                        {
                            Name = "endpointType",
                            Value = "private",
                        },
                    },
                },
                new Ibm.Inputs.CbrRuleContextArgs
                {
                    Attributes = new[]
                    {
                        new Ibm.Inputs.CbrRuleContextAttributeArgs
                        {
                            Name = "networkZoneId",
                            Value = "bf823d4f45b64ceaa4671bee0479346e",
                        },
                        new Ibm.Inputs.CbrRuleContextAttributeArgs
                        {
                            Name = "endpointType",
                            Value = "public",
                        },
                    },
                },
            },
            Description = "this is an example of rule with two contexts",
            EnforcementMode = "enabled",
            Operations = new Ibm.Inputs.CbrRuleOperationsArgs
            {
                ApiTypes = new[]
                {
                    new Ibm.Inputs.CbrRuleOperationsApiTypeArgs
                    {
                        ApiTypeId = "api_type_id",
                    },
                },
            },
            Resources = new[]
            {
                new Ibm.Inputs.CbrRuleResourceArgs
                {
                    Attributes = new[]
                    {
                        new Ibm.Inputs.CbrRuleResourceAttributeArgs
                        {
                            Name = "accountId",
                            Value = "12ab34cd56ef78ab90cd12ef34ab56cd",
                        },
                        new Ibm.Inputs.CbrRuleResourceAttributeArgs
                        {
                            Name = "serviceName",
                            Value = "network-policy-enabled",
                        },
                    },
                    Tags = new[]
                    {
                        new Ibm.Inputs.CbrRuleResourceTagArgs
                        {
                            Name = "tag_name",
                            Value = "tag_value",
                        },
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.CbrRule;
    import com.pulumi.ibm.CbrRuleArgs;
    import com.pulumi.ibm.inputs.CbrRuleContextArgs;
    import com.pulumi.ibm.inputs.CbrRuleOperationsArgs;
    import com.pulumi.ibm.inputs.CbrRuleResourceArgs;
    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 cbrRuleInstance = new CbrRule("cbrRuleInstance", CbrRuleArgs.builder()
                .contexts(            
                    CbrRuleContextArgs.builder()
                        .attributes(                    
                            CbrRuleContextAttributeArgs.builder()
                                .name("networkZoneId")
                                .value("559052eb8f43302824e7ae490c0281eb")
                                .build(),
                            CbrRuleContextAttributeArgs.builder()
                                .name("endpointType")
                                .value("private")
                                .build())
                        .build(),
                    CbrRuleContextArgs.builder()
                        .attributes(                    
                            CbrRuleContextAttributeArgs.builder()
                                .name("networkZoneId")
                                .value("bf823d4f45b64ceaa4671bee0479346e")
                                .build(),
                            CbrRuleContextAttributeArgs.builder()
                                .name("endpointType")
                                .value("public")
                                .build())
                        .build())
                .description("this is an example of rule with two contexts")
                .enforcementMode("enabled")
                .operations(CbrRuleOperationsArgs.builder()
                    .apiTypes(CbrRuleOperationsApiTypeArgs.builder()
                        .apiTypeId("api_type_id")
                        .build())
                    .build())
                .resources(CbrRuleResourceArgs.builder()
                    .attributes(                
                        CbrRuleResourceAttributeArgs.builder()
                            .name("accountId")
                            .value("12ab34cd56ef78ab90cd12ef34ab56cd")
                            .build(),
                        CbrRuleResourceAttributeArgs.builder()
                            .name("serviceName")
                            .value("network-policy-enabled")
                            .build())
                    .tags(CbrRuleResourceTagArgs.builder()
                        .name("tag_name")
                        .value("tag_value")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      cbrRuleInstance:
        type: ibm:CbrRule
        properties:
          contexts:
            - attributes:
                - name: networkZoneId
                  value: 559052eb8f43302824e7ae490c0281eb
                - name: endpointType
                  value: private
            - attributes:
                - name: networkZoneId
                  value: bf823d4f45b64ceaa4671bee0479346e
                - name: endpointType
                  value: public
          description: this is an example of rule with two contexts
          enforcementMode: enabled
          operations:
            apiTypes:
              - apiTypeId: api_type_id
          resources:
            - attributes:
                - name: accountId
                  value: 12ab34cd56ef78ab90cd12ef34ab56cd
                - name: serviceName
                  value: network-policy-enabled
              tags:
                - name: tag_name
                  value: tag_value
    

    Create CbrRule Resource

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

    Constructor syntax

    new CbrRule(name: string, args: CbrRuleArgs, opts?: CustomResourceOptions);
    @overload
    def CbrRule(resource_name: str,
                args: CbrRuleArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def CbrRule(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                resources: Optional[Sequence[CbrRuleResourceArgs]] = None,
                cbr_rule_id: Optional[str] = None,
                contexts: Optional[Sequence[CbrRuleContextArgs]] = None,
                description: Optional[str] = None,
                enforcement_mode: Optional[str] = None,
                operations: Optional[CbrRuleOperationsArgs] = None,
                timeouts: Optional[CbrRuleTimeoutsArgs] = None,
                transaction_id: Optional[str] = None,
                x_correlation_id: Optional[str] = None)
    func NewCbrRule(ctx *Context, name string, args CbrRuleArgs, opts ...ResourceOption) (*CbrRule, error)
    public CbrRule(string name, CbrRuleArgs args, CustomResourceOptions? opts = null)
    public CbrRule(String name, CbrRuleArgs args)
    public CbrRule(String name, CbrRuleArgs args, CustomResourceOptions options)
    
    type: ibm:CbrRule
    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 CbrRuleArgs
    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 CbrRuleArgs
    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 CbrRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CbrRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CbrRuleArgs
    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 cbrRuleResource = new Ibm.CbrRule("cbrRuleResource", new()
    {
        Resources = new[]
        {
            new Ibm.Inputs.CbrRuleResourceArgs
            {
                Attributes = new[]
                {
                    new Ibm.Inputs.CbrRuleResourceAttributeArgs
                    {
                        Name = "string",
                        Value = "string",
                        Operator = "string",
                    },
                },
                Tags = new[]
                {
                    new Ibm.Inputs.CbrRuleResourceTagArgs
                    {
                        Name = "string",
                        Value = "string",
                        Operator = "string",
                    },
                },
            },
        },
        CbrRuleId = "string",
        Contexts = new[]
        {
            new Ibm.Inputs.CbrRuleContextArgs
            {
                Attributes = new[]
                {
                    new Ibm.Inputs.CbrRuleContextAttributeArgs
                    {
                        Name = "string",
                        Value = "string",
                    },
                },
            },
        },
        Description = "string",
        EnforcementMode = "string",
        Operations = new Ibm.Inputs.CbrRuleOperationsArgs
        {
            ApiTypes = new[]
            {
                new Ibm.Inputs.CbrRuleOperationsApiTypeArgs
                {
                    ApiTypeId = "string",
                    Description = "string",
                    DisplayName = "string",
                },
            },
        },
        Timeouts = new Ibm.Inputs.CbrRuleTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Update = "string",
        },
        XCorrelationId = "string",
    });
    
    example, err := ibm.NewCbrRule(ctx, "cbrRuleResource", &ibm.CbrRuleArgs{
    	Resources: ibm.CbrRuleResourceArray{
    		&ibm.CbrRuleResourceArgs{
    			Attributes: ibm.CbrRuleResourceAttributeArray{
    				&ibm.CbrRuleResourceAttributeArgs{
    					Name:     pulumi.String("string"),
    					Value:    pulumi.String("string"),
    					Operator: pulumi.String("string"),
    				},
    			},
    			Tags: ibm.CbrRuleResourceTagArray{
    				&ibm.CbrRuleResourceTagArgs{
    					Name:     pulumi.String("string"),
    					Value:    pulumi.String("string"),
    					Operator: pulumi.String("string"),
    				},
    			},
    		},
    	},
    	CbrRuleId: pulumi.String("string"),
    	Contexts: ibm.CbrRuleContextArray{
    		&ibm.CbrRuleContextArgs{
    			Attributes: ibm.CbrRuleContextAttributeArray{
    				&ibm.CbrRuleContextAttributeArgs{
    					Name:  pulumi.String("string"),
    					Value: pulumi.String("string"),
    				},
    			},
    		},
    	},
    	Description:     pulumi.String("string"),
    	EnforcementMode: pulumi.String("string"),
    	Operations: &ibm.CbrRuleOperationsArgs{
    		ApiTypes: ibm.CbrRuleOperationsApiTypeArray{
    			&ibm.CbrRuleOperationsApiTypeArgs{
    				ApiTypeId:   pulumi.String("string"),
    				Description: pulumi.String("string"),
    				DisplayName: pulumi.String("string"),
    			},
    		},
    	},
    	Timeouts: &ibm.CbrRuleTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    	XCorrelationId: pulumi.String("string"),
    })
    
    var cbrRuleResource = new CbrRule("cbrRuleResource", CbrRuleArgs.builder()
        .resources(CbrRuleResourceArgs.builder()
            .attributes(CbrRuleResourceAttributeArgs.builder()
                .name("string")
                .value("string")
                .operator("string")
                .build())
            .tags(CbrRuleResourceTagArgs.builder()
                .name("string")
                .value("string")
                .operator("string")
                .build())
            .build())
        .cbrRuleId("string")
        .contexts(CbrRuleContextArgs.builder()
            .attributes(CbrRuleContextAttributeArgs.builder()
                .name("string")
                .value("string")
                .build())
            .build())
        .description("string")
        .enforcementMode("string")
        .operations(CbrRuleOperationsArgs.builder()
            .apiTypes(CbrRuleOperationsApiTypeArgs.builder()
                .apiTypeId("string")
                .description("string")
                .displayName("string")
                .build())
            .build())
        .timeouts(CbrRuleTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .update("string")
            .build())
        .xCorrelationId("string")
        .build());
    
    cbr_rule_resource = ibm.CbrRule("cbrRuleResource",
        resources=[{
            "attributes": [{
                "name": "string",
                "value": "string",
                "operator": "string",
            }],
            "tags": [{
                "name": "string",
                "value": "string",
                "operator": "string",
            }],
        }],
        cbr_rule_id="string",
        contexts=[{
            "attributes": [{
                "name": "string",
                "value": "string",
            }],
        }],
        description="string",
        enforcement_mode="string",
        operations={
            "api_types": [{
                "api_type_id": "string",
                "description": "string",
                "display_name": "string",
            }],
        },
        timeouts={
            "create": "string",
            "delete": "string",
            "update": "string",
        },
        x_correlation_id="string")
    
    const cbrRuleResource = new ibm.CbrRule("cbrRuleResource", {
        resources: [{
            attributes: [{
                name: "string",
                value: "string",
                operator: "string",
            }],
            tags: [{
                name: "string",
                value: "string",
                operator: "string",
            }],
        }],
        cbrRuleId: "string",
        contexts: [{
            attributes: [{
                name: "string",
                value: "string",
            }],
        }],
        description: "string",
        enforcementMode: "string",
        operations: {
            apiTypes: [{
                apiTypeId: "string",
                description: "string",
                displayName: "string",
            }],
        },
        timeouts: {
            create: "string",
            "delete": "string",
            update: "string",
        },
        xCorrelationId: "string",
    });
    
    type: ibm:CbrRule
    properties:
        cbrRuleId: string
        contexts:
            - attributes:
                - name: string
                  value: string
        description: string
        enforcementMode: string
        operations:
            apiTypes:
                - apiTypeId: string
                  description: string
                  displayName: string
        resources:
            - attributes:
                - name: string
                  operator: string
                  value: string
              tags:
                - name: string
                  operator: string
                  value: string
        timeouts:
            create: string
            delete: string
            update: string
        xCorrelationId: string
    

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

    Resources List<CbrRuleResource>
    The resources this rule apply to.

    • Constraints: The maximum length is 1 item. The minimum length is 1 item. Nested schema for resources:
    CbrRuleId string
    The unique identifier of the cbr_rule.
    Contexts List<CbrRuleContext>
    The contexts this rule applies to.

    • Constraints: The maximum length is 1000 items. The minimum length is 0 items. Nested schema for contexts:
    Description string
    The description of the rule.

    • Constraints: The maximum length is 300 characters. The minimum length is 0 characters. The value must match regular expression /^[\x20-\xFE]*$/.
    EnforcementMode string
    The rule enforcement mode: * enabled - The restrictions are enforced and reported. This is the default. * disabled - The restrictions are disabled. Nothing is enforced or reported. * report - The restrictions are evaluated and reported, but not enforced.

    • Constraints: The default value is enabled. Allowable values are: enabled, disabled, report.
    Operations CbrRuleOperations
    The operations this rule applies to. Nested schema for operations:
    Timeouts CbrRuleTimeouts
    TransactionId string
    The Transaction-Id header behaves as the X-Correlation-Id header. It is supported for backward compatibility with other IBM platform services that support the Transaction-Id header only. If both X-Correlation-Id and Transaction-Id are provided, X-Correlation-Id has the precedence over Transaction-Id.

    Deprecated: Deprecated

    XCorrelationId string
    The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.
    Resources []CbrRuleResourceArgs
    The resources this rule apply to.

    • Constraints: The maximum length is 1 item. The minimum length is 1 item. Nested schema for resources:
    CbrRuleId string
    The unique identifier of the cbr_rule.
    Contexts []CbrRuleContextArgs
    The contexts this rule applies to.

    • Constraints: The maximum length is 1000 items. The minimum length is 0 items. Nested schema for contexts:
    Description string
    The description of the rule.

    • Constraints: The maximum length is 300 characters. The minimum length is 0 characters. The value must match regular expression /^[\x20-\xFE]*$/.
    EnforcementMode string
    The rule enforcement mode: * enabled - The restrictions are enforced and reported. This is the default. * disabled - The restrictions are disabled. Nothing is enforced or reported. * report - The restrictions are evaluated and reported, but not enforced.

    • Constraints: The default value is enabled. Allowable values are: enabled, disabled, report.
    Operations CbrRuleOperationsArgs
    The operations this rule applies to. Nested schema for operations:
    Timeouts CbrRuleTimeoutsArgs
    TransactionId string
    The Transaction-Id header behaves as the X-Correlation-Id header. It is supported for backward compatibility with other IBM platform services that support the Transaction-Id header only. If both X-Correlation-Id and Transaction-Id are provided, X-Correlation-Id has the precedence over Transaction-Id.

    Deprecated: Deprecated

    XCorrelationId string
    The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.
    resources List<CbrRuleResource>
    The resources this rule apply to.

    • Constraints: The maximum length is 1 item. The minimum length is 1 item. Nested schema for resources:
    cbrRuleId String
    The unique identifier of the cbr_rule.
    contexts List<CbrRuleContext>
    The contexts this rule applies to.

    • Constraints: The maximum length is 1000 items. The minimum length is 0 items. Nested schema for contexts:
    description String
    The description of the rule.

    • Constraints: The maximum length is 300 characters. The minimum length is 0 characters. The value must match regular expression /^[\x20-\xFE]*$/.
    enforcementMode String
    The rule enforcement mode: * enabled - The restrictions are enforced and reported. This is the default. * disabled - The restrictions are disabled. Nothing is enforced or reported. * report - The restrictions are evaluated and reported, but not enforced.

    • Constraints: The default value is enabled. Allowable values are: enabled, disabled, report.
    operations CbrRuleOperations
    The operations this rule applies to. Nested schema for operations:
    timeouts CbrRuleTimeouts
    transactionId String
    The Transaction-Id header behaves as the X-Correlation-Id header. It is supported for backward compatibility with other IBM platform services that support the Transaction-Id header only. If both X-Correlation-Id and Transaction-Id are provided, X-Correlation-Id has the precedence over Transaction-Id.

    Deprecated: Deprecated

    xCorrelationId String
    The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.
    resources CbrRuleResource[]
    The resources this rule apply to.

    • Constraints: The maximum length is 1 item. The minimum length is 1 item. Nested schema for resources:
    cbrRuleId string
    The unique identifier of the cbr_rule.
    contexts CbrRuleContext[]
    The contexts this rule applies to.

    • Constraints: The maximum length is 1000 items. The minimum length is 0 items. Nested schema for contexts:
    description string
    The description of the rule.

    • Constraints: The maximum length is 300 characters. The minimum length is 0 characters. The value must match regular expression /^[\x20-\xFE]*$/.
    enforcementMode string
    The rule enforcement mode: * enabled - The restrictions are enforced and reported. This is the default. * disabled - The restrictions are disabled. Nothing is enforced or reported. * report - The restrictions are evaluated and reported, but not enforced.

    • Constraints: The default value is enabled. Allowable values are: enabled, disabled, report.
    operations CbrRuleOperations
    The operations this rule applies to. Nested schema for operations:
    timeouts CbrRuleTimeouts
    transactionId string
    The Transaction-Id header behaves as the X-Correlation-Id header. It is supported for backward compatibility with other IBM platform services that support the Transaction-Id header only. If both X-Correlation-Id and Transaction-Id are provided, X-Correlation-Id has the precedence over Transaction-Id.

    Deprecated: Deprecated

    xCorrelationId string
    The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.
    resources Sequence[CbrRuleResourceArgs]
    The resources this rule apply to.

    • Constraints: The maximum length is 1 item. The minimum length is 1 item. Nested schema for resources:
    cbr_rule_id str
    The unique identifier of the cbr_rule.
    contexts Sequence[CbrRuleContextArgs]
    The contexts this rule applies to.

    • Constraints: The maximum length is 1000 items. The minimum length is 0 items. Nested schema for contexts:
    description str
    The description of the rule.

    • Constraints: The maximum length is 300 characters. The minimum length is 0 characters. The value must match regular expression /^[\x20-\xFE]*$/.
    enforcement_mode str
    The rule enforcement mode: * enabled - The restrictions are enforced and reported. This is the default. * disabled - The restrictions are disabled. Nothing is enforced or reported. * report - The restrictions are evaluated and reported, but not enforced.

    • Constraints: The default value is enabled. Allowable values are: enabled, disabled, report.
    operations CbrRuleOperationsArgs
    The operations this rule applies to. Nested schema for operations:
    timeouts CbrRuleTimeoutsArgs
    transaction_id str
    The Transaction-Id header behaves as the X-Correlation-Id header. It is supported for backward compatibility with other IBM platform services that support the Transaction-Id header only. If both X-Correlation-Id and Transaction-Id are provided, X-Correlation-Id has the precedence over Transaction-Id.

    Deprecated: Deprecated

    x_correlation_id str
    The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.
    resources List<Property Map>
    The resources this rule apply to.

    • Constraints: The maximum length is 1 item. The minimum length is 1 item. Nested schema for resources:
    cbrRuleId String
    The unique identifier of the cbr_rule.
    contexts List<Property Map>
    The contexts this rule applies to.

    • Constraints: The maximum length is 1000 items. The minimum length is 0 items. Nested schema for contexts:
    description String
    The description of the rule.

    • Constraints: The maximum length is 300 characters. The minimum length is 0 characters. The value must match regular expression /^[\x20-\xFE]*$/.
    enforcementMode String
    The rule enforcement mode: * enabled - The restrictions are enforced and reported. This is the default. * disabled - The restrictions are disabled. Nothing is enforced or reported. * report - The restrictions are evaluated and reported, but not enforced.

    • Constraints: The default value is enabled. Allowable values are: enabled, disabled, report.
    operations Property Map
    The operations this rule applies to. Nested schema for operations:
    timeouts Property Map
    transactionId String
    The Transaction-Id header behaves as the X-Correlation-Id header. It is supported for backward compatibility with other IBM platform services that support the Transaction-Id header only. If both X-Correlation-Id and Transaction-Id are provided, X-Correlation-Id has the precedence over Transaction-Id.

    Deprecated: Deprecated

    xCorrelationId String
    The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Outputs

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

    CreatedAt string
    (String) The time the resource was created.
    CreatedById string
    (String) IAM ID of the user or service which created the resource.
    Crn string
    (String) The rule CRN.
    Etag string
    ETag identifier for cbr_rule.
    Href string
    (String) The href link to the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastModifiedAt string
    (String) The last time the resource was modified.
    LastModifiedById string
    (String) IAM ID of the user or service which modified the resource.
    CreatedAt string
    (String) The time the resource was created.
    CreatedById string
    (String) IAM ID of the user or service which created the resource.
    Crn string
    (String) The rule CRN.
    Etag string
    ETag identifier for cbr_rule.
    Href string
    (String) The href link to the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastModifiedAt string
    (String) The last time the resource was modified.
    LastModifiedById string
    (String) IAM ID of the user or service which modified the resource.
    createdAt String
    (String) The time the resource was created.
    createdById String
    (String) IAM ID of the user or service which created the resource.
    crn String
    (String) The rule CRN.
    etag String
    ETag identifier for cbr_rule.
    href String
    (String) The href link to the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    lastModifiedAt String
    (String) The last time the resource was modified.
    lastModifiedById String
    (String) IAM ID of the user or service which modified the resource.
    createdAt string
    (String) The time the resource was created.
    createdById string
    (String) IAM ID of the user or service which created the resource.
    crn string
    (String) The rule CRN.
    etag string
    ETag identifier for cbr_rule.
    href string
    (String) The href link to the resource.
    id string
    The provider-assigned unique ID for this managed resource.
    lastModifiedAt string
    (String) The last time the resource was modified.
    lastModifiedById string
    (String) IAM ID of the user or service which modified the resource.
    created_at str
    (String) The time the resource was created.
    created_by_id str
    (String) IAM ID of the user or service which created the resource.
    crn str
    (String) The rule CRN.
    etag str
    ETag identifier for cbr_rule.
    href str
    (String) The href link to the resource.
    id str
    The provider-assigned unique ID for this managed resource.
    last_modified_at str
    (String) The last time the resource was modified.
    last_modified_by_id str
    (String) IAM ID of the user or service which modified the resource.
    createdAt String
    (String) The time the resource was created.
    createdById String
    (String) IAM ID of the user or service which created the resource.
    crn String
    (String) The rule CRN.
    etag String
    ETag identifier for cbr_rule.
    href String
    (String) The href link to the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    lastModifiedAt String
    (String) The last time the resource was modified.
    lastModifiedById String
    (String) IAM ID of the user or service which modified the resource.

    Look up Existing CbrRule Resource

    Get an existing CbrRule 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?: CbrRuleState, opts?: CustomResourceOptions): CbrRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cbr_rule_id: Optional[str] = None,
            contexts: Optional[Sequence[CbrRuleContextArgs]] = None,
            created_at: Optional[str] = None,
            created_by_id: Optional[str] = None,
            crn: Optional[str] = None,
            description: Optional[str] = None,
            enforcement_mode: Optional[str] = None,
            etag: Optional[str] = None,
            href: Optional[str] = None,
            last_modified_at: Optional[str] = None,
            last_modified_by_id: Optional[str] = None,
            operations: Optional[CbrRuleOperationsArgs] = None,
            resources: Optional[Sequence[CbrRuleResourceArgs]] = None,
            timeouts: Optional[CbrRuleTimeoutsArgs] = None,
            transaction_id: Optional[str] = None,
            x_correlation_id: Optional[str] = None) -> CbrRule
    func GetCbrRule(ctx *Context, name string, id IDInput, state *CbrRuleState, opts ...ResourceOption) (*CbrRule, error)
    public static CbrRule Get(string name, Input<string> id, CbrRuleState? state, CustomResourceOptions? opts = null)
    public static CbrRule get(String name, Output<String> id, CbrRuleState state, CustomResourceOptions options)
    resources:  _:    type: ibm:CbrRule    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:
    CbrRuleId string
    The unique identifier of the cbr_rule.
    Contexts List<CbrRuleContext>
    The contexts this rule applies to.

    • Constraints: The maximum length is 1000 items. The minimum length is 0 items. Nested schema for contexts:
    CreatedAt string
    (String) The time the resource was created.
    CreatedById string
    (String) IAM ID of the user or service which created the resource.
    Crn string
    (String) The rule CRN.
    Description string
    The description of the rule.

    • Constraints: The maximum length is 300 characters. The minimum length is 0 characters. The value must match regular expression /^[\x20-\xFE]*$/.
    EnforcementMode string
    The rule enforcement mode: * enabled - The restrictions are enforced and reported. This is the default. * disabled - The restrictions are disabled. Nothing is enforced or reported. * report - The restrictions are evaluated and reported, but not enforced.

    • Constraints: The default value is enabled. Allowable values are: enabled, disabled, report.
    Etag string
    ETag identifier for cbr_rule.
    Href string
    (String) The href link to the resource.
    LastModifiedAt string
    (String) The last time the resource was modified.
    LastModifiedById string
    (String) IAM ID of the user or service which modified the resource.
    Operations CbrRuleOperations
    The operations this rule applies to. Nested schema for operations:
    Resources List<CbrRuleResource>
    The resources this rule apply to.

    • Constraints: The maximum length is 1 item. The minimum length is 1 item. Nested schema for resources:
    Timeouts CbrRuleTimeouts
    TransactionId string
    The Transaction-Id header behaves as the X-Correlation-Id header. It is supported for backward compatibility with other IBM platform services that support the Transaction-Id header only. If both X-Correlation-Id and Transaction-Id are provided, X-Correlation-Id has the precedence over Transaction-Id.

    Deprecated: Deprecated

    XCorrelationId string
    The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.
    CbrRuleId string
    The unique identifier of the cbr_rule.
    Contexts []CbrRuleContextArgs
    The contexts this rule applies to.

    • Constraints: The maximum length is 1000 items. The minimum length is 0 items. Nested schema for contexts:
    CreatedAt string
    (String) The time the resource was created.
    CreatedById string
    (String) IAM ID of the user or service which created the resource.
    Crn string
    (String) The rule CRN.
    Description string
    The description of the rule.

    • Constraints: The maximum length is 300 characters. The minimum length is 0 characters. The value must match regular expression /^[\x20-\xFE]*$/.
    EnforcementMode string
    The rule enforcement mode: * enabled - The restrictions are enforced and reported. This is the default. * disabled - The restrictions are disabled. Nothing is enforced or reported. * report - The restrictions are evaluated and reported, but not enforced.

    • Constraints: The default value is enabled. Allowable values are: enabled, disabled, report.
    Etag string
    ETag identifier for cbr_rule.
    Href string
    (String) The href link to the resource.
    LastModifiedAt string
    (String) The last time the resource was modified.
    LastModifiedById string
    (String) IAM ID of the user or service which modified the resource.
    Operations CbrRuleOperationsArgs
    The operations this rule applies to. Nested schema for operations:
    Resources []CbrRuleResourceArgs
    The resources this rule apply to.

    • Constraints: The maximum length is 1 item. The minimum length is 1 item. Nested schema for resources:
    Timeouts CbrRuleTimeoutsArgs
    TransactionId string
    The Transaction-Id header behaves as the X-Correlation-Id header. It is supported for backward compatibility with other IBM platform services that support the Transaction-Id header only. If both X-Correlation-Id and Transaction-Id are provided, X-Correlation-Id has the precedence over Transaction-Id.

    Deprecated: Deprecated

    XCorrelationId string
    The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.
    cbrRuleId String
    The unique identifier of the cbr_rule.
    contexts List<CbrRuleContext>
    The contexts this rule applies to.

    • Constraints: The maximum length is 1000 items. The minimum length is 0 items. Nested schema for contexts:
    createdAt String
    (String) The time the resource was created.
    createdById String
    (String) IAM ID of the user or service which created the resource.
    crn String
    (String) The rule CRN.
    description String
    The description of the rule.

    • Constraints: The maximum length is 300 characters. The minimum length is 0 characters. The value must match regular expression /^[\x20-\xFE]*$/.
    enforcementMode String
    The rule enforcement mode: * enabled - The restrictions are enforced and reported. This is the default. * disabled - The restrictions are disabled. Nothing is enforced or reported. * report - The restrictions are evaluated and reported, but not enforced.

    • Constraints: The default value is enabled. Allowable values are: enabled, disabled, report.
    etag String
    ETag identifier for cbr_rule.
    href String
    (String) The href link to the resource.
    lastModifiedAt String
    (String) The last time the resource was modified.
    lastModifiedById String
    (String) IAM ID of the user or service which modified the resource.
    operations CbrRuleOperations
    The operations this rule applies to. Nested schema for operations:
    resources List<CbrRuleResource>
    The resources this rule apply to.

    • Constraints: The maximum length is 1 item. The minimum length is 1 item. Nested schema for resources:
    timeouts CbrRuleTimeouts
    transactionId String
    The Transaction-Id header behaves as the X-Correlation-Id header. It is supported for backward compatibility with other IBM platform services that support the Transaction-Id header only. If both X-Correlation-Id and Transaction-Id are provided, X-Correlation-Id has the precedence over Transaction-Id.

    Deprecated: Deprecated

    xCorrelationId String
    The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.
    cbrRuleId string
    The unique identifier of the cbr_rule.
    contexts CbrRuleContext[]
    The contexts this rule applies to.

    • Constraints: The maximum length is 1000 items. The minimum length is 0 items. Nested schema for contexts:
    createdAt string
    (String) The time the resource was created.
    createdById string
    (String) IAM ID of the user or service which created the resource.
    crn string
    (String) The rule CRN.
    description string
    The description of the rule.

    • Constraints: The maximum length is 300 characters. The minimum length is 0 characters. The value must match regular expression /^[\x20-\xFE]*$/.
    enforcementMode string
    The rule enforcement mode: * enabled - The restrictions are enforced and reported. This is the default. * disabled - The restrictions are disabled. Nothing is enforced or reported. * report - The restrictions are evaluated and reported, but not enforced.

    • Constraints: The default value is enabled. Allowable values are: enabled, disabled, report.
    etag string
    ETag identifier for cbr_rule.
    href string
    (String) The href link to the resource.
    lastModifiedAt string
    (String) The last time the resource was modified.
    lastModifiedById string
    (String) IAM ID of the user or service which modified the resource.
    operations CbrRuleOperations
    The operations this rule applies to. Nested schema for operations:
    resources CbrRuleResource[]
    The resources this rule apply to.

    • Constraints: The maximum length is 1 item. The minimum length is 1 item. Nested schema for resources:
    timeouts CbrRuleTimeouts
    transactionId string
    The Transaction-Id header behaves as the X-Correlation-Id header. It is supported for backward compatibility with other IBM platform services that support the Transaction-Id header only. If both X-Correlation-Id and Transaction-Id are provided, X-Correlation-Id has the precedence over Transaction-Id.

    Deprecated: Deprecated

    xCorrelationId string
    The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.
    cbr_rule_id str
    The unique identifier of the cbr_rule.
    contexts Sequence[CbrRuleContextArgs]
    The contexts this rule applies to.

    • Constraints: The maximum length is 1000 items. The minimum length is 0 items. Nested schema for contexts:
    created_at str
    (String) The time the resource was created.
    created_by_id str
    (String) IAM ID of the user or service which created the resource.
    crn str
    (String) The rule CRN.
    description str
    The description of the rule.

    • Constraints: The maximum length is 300 characters. The minimum length is 0 characters. The value must match regular expression /^[\x20-\xFE]*$/.
    enforcement_mode str
    The rule enforcement mode: * enabled - The restrictions are enforced and reported. This is the default. * disabled - The restrictions are disabled. Nothing is enforced or reported. * report - The restrictions are evaluated and reported, but not enforced.

    • Constraints: The default value is enabled. Allowable values are: enabled, disabled, report.
    etag str
    ETag identifier for cbr_rule.
    href str
    (String) The href link to the resource.
    last_modified_at str
    (String) The last time the resource was modified.
    last_modified_by_id str
    (String) IAM ID of the user or service which modified the resource.
    operations CbrRuleOperationsArgs
    The operations this rule applies to. Nested schema for operations:
    resources Sequence[CbrRuleResourceArgs]
    The resources this rule apply to.

    • Constraints: The maximum length is 1 item. The minimum length is 1 item. Nested schema for resources:
    timeouts CbrRuleTimeoutsArgs
    transaction_id str
    The Transaction-Id header behaves as the X-Correlation-Id header. It is supported for backward compatibility with other IBM platform services that support the Transaction-Id header only. If both X-Correlation-Id and Transaction-Id are provided, X-Correlation-Id has the precedence over Transaction-Id.

    Deprecated: Deprecated

    x_correlation_id str
    The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.
    cbrRuleId String
    The unique identifier of the cbr_rule.
    contexts List<Property Map>
    The contexts this rule applies to.

    • Constraints: The maximum length is 1000 items. The minimum length is 0 items. Nested schema for contexts:
    createdAt String
    (String) The time the resource was created.
    createdById String
    (String) IAM ID of the user or service which created the resource.
    crn String
    (String) The rule CRN.
    description String
    The description of the rule.

    • Constraints: The maximum length is 300 characters. The minimum length is 0 characters. The value must match regular expression /^[\x20-\xFE]*$/.
    enforcementMode String
    The rule enforcement mode: * enabled - The restrictions are enforced and reported. This is the default. * disabled - The restrictions are disabled. Nothing is enforced or reported. * report - The restrictions are evaluated and reported, but not enforced.

    • Constraints: The default value is enabled. Allowable values are: enabled, disabled, report.
    etag String
    ETag identifier for cbr_rule.
    href String
    (String) The href link to the resource.
    lastModifiedAt String
    (String) The last time the resource was modified.
    lastModifiedById String
    (String) IAM ID of the user or service which modified the resource.
    operations Property Map
    The operations this rule applies to. Nested schema for operations:
    resources List<Property Map>
    The resources this rule apply to.

    • Constraints: The maximum length is 1 item. The minimum length is 1 item. Nested schema for resources:
    timeouts Property Map
    transactionId String
    The Transaction-Id header behaves as the X-Correlation-Id header. It is supported for backward compatibility with other IBM platform services that support the Transaction-Id header only. If both X-Correlation-Id and Transaction-Id are provided, X-Correlation-Id has the precedence over Transaction-Id.

    Deprecated: Deprecated

    xCorrelationId String
    The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Supporting Types

    CbrRuleContext, CbrRuleContextArgs

    Attributes List<CbrRuleContextAttribute>
    The attributes.

    • Constraints: The minimum length is 1 item. Nested schema for attributes:
    Attributes []CbrRuleContextAttribute
    The attributes.

    • Constraints: The minimum length is 1 item. Nested schema for attributes:
    attributes List<CbrRuleContextAttribute>
    The attributes.

    • Constraints: The minimum length is 1 item. Nested schema for attributes:
    attributes CbrRuleContextAttribute[]
    The attributes.

    • Constraints: The minimum length is 1 item. Nested schema for attributes:
    attributes Sequence[CbrRuleContextAttribute]
    The attributes.

    • Constraints: The minimum length is 1 item. Nested schema for attributes:
    attributes List<Property Map>
    The attributes.

    • Constraints: The minimum length is 1 item. Nested schema for attributes:

    CbrRuleContextAttribute, CbrRuleContextAttributeArgs

    Name string
    The attribute name.

    • Constraints: The maximum length is 64 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9]+$/.
    Value string
    The attribute value.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character. The value must match regular expression /^[\S\s]+$/.
    Name string
    The attribute name.

    • Constraints: The maximum length is 64 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9]+$/.
    Value string
    The attribute value.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character. The value must match regular expression /^[\S\s]+$/.
    name String
    The attribute name.

    • Constraints: The maximum length is 64 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9]+$/.
    value String
    The attribute value.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character. The value must match regular expression /^[\S\s]+$/.
    name string
    The attribute name.

    • Constraints: The maximum length is 64 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9]+$/.
    value string
    The attribute value.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character. The value must match regular expression /^[\S\s]+$/.
    name str
    The attribute name.

    • Constraints: The maximum length is 64 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9]+$/.
    value str
    The attribute value.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character. The value must match regular expression /^[\S\s]+$/.
    name String
    The attribute name.

    • Constraints: The maximum length is 64 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9]+$/.
    value String
    The attribute value.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character. The value must match regular expression /^[\S\s]+$/.

    CbrRuleOperations, CbrRuleOperationsArgs

    ApiTypes List<CbrRuleOperationsApiType>
    The API types this rule applies to.

    • Constraints: The maximum length is 100 items. The minimum length is 1 item. Nested schema for api_types:
    ApiTypes []CbrRuleOperationsApiType
    The API types this rule applies to.

    • Constraints: The maximum length is 100 items. The minimum length is 1 item. Nested schema for api_types:
    apiTypes List<CbrRuleOperationsApiType>
    The API types this rule applies to.

    • Constraints: The maximum length is 100 items. The minimum length is 1 item. Nested schema for api_types:
    apiTypes CbrRuleOperationsApiType[]
    The API types this rule applies to.

    • Constraints: The maximum length is 100 items. The minimum length is 1 item. Nested schema for api_types:
    api_types Sequence[CbrRuleOperationsApiType]
    The API types this rule applies to.

    • Constraints: The maximum length is 100 items. The minimum length is 1 item. Nested schema for api_types:
    apiTypes List<Property Map>
    The API types this rule applies to.

    • Constraints: The maximum length is 100 items. The minimum length is 1 item. Nested schema for api_types:

    CbrRuleOperationsApiType, CbrRuleOperationsApiTypeArgs

    ApiTypeId string
    • Constraints: The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9_.\-:]+$/.
    Description string
    The description of the rule.

    • Constraints: The maximum length is 300 characters. The minimum length is 0 characters. The value must match regular expression /^[\x20-\xFE]*$/.
    DisplayName string
    ApiTypeId string
    • Constraints: The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9_.\-:]+$/.
    Description string
    The description of the rule.

    • Constraints: The maximum length is 300 characters. The minimum length is 0 characters. The value must match regular expression /^[\x20-\xFE]*$/.
    DisplayName string
    apiTypeId String
    • Constraints: The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9_.\-:]+$/.
    description String
    The description of the rule.

    • Constraints: The maximum length is 300 characters. The minimum length is 0 characters. The value must match regular expression /^[\x20-\xFE]*$/.
    displayName String
    apiTypeId string
    • Constraints: The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9_.\-:]+$/.
    description string
    The description of the rule.

    • Constraints: The maximum length is 300 characters. The minimum length is 0 characters. The value must match regular expression /^[\x20-\xFE]*$/.
    displayName string
    api_type_id str
    • Constraints: The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9_.\-:]+$/.
    description str
    The description of the rule.

    • Constraints: The maximum length is 300 characters. The minimum length is 0 characters. The value must match regular expression /^[\x20-\xFE]*$/.
    display_name str
    apiTypeId String
    • Constraints: The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9_.\-:]+$/.
    description String
    The description of the rule.

    • Constraints: The maximum length is 300 characters. The minimum length is 0 characters. The value must match regular expression /^[\x20-\xFE]*$/.
    displayName String

    CbrRuleResource, CbrRuleResourceArgs

    Attributes List<CbrRuleResourceAttribute>
    The resource attributes.

    • Constraints: The minimum length is 1 item. Nested schema for attributes:
    Tags List<CbrRuleResourceTag>
    The optional resource tags.

    • Constraints: The maximum length is 10 items. The minimum length is 1 item. Nested schema for tags:
    Attributes []CbrRuleResourceAttribute
    The resource attributes.

    • Constraints: The minimum length is 1 item. Nested schema for attributes:
    Tags []CbrRuleResourceTag
    The optional resource tags.

    • Constraints: The maximum length is 10 items. The minimum length is 1 item. Nested schema for tags:
    attributes List<CbrRuleResourceAttribute>
    The resource attributes.

    • Constraints: The minimum length is 1 item. Nested schema for attributes:
    tags List<CbrRuleResourceTag>
    The optional resource tags.

    • Constraints: The maximum length is 10 items. The minimum length is 1 item. Nested schema for tags:
    attributes CbrRuleResourceAttribute[]
    The resource attributes.

    • Constraints: The minimum length is 1 item. Nested schema for attributes:
    tags CbrRuleResourceTag[]
    The optional resource tags.

    • Constraints: The maximum length is 10 items. The minimum length is 1 item. Nested schema for tags:
    attributes Sequence[CbrRuleResourceAttribute]
    The resource attributes.

    • Constraints: The minimum length is 1 item. Nested schema for attributes:
    tags Sequence[CbrRuleResourceTag]
    The optional resource tags.

    • Constraints: The maximum length is 10 items. The minimum length is 1 item. Nested schema for tags:
    attributes List<Property Map>
    The resource attributes.

    • Constraints: The minimum length is 1 item. Nested schema for attributes:
    tags List<Property Map>
    The optional resource tags.

    • Constraints: The maximum length is 10 items. The minimum length is 1 item. Nested schema for tags:

    CbrRuleResourceAttribute, CbrRuleResourceAttributeArgs

    Name string
    The attribute name.

    • Constraints: The maximum length is 64 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9_]+$/.
    Value string
    The attribute value.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character. The value must match regular expression /^[\S\s]+$/.
    Operator string
    The attribute operator.

    • Constraints: The maximum length is 64 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9]+$/.
    Name string
    The attribute name.

    • Constraints: The maximum length is 64 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9_]+$/.
    Value string
    The attribute value.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character. The value must match regular expression /^[\S\s]+$/.
    Operator string
    The attribute operator.

    • Constraints: The maximum length is 64 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9]+$/.
    name String
    The attribute name.

    • Constraints: The maximum length is 64 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9_]+$/.
    value String
    The attribute value.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character. The value must match regular expression /^[\S\s]+$/.
    operator String
    The attribute operator.

    • Constraints: The maximum length is 64 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9]+$/.
    name string
    The attribute name.

    • Constraints: The maximum length is 64 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9_]+$/.
    value string
    The attribute value.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character. The value must match regular expression /^[\S\s]+$/.
    operator string
    The attribute operator.

    • Constraints: The maximum length is 64 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9]+$/.
    name str
    The attribute name.

    • Constraints: The maximum length is 64 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9_]+$/.
    value str
    The attribute value.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character. The value must match regular expression /^[\S\s]+$/.
    operator str
    The attribute operator.

    • Constraints: The maximum length is 64 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9]+$/.
    name String
    The attribute name.

    • Constraints: The maximum length is 64 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9_]+$/.
    value String
    The attribute value.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character. The value must match regular expression /^[\S\s]+$/.
    operator String
    The attribute operator.

    • Constraints: The maximum length is 64 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9]+$/.

    CbrRuleResourceTag, CbrRuleResourceTagArgs

    Name string
    The tag attribute name.

    • Constraints: The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9 _.-]+$/.
    Value string
    The tag attribute value.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9 _*?.-]+$/.
    Operator string
    The attribute operator.

    • Constraints: The maximum length is 64 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9]+$/.
    Name string
    The tag attribute name.

    • Constraints: The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9 _.-]+$/.
    Value string
    The tag attribute value.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9 _*?.-]+$/.
    Operator string
    The attribute operator.

    • Constraints: The maximum length is 64 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9]+$/.
    name String
    The tag attribute name.

    • Constraints: The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9 _.-]+$/.
    value String
    The tag attribute value.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9 _*?.-]+$/.
    operator String
    The attribute operator.

    • Constraints: The maximum length is 64 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9]+$/.
    name string
    The tag attribute name.

    • Constraints: The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9 _.-]+$/.
    value string
    The tag attribute value.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9 _*?.-]+$/.
    operator string
    The attribute operator.

    • Constraints: The maximum length is 64 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9]+$/.
    name str
    The tag attribute name.

    • Constraints: The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9 _.-]+$/.
    value str
    The tag attribute value.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9 _*?.-]+$/.
    operator str
    The attribute operator.

    • Constraints: The maximum length is 64 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9]+$/.
    name String
    The tag attribute name.

    • Constraints: The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9 _.-]+$/.
    value String
    The tag attribute value.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9 _*?.-]+$/.
    operator String
    The attribute operator.

    • Constraints: The maximum length is 64 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9]+$/.

    CbrRuleTimeouts, CbrRuleTimeoutsArgs

    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_cbr_rule resource by using id. The globally unique ID of the rule.

    Syntax

    
    ```sh
    $ pulumi import ibm:index/cbrRule:CbrRule cbr_rule <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.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud