# coding=utf-8
# *** WARNING: this file was generated by pulumi-language-python. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins as _builtins
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from .. import _utilities
from . import outputs

__all__ = [
    'GetAclResult',
    'AwaitableGetAclResult',
    'get_acl',
    'get_acl_output',
]

@pulumi.output_type
class GetAclResult:
    """
    A collection of values returned by getAcl.
    """
    def __init__(__self__, default_policy=None, id=None, is_ipv6=None, region=None, rules=None, vpc_id=None):
        if default_policy and not isinstance(default_policy, str):
            raise TypeError("Expected argument 'default_policy' to be a str")
        pulumi.set(__self__, "default_policy", default_policy)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if is_ipv6 and not isinstance(is_ipv6, bool):
            raise TypeError("Expected argument 'is_ipv6' to be a bool")
        pulumi.set(__self__, "is_ipv6", is_ipv6)
        if region and not isinstance(region, str):
            raise TypeError("Expected argument 'region' to be a str")
        pulumi.set(__self__, "region", region)
        if rules and not isinstance(rules, list):
            raise TypeError("Expected argument 'rules' to be a list")
        pulumi.set(__self__, "rules", rules)
        if vpc_id and not isinstance(vpc_id, str):
            raise TypeError("Expected argument 'vpc_id' to be a str")
        pulumi.set(__self__, "vpc_id", vpc_id)

    @_builtins.property
    @pulumi.getter(name="defaultPolicy")
    def default_policy(self) -> _builtins.str:
        return pulumi.get(self, "default_policy")

    @_builtins.property
    @pulumi.getter
    def id(self) -> _builtins.str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

    @_builtins.property
    @pulumi.getter(name="isIpv6")
    def is_ipv6(self) -> Optional[_builtins.bool]:
        return pulumi.get(self, "is_ipv6")

    @_builtins.property
    @pulumi.getter
    def region(self) -> Optional[_builtins.str]:
        return pulumi.get(self, "region")

    @_builtins.property
    @pulumi.getter
    def rules(self) -> Sequence['outputs.GetAclRuleResult']:
        return pulumi.get(self, "rules")

    @_builtins.property
    @pulumi.getter(name="vpcId")
    def vpc_id(self) -> _builtins.str:
        return pulumi.get(self, "vpc_id")


class AwaitableGetAclResult(GetAclResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetAclResult(
            default_policy=self.default_policy,
            id=self.id,
            is_ipv6=self.is_ipv6,
            region=self.region,
            rules=self.rules,
            vpc_id=self.vpc_id)


def get_acl(is_ipv6: Optional[_builtins.bool] = None,
            region: Optional[_builtins.str] = None,
            vpc_id: Optional[_builtins.str] = None,
            opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetAclResult:
    """
    Gets information about a VPC ACL (Access Control List).

    ## Example Usage

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    # Get the IPv4 ACL for a VPC
    my_acl = scaleway.network.get_acl(vpc_id=my_vpc["id"],
        is_ipv6=False)
    ```

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    # Get the IPv6 ACL for a VPC
    my_acl_v6 = scaleway.network.get_acl(vpc_id=my_vpc["id"],
        is_ipv6=True)
    ```


    :param _builtins.bool is_ipv6: Whether to get the IPv6 ACL.
    :param _builtins.str region: `region`). The region in which the ACL exists.
    :param _builtins.str vpc_id: The VPC ID to look up the ACL for.
    """
    __args__ = dict()
    __args__['isIpv6'] = is_ipv6
    __args__['region'] = region
    __args__['vpcId'] = vpc_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('scaleway:network/getAcl:getAcl', __args__, opts=opts, typ=GetAclResult).value

    return AwaitableGetAclResult(
        default_policy=pulumi.get(__ret__, 'default_policy'),
        id=pulumi.get(__ret__, 'id'),
        is_ipv6=pulumi.get(__ret__, 'is_ipv6'),
        region=pulumi.get(__ret__, 'region'),
        rules=pulumi.get(__ret__, 'rules'),
        vpc_id=pulumi.get(__ret__, 'vpc_id'))
def get_acl_output(is_ipv6: Optional[pulumi.Input[Optional[_builtins.bool]]] = None,
                   region: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                   vpc_id: Optional[pulumi.Input[_builtins.str]] = None,
                   opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetAclResult]:
    """
    Gets information about a VPC ACL (Access Control List).

    ## Example Usage

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    # Get the IPv4 ACL for a VPC
    my_acl = scaleway.network.get_acl(vpc_id=my_vpc["id"],
        is_ipv6=False)
    ```

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    # Get the IPv6 ACL for a VPC
    my_acl_v6 = scaleway.network.get_acl(vpc_id=my_vpc["id"],
        is_ipv6=True)
    ```


    :param _builtins.bool is_ipv6: Whether to get the IPv6 ACL.
    :param _builtins.str region: `region`). The region in which the ACL exists.
    :param _builtins.str vpc_id: The VPC ID to look up the ACL for.
    """
    __args__ = dict()
    __args__['isIpv6'] = is_ipv6
    __args__['region'] = region
    __args__['vpcId'] = vpc_id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('scaleway:network/getAcl:getAcl', __args__, opts=opts, typ=GetAclResult)
    return __ret__.apply(lambda __response__: GetAclResult(
        default_policy=pulumi.get(__response__, 'default_policy'),
        id=pulumi.get(__response__, 'id'),
        is_ipv6=pulumi.get(__response__, 'is_ipv6'),
        region=pulumi.get(__response__, 'region'),
        rules=pulumi.get(__response__, 'rules'),
        vpc_id=pulumi.get(__response__, 'vpc_id')))
