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

ibm.getCisPageRules

Explore with Pulumi AI

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

    Retrieve an information of an IBM Cloud Internet Services page rules resource. For more information, about IBM Cloud Internet Services page rules, see using page rules.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const rules = ibm.getCisPageRules({
        cisId: ibm_cis.instance.id,
        domainId: ibm_cis_domain.example.id,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    rules = ibm.get_cis_page_rules(cis_id=ibm_cis["instance"]["id"],
        domain_id=ibm_cis_domain["example"]["id"])
    
    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.GetCisPageRules(ctx, &ibm.GetCisPageRulesArgs{
    			CisId:    ibm_cis.Instance.Id,
    			DomainId: ibm_cis_domain.Example.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var rules = Ibm.GetCisPageRules.Invoke(new()
        {
            CisId = ibm_cis.Instance.Id,
            DomainId = ibm_cis_domain.Example.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.inputs.GetCisPageRulesArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var rules = IbmFunctions.getCisPageRules(GetCisPageRulesArgs.builder()
                .cisId(ibm_cis.instance().id())
                .domainId(ibm_cis_domain.example().id())
                .build());
    
        }
    }
    
    variables:
      rules:
        fn::invoke:
          function: ibm:getCisPageRules
          arguments:
            cisId: ${ibm_cis.instance.id}
            domainId: ${ibm_cis_domain.example.id}
    

    Using getCisPageRules

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getCisPageRules(args: GetCisPageRulesArgs, opts?: InvokeOptions): Promise<GetCisPageRulesResult>
    function getCisPageRulesOutput(args: GetCisPageRulesOutputArgs, opts?: InvokeOptions): Output<GetCisPageRulesResult>
    def get_cis_page_rules(cis_id: Optional[str] = None,
                           domain_id: Optional[str] = None,
                           id: Optional[str] = None,
                           timeouts: Optional[GetCisPageRulesTimeouts] = None,
                           opts: Optional[InvokeOptions] = None) -> GetCisPageRulesResult
    def get_cis_page_rules_output(cis_id: Optional[pulumi.Input[str]] = None,
                           domain_id: Optional[pulumi.Input[str]] = None,
                           id: Optional[pulumi.Input[str]] = None,
                           timeouts: Optional[pulumi.Input[GetCisPageRulesTimeoutsArgs]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetCisPageRulesResult]
    func GetCisPageRules(ctx *Context, args *GetCisPageRulesArgs, opts ...InvokeOption) (*GetCisPageRulesResult, error)
    func GetCisPageRulesOutput(ctx *Context, args *GetCisPageRulesOutputArgs, opts ...InvokeOption) GetCisPageRulesResultOutput

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

    public static class GetCisPageRules 
    {
        public static Task<GetCisPageRulesResult> InvokeAsync(GetCisPageRulesArgs args, InvokeOptions? opts = null)
        public static Output<GetCisPageRulesResult> Invoke(GetCisPageRulesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCisPageRulesResult> getCisPageRules(GetCisPageRulesArgs args, InvokeOptions options)
    public static Output<GetCisPageRulesResult> getCisPageRules(GetCisPageRulesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getCisPageRules:getCisPageRules
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CisId string
    The ID of the IBM Cloud Internet Services instance .
    DomainId string
    The ID of the domain.
    Id string
    (String) The action ID. Valid values are page rule action field map from console to API CF-UI map API.
    Timeouts GetCisPageRulesTimeouts
    CisId string
    The ID of the IBM Cloud Internet Services instance .
    DomainId string
    The ID of the domain.
    Id string
    (String) The action ID. Valid values are page rule action field map from console to API CF-UI map API.
    Timeouts GetCisPageRulesTimeouts
    cisId String
    The ID of the IBM Cloud Internet Services instance .
    domainId String
    The ID of the domain.
    id String
    (String) The action ID. Valid values are page rule action field map from console to API CF-UI map API.
    timeouts GetCisPageRulesTimeouts
    cisId string
    The ID of the IBM Cloud Internet Services instance .
    domainId string
    The ID of the domain.
    id string
    (String) The action ID. Valid values are page rule action field map from console to API CF-UI map API.
    timeouts GetCisPageRulesTimeouts
    cis_id str
    The ID of the IBM Cloud Internet Services instance .
    domain_id str
    The ID of the domain.
    id str
    (String) The action ID. Valid values are page rule action field map from console to API CF-UI map API.
    timeouts GetCisPageRulesTimeouts
    cisId String
    The ID of the IBM Cloud Internet Services instance .
    domainId String
    The ID of the domain.
    id String
    (String) The action ID. Valid values are page rule action field map from console to API CF-UI map API.
    timeouts Property Map

    getCisPageRules Result

    The following output properties are available:

    CisId string
    CisPageRules List<GetCisPageRulesCisPageRule>
    (String) The page rules detail.
    DomainId string
    Id string
    (String) The action ID. Valid values are page rule action field map from console to API CF-UI map API.
    Timeouts GetCisPageRulesTimeouts
    CisId string
    CisPageRules []GetCisPageRulesCisPageRule
    (String) The page rules detail.
    DomainId string
    Id string
    (String) The action ID. Valid values are page rule action field map from console to API CF-UI map API.
    Timeouts GetCisPageRulesTimeouts
    cisId String
    cisPageRules List<GetCisPageRulesCisPageRule>
    (String) The page rules detail.
    domainId String
    id String
    (String) The action ID. Valid values are page rule action field map from console to API CF-UI map API.
    timeouts GetCisPageRulesTimeouts
    cisId string
    cisPageRules GetCisPageRulesCisPageRule[]
    (String) The page rules detail.
    domainId string
    id string
    (String) The action ID. Valid values are page rule action field map from console to API CF-UI map API.
    timeouts GetCisPageRulesTimeouts
    cis_id str
    cis_page_rules Sequence[GetCisPageRulesCisPageRule]
    (String) The page rules detail.
    domain_id str
    id str
    (String) The action ID. Valid values are page rule action field map from console to API CF-UI map API.
    timeouts GetCisPageRulesTimeouts
    cisId String
    cisPageRules List<Property Map>
    (String) The page rules detail.
    domainId String
    id String
    (String) The action ID. Valid values are page rule action field map from console to API CF-UI map API.
    timeouts Property Map

    Supporting Types

    GetCisPageRulesCisPageRule

    Actions List<GetCisPageRulesCisPageRuleAction>
    (String) The actions to be performed on the URL.
    Id string
    (String) The action ID. Valid values are page rule action field map from console to API CF-UI map API.
    Priority double
    (String) The priority of the page rule.
    RuleId string
    (String) The page rule ID.
    Status string
    (String) The status of the page rule. Default value is active.
    Targets List<GetCisPageRulesCisPageRuleTarget>
    (String) The targets, of the added rule.
    Actions []GetCisPageRulesCisPageRuleAction
    (String) The actions to be performed on the URL.
    Id string
    (String) The action ID. Valid values are page rule action field map from console to API CF-UI map API.
    Priority float64
    (String) The priority of the page rule.
    RuleId string
    (String) The page rule ID.
    Status string
    (String) The status of the page rule. Default value is active.
    Targets []GetCisPageRulesCisPageRuleTarget
    (String) The targets, of the added rule.
    actions List<GetCisPageRulesCisPageRuleAction>
    (String) The actions to be performed on the URL.
    id String
    (String) The action ID. Valid values are page rule action field map from console to API CF-UI map API.
    priority Double
    (String) The priority of the page rule.
    ruleId String
    (String) The page rule ID.
    status String
    (String) The status of the page rule. Default value is active.
    targets List<GetCisPageRulesCisPageRuleTarget>
    (String) The targets, of the added rule.
    actions GetCisPageRulesCisPageRuleAction[]
    (String) The actions to be performed on the URL.
    id string
    (String) The action ID. Valid values are page rule action field map from console to API CF-UI map API.
    priority number
    (String) The priority of the page rule.
    ruleId string
    (String) The page rule ID.
    status string
    (String) The status of the page rule. Default value is active.
    targets GetCisPageRulesCisPageRuleTarget[]
    (String) The targets, of the added rule.
    actions Sequence[GetCisPageRulesCisPageRuleAction]
    (String) The actions to be performed on the URL.
    id str
    (String) The action ID. Valid values are page rule action field map from console to API CF-UI map API.
    priority float
    (String) The priority of the page rule.
    rule_id str
    (String) The page rule ID.
    status str
    (String) The status of the page rule. Default value is active.
    targets Sequence[GetCisPageRulesCisPageRuleTarget]
    (String) The targets, of the added rule.
    actions List<Property Map>
    (String) The actions to be performed on the URL.
    id String
    (String) The action ID. Valid values are page rule action field map from console to API CF-UI map API.
    priority Number
    (String) The priority of the page rule.
    ruleId String
    (String) The page rule ID.
    status String
    (String) The status of the page rule. Default value is active.
    targets List<Property Map>
    (String) The targets, of the added rule.

    GetCisPageRulesCisPageRuleAction

    Css string
    (String) The required attribute for minify action. CSS supported values are on and off.
    Html string
    (String) The required attribute for minify action. HTML supported values are on and off.
    Id string
    (String) The action ID. Valid values are page rule action field map from console to API CF-UI map API.
    Js string
    (String) The required attribute for minify action. JS supported values are on and off.
    StatusCode double
    (String) The status code to check for URL forwarding. The required attribute for forwarding_url action. Valid values are 301 and 302. It returns 0 for all other actions.
    Url string
    (String) The forward rule URL, a required attribute for forwarding_url action.
    Value string
    (String) The values for corresponding actions. Please refer table in ibm.CisPageRule resource document for corresponding valid values of id and value.
    Css string
    (String) The required attribute for minify action. CSS supported values are on and off.
    Html string
    (String) The required attribute for minify action. HTML supported values are on and off.
    Id string
    (String) The action ID. Valid values are page rule action field map from console to API CF-UI map API.
    Js string
    (String) The required attribute for minify action. JS supported values are on and off.
    StatusCode float64
    (String) The status code to check for URL forwarding. The required attribute for forwarding_url action. Valid values are 301 and 302. It returns 0 for all other actions.
    Url string
    (String) The forward rule URL, a required attribute for forwarding_url action.
    Value string
    (String) The values for corresponding actions. Please refer table in ibm.CisPageRule resource document for corresponding valid values of id and value.
    css String
    (String) The required attribute for minify action. CSS supported values are on and off.
    html String
    (String) The required attribute for minify action. HTML supported values are on and off.
    id String
    (String) The action ID. Valid values are page rule action field map from console to API CF-UI map API.
    js String
    (String) The required attribute for minify action. JS supported values are on and off.
    statusCode Double
    (String) The status code to check for URL forwarding. The required attribute for forwarding_url action. Valid values are 301 and 302. It returns 0 for all other actions.
    url String
    (String) The forward rule URL, a required attribute for forwarding_url action.
    value String
    (String) The values for corresponding actions. Please refer table in ibm.CisPageRule resource document for corresponding valid values of id and value.
    css string
    (String) The required attribute for minify action. CSS supported values are on and off.
    html string
    (String) The required attribute for minify action. HTML supported values are on and off.
    id string
    (String) The action ID. Valid values are page rule action field map from console to API CF-UI map API.
    js string
    (String) The required attribute for minify action. JS supported values are on and off.
    statusCode number
    (String) The status code to check for URL forwarding. The required attribute for forwarding_url action. Valid values are 301 and 302. It returns 0 for all other actions.
    url string
    (String) The forward rule URL, a required attribute for forwarding_url action.
    value string
    (String) The values for corresponding actions. Please refer table in ibm.CisPageRule resource document for corresponding valid values of id and value.
    css str
    (String) The required attribute for minify action. CSS supported values are on and off.
    html str
    (String) The required attribute for minify action. HTML supported values are on and off.
    id str
    (String) The action ID. Valid values are page rule action field map from console to API CF-UI map API.
    js str
    (String) The required attribute for minify action. JS supported values are on and off.
    status_code float
    (String) The status code to check for URL forwarding. The required attribute for forwarding_url action. Valid values are 301 and 302. It returns 0 for all other actions.
    url str
    (String) The forward rule URL, a required attribute for forwarding_url action.
    value str
    (String) The values for corresponding actions. Please refer table in ibm.CisPageRule resource document for corresponding valid values of id and value.
    css String
    (String) The required attribute for minify action. CSS supported values are on and off.
    html String
    (String) The required attribute for minify action. HTML supported values are on and off.
    id String
    (String) The action ID. Valid values are page rule action field map from console to API CF-UI map API.
    js String
    (String) The required attribute for minify action. JS supported values are on and off.
    statusCode Number
    (String) The status code to check for URL forwarding. The required attribute for forwarding_url action. Valid values are 301 and 302. It returns 0 for all other actions.
    url String
    (String) The forward rule URL, a required attribute for forwarding_url action.
    value String
    (String) The values for corresponding actions. Please refer table in ibm.CisPageRule resource document for corresponding valid values of id and value.

    GetCisPageRulesCisPageRuleTarget

    Constraints List<GetCisPageRulesCisPageRuleTargetConstraint>
    (String) The constraint of the page rule.
    Target string
    (String) The target type. Valid value is url.
    Constraints []GetCisPageRulesCisPageRuleTargetConstraint
    (String) The constraint of the page rule.
    Target string
    (String) The target type. Valid value is url.
    constraints List<GetCisPageRulesCisPageRuleTargetConstraint>
    (String) The constraint of the page rule.
    target String
    (String) The target type. Valid value is url.
    constraints GetCisPageRulesCisPageRuleTargetConstraint[]
    (String) The constraint of the page rule.
    target string
    (String) The target type. Valid value is url.
    constraints Sequence[GetCisPageRulesCisPageRuleTargetConstraint]
    (String) The constraint of the page rule.
    target str
    (String) The target type. Valid value is url.
    constraints List<Property Map>
    (String) The constraint of the page rule.
    target String
    (String) The target type. Valid value is url.

    GetCisPageRulesCisPageRuleTargetConstraint

    Operator string
    (String) The operation on page rule. Valid value is matches.
    Value string
    (String) The values for corresponding actions. Please refer table in ibm.CisPageRule resource document for corresponding valid values of id and value.
    Operator string
    (String) The operation on page rule. Valid value is matches.
    Value string
    (String) The values for corresponding actions. Please refer table in ibm.CisPageRule resource document for corresponding valid values of id and value.
    operator String
    (String) The operation on page rule. Valid value is matches.
    value String
    (String) The values for corresponding actions. Please refer table in ibm.CisPageRule resource document for corresponding valid values of id and value.
    operator string
    (String) The operation on page rule. Valid value is matches.
    value string
    (String) The values for corresponding actions. Please refer table in ibm.CisPageRule resource document for corresponding valid values of id and value.
    operator str
    (String) The operation on page rule. Valid value is matches.
    value str
    (String) The values for corresponding actions. Please refer table in ibm.CisPageRule resource document for corresponding valid values of id and value.
    operator String
    (String) The operation on page rule. Valid value is matches.
    value String
    (String) The values for corresponding actions. Please refer table in ibm.CisPageRule resource document for corresponding valid values of id and value.

    GetCisPageRulesTimeouts

    Read string
    Read string
    read String
    read string
    read str
    read String

    Package Details

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