# 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

__all__ = [
    'KeyRotationPolicy',
    'GetKeyRotationPolicyResult',
]

@pulumi.output_type
class KeyRotationPolicy(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "rotationPeriod":
            suggest = "rotation_period"
        elif key == "nextRotationAt":
            suggest = "next_rotation_at"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in KeyRotationPolicy. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        KeyRotationPolicy.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        KeyRotationPolicy.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 rotation_period: _builtins.str,
                 next_rotation_at: Optional[_builtins.str] = None):
        """
        :param _builtins.str rotation_period: – The period between key rotations (e.g., `"720h"` for 30 days).
        :param _builtins.str next_rotation_at: The date and time of the next scheduled rotation.
        """
        pulumi.set(__self__, "rotation_period", rotation_period)
        if next_rotation_at is not None:
            pulumi.set(__self__, "next_rotation_at", next_rotation_at)

    @_builtins.property
    @pulumi.getter(name="rotationPeriod")
    def rotation_period(self) -> _builtins.str:
        """
        – The period between key rotations (e.g., `"720h"` for 30 days).
        """
        return pulumi.get(self, "rotation_period")

    @_builtins.property
    @pulumi.getter(name="nextRotationAt")
    def next_rotation_at(self) -> Optional[_builtins.str]:
        """
        The date and time of the next scheduled rotation.
        """
        return pulumi.get(self, "next_rotation_at")


@pulumi.output_type
class GetKeyRotationPolicyResult(dict):
    def __init__(__self__, *,
                 next_rotation_at: _builtins.str,
                 rotation_period: _builtins.str):
        """
        :param _builtins.str next_rotation_at: Timestamp indicating the next scheduled rotation.
        :param _builtins.str rotation_period: Time interval between two key rotations. The minimum duration is 24 hours and the maximum duration is 1 year (876000 hours).
        """
        pulumi.set(__self__, "next_rotation_at", next_rotation_at)
        pulumi.set(__self__, "rotation_period", rotation_period)

    @_builtins.property
    @pulumi.getter(name="nextRotationAt")
    def next_rotation_at(self) -> _builtins.str:
        """
        Timestamp indicating the next scheduled rotation.
        """
        return pulumi.get(self, "next_rotation_at")

    @_builtins.property
    @pulumi.getter(name="rotationPeriod")
    def rotation_period(self) -> _builtins.str:
        """
        Time interval between two key rotations. The minimum duration is 24 hours and the maximum duration is 1 year (876000 hours).
        """
        return pulumi.get(self, "rotation_period")


