1. Packages
  2. Dome9 Provider
  3. API Docs
  4. AdmissionControlPolicy
dome9 1.40.3 published on Monday, Apr 14, 2025 by dome9

dome9.AdmissionControlPolicy

Explore with Pulumi AI

dome9 logo
dome9 1.40.3 published on Monday, Apr 14, 2025 by dome9

    This resource is used to create and modify admission control policy in CloudGuard for Kubernetes. An admission control policy is the combination of a Ruleset applied to a specific Kubernetes environment with specific action, ruleset type have to be ‘kubernetesruntimeassurance’’.

    Example Usage

    Basic usage:

    import * as pulumi from "@pulumi/pulumi";
    import * as dome9 from "@pulumi/dome9";
    
    const testAcPolicy = new dome9.AdmissionControlPolicy("testAcPolicy", {
        action: "Detection",
        notificationIds: ["NOTIFICATION IDS"],
        rulesetId: 0,
        targetId: "Environment ID",
        targetType: "Environment",
    });
    
    import pulumi
    import pulumi_dome9 as dome9
    
    test_ac_policy = dome9.AdmissionControlPolicy("testAcPolicy",
        action="Detection",
        notification_ids=["NOTIFICATION IDS"],
        ruleset_id=0,
        target_id="Environment ID",
        target_type="Environment")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/dome9/dome9"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := dome9.NewAdmissionControlPolicy(ctx, "testAcPolicy", &dome9.AdmissionControlPolicyArgs{
    			Action: pulumi.String("Detection"),
    			NotificationIds: pulumi.StringArray{
    				pulumi.String("NOTIFICATION IDS"),
    			},
    			RulesetId:  pulumi.Float64(0),
    			TargetId:   pulumi.String("Environment ID"),
    			TargetType: pulumi.String("Environment"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Dome9 = Pulumi.Dome9;
    
    return await Deployment.RunAsync(() => 
    {
        var testAcPolicy = new Dome9.AdmissionControlPolicy("testAcPolicy", new()
        {
            Action = "Detection",
            NotificationIds = new[]
            {
                "NOTIFICATION IDS",
            },
            RulesetId = 0,
            TargetId = "Environment ID",
            TargetType = "Environment",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.dome9.AdmissionControlPolicy;
    import com.pulumi.dome9.AdmissionControlPolicyArgs;
    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 testAcPolicy = new AdmissionControlPolicy("testAcPolicy", AdmissionControlPolicyArgs.builder()
                .action("Detection")
                .notificationIds("NOTIFICATION IDS")
                .rulesetId(0)
                .targetId("Environment ID")
                .targetType("Environment")
                .build());
    
        }
    }
    
    resources:
      testAcPolicy:
        type: dome9:AdmissionControlPolicy
        properties:
          action: Detection
          notificationIds:
            - NOTIFICATION IDS
          rulesetId: 0
          targetId: Environment ID
          targetType: Environment
    

    Create AdmissionControlPolicy Resource

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

    Constructor syntax

    new AdmissionControlPolicy(name: string, args: AdmissionControlPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def AdmissionControlPolicy(resource_name: str,
                               args: AdmissionControlPolicyArgs,
                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def AdmissionControlPolicy(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               action: Optional[str] = None,
                               notification_ids: Optional[Sequence[str]] = None,
                               ruleset_id: Optional[float] = None,
                               target_id: Optional[str] = None,
                               admission_control_policy_id: Optional[str] = None,
                               target_type: Optional[str] = None)
    func NewAdmissionControlPolicy(ctx *Context, name string, args AdmissionControlPolicyArgs, opts ...ResourceOption) (*AdmissionControlPolicy, error)
    public AdmissionControlPolicy(string name, AdmissionControlPolicyArgs args, CustomResourceOptions? opts = null)
    public AdmissionControlPolicy(String name, AdmissionControlPolicyArgs args)
    public AdmissionControlPolicy(String name, AdmissionControlPolicyArgs args, CustomResourceOptions options)
    
    type: dome9:AdmissionControlPolicy
    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 AdmissionControlPolicyArgs
    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 AdmissionControlPolicyArgs
    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 AdmissionControlPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AdmissionControlPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AdmissionControlPolicyArgs
    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 admissionControlPolicyResource = new Dome9.AdmissionControlPolicy("admissionControlPolicyResource", new()
    {
        Action = "string",
        NotificationIds = new[]
        {
            "string",
        },
        RulesetId = 0,
        TargetId = "string",
        AdmissionControlPolicyId = "string",
        TargetType = "string",
    });
    
    example, err := dome9.NewAdmissionControlPolicy(ctx, "admissionControlPolicyResource", &dome9.AdmissionControlPolicyArgs{
    	Action: pulumi.String("string"),
    	NotificationIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	RulesetId:                pulumi.Float64(0),
    	TargetId:                 pulumi.String("string"),
    	AdmissionControlPolicyId: pulumi.String("string"),
    	TargetType:               pulumi.String("string"),
    })
    
    var admissionControlPolicyResource = new AdmissionControlPolicy("admissionControlPolicyResource", AdmissionControlPolicyArgs.builder()
        .action("string")
        .notificationIds("string")
        .rulesetId(0)
        .targetId("string")
        .admissionControlPolicyId("string")
        .targetType("string")
        .build());
    
    admission_control_policy_resource = dome9.AdmissionControlPolicy("admissionControlPolicyResource",
        action="string",
        notification_ids=["string"],
        ruleset_id=0,
        target_id="string",
        admission_control_policy_id="string",
        target_type="string")
    
    const admissionControlPolicyResource = new dome9.AdmissionControlPolicy("admissionControlPolicyResource", {
        action: "string",
        notificationIds: ["string"],
        rulesetId: 0,
        targetId: "string",
        admissionControlPolicyId: "string",
        targetType: "string",
    });
    
    type: dome9:AdmissionControlPolicy
    properties:
        action: string
        admissionControlPolicyId: string
        notificationIds:
            - string
        rulesetId: 0
        targetId: string
        targetType: string
    

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

    Action string
    The admission control policy action ("Prevention", "Detection").
    NotificationIds List<string>
    The notification policy id's for the policy [list].
    RulesetId double
    The bundle id for the bundle that will be used in the policy.
    TargetId string
    The kubernetes environment id / organizational unit id.
    AdmissionControlPolicyId string
    Id of the admission control policy.
    TargetType string
    The admission control policy type ("Environment", "OrganizationalUnit").
    Action string
    The admission control policy action ("Prevention", "Detection").
    NotificationIds []string
    The notification policy id's for the policy [list].
    RulesetId float64
    The bundle id for the bundle that will be used in the policy.
    TargetId string
    The kubernetes environment id / organizational unit id.
    AdmissionControlPolicyId string
    Id of the admission control policy.
    TargetType string
    The admission control policy type ("Environment", "OrganizationalUnit").
    action String
    The admission control policy action ("Prevention", "Detection").
    notificationIds List<String>
    The notification policy id's for the policy [list].
    rulesetId Double
    The bundle id for the bundle that will be used in the policy.
    targetId String
    The kubernetes environment id / organizational unit id.
    admissionControlPolicyId String
    Id of the admission control policy.
    targetType String
    The admission control policy type ("Environment", "OrganizationalUnit").
    action string
    The admission control policy action ("Prevention", "Detection").
    notificationIds string[]
    The notification policy id's for the policy [list].
    rulesetId number
    The bundle id for the bundle that will be used in the policy.
    targetId string
    The kubernetes environment id / organizational unit id.
    admissionControlPolicyId string
    Id of the admission control policy.
    targetType string
    The admission control policy type ("Environment", "OrganizationalUnit").
    action str
    The admission control policy action ("Prevention", "Detection").
    notification_ids Sequence[str]
    The notification policy id's for the policy [list].
    ruleset_id float
    The bundle id for the bundle that will be used in the policy.
    target_id str
    The kubernetes environment id / organizational unit id.
    admission_control_policy_id str
    Id of the admission control policy.
    target_type str
    The admission control policy type ("Environment", "OrganizationalUnit").
    action String
    The admission control policy action ("Prevention", "Detection").
    notificationIds List<String>
    The notification policy id's for the policy [list].
    rulesetId Number
    The bundle id for the bundle that will be used in the policy.
    targetId String
    The kubernetes environment id / organizational unit id.
    admissionControlPolicyId String
    Id of the admission control policy.
    targetType String
    The admission control policy type ("Environment", "OrganizationalUnit").

    Outputs

    All input properties are implicitly available as output properties. Additionally, the AdmissionControlPolicy 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 AdmissionControlPolicy Resource

    Get an existing AdmissionControlPolicy 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?: AdmissionControlPolicyState, opts?: CustomResourceOptions): AdmissionControlPolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            action: Optional[str] = None,
            admission_control_policy_id: Optional[str] = None,
            notification_ids: Optional[Sequence[str]] = None,
            ruleset_id: Optional[float] = None,
            target_id: Optional[str] = None,
            target_type: Optional[str] = None) -> AdmissionControlPolicy
    func GetAdmissionControlPolicy(ctx *Context, name string, id IDInput, state *AdmissionControlPolicyState, opts ...ResourceOption) (*AdmissionControlPolicy, error)
    public static AdmissionControlPolicy Get(string name, Input<string> id, AdmissionControlPolicyState? state, CustomResourceOptions? opts = null)
    public static AdmissionControlPolicy get(String name, Output<String> id, AdmissionControlPolicyState state, CustomResourceOptions options)
    resources:  _:    type: dome9:AdmissionControlPolicy    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:
    Action string
    The admission control policy action ("Prevention", "Detection").
    AdmissionControlPolicyId string
    Id of the admission control policy.
    NotificationIds List<string>
    The notification policy id's for the policy [list].
    RulesetId double
    The bundle id for the bundle that will be used in the policy.
    TargetId string
    The kubernetes environment id / organizational unit id.
    TargetType string
    The admission control policy type ("Environment", "OrganizationalUnit").
    Action string
    The admission control policy action ("Prevention", "Detection").
    AdmissionControlPolicyId string
    Id of the admission control policy.
    NotificationIds []string
    The notification policy id's for the policy [list].
    RulesetId float64
    The bundle id for the bundle that will be used in the policy.
    TargetId string
    The kubernetes environment id / organizational unit id.
    TargetType string
    The admission control policy type ("Environment", "OrganizationalUnit").
    action String
    The admission control policy action ("Prevention", "Detection").
    admissionControlPolicyId String
    Id of the admission control policy.
    notificationIds List<String>
    The notification policy id's for the policy [list].
    rulesetId Double
    The bundle id for the bundle that will be used in the policy.
    targetId String
    The kubernetes environment id / organizational unit id.
    targetType String
    The admission control policy type ("Environment", "OrganizationalUnit").
    action string
    The admission control policy action ("Prevention", "Detection").
    admissionControlPolicyId string
    Id of the admission control policy.
    notificationIds string[]
    The notification policy id's for the policy [list].
    rulesetId number
    The bundle id for the bundle that will be used in the policy.
    targetId string
    The kubernetes environment id / organizational unit id.
    targetType string
    The admission control policy type ("Environment", "OrganizationalUnit").
    action str
    The admission control policy action ("Prevention", "Detection").
    admission_control_policy_id str
    Id of the admission control policy.
    notification_ids Sequence[str]
    The notification policy id's for the policy [list].
    ruleset_id float
    The bundle id for the bundle that will be used in the policy.
    target_id str
    The kubernetes environment id / organizational unit id.
    target_type str
    The admission control policy type ("Environment", "OrganizationalUnit").
    action String
    The admission control policy action ("Prevention", "Detection").
    admissionControlPolicyId String
    Id of the admission control policy.
    notificationIds List<String>
    The notification policy id's for the policy [list].
    rulesetId Number
    The bundle id for the bundle that will be used in the policy.
    targetId String
    The kubernetes environment id / organizational unit id.
    targetType String
    The admission control policy type ("Environment", "OrganizationalUnit").

    Import

    The policy can be imported; use <POLICY ID> as the import ID.

    For example:

    $ pulumi import dome9:index/admissionControlPolicy:AdmissionControlPolicy test 00000000-0000-0000-0000-000000000000
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    dome9 dome9/terraform-provider-dome9
    License
    Notes
    This Pulumi package is based on the dome9 Terraform Provider.
    dome9 logo
    dome9 1.40.3 published on Monday, Apr 14, 2025 by dome9