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

ibm.CisRulesetVersionDetach

Explore with Pulumi AI

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

    Provides an IBM Cloud Internet Services ruleset version resource of an instance or domain to be detached. This allow ruleset version to delete. For more information about IBM Cloud Internet Services ruleset version detach, see ruleset instance.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    // delete ruleset of a domain or instance
    const tests = new ibm.CisRulesetVersionDetach("tests", {
        cisId: ibm_cis.instance.id,
        domainId: data.ibm_cis_domain.cis_domain.domain_id,
        rulesetId: "<id of the ruleset>",
        version: "<ruleset version>",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    # delete ruleset of a domain or instance
    tests = ibm.CisRulesetVersionDetach("tests",
        cis_id=ibm_cis["instance"]["id"],
        domain_id=data["ibm_cis_domain"]["cis_domain"]["domain_id"],
        ruleset_id="<id of the ruleset>",
        version="<ruleset version>")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// delete ruleset of a domain or instance
    		_, err := ibm.NewCisRulesetVersionDetach(ctx, "tests", &ibm.CisRulesetVersionDetachArgs{
    			CisId:     pulumi.Any(ibm_cis.Instance.Id),
    			DomainId:  pulumi.Any(data.Ibm_cis_domain.Cis_domain.Domain_id),
    			RulesetId: pulumi.String("<id of the ruleset>"),
    			Version:   pulumi.String("<ruleset version>"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        // delete ruleset of a domain or instance
        var tests = new Ibm.CisRulesetVersionDetach("tests", new()
        {
            CisId = ibm_cis.Instance.Id,
            DomainId = data.Ibm_cis_domain.Cis_domain.Domain_id,
            RulesetId = "<id of the ruleset>",
            Version = "<ruleset version>",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.CisRulesetVersionDetach;
    import com.pulumi.ibm.CisRulesetVersionDetachArgs;
    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) {
            // delete ruleset of a domain or instance
            var tests = new CisRulesetVersionDetach("tests", CisRulesetVersionDetachArgs.builder()
                .cisId(ibm_cis.instance().id())
                .domainId(data.ibm_cis_domain().cis_domain().domain_id())
                .rulesetId("<id of the ruleset>")
                .version("<ruleset version>")
                .build());
    
        }
    }
    
    resources:
      # delete ruleset of a domain or instance
      tests:
        type: ibm:CisRulesetVersionDetach
        properties:
          cisId: ${ibm_cis.instance.id}
          domainId: ${data.ibm_cis_domain.cis_domain.domain_id}
          rulesetId: <id of the ruleset>
          version: <ruleset version>
    

    Create CisRulesetVersionDetach Resource

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

    Constructor syntax

    new CisRulesetVersionDetach(name: string, args: CisRulesetVersionDetachArgs, opts?: CustomResourceOptions);
    @overload
    def CisRulesetVersionDetach(resource_name: str,
                                args: CisRulesetVersionDetachArgs,
                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def CisRulesetVersionDetach(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                cis_id: Optional[str] = None,
                                ruleset_id: Optional[str] = None,
                                version: Optional[str] = None,
                                cis_ruleset_version_detach_id: Optional[str] = None,
                                domain_id: Optional[str] = None)
    func NewCisRulesetVersionDetach(ctx *Context, name string, args CisRulesetVersionDetachArgs, opts ...ResourceOption) (*CisRulesetVersionDetach, error)
    public CisRulesetVersionDetach(string name, CisRulesetVersionDetachArgs args, CustomResourceOptions? opts = null)
    public CisRulesetVersionDetach(String name, CisRulesetVersionDetachArgs args)
    public CisRulesetVersionDetach(String name, CisRulesetVersionDetachArgs args, CustomResourceOptions options)
    
    type: ibm:CisRulesetVersionDetach
    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 CisRulesetVersionDetachArgs
    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 CisRulesetVersionDetachArgs
    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 CisRulesetVersionDetachArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CisRulesetVersionDetachArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CisRulesetVersionDetachArgs
    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 cisRulesetVersionDetachResource = new Ibm.CisRulesetVersionDetach("cisRulesetVersionDetachResource", new()
    {
        CisId = "string",
        RulesetId = "string",
        Version = "string",
        CisRulesetVersionDetachId = "string",
        DomainId = "string",
    });
    
    example, err := ibm.NewCisRulesetVersionDetach(ctx, "cisRulesetVersionDetachResource", &ibm.CisRulesetVersionDetachArgs{
    	CisId:                     pulumi.String("string"),
    	RulesetId:                 pulumi.String("string"),
    	Version:                   pulumi.String("string"),
    	CisRulesetVersionDetachId: pulumi.String("string"),
    	DomainId:                  pulumi.String("string"),
    })
    
    var cisRulesetVersionDetachResource = new CisRulesetVersionDetach("cisRulesetVersionDetachResource", CisRulesetVersionDetachArgs.builder()
        .cisId("string")
        .rulesetId("string")
        .version("string")
        .cisRulesetVersionDetachId("string")
        .domainId("string")
        .build());
    
    cis_ruleset_version_detach_resource = ibm.CisRulesetVersionDetach("cisRulesetVersionDetachResource",
        cis_id="string",
        ruleset_id="string",
        version="string",
        cis_ruleset_version_detach_id="string",
        domain_id="string")
    
    const cisRulesetVersionDetachResource = new ibm.CisRulesetVersionDetach("cisRulesetVersionDetachResource", {
        cisId: "string",
        rulesetId: "string",
        version: "string",
        cisRulesetVersionDetachId: "string",
        domainId: "string",
    });
    
    type: ibm:CisRulesetVersionDetach
    properties:
        cisId: string
        cisRulesetVersionDetachId: string
        domainId: string
        rulesetId: string
        version: string
    

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

    CisId string
    The ID of the CIS service instance.
    RulesetId string
    ID of the ruleset.
    Version string
    Version of the ruleset to be deleted. You can not delete the latest version of the ruleset.
    CisRulesetVersionDetachId string
    DomainId string
    The Domain/Zone ID of the CIS service instance. If domain_id is provided the request will be made at the zone/domain level otherwise the request will be made at the instance level.
    CisId string
    The ID of the CIS service instance.
    RulesetId string
    ID of the ruleset.
    Version string
    Version of the ruleset to be deleted. You can not delete the latest version of the ruleset.
    CisRulesetVersionDetachId string
    DomainId string
    The Domain/Zone ID of the CIS service instance. If domain_id is provided the request will be made at the zone/domain level otherwise the request will be made at the instance level.
    cisId String
    The ID of the CIS service instance.
    rulesetId String
    ID of the ruleset.
    version String
    Version of the ruleset to be deleted. You can not delete the latest version of the ruleset.
    cisRulesetVersionDetachId String
    domainId String
    The Domain/Zone ID of the CIS service instance. If domain_id is provided the request will be made at the zone/domain level otherwise the request will be made at the instance level.
    cisId string
    The ID of the CIS service instance.
    rulesetId string
    ID of the ruleset.
    version string
    Version of the ruleset to be deleted. You can not delete the latest version of the ruleset.
    cisRulesetVersionDetachId string
    domainId string
    The Domain/Zone ID of the CIS service instance. If domain_id is provided the request will be made at the zone/domain level otherwise the request will be made at the instance level.
    cis_id str
    The ID of the CIS service instance.
    ruleset_id str
    ID of the ruleset.
    version str
    Version of the ruleset to be deleted. You can not delete the latest version of the ruleset.
    cis_ruleset_version_detach_id str
    domain_id str
    The Domain/Zone ID of the CIS service instance. If domain_id is provided the request will be made at the zone/domain level otherwise the request will be made at the instance level.
    cisId String
    The ID of the CIS service instance.
    rulesetId String
    ID of the ruleset.
    version String
    Version of the ruleset to be deleted. You can not delete the latest version of the ruleset.
    cisRulesetVersionDetachId String
    domainId String
    The Domain/Zone ID of the CIS service instance. If domain_id is provided the request will be made at the zone/domain level otherwise the request will be made at the instance level.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing CisRulesetVersionDetach Resource

    Get an existing CisRulesetVersionDetach 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?: CisRulesetVersionDetachState, opts?: CustomResourceOptions): CisRulesetVersionDetach
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cis_id: Optional[str] = None,
            cis_ruleset_version_detach_id: Optional[str] = None,
            domain_id: Optional[str] = None,
            ruleset_id: Optional[str] = None,
            version: Optional[str] = None) -> CisRulesetVersionDetach
    func GetCisRulesetVersionDetach(ctx *Context, name string, id IDInput, state *CisRulesetVersionDetachState, opts ...ResourceOption) (*CisRulesetVersionDetach, error)
    public static CisRulesetVersionDetach Get(string name, Input<string> id, CisRulesetVersionDetachState? state, CustomResourceOptions? opts = null)
    public static CisRulesetVersionDetach get(String name, Output<String> id, CisRulesetVersionDetachState state, CustomResourceOptions options)
    resources:  _:    type: ibm:CisRulesetVersionDetach    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:
    CisId string
    The ID of the CIS service instance.
    CisRulesetVersionDetachId string
    DomainId string
    The Domain/Zone ID of the CIS service instance. If domain_id is provided the request will be made at the zone/domain level otherwise the request will be made at the instance level.
    RulesetId string
    ID of the ruleset.
    Version string
    Version of the ruleset to be deleted. You can not delete the latest version of the ruleset.
    CisId string
    The ID of the CIS service instance.
    CisRulesetVersionDetachId string
    DomainId string
    The Domain/Zone ID of the CIS service instance. If domain_id is provided the request will be made at the zone/domain level otherwise the request will be made at the instance level.
    RulesetId string
    ID of the ruleset.
    Version string
    Version of the ruleset to be deleted. You can not delete the latest version of the ruleset.
    cisId String
    The ID of the CIS service instance.
    cisRulesetVersionDetachId String
    domainId String
    The Domain/Zone ID of the CIS service instance. If domain_id is provided the request will be made at the zone/domain level otherwise the request will be made at the instance level.
    rulesetId String
    ID of the ruleset.
    version String
    Version of the ruleset to be deleted. You can not delete the latest version of the ruleset.
    cisId string
    The ID of the CIS service instance.
    cisRulesetVersionDetachId string
    domainId string
    The Domain/Zone ID of the CIS service instance. If domain_id is provided the request will be made at the zone/domain level otherwise the request will be made at the instance level.
    rulesetId string
    ID of the ruleset.
    version string
    Version of the ruleset to be deleted. You can not delete the latest version of the ruleset.
    cis_id str
    The ID of the CIS service instance.
    cis_ruleset_version_detach_id str
    domain_id str
    The Domain/Zone ID of the CIS service instance. If domain_id is provided the request will be made at the zone/domain level otherwise the request will be made at the instance level.
    ruleset_id str
    ID of the ruleset.
    version str
    Version of the ruleset to be deleted. You can not delete the latest version of the ruleset.
    cisId String
    The ID of the CIS service instance.
    cisRulesetVersionDetachId String
    domainId String
    The Domain/Zone ID of the CIS service instance. If domain_id is provided the request will be made at the zone/domain level otherwise the request will be made at the instance level.
    rulesetId String
    ID of the ruleset.
    version String
    Version of the ruleset to be deleted. You can not delete the latest version of the ruleset.

    Import

    Import is not possible, as there is no way to read the resource module.

    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