# 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 copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
from ._inputs import *

__all__ = ['InputSecurityGroupArgs', 'InputSecurityGroup']

@pulumi.input_type
class InputSecurityGroupArgs:
    def __init__(__self__, *,
                 whitelist_rules: pulumi.Input[Sequence[pulumi.Input['InputSecurityGroupWhitelistRuleArgs']]],
                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None):
        """
        The set of arguments for constructing a InputSecurityGroup resource.
        :param pulumi.Input[Sequence[pulumi.Input['InputSecurityGroupWhitelistRuleArgs']]] whitelist_rules: Whitelist rules. See Whitelist Rules for more details.
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A map of tags to assign to the InputSecurityGroup. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
        """
        pulumi.set(__self__, "whitelist_rules", whitelist_rules)
        if tags is not None:
            pulumi.set(__self__, "tags", tags)

    @property
    @pulumi.getter(name="whitelistRules")
    def whitelist_rules(self) -> pulumi.Input[Sequence[pulumi.Input['InputSecurityGroupWhitelistRuleArgs']]]:
        """
        Whitelist rules. See Whitelist Rules for more details.
        """
        return pulumi.get(self, "whitelist_rules")

    @whitelist_rules.setter
    def whitelist_rules(self, value: pulumi.Input[Sequence[pulumi.Input['InputSecurityGroupWhitelistRuleArgs']]]):
        pulumi.set(self, "whitelist_rules", value)

    @property
    @pulumi.getter
    def tags(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
        """
        A map of tags to assign to the InputSecurityGroup. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
        """
        return pulumi.get(self, "tags")

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


@pulumi.input_type
class _InputSecurityGroupState:
    def __init__(__self__, *,
                 arn: Optional[pulumi.Input[str]] = None,
                 inputs: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 tags_all: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 whitelist_rules: Optional[pulumi.Input[Sequence[pulumi.Input['InputSecurityGroupWhitelistRuleArgs']]]] = None):
        """
        Input properties used for looking up and filtering InputSecurityGroup resources.
        :param pulumi.Input[str] arn: ARN of the InputSecurityGroup.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] inputs: The list of inputs currently using this InputSecurityGroup.
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A map of tags to assign to the InputSecurityGroup. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
        :param pulumi.Input[Sequence[pulumi.Input['InputSecurityGroupWhitelistRuleArgs']]] whitelist_rules: Whitelist rules. See Whitelist Rules for more details.
        """
        if arn is not None:
            pulumi.set(__self__, "arn", arn)
        if inputs is not None:
            pulumi.set(__self__, "inputs", inputs)
        if tags is not None:
            pulumi.set(__self__, "tags", tags)
        if tags_all is not None:
            pulumi.set(__self__, "tags_all", tags_all)
        if whitelist_rules is not None:
            pulumi.set(__self__, "whitelist_rules", whitelist_rules)

    @property
    @pulumi.getter
    def arn(self) -> Optional[pulumi.Input[str]]:
        """
        ARN of the InputSecurityGroup.
        """
        return pulumi.get(self, "arn")

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

    @property
    @pulumi.getter
    def inputs(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        The list of inputs currently using this InputSecurityGroup.
        """
        return pulumi.get(self, "inputs")

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

    @property
    @pulumi.getter
    def tags(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
        """
        A map of tags to assign to the InputSecurityGroup. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
        """
        return pulumi.get(self, "tags")

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

    @property
    @pulumi.getter(name="tagsAll")
    def tags_all(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
        return pulumi.get(self, "tags_all")

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

    @property
    @pulumi.getter(name="whitelistRules")
    def whitelist_rules(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['InputSecurityGroupWhitelistRuleArgs']]]]:
        """
        Whitelist rules. See Whitelist Rules for more details.
        """
        return pulumi.get(self, "whitelist_rules")

    @whitelist_rules.setter
    def whitelist_rules(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['InputSecurityGroupWhitelistRuleArgs']]]]):
        pulumi.set(self, "whitelist_rules", value)


class InputSecurityGroup(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 whitelist_rules: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InputSecurityGroupWhitelistRuleArgs']]]]] = None,
                 __props__=None):
        """
        Resource for managing an AWS MediaLive InputSecurityGroup.

        ## Example Usage
        ### Basic Usage

        ```python
        import pulumi
        import pulumi_aws as aws

        example = aws.medialive.InputSecurityGroup("example",
            tags={
                "ENVIRONMENT": "prod",
            },
            whitelist_rules=[aws.medialive.InputSecurityGroupWhitelistRuleArgs(
                cidr="10.0.0.8/32",
            )])
        ```

        ## Import

        MediaLive InputSecurityGroup can be imported using the `id`, e.g.,

        ```sh
         $ pulumi import aws:medialive/inputSecurityGroup:InputSecurityGroup example 123456
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A map of tags to assign to the InputSecurityGroup. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InputSecurityGroupWhitelistRuleArgs']]]] whitelist_rules: Whitelist rules. See Whitelist Rules for more details.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: InputSecurityGroupArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Resource for managing an AWS MediaLive InputSecurityGroup.

        ## Example Usage
        ### Basic Usage

        ```python
        import pulumi
        import pulumi_aws as aws

        example = aws.medialive.InputSecurityGroup("example",
            tags={
                "ENVIRONMENT": "prod",
            },
            whitelist_rules=[aws.medialive.InputSecurityGroupWhitelistRuleArgs(
                cidr="10.0.0.8/32",
            )])
        ```

        ## Import

        MediaLive InputSecurityGroup can be imported using the `id`, e.g.,

        ```sh
         $ pulumi import aws:medialive/inputSecurityGroup:InputSecurityGroup example 123456
        ```

        :param str resource_name: The name of the resource.
        :param InputSecurityGroupArgs 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(InputSecurityGroupArgs, 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,
                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 whitelist_rules: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InputSecurityGroupWhitelistRuleArgs']]]]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        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__ = InputSecurityGroupArgs.__new__(InputSecurityGroupArgs)

            __props__.__dict__["tags"] = tags
            if whitelist_rules is None and not opts.urn:
                raise TypeError("Missing required property 'whitelist_rules'")
            __props__.__dict__["whitelist_rules"] = whitelist_rules
            __props__.__dict__["arn"] = None
            __props__.__dict__["inputs"] = None
            __props__.__dict__["tags_all"] = None
        super(InputSecurityGroup, __self__).__init__(
            'aws:medialive/inputSecurityGroup:InputSecurityGroup',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            arn: Optional[pulumi.Input[str]] = None,
            inputs: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
            tags_all: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
            whitelist_rules: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InputSecurityGroupWhitelistRuleArgs']]]]] = None) -> 'InputSecurityGroup':
        """
        Get an existing InputSecurityGroup 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[str] arn: ARN of the InputSecurityGroup.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] inputs: The list of inputs currently using this InputSecurityGroup.
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A map of tags to assign to the InputSecurityGroup. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InputSecurityGroupWhitelistRuleArgs']]]] whitelist_rules: Whitelist rules. See Whitelist Rules for more details.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _InputSecurityGroupState.__new__(_InputSecurityGroupState)

        __props__.__dict__["arn"] = arn
        __props__.__dict__["inputs"] = inputs
        __props__.__dict__["tags"] = tags
        __props__.__dict__["tags_all"] = tags_all
        __props__.__dict__["whitelist_rules"] = whitelist_rules
        return InputSecurityGroup(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter
    def arn(self) -> pulumi.Output[str]:
        """
        ARN of the InputSecurityGroup.
        """
        return pulumi.get(self, "arn")

    @property
    @pulumi.getter
    def inputs(self) -> pulumi.Output[Sequence[str]]:
        """
        The list of inputs currently using this InputSecurityGroup.
        """
        return pulumi.get(self, "inputs")

    @property
    @pulumi.getter
    def tags(self) -> pulumi.Output[Optional[Mapping[str, str]]]:
        """
        A map of tags to assign to the InputSecurityGroup. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
        """
        return pulumi.get(self, "tags")

    @property
    @pulumi.getter(name="tagsAll")
    def tags_all(self) -> pulumi.Output[Mapping[str, str]]:
        return pulumi.get(self, "tags_all")

    @property
    @pulumi.getter(name="whitelistRules")
    def whitelist_rules(self) -> pulumi.Output[Sequence['outputs.InputSecurityGroupWhitelistRule']]:
        """
        Whitelist rules. See Whitelist Rules for more details.
        """
        return pulumi.get(self, "whitelist_rules")

