ibm.CisFilter
Explore with Pulumi AI
Provides a IBM CIS Filter. This resource is associated with an IBM Cloud Internet Services (CIS) instance and a CIS Domain resource. It allows to create, update, delete filter of a domain of a CIS instance. For more information, see IBM Cloud Internet Services.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
// Add a filter to the domain
const test = new ibm.CisFilter("test", {
cisId: data.ibm_cis.cis.id,
domainId: data.ibm_cis_domain.cis_domain.domain_id,
expression: "(http.request.uri eq \"/test-update?number=212\")",
paused: false,
description: "Filter-creation",
});
import pulumi
import pulumi_ibm as ibm
# Add a filter to the domain
test = ibm.CisFilter("test",
cis_id=data["ibm_cis"]["cis"]["id"],
domain_id=data["ibm_cis_domain"]["cis_domain"]["domain_id"],
expression="(http.request.uri eq \"/test-update?number=212\")",
paused=False,
description="Filter-creation")
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 {
// Add a filter to the domain
_, err := ibm.NewCisFilter(ctx, "test", &ibm.CisFilterArgs{
CisId: pulumi.Any(data.Ibm_cis.Cis.Id),
DomainId: pulumi.Any(data.Ibm_cis_domain.Cis_domain.Domain_id),
Expression: pulumi.String("(http.request.uri eq \"/test-update?number=212\")"),
Paused: pulumi.Bool(false),
Description: pulumi.String("Filter-creation"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;
return await Deployment.RunAsync(() =>
{
// Add a filter to the domain
var test = new Ibm.CisFilter("test", new()
{
CisId = data.Ibm_cis.Cis.Id,
DomainId = data.Ibm_cis_domain.Cis_domain.Domain_id,
Expression = "(http.request.uri eq \"/test-update?number=212\")",
Paused = false,
Description = "Filter-creation",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.CisFilter;
import com.pulumi.ibm.CisFilterArgs;
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) {
// Add a filter to the domain
var test = new CisFilter("test", CisFilterArgs.builder()
.cisId(data.ibm_cis().cis().id())
.domainId(data.ibm_cis_domain().cis_domain().domain_id())
.expression("(http.request.uri eq \"/test-update?number=212\")")
.paused(false)
.description("Filter-creation")
.build());
}
}
resources:
# Add a filter to the domain
test:
type: ibm:CisFilter
properties:
cisId: ${data.ibm_cis.cis.id}
domainId: ${data.ibm_cis_domain.cis_domain.domain_id}
expression: (http.request.uri eq "/test-update?number=212")
paused: false
description: Filter-creation
Create CisFilter Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CisFilter(name: string, args: CisFilterArgs, opts?: CustomResourceOptions);
@overload
def CisFilter(resource_name: str,
args: CisFilterArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CisFilter(resource_name: str,
opts: Optional[ResourceOptions] = None,
cis_id: Optional[str] = None,
domain_id: Optional[str] = None,
expression: Optional[str] = None,
cis_filter_id: Optional[str] = None,
description: Optional[str] = None,
paused: Optional[bool] = None)
func NewCisFilter(ctx *Context, name string, args CisFilterArgs, opts ...ResourceOption) (*CisFilter, error)
public CisFilter(string name, CisFilterArgs args, CustomResourceOptions? opts = null)
public CisFilter(String name, CisFilterArgs args)
public CisFilter(String name, CisFilterArgs args, CustomResourceOptions options)
type: ibm:CisFilter
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 CisFilterArgs
- 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 CisFilterArgs
- 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 CisFilterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CisFilterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CisFilterArgs
- 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 cisFilterResource = new Ibm.CisFilter("cisFilterResource", new()
{
CisId = "string",
DomainId = "string",
Expression = "string",
CisFilterId = "string",
Description = "string",
Paused = false,
});
example, err := ibm.NewCisFilter(ctx, "cisFilterResource", &ibm.CisFilterArgs{
CisId: pulumi.String("string"),
DomainId: pulumi.String("string"),
Expression: pulumi.String("string"),
CisFilterId: pulumi.String("string"),
Description: pulumi.String("string"),
Paused: pulumi.Bool(false),
})
var cisFilterResource = new CisFilter("cisFilterResource", CisFilterArgs.builder()
.cisId("string")
.domainId("string")
.expression("string")
.cisFilterId("string")
.description("string")
.paused(false)
.build());
cis_filter_resource = ibm.CisFilter("cisFilterResource",
cis_id="string",
domain_id="string",
expression="string",
cis_filter_id="string",
description="string",
paused=False)
const cisFilterResource = new ibm.CisFilter("cisFilterResource", {
cisId: "string",
domainId: "string",
expression: "string",
cisFilterId: "string",
description: "string",
paused: false,
});
type: ibm:CisFilter
properties:
cisFilterId: string
cisId: string
description: string
domainId: string
expression: string
paused: false
CisFilter 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 CisFilter resource accepts the following input properties:
- Cis
Id string - The ID of the CIS service instance.
- Domain
Id string - The ID of the domain to add the Filter.
- Expression string
- The expression of filter.
- Cis
Filter stringId - (String) The ID of filter resource. It is a combination of <
filter-id
>:<domain-id
>:<crn
> attributes concatenated with ":". - Description string
- The information about this filter to help identify the purpose of it.
- Paused bool
- Whether this filter is currently disabled.
- Cis
Id string - The ID of the CIS service instance.
- Domain
Id string - The ID of the domain to add the Filter.
- Expression string
- The expression of filter.
- Cis
Filter stringId - (String) The ID of filter resource. It is a combination of <
filter-id
>:<domain-id
>:<crn
> attributes concatenated with ":". - Description string
- The information about this filter to help identify the purpose of it.
- Paused bool
- Whether this filter is currently disabled.
- cis
Id String - The ID of the CIS service instance.
- domain
Id String - The ID of the domain to add the Filter.
- expression String
- The expression of filter.
- cis
Filter StringId - (String) The ID of filter resource. It is a combination of <
filter-id
>:<domain-id
>:<crn
> attributes concatenated with ":". - description String
- The information about this filter to help identify the purpose of it.
- paused Boolean
- Whether this filter is currently disabled.
- cis
Id string - The ID of the CIS service instance.
- domain
Id string - The ID of the domain to add the Filter.
- expression string
- The expression of filter.
- cis
Filter stringId - (String) The ID of filter resource. It is a combination of <
filter-id
>:<domain-id
>:<crn
> attributes concatenated with ":". - description string
- The information about this filter to help identify the purpose of it.
- paused boolean
- Whether this filter is currently disabled.
- cis_
id str - The ID of the CIS service instance.
- domain_
id str - The ID of the domain to add the Filter.
- expression str
- The expression of filter.
- cis_
filter_ strid - (String) The ID of filter resource. It is a combination of <
filter-id
>:<domain-id
>:<crn
> attributes concatenated with ":". - description str
- The information about this filter to help identify the purpose of it.
- paused bool
- Whether this filter is currently disabled.
- cis
Id String - The ID of the CIS service instance.
- domain
Id String - The ID of the domain to add the Filter.
- expression String
- The expression of filter.
- cis
Filter StringId - (String) The ID of filter resource. It is a combination of <
filter-id
>:<domain-id
>:<crn
> attributes concatenated with ":". - description String
- The information about this filter to help identify the purpose of it.
- paused Boolean
- Whether this filter is currently disabled.
Outputs
All input properties are implicitly available as output properties. Additionally, the CisFilter resource produces the following output properties:
Look up Existing CisFilter Resource
Get an existing CisFilter 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?: CisFilterState, opts?: CustomResourceOptions): CisFilter
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cis_filter_id: Optional[str] = None,
cis_id: Optional[str] = None,
description: Optional[str] = None,
domain_id: Optional[str] = None,
expression: Optional[str] = None,
filter_id: Optional[str] = None,
paused: Optional[bool] = None) -> CisFilter
func GetCisFilter(ctx *Context, name string, id IDInput, state *CisFilterState, opts ...ResourceOption) (*CisFilter, error)
public static CisFilter Get(string name, Input<string> id, CisFilterState? state, CustomResourceOptions? opts = null)
public static CisFilter get(String name, Output<String> id, CisFilterState state, CustomResourceOptions options)
resources: _: type: ibm:CisFilter 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.
- Cis
Filter stringId - (String) The ID of filter resource. It is a combination of <
filter-id
>:<domain-id
>:<crn
> attributes concatenated with ":". - Cis
Id string - The ID of the CIS service instance.
- Description string
- The information about this filter to help identify the purpose of it.
- Domain
Id string - The ID of the domain to add the Filter.
- Expression string
- The expression of filter.
- Filter
Id string - (String) Unique identifier for the Filter.
- Paused bool
- Whether this filter is currently disabled.
- Cis
Filter stringId - (String) The ID of filter resource. It is a combination of <
filter-id
>:<domain-id
>:<crn
> attributes concatenated with ":". - Cis
Id string - The ID of the CIS service instance.
- Description string
- The information about this filter to help identify the purpose of it.
- Domain
Id string - The ID of the domain to add the Filter.
- Expression string
- The expression of filter.
- Filter
Id string - (String) Unique identifier for the Filter.
- Paused bool
- Whether this filter is currently disabled.
- cis
Filter StringId - (String) The ID of filter resource. It is a combination of <
filter-id
>:<domain-id
>:<crn
> attributes concatenated with ":". - cis
Id String - The ID of the CIS service instance.
- description String
- The information about this filter to help identify the purpose of it.
- domain
Id String - The ID of the domain to add the Filter.
- expression String
- The expression of filter.
- filter
Id String - (String) Unique identifier for the Filter.
- paused Boolean
- Whether this filter is currently disabled.
- cis
Filter stringId - (String) The ID of filter resource. It is a combination of <
filter-id
>:<domain-id
>:<crn
> attributes concatenated with ":". - cis
Id string - The ID of the CIS service instance.
- description string
- The information about this filter to help identify the purpose of it.
- domain
Id string - The ID of the domain to add the Filter.
- expression string
- The expression of filter.
- filter
Id string - (String) Unique identifier for the Filter.
- paused boolean
- Whether this filter is currently disabled.
- cis_
filter_ strid - (String) The ID of filter resource. It is a combination of <
filter-id
>:<domain-id
>:<crn
> attributes concatenated with ":". - cis_
id str - The ID of the CIS service instance.
- description str
- The information about this filter to help identify the purpose of it.
- domain_
id str - The ID of the domain to add the Filter.
- expression str
- The expression of filter.
- filter_
id str - (String) Unique identifier for the Filter.
- paused bool
- Whether this filter is currently disabled.
- cis
Filter StringId - (String) The ID of filter resource. It is a combination of <
filter-id
>:<domain-id
>:<crn
> attributes concatenated with ":". - cis
Id String - The ID of the CIS service instance.
- description String
- The information about this filter to help identify the purpose of it.
- domain
Id String - The ID of the domain to add the Filter.
- expression String
- The expression of filter.
- filter
Id String - (String) Unique identifier for the Filter.
- paused Boolean
- Whether this filter is currently disabled.
Import
The ibm_cis_filter
resource can be imported using the id
. The ID is formed from the Filter ID
, the Domain ID
of the domain and the CRN
(Cloud Resource Name) concatentated usinga :
character.
The Domain ID and CRN will be located on the Overview page of the Internet Services instance under the Domain heading of the UI, or via using the ibmcloud cis
CLI commands.
Domain ID is a 32 digit character string of the form:
9caf68812ae9b3f0377fdf986751a78f
CRN is a 120 digit character string of the form:
crn:v1:bluemix:public:internet-svcs:global:a/4ea1882a2d3401ed1e459979941966ea:31fa970d-51d0-4b05-893e-251cba75a7b3::
Filter ID is a 32 digit character string of the form:
d72c91492cc24d8286fb713d406abe91
.
Syntax
$ pulumi import ibm:index/cisFilter:CisFilter myorg <filter_id>:<domain-id>:<crn>
Example
$ pulumi import ibm:index/cisFilter:CisFilter myorg
d72c91492cc24d8286fb713d406abe91:0b30801280dc2dacac1c3960c33b9ccb:crn:v1:bluemix:public:internet-svcs-ci:global:a/01652b251c3ae2787110a995d8db0135:9054ad06-3485-421a-9300-fe3fb4b79e1d::
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.