# 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
from ._inputs import *

__all__ = [
    'GetMaintenancePoliciesResult',
    'AwaitableGetMaintenancePoliciesResult',
    'get_maintenance_policies',
    'get_maintenance_policies_output',
]

@pulumi.output_type
class GetMaintenancePoliciesResult:
    """
    A collection of values returned by getMaintenancePolicies.
    """
    def __init__(__self__, filters=None, id=None, maintenance_policies=None):
        if filters and not isinstance(filters, list):
            raise TypeError("Expected argument 'filters' to be a list")
        pulumi.set(__self__, "filters", filters)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if maintenance_policies and not isinstance(maintenance_policies, list):
            raise TypeError("Expected argument 'maintenance_policies' to be a list")
        pulumi.set(__self__, "maintenance_policies", maintenance_policies)

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

    @_builtins.property
    @pulumi.getter
    def id(self) -> _builtins.str:
        return pulumi.get(self, "id")

    @_builtins.property
    @pulumi.getter(name="maintenancePolicies")
    def maintenance_policies(self) -> Optional[Sequence['outputs.GetMaintenancePoliciesMaintenancePolicyResult']]:
        return pulumi.get(self, "maintenance_policies")


class AwaitableGetMaintenancePoliciesResult(GetMaintenancePoliciesResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetMaintenancePoliciesResult(
            filters=self.filters,
            id=self.id,
            maintenance_policies=self.maintenance_policies)


def get_maintenance_policies(filters: Optional[Sequence[Union['GetMaintenancePoliciesFilterArgs', 'GetMaintenancePoliciesFilterArgsDict']]] = None,
                             maintenance_policies: Optional[Sequence[Union['GetMaintenancePoliciesMaintenancePolicyArgs', 'GetMaintenancePoliciesMaintenancePolicyArgsDict']]] = None,
                             opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetMaintenancePoliciesResult:
    """
    Provides details about the Maintenance Policies available to apply to Accounts and Instances.
    For more information, see the [Linode APIv4 docs](https://techdocs.akamai.com/linode-api/reference/get-maintenance-policies). (**Note: v4beta only.**)

    ## Example Usage

    The following example shows how one might use this data source to access information about Maintenance Policies:

    ```python
    import pulumi
    import pulumi_linode as linode

    example = linode.get_maintenance_policies()
    pulumi.export("exampleOutput", example)
    ```

    The following example shows how one might use this data source to access information about Maintenance Policies with a certain slug:
    """
    __args__ = dict()
    __args__['filters'] = filters
    __args__['maintenancePolicies'] = maintenance_policies
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('linode:index/getMaintenancePolicies:getMaintenancePolicies', __args__, opts=opts, typ=GetMaintenancePoliciesResult).value

    return AwaitableGetMaintenancePoliciesResult(
        filters=pulumi.get(__ret__, 'filters'),
        id=pulumi.get(__ret__, 'id'),
        maintenance_policies=pulumi.get(__ret__, 'maintenance_policies'))
def get_maintenance_policies_output(filters: Optional[pulumi.Input[Optional[Sequence[Union['GetMaintenancePoliciesFilterArgs', 'GetMaintenancePoliciesFilterArgsDict']]]]] = None,
                                    maintenance_policies: Optional[pulumi.Input[Optional[Sequence[Union['GetMaintenancePoliciesMaintenancePolicyArgs', 'GetMaintenancePoliciesMaintenancePolicyArgsDict']]]]] = None,
                                    opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetMaintenancePoliciesResult]:
    """
    Provides details about the Maintenance Policies available to apply to Accounts and Instances.
    For more information, see the [Linode APIv4 docs](https://techdocs.akamai.com/linode-api/reference/get-maintenance-policies). (**Note: v4beta only.**)

    ## Example Usage

    The following example shows how one might use this data source to access information about Maintenance Policies:

    ```python
    import pulumi
    import pulumi_linode as linode

    example = linode.get_maintenance_policies()
    pulumi.export("exampleOutput", example)
    ```

    The following example shows how one might use this data source to access information about Maintenance Policies with a certain slug:
    """
    __args__ = dict()
    __args__['filters'] = filters
    __args__['maintenancePolicies'] = maintenance_policies
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('linode:index/getMaintenancePolicies:getMaintenancePolicies', __args__, opts=opts, typ=GetMaintenancePoliciesResult)
    return __ret__.apply(lambda __response__: GetMaintenancePoliciesResult(
        filters=pulumi.get(__response__, 'filters'),
        id=pulumi.get(__response__, 'id'),
        maintenance_policies=pulumi.get(__response__, 'maintenance_policies')))
