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

dome9.ImageAssurancePolicy

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 image assurance policy in CloudGuard for Kubernetes. An image assurance policy is the combination of a Ruleset applied to a specific Kubernetes environment with specific action.

    Example Usage

    Basic usage:

    import * as pulumi from "@pulumi/pulumi";
    import * as dome9 from "@pulumi/dome9";
    
    const testIaPolicy = new dome9.ImageAssurancePolicy("testIaPolicy", {
        admissionControlAction: "Detection",
        admissionControlUnscannedAction: "Detection",
        notificationIds: ["NOTIFICATION IDS"],
        rulesetId: 0,
        targetId: "Environment ID",
        targetType: "Environment",
    });
    
    import pulumi
    import pulumi_dome9 as dome9
    
    test_ia_policy = dome9.ImageAssurancePolicy("testIaPolicy",
        admission_control_action="Detection",
        admission_control_unscanned_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.NewImageAssurancePolicy(ctx, "testIaPolicy", &dome9.ImageAssurancePolicyArgs{
    			AdmissionControlAction:          pulumi.String("Detection"),
    			AdmissionControlUnscannedAction: 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 testIaPolicy = new Dome9.ImageAssurancePolicy("testIaPolicy", new()
        {
            AdmissionControlAction = "Detection",
            AdmissionControlUnscannedAction = "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.ImageAssurancePolicy;
    import com.pulumi.dome9.ImageAssurancePolicyArgs;
    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 testIaPolicy = new ImageAssurancePolicy("testIaPolicy", ImageAssurancePolicyArgs.builder()
                .admissionControlAction("Detection")
                .admissionControlUnscannedAction("Detection")
                .notificationIds("NOTIFICATION IDS")
                .rulesetId(0)
                .targetId("Environment ID")
                .targetType("Environment")
                .build());
    
        }
    }
    
    resources:
      testIaPolicy:
        type: dome9:ImageAssurancePolicy
        properties:
          admissionControlAction: Detection
          admissionControlUnscannedAction: Detection
          notificationIds:
            - NOTIFICATION IDS
          rulesetId: 0
          targetId: Environment ID
          targetType: Environment
    

    Create ImageAssurancePolicy Resource

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

    Constructor syntax

    new ImageAssurancePolicy(name: string, args: ImageAssurancePolicyArgs, opts?: CustomResourceOptions);
    @overload
    def ImageAssurancePolicy(resource_name: str,
                             args: ImageAssurancePolicyArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def ImageAssurancePolicy(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             notification_ids: Optional[Sequence[str]] = None,
                             ruleset_id: Optional[float] = None,
                             target_id: Optional[str] = None,
                             target_type: Optional[str] = None,
                             admission_control_action: Optional[str] = None,
                             admission_control_unscanned_action: Optional[str] = None,
                             image_assurance_policy_id: Optional[str] = None)
    func NewImageAssurancePolicy(ctx *Context, name string, args ImageAssurancePolicyArgs, opts ...ResourceOption) (*ImageAssurancePolicy, error)
    public ImageAssurancePolicy(string name, ImageAssurancePolicyArgs args, CustomResourceOptions? opts = null)
    public ImageAssurancePolicy(String name, ImageAssurancePolicyArgs args)
    public ImageAssurancePolicy(String name, ImageAssurancePolicyArgs args, CustomResourceOptions options)
    
    type: dome9:ImageAssurancePolicy
    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 ImageAssurancePolicyArgs
    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 ImageAssurancePolicyArgs
    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 ImageAssurancePolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ImageAssurancePolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ImageAssurancePolicyArgs
    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 imageAssurancePolicyResource = new Dome9.ImageAssurancePolicy("imageAssurancePolicyResource", new()
    {
        NotificationIds = new[]
        {
            "string",
        },
        RulesetId = 0,
        TargetId = "string",
        TargetType = "string",
        AdmissionControlAction = "string",
        AdmissionControlUnscannedAction = "string",
        ImageAssurancePolicyId = "string",
    });
    
    example, err := dome9.NewImageAssurancePolicy(ctx, "imageAssurancePolicyResource", &dome9.ImageAssurancePolicyArgs{
    	NotificationIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	RulesetId:                       pulumi.Float64(0),
    	TargetId:                        pulumi.String("string"),
    	TargetType:                      pulumi.String("string"),
    	AdmissionControlAction:          pulumi.String("string"),
    	AdmissionControlUnscannedAction: pulumi.String("string"),
    	ImageAssurancePolicyId:          pulumi.String("string"),
    })
    
    var imageAssurancePolicyResource = new ImageAssurancePolicy("imageAssurancePolicyResource", ImageAssurancePolicyArgs.builder()
        .notificationIds("string")
        .rulesetId(0)
        .targetId("string")
        .targetType("string")
        .admissionControlAction("string")
        .admissionControlUnscannedAction("string")
        .imageAssurancePolicyId("string")
        .build());
    
    image_assurance_policy_resource = dome9.ImageAssurancePolicy("imageAssurancePolicyResource",
        notification_ids=["string"],
        ruleset_id=0,
        target_id="string",
        target_type="string",
        admission_control_action="string",
        admission_control_unscanned_action="string",
        image_assurance_policy_id="string")
    
    const imageAssurancePolicyResource = new dome9.ImageAssurancePolicy("imageAssurancePolicyResource", {
        notificationIds: ["string"],
        rulesetId: 0,
        targetId: "string",
        targetType: "string",
        admissionControlAction: "string",
        admissionControlUnscannedAction: "string",
        imageAssurancePolicyId: "string",
    });
    
    type: dome9:ImageAssurancePolicy
    properties:
        admissionControlAction: string
        admissionControlUnscannedAction: string
        imageAssurancePolicyId: string
        notificationIds:
            - string
        rulesetId: 0
        targetId: string
        targetType: string
    

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

    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 imageassurance policy type ("Environment", "OrganizationalUnit").
    AdmissionControlAction string
    The imageassurance policy action ("Prevention", "Detection").
    AdmissionControlUnscannedAction string
    The imageassurance policy action ("Prevention", "Detection").
    ImageAssurancePolicyId string
    Id of the imageassurance 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 imageassurance policy type ("Environment", "OrganizationalUnit").
    AdmissionControlAction string
    The imageassurance policy action ("Prevention", "Detection").
    AdmissionControlUnscannedAction string
    The imageassurance policy action ("Prevention", "Detection").
    ImageAssurancePolicyId string
    Id of the imageassurance 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 imageassurance policy type ("Environment", "OrganizationalUnit").
    admissionControlAction String
    The imageassurance policy action ("Prevention", "Detection").
    admissionControlUnscannedAction String
    The imageassurance policy action ("Prevention", "Detection").
    imageAssurancePolicyId String
    Id of the imageassurance 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 imageassurance policy type ("Environment", "OrganizationalUnit").
    admissionControlAction string
    The imageassurance policy action ("Prevention", "Detection").
    admissionControlUnscannedAction string
    The imageassurance policy action ("Prevention", "Detection").
    imageAssurancePolicyId string
    Id of the imageassurance 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 imageassurance policy type ("Environment", "OrganizationalUnit").
    admission_control_action str
    The imageassurance policy action ("Prevention", "Detection").
    admission_control_unscanned_action str
    The imageassurance policy action ("Prevention", "Detection").
    image_assurance_policy_id str
    Id of the imageassurance 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 imageassurance policy type ("Environment", "OrganizationalUnit").
    admissionControlAction String
    The imageassurance policy action ("Prevention", "Detection").
    admissionControlUnscannedAction String
    The imageassurance policy action ("Prevention", "Detection").
    imageAssurancePolicyId String
    Id of the imageassurance policy.

    Outputs

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

    Get an existing ImageAssurancePolicy 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?: ImageAssurancePolicyState, opts?: CustomResourceOptions): ImageAssurancePolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            admission_control_action: Optional[str] = None,
            admission_control_unscanned_action: Optional[str] = None,
            image_assurance_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) -> ImageAssurancePolicy
    func GetImageAssurancePolicy(ctx *Context, name string, id IDInput, state *ImageAssurancePolicyState, opts ...ResourceOption) (*ImageAssurancePolicy, error)
    public static ImageAssurancePolicy Get(string name, Input<string> id, ImageAssurancePolicyState? state, CustomResourceOptions? opts = null)
    public static ImageAssurancePolicy get(String name, Output<String> id, ImageAssurancePolicyState state, CustomResourceOptions options)
    resources:  _:    type: dome9:ImageAssurancePolicy    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:
    AdmissionControlAction string
    The imageassurance policy action ("Prevention", "Detection").
    AdmissionControlUnscannedAction string
    The imageassurance policy action ("Prevention", "Detection").
    ImageAssurancePolicyId string
    Id of the imageassurance 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 imageassurance policy type ("Environment", "OrganizationalUnit").
    AdmissionControlAction string
    The imageassurance policy action ("Prevention", "Detection").
    AdmissionControlUnscannedAction string
    The imageassurance policy action ("Prevention", "Detection").
    ImageAssurancePolicyId string
    Id of the imageassurance 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 imageassurance policy type ("Environment", "OrganizationalUnit").
    admissionControlAction String
    The imageassurance policy action ("Prevention", "Detection").
    admissionControlUnscannedAction String
    The imageassurance policy action ("Prevention", "Detection").
    imageAssurancePolicyId String
    Id of the imageassurance 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 imageassurance policy type ("Environment", "OrganizationalUnit").
    admissionControlAction string
    The imageassurance policy action ("Prevention", "Detection").
    admissionControlUnscannedAction string
    The imageassurance policy action ("Prevention", "Detection").
    imageAssurancePolicyId string
    Id of the imageassurance 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 imageassurance policy type ("Environment", "OrganizationalUnit").
    admission_control_action str
    The imageassurance policy action ("Prevention", "Detection").
    admission_control_unscanned_action str
    The imageassurance policy action ("Prevention", "Detection").
    image_assurance_policy_id str
    Id of the imageassurance 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 imageassurance policy type ("Environment", "OrganizationalUnit").
    admissionControlAction String
    The imageassurance policy action ("Prevention", "Detection").
    admissionControlUnscannedAction String
    The imageassurance policy action ("Prevention", "Detection").
    imageAssurancePolicyId String
    Id of the imageassurance 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 imageassurance policy type ("Environment", "OrganizationalUnit").

    Import

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

    For example:

    $ pulumi import dome9:index/imageAssurancePolicy:ImageAssurancePolicy 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