ibm.CisRulesetVersionDetach
Explore with Pulumi AI
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:
- Cis
Id string - The ID of the CIS service instance.
- Ruleset
Id 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
Ruleset stringVersion Detach Id - Domain
Id 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 string - The ID of the CIS service instance.
- Ruleset
Id 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
Ruleset stringVersion Detach Id - Domain
Id 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 String - The ID of the CIS service instance.
- ruleset
Id 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
Ruleset StringVersion Detach Id - domain
Id 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 string - The ID of the CIS service instance.
- ruleset
Id 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
Ruleset stringVersion Detach Id - domain
Id 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_ strversion_ detach_ id - 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.
- cis
Id String - The ID of the CIS service instance.
- ruleset
Id 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
Ruleset StringVersion Detach Id - domain
Id 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.
- Cis
Id string - The ID of the CIS service instance.
- Cis
Ruleset stringVersion Detach Id - Domain
Id 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.
- Ruleset
Id 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 string - The ID of the CIS service instance.
- Cis
Ruleset stringVersion Detach Id - Domain
Id 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.
- Ruleset
Id 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 String - The ID of the CIS service instance.
- cis
Ruleset StringVersion Detach Id - domain
Id 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.
- ruleset
Id 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 string - The ID of the CIS service instance.
- cis
Ruleset stringVersion Detach Id - domain
Id 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.
- ruleset
Id 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_ strversion_ detach_ id - 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.
- cis
Id String - The ID of the CIS service instance.
- cis
Ruleset StringVersion Detach Id - domain
Id 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.
- ruleset
Id 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.