# 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__ = [
    'GetAgentPoolUpdateResult',
    'AwaitableGetAgentPoolUpdateResult',
    'get_agent_pool_update',
    'get_agent_pool_update_output',
]

@pulumi.output_type
class GetAgentPoolUpdateResult:
    """
    A collection of values returned by getAgentPoolUpdate.
    """
    def __init__(__self__, agent_type=None, agents=None, enabled=None, id=None, name=None, notify_admin=None, pool_id=None, reason=None, schedule=None, sort_order=None, status=None, target_version=None):
        if agent_type and not isinstance(agent_type, str):
            raise TypeError("Expected argument 'agent_type' to be a str")
        pulumi.set(__self__, "agent_type", agent_type)
        if agents and not isinstance(agents, list):
            raise TypeError("Expected argument 'agents' to be a list")
        pulumi.set(__self__, "agents", agents)
        if enabled and not isinstance(enabled, bool):
            raise TypeError("Expected argument 'enabled' to be a bool")
        pulumi.set(__self__, "enabled", enabled)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if notify_admin and not isinstance(notify_admin, bool):
            raise TypeError("Expected argument 'notify_admin' to be a bool")
        pulumi.set(__self__, "notify_admin", notify_admin)
        if pool_id and not isinstance(pool_id, str):
            raise TypeError("Expected argument 'pool_id' to be a str")
        pulumi.set(__self__, "pool_id", pool_id)
        if reason and not isinstance(reason, str):
            raise TypeError("Expected argument 'reason' to be a str")
        pulumi.set(__self__, "reason", reason)
        if schedule and not isinstance(schedule, dict):
            raise TypeError("Expected argument 'schedule' to be a dict")
        pulumi.set(__self__, "schedule", schedule)
        if sort_order and not isinstance(sort_order, int):
            raise TypeError("Expected argument 'sort_order' to be a int")
        pulumi.set(__self__, "sort_order", sort_order)
        if status and not isinstance(status, str):
            raise TypeError("Expected argument 'status' to be a str")
        pulumi.set(__self__, "status", status)
        if target_version and not isinstance(target_version, str):
            raise TypeError("Expected argument 'target_version' to be a str")
        pulumi.set(__self__, "target_version", target_version)

    @_builtins.property
    @pulumi.getter(name="agentType")
    def agent_type(self) -> _builtins.str:
        """
        Agent types that are being monitored (e.g. AD, LDAP, IWA, RADIUS, MFA, OPP, RUM, Radius).
        """
        return pulumi.get(self, "agent_type")

    @_builtins.property
    @pulumi.getter
    def agents(self) -> Optional[Sequence['outputs.GetAgentPoolUpdateAgentResult']]:
        """
        The agents associated with the agent pool update.
        """
        return pulumi.get(self, "agents")

    @_builtins.property
    @pulumi.getter
    def enabled(self) -> _builtins.bool:
        """
        Indicates if auto-update is enabled for the agent pool.
        """
        return pulumi.get(self, "enabled")

    @_builtins.property
    @pulumi.getter
    def id(self) -> _builtins.str:
        """
        The unique identifier of the agent pool update.
        """
        return pulumi.get(self, "id")

    @_builtins.property
    @pulumi.getter
    def name(self) -> _builtins.str:
        """
        The name of the agent pool update.
        """
        return pulumi.get(self, "name")

    @_builtins.property
    @pulumi.getter(name="notifyAdmin")
    def notify_admin(self) -> _builtins.bool:
        """
        Indicates if the admin is notified about the update.
        """
        return pulumi.get(self, "notify_admin")

    @_builtins.property
    @pulumi.getter(name="poolId")
    def pool_id(self) -> _builtins.str:
        """
        The unique identifier of the agent pool.
        """
        return pulumi.get(self, "pool_id")

    @_builtins.property
    @pulumi.getter
    def reason(self) -> _builtins.str:
        """
        Reason for the update.
        """
        return pulumi.get(self, "reason")

    @_builtins.property
    @pulumi.getter
    def schedule(self) -> Optional['outputs.GetAgentPoolUpdateScheduleResult']:
        """
        The schedule configuration for the agent pool update.
        """
        return pulumi.get(self, "schedule")

    @_builtins.property
    @pulumi.getter(name="sortOrder")
    def sort_order(self) -> _builtins.int:
        """
        Specifies the sort order.
        """
        return pulumi.get(self, "sort_order")

    @_builtins.property
    @pulumi.getter
    def status(self) -> _builtins.str:
        """
        Overall state for the auto-update job from the admin perspective (e.g., Cancelled, Failed, InProgress, Paused, Scheduled, Success).
        """
        return pulumi.get(self, "status")

    @_builtins.property
    @pulumi.getter(name="targetVersion")
    def target_version(self) -> _builtins.str:
        """
        The agent version to update to.
        """
        return pulumi.get(self, "target_version")


class AwaitableGetAgentPoolUpdateResult(GetAgentPoolUpdateResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetAgentPoolUpdateResult(
            agent_type=self.agent_type,
            agents=self.agents,
            enabled=self.enabled,
            id=self.id,
            name=self.name,
            notify_admin=self.notify_admin,
            pool_id=self.pool_id,
            reason=self.reason,
            schedule=self.schedule,
            sort_order=self.sort_order,
            status=self.status,
            target_version=self.target_version)


def get_agent_pool_update(agents: Optional[Sequence[Union['GetAgentPoolUpdateAgentArgs', 'GetAgentPoolUpdateAgentArgsDict']]] = None,
                          id: Optional[_builtins.str] = None,
                          pool_id: Optional[_builtins.str] = None,
                          schedule: Optional[Union['GetAgentPoolUpdateScheduleArgs', 'GetAgentPoolUpdateScheduleArgsDict']] = None,
                          opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetAgentPoolUpdateResult:
    """
    Retrieves an Okta Agent Pool Update. Agent pool updates allow you to schedule and manage updates for agent pools.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_okta as okta

    example = okta.get_agent_pool_update(id="<update_id>",
        pool_id="<pool_id>")
    ```


    :param Sequence[Union['GetAgentPoolUpdateAgentArgs', 'GetAgentPoolUpdateAgentArgsDict']] agents: The agents associated with the agent pool update.
    :param _builtins.str id: The unique identifier of the agent pool update.
    :param _builtins.str pool_id: The unique identifier of the agent pool.
    :param Union['GetAgentPoolUpdateScheduleArgs', 'GetAgentPoolUpdateScheduleArgsDict'] schedule: The schedule configuration for the agent pool update.
    """
    __args__ = dict()
    __args__['agents'] = agents
    __args__['id'] = id
    __args__['poolId'] = pool_id
    __args__['schedule'] = schedule
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('okta:index/getAgentPoolUpdate:getAgentPoolUpdate', __args__, opts=opts, typ=GetAgentPoolUpdateResult).value

    return AwaitableGetAgentPoolUpdateResult(
        agent_type=pulumi.get(__ret__, 'agent_type'),
        agents=pulumi.get(__ret__, 'agents'),
        enabled=pulumi.get(__ret__, 'enabled'),
        id=pulumi.get(__ret__, 'id'),
        name=pulumi.get(__ret__, 'name'),
        notify_admin=pulumi.get(__ret__, 'notify_admin'),
        pool_id=pulumi.get(__ret__, 'pool_id'),
        reason=pulumi.get(__ret__, 'reason'),
        schedule=pulumi.get(__ret__, 'schedule'),
        sort_order=pulumi.get(__ret__, 'sort_order'),
        status=pulumi.get(__ret__, 'status'),
        target_version=pulumi.get(__ret__, 'target_version'))
def get_agent_pool_update_output(agents: Optional[pulumi.Input[Optional[Sequence[Union['GetAgentPoolUpdateAgentArgs', 'GetAgentPoolUpdateAgentArgsDict']]]]] = None,
                                 id: Optional[pulumi.Input[_builtins.str]] = None,
                                 pool_id: Optional[pulumi.Input[_builtins.str]] = None,
                                 schedule: Optional[pulumi.Input[Optional[Union['GetAgentPoolUpdateScheduleArgs', 'GetAgentPoolUpdateScheduleArgsDict']]]] = None,
                                 opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetAgentPoolUpdateResult]:
    """
    Retrieves an Okta Agent Pool Update. Agent pool updates allow you to schedule and manage updates for agent pools.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_okta as okta

    example = okta.get_agent_pool_update(id="<update_id>",
        pool_id="<pool_id>")
    ```


    :param Sequence[Union['GetAgentPoolUpdateAgentArgs', 'GetAgentPoolUpdateAgentArgsDict']] agents: The agents associated with the agent pool update.
    :param _builtins.str id: The unique identifier of the agent pool update.
    :param _builtins.str pool_id: The unique identifier of the agent pool.
    :param Union['GetAgentPoolUpdateScheduleArgs', 'GetAgentPoolUpdateScheduleArgsDict'] schedule: The schedule configuration for the agent pool update.
    """
    __args__ = dict()
    __args__['agents'] = agents
    __args__['id'] = id
    __args__['poolId'] = pool_id
    __args__['schedule'] = schedule
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('okta:index/getAgentPoolUpdate:getAgentPoolUpdate', __args__, opts=opts, typ=GetAgentPoolUpdateResult)
    return __ret__.apply(lambda __response__: GetAgentPoolUpdateResult(
        agent_type=pulumi.get(__response__, 'agent_type'),
        agents=pulumi.get(__response__, 'agents'),
        enabled=pulumi.get(__response__, 'enabled'),
        id=pulumi.get(__response__, 'id'),
        name=pulumi.get(__response__, 'name'),
        notify_admin=pulumi.get(__response__, 'notify_admin'),
        pool_id=pulumi.get(__response__, 'pool_id'),
        reason=pulumi.get(__response__, 'reason'),
        schedule=pulumi.get(__response__, 'schedule'),
        sort_order=pulumi.get(__response__, 'sort_order'),
        status=pulumi.get(__response__, 'status'),
        target_version=pulumi.get(__response__, 'target_version')))
