# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities

__all__ = ['AppSecEvalArgs', 'AppSecEval']

@pulumi.input_type
class AppSecEvalArgs:
    def __init__(__self__, *,
                 config_id: pulumi.Input[int],
                 eval_operation: pulumi.Input[str],
                 security_policy_id: pulumi.Input[str]):
        """
        The set of arguments for constructing a AppSecEval resource.
        :param pulumi.Input[int] config_id: The ID of the security configuration to use.
        :param pulumi.Input[str] eval_operation: The operation to perform: START, STOP, RESTART, UPDATE, or COMPLETE.
        :param pulumi.Input[str] security_policy_id: The ID of the security policy to use.
        """
        pulumi.set(__self__, "config_id", config_id)
        pulumi.set(__self__, "eval_operation", eval_operation)
        pulumi.set(__self__, "security_policy_id", security_policy_id)

    @property
    @pulumi.getter(name="configId")
    def config_id(self) -> pulumi.Input[int]:
        """
        The ID of the security configuration to use.
        """
        return pulumi.get(self, "config_id")

    @config_id.setter
    def config_id(self, value: pulumi.Input[int]):
        pulumi.set(self, "config_id", value)

    @property
    @pulumi.getter(name="evalOperation")
    def eval_operation(self) -> pulumi.Input[str]:
        """
        The operation to perform: START, STOP, RESTART, UPDATE, or COMPLETE.
        """
        return pulumi.get(self, "eval_operation")

    @eval_operation.setter
    def eval_operation(self, value: pulumi.Input[str]):
        pulumi.set(self, "eval_operation", value)

    @property
    @pulumi.getter(name="securityPolicyId")
    def security_policy_id(self) -> pulumi.Input[str]:
        """
        The ID of the security policy to use.
        """
        return pulumi.get(self, "security_policy_id")

    @security_policy_id.setter
    def security_policy_id(self, value: pulumi.Input[str]):
        pulumi.set(self, "security_policy_id", value)


@pulumi.input_type
class _AppSecEvalState:
    def __init__(__self__, *,
                 config_id: Optional[pulumi.Input[int]] = None,
                 current_ruleset: Optional[pulumi.Input[str]] = None,
                 eval_operation: Optional[pulumi.Input[str]] = None,
                 eval_status: Optional[pulumi.Input[str]] = None,
                 evaluating_ruleset: Optional[pulumi.Input[str]] = None,
                 expiration_date: Optional[pulumi.Input[str]] = None,
                 security_policy_id: Optional[pulumi.Input[str]] = None):
        """
        Input properties used for looking up and filtering AppSecEval resources.
        :param pulumi.Input[int] config_id: The ID of the security configuration to use.
        :param pulumi.Input[str] current_ruleset: The set of rules currently in effect.
        :param pulumi.Input[str] eval_operation: The operation to perform: START, STOP, RESTART, UPDATE, or COMPLETE.
        :param pulumi.Input[str] eval_status: Either `enabled` if an evaluation is currently in progress (that is, if the `eval_operation` parameter was `START`, `RESTART`, or `COMPLETE`) or `disabled` otherwise (that is, if the `eval_operation` parameter was `STOP` or `UPDATE`).
        :param pulumi.Input[str] evaluating_ruleset: The set of rules being evaluated.
        :param pulumi.Input[str] expiration_date: The date on which the evaluation period ends.
        :param pulumi.Input[str] security_policy_id: The ID of the security policy to use.
        """
        if config_id is not None:
            pulumi.set(__self__, "config_id", config_id)
        if current_ruleset is not None:
            pulumi.set(__self__, "current_ruleset", current_ruleset)
        if eval_operation is not None:
            pulumi.set(__self__, "eval_operation", eval_operation)
        if eval_status is not None:
            pulumi.set(__self__, "eval_status", eval_status)
        if evaluating_ruleset is not None:
            pulumi.set(__self__, "evaluating_ruleset", evaluating_ruleset)
        if expiration_date is not None:
            pulumi.set(__self__, "expiration_date", expiration_date)
        if security_policy_id is not None:
            pulumi.set(__self__, "security_policy_id", security_policy_id)

    @property
    @pulumi.getter(name="configId")
    def config_id(self) -> Optional[pulumi.Input[int]]:
        """
        The ID of the security configuration to use.
        """
        return pulumi.get(self, "config_id")

    @config_id.setter
    def config_id(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "config_id", value)

    @property
    @pulumi.getter(name="currentRuleset")
    def current_ruleset(self) -> Optional[pulumi.Input[str]]:
        """
        The set of rules currently in effect.
        """
        return pulumi.get(self, "current_ruleset")

    @current_ruleset.setter
    def current_ruleset(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "current_ruleset", value)

    @property
    @pulumi.getter(name="evalOperation")
    def eval_operation(self) -> Optional[pulumi.Input[str]]:
        """
        The operation to perform: START, STOP, RESTART, UPDATE, or COMPLETE.
        """
        return pulumi.get(self, "eval_operation")

    @eval_operation.setter
    def eval_operation(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "eval_operation", value)

    @property
    @pulumi.getter(name="evalStatus")
    def eval_status(self) -> Optional[pulumi.Input[str]]:
        """
        Either `enabled` if an evaluation is currently in progress (that is, if the `eval_operation` parameter was `START`, `RESTART`, or `COMPLETE`) or `disabled` otherwise (that is, if the `eval_operation` parameter was `STOP` or `UPDATE`).
        """
        return pulumi.get(self, "eval_status")

    @eval_status.setter
    def eval_status(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "eval_status", value)

    @property
    @pulumi.getter(name="evaluatingRuleset")
    def evaluating_ruleset(self) -> Optional[pulumi.Input[str]]:
        """
        The set of rules being evaluated.
        """
        return pulumi.get(self, "evaluating_ruleset")

    @evaluating_ruleset.setter
    def evaluating_ruleset(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "evaluating_ruleset", value)

    @property
    @pulumi.getter(name="expirationDate")
    def expiration_date(self) -> Optional[pulumi.Input[str]]:
        """
        The date on which the evaluation period ends.
        """
        return pulumi.get(self, "expiration_date")

    @expiration_date.setter
    def expiration_date(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "expiration_date", value)

    @property
    @pulumi.getter(name="securityPolicyId")
    def security_policy_id(self) -> Optional[pulumi.Input[str]]:
        """
        The ID of the security policy to use.
        """
        return pulumi.get(self, "security_policy_id")

    @security_policy_id.setter
    def security_policy_id(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "security_policy_id", value)


class AppSecEval(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 config_id: Optional[pulumi.Input[int]] = None,
                 eval_operation: Optional[pulumi.Input[str]] = None,
                 security_policy_id: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        """
        Use the `AppSecEval` resource to perform evaluation mode operations such as Start, Stop, Restart, Update, or Complete.

        ## Example Usage

        Basic usage:

        ```python
        import pulumi
        import pulumi_akamai as akamai

        configuration = akamai.get_app_sec_configuration(name=var["security_configuration"])
        eval_operation = akamai.AppSecEval("evalOperation",
            config_id=configuration.config_id,
            security_policy_id=var["security_policy_id"],
            eval_operation=var["eval_operation"])
        pulumi.export("evalModeEvaluatingRuleset", eval_operation.evaluating_ruleset)
        pulumi.export("evalModeExpirationDate", eval_operation.expiration_date)
        pulumi.export("evalModeCurrentRuleset", eval_operation.current_ruleset)
        pulumi.export("evalModeStatus", eval_operation.eval_status)
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[int] config_id: The ID of the security configuration to use.
        :param pulumi.Input[str] eval_operation: The operation to perform: START, STOP, RESTART, UPDATE, or COMPLETE.
        :param pulumi.Input[str] security_policy_id: The ID of the security policy to use.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: AppSecEvalArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Use the `AppSecEval` resource to perform evaluation mode operations such as Start, Stop, Restart, Update, or Complete.

        ## Example Usage

        Basic usage:

        ```python
        import pulumi
        import pulumi_akamai as akamai

        configuration = akamai.get_app_sec_configuration(name=var["security_configuration"])
        eval_operation = akamai.AppSecEval("evalOperation",
            config_id=configuration.config_id,
            security_policy_id=var["security_policy_id"],
            eval_operation=var["eval_operation"])
        pulumi.export("evalModeEvaluatingRuleset", eval_operation.evaluating_ruleset)
        pulumi.export("evalModeExpirationDate", eval_operation.expiration_date)
        pulumi.export("evalModeCurrentRuleset", eval_operation.current_ruleset)
        pulumi.export("evalModeStatus", eval_operation.eval_status)
        ```

        :param str resource_name: The name of the resource.
        :param AppSecEvalArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(AppSecEvalArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 config_id: Optional[pulumi.Input[int]] = None,
                 eval_operation: Optional[pulumi.Input[str]] = None,
                 security_policy_id: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        if opts is None:
            opts = pulumi.ResourceOptions()
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.version is None:
            opts.version = _utilities.get_version()
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = AppSecEvalArgs.__new__(AppSecEvalArgs)

            if config_id is None and not opts.urn:
                raise TypeError("Missing required property 'config_id'")
            __props__.__dict__["config_id"] = config_id
            if eval_operation is None and not opts.urn:
                raise TypeError("Missing required property 'eval_operation'")
            __props__.__dict__["eval_operation"] = eval_operation
            if security_policy_id is None and not opts.urn:
                raise TypeError("Missing required property 'security_policy_id'")
            __props__.__dict__["security_policy_id"] = security_policy_id
            __props__.__dict__["current_ruleset"] = None
            __props__.__dict__["eval_status"] = None
            __props__.__dict__["evaluating_ruleset"] = None
            __props__.__dict__["expiration_date"] = None
        super(AppSecEval, __self__).__init__(
            'akamai:index/appSecEval:AppSecEval',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            config_id: Optional[pulumi.Input[int]] = None,
            current_ruleset: Optional[pulumi.Input[str]] = None,
            eval_operation: Optional[pulumi.Input[str]] = None,
            eval_status: Optional[pulumi.Input[str]] = None,
            evaluating_ruleset: Optional[pulumi.Input[str]] = None,
            expiration_date: Optional[pulumi.Input[str]] = None,
            security_policy_id: Optional[pulumi.Input[str]] = None) -> 'AppSecEval':
        """
        Get an existing AppSecEval resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[int] config_id: The ID of the security configuration to use.
        :param pulumi.Input[str] current_ruleset: The set of rules currently in effect.
        :param pulumi.Input[str] eval_operation: The operation to perform: START, STOP, RESTART, UPDATE, or COMPLETE.
        :param pulumi.Input[str] eval_status: Either `enabled` if an evaluation is currently in progress (that is, if the `eval_operation` parameter was `START`, `RESTART`, or `COMPLETE`) or `disabled` otherwise (that is, if the `eval_operation` parameter was `STOP` or `UPDATE`).
        :param pulumi.Input[str] evaluating_ruleset: The set of rules being evaluated.
        :param pulumi.Input[str] expiration_date: The date on which the evaluation period ends.
        :param pulumi.Input[str] security_policy_id: The ID of the security policy to use.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _AppSecEvalState.__new__(_AppSecEvalState)

        __props__.__dict__["config_id"] = config_id
        __props__.__dict__["current_ruleset"] = current_ruleset
        __props__.__dict__["eval_operation"] = eval_operation
        __props__.__dict__["eval_status"] = eval_status
        __props__.__dict__["evaluating_ruleset"] = evaluating_ruleset
        __props__.__dict__["expiration_date"] = expiration_date
        __props__.__dict__["security_policy_id"] = security_policy_id
        return AppSecEval(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="configId")
    def config_id(self) -> pulumi.Output[int]:
        """
        The ID of the security configuration to use.
        """
        return pulumi.get(self, "config_id")

    @property
    @pulumi.getter(name="currentRuleset")
    def current_ruleset(self) -> pulumi.Output[str]:
        """
        The set of rules currently in effect.
        """
        return pulumi.get(self, "current_ruleset")

    @property
    @pulumi.getter(name="evalOperation")
    def eval_operation(self) -> pulumi.Output[str]:
        """
        The operation to perform: START, STOP, RESTART, UPDATE, or COMPLETE.
        """
        return pulumi.get(self, "eval_operation")

    @property
    @pulumi.getter(name="evalStatus")
    def eval_status(self) -> pulumi.Output[str]:
        """
        Either `enabled` if an evaluation is currently in progress (that is, if the `eval_operation` parameter was `START`, `RESTART`, or `COMPLETE`) or `disabled` otherwise (that is, if the `eval_operation` parameter was `STOP` or `UPDATE`).
        """
        return pulumi.get(self, "eval_status")

    @property
    @pulumi.getter(name="evaluatingRuleset")
    def evaluating_ruleset(self) -> pulumi.Output[str]:
        """
        The set of rules being evaluated.
        """
        return pulumi.get(self, "evaluating_ruleset")

    @property
    @pulumi.getter(name="expirationDate")
    def expiration_date(self) -> pulumi.Output[str]:
        """
        The date on which the evaluation period ends.
        """
        return pulumi.get(self, "expiration_date")

    @property
    @pulumi.getter(name="securityPolicyId")
    def security_policy_id(self) -> pulumi.Output[str]:
        """
        The ID of the security policy to use.
        """
        return pulumi.get(self, "security_policy_id")

