text: # 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 warnings
  import pulumi
  import pulumi.runtime
  from typing import Any, Mapping, Optional, Sequence, Union, overload
  from .. import _utilities
  
  __all__ = [
      'GetFlexibleServerResult',
      'AwaitableGetFlexibleServerResult',
      'get_flexible_server',
      'get_flexible_server_output',
  ]
  
  @pulumi.output_type
  class GetFlexibleServerResult:
      """
      A collection of values returned by getFlexibleServer.
      """
      def __init__(__self__, administrator_login=None, backup_retention_days=None, cmk_enabled=None, delegated_subnet_id=None, fqdn=None, id=None, location=None, name=None, public_network_access_enabled=None, resource_group_name=None, sku_name=None, storage_mb=None, tags=None, version=None):
          if administrator_login and not isinstance(administrator_login, str):
              raise TypeError("Expected argument 'administrator_login' to be a str")
          pulumi.set(__self__, "administrator_login", administrator_login)
          if backup_retention_days and not isinstance(backup_retention_days, int):
              raise TypeError("Expected argument 'backup_retention_days' to be a int")
          pulumi.set(__self__, "backup_retention_days", backup_retention_days)
          if cmk_enabled and not isinstance(cmk_enabled, str):
              raise TypeError("Expected argument 'cmk_enabled' to be a str")
          if cmk_enabled is not None:
              warnings.warn("""This attribute has been removed from the API and will be removed in version 3.0 of the provider.""", DeprecationWarning)
              pulumi.log.warn("""cmk_enabled is deprecated: This attribute has been removed from the API and will be removed in version 3.0 of the provider.""")
  
          pulumi.set(__self__, "cmk_enabled", cmk_enabled)
          if delegated_subnet_id and not isinstance(delegated_subnet_id, str):
              raise TypeError("Expected argument 'delegated_subnet_id' to be a str")
          pulumi.set(__self__, "delegated_subnet_id", delegated_subnet_id)
          if fqdn and not isinstance(fqdn, str):
              raise TypeError("Expected argument 'fqdn' to be a str")
          pulumi.set(__self__, "fqdn", fqdn)
          if id and not isinstance(id, str):
              raise TypeError("Expected argument 'id' to be a str")
          pulumi.set(__self__, "id", id)
          if location and not isinstance(location, str):
              raise TypeError("Expected argument 'location' to be a str")
          pulumi.set(__self__, "location", location)
          if name and not isinstance(name, str):
              raise TypeError("Expected argument 'name' to be a str")
          pulumi.set(__self__, "name", name)
          if public_network_access_enabled and not isinstance(public_network_access_enabled, bool):
              raise TypeError("Expected argument 'public_network_access_enabled' to be a bool")
          pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled)
          if resource_group_name and not isinstance(resource_group_name, str):
              raise TypeError("Expected argument 'resource_group_name' to be a str")
          pulumi.set(__self__, "resource_group_name", resource_group_name)
          if sku_name and not isinstance(sku_name, str):
              raise TypeError("Expected argument 'sku_name' to be a str")
          pulumi.set(__self__, "sku_name", sku_name)
          if storage_mb and not isinstance(storage_mb, int):
              raise TypeError("Expected argument 'storage_mb' to be a int")
          pulumi.set(__self__, "storage_mb", storage_mb)
          if tags and not isinstance(tags, dict):
              raise TypeError("Expected argument 'tags' to be a dict")
          pulumi.set(__self__, "tags", tags)
          if version and not isinstance(version, str):
              raise TypeError("Expected argument 'version' to be a str")
          pulumi.set(__self__, "version", version)
  
      @property
      @pulumi.getter(name="administratorLogin")
      def administrator_login(self) -> str:
          """
          The Administrator Login for the PostgreSQL Flexible Server.
          """
          return pulumi.get(self, "administrator_login")
  
      @property
      @pulumi.getter(name="backupRetentionDays")
      def backup_retention_days(self) -> int:
          """
          The backup retention days for the PostgreSQL Flexible Server.
          """
          return pulumi.get(self, "backup_retention_days")
  
      @property
      @pulumi.getter(name="cmkEnabled")
      def cmk_enabled(self) -> str:
          """
          The status showing whether the data encryption is enabled with a customer-managed key.
          """
          return pulumi.get(self, "cmk_enabled")
  
      @property
      @pulumi.getter(name="delegatedSubnetId")
      def delegated_subnet_id(self) -> str:
          """
          The ID of the virtual network subnet to create the PostgreSQL Flexible Server.
          """
          return pulumi.get(self, "delegated_subnet_id")
  
      @property
      @pulumi.getter
      def fqdn(self) -> str:
          """
          The FQDN of the PostgreSQL Flexible Server.
          """
          return pulumi.get(self, "fqdn")
  
      @property
      @pulumi.getter
      def id(self) -> str:
          """
          The provider-assigned unique ID for this managed resource.
          """
          return pulumi.get(self, "id")
  
      @property
      @pulumi.getter
      def location(self) -> str:
          """
          The Azure Region where the PostgreSQL Flexible Server exists.
          """
          return pulumi.get(self, "location")
  
      @property
      @pulumi.getter
      def name(self) -> str:
          return pulumi.get(self, "name")
  
      @property
      @pulumi.getter(name="publicNetworkAccessEnabled")
      def public_network_access_enabled(self) -> bool:
          """
          Is public network access enabled?
          """
          return pulumi.get(self, "public_network_access_enabled")
  
      @property
      @pulumi.getter(name="resourceGroupName")
      def resource_group_name(self) -> str:
          return pulumi.get(self, "resource_group_name")
  
      @property
      @pulumi.getter(name="skuName")
      def sku_name(self) -> str:
          """
          The SKU Name for the PostgreSQL Flexible Server. The name of the SKU, follows the `tier` + `name` pattern (e.g. `B_Standard_B1ms`, `GP_Standard_D2s_v3`, `MO_Standard_E4s_v3`).
          """
          return pulumi.get(self, "sku_name")
  
      @property
      @pulumi.getter(name="storageMb")
      def storage_mb(self) -> int:
          """
          The max storage allowed for the PostgreSQL Flexible Server.
          """
          return pulumi.get(self, "storage_mb")
  
      @property
      @pulumi.getter
      def tags(self) -> Mapping[str, str]:
          """
          A mapping of tags assigned to the PostgreSQL Flexible Server.
          """
          return pulumi.get(self, "tags")
  
      @property
      @pulumi.getter
      def version(self) -> str:
          """
          The version of PostgreSQL Flexible Server to use.
          """
          return pulumi.get(self, "version")
  
  
  class AwaitableGetFlexibleServerResult(GetFlexibleServerResult):
      # pylint: disable=using-constant-test
      def __await__(self):
          if False:
              yield self
          return GetFlexibleServerResult(
              administrator_login=self.administrator_login,
              backup_retention_days=self.backup_retention_days,
              cmk_enabled=self.cmk_enabled,
              delegated_subnet_id=self.delegated_subnet_id,
              fqdn=self.fqdn,
              id=self.id,
              location=self.location,
              name=self.name,
              public_network_access_enabled=self.public_network_access_enabled,
              resource_group_name=self.resource_group_name,
              sku_name=self.sku_name,
              storage_mb=self.storage_mb,
              tags=self.tags,
              version=self.version)
  
  
  def get_flexible_server(name: Optional[str] = None,
                          resource_group_name: Optional[str] = None,
                          opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetFlexibleServerResult:
      """
      Use this data source to access information about an existing PostgreSQL Flexible Server.
  
      ## Example Usage
  
      ```python
      import pulumi
      import pulumi_azure as azure
  
      example = azure.postgresql.get_flexible_server(name="existing-postgresql-fs",
          resource_group_name="existing-postgresql-resgroup")
      pulumi.export("id", example.id)
      ```
  
  
      :param str name: The name of this PostgreSQL Flexible Server.
      :param str resource_group_name: The name of the Resource Group where the PostgreSQL Flexible Server exists.
      """
      __args__ = dict()
      __args__['name'] = name
      __args__['resourceGroupName'] = resource_group_name
      if opts is None:
          opts = pulumi.InvokeOptions()
      if opts.version is None:
          opts.version = _utilities.get_version()
      __ret__ = pulumi.runtime.invoke('azure:postgresql/getFlexibleServer:getFlexibleServer', __args__, opts=opts, typ=GetFlexibleServerResult).value
  
      return AwaitableGetFlexibleServerResult(
          administrator_login=__ret__.administrator_login,
          backup_retention_days=__ret__.backup_retention_days,
          cmk_enabled=__ret__.cmk_enabled,
          delegated_subnet_id=__ret__.delegated_subnet_id,
          fqdn=__ret__.fqdn,
          id=__ret__.id,
          location=__ret__.location,
          name=__ret__.name,
          public_network_access_enabled=__ret__.public_network_access_enabled,
          resource_group_name=__ret__.resource_group_name,
          sku_name=__ret__.sku_name,
          storage_mb=__ret__.storage_mb,
          tags=__ret__.tags,
          version=__ret__.version)
  
  
  @_utilities.lift_output_func(get_flexible_server)
  def get_flexible_server_output(name: Optional[pulumi.Input[str]] = None,
                                 resource_group_name: Optional[pulumi.Input[str]] = None,
                                 opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetFlexibleServerResult]:
      """
      Use this data source to access information about an existing PostgreSQL Flexible Server.
  
      ## Example Usage
  
      ```python
      import pulumi
      import pulumi_azure as azure
  
      example = azure.postgresql.get_flexible_server(name="existing-postgresql-fs",
          resource_group_name="existing-postgresql-resgroup")
      pulumi.export("id", example.id)
      ```
  
  
      :param str name: The name of this PostgreSQL Flexible Server.
      :param str resource_group_name: The name of the Resource Group where the PostgreSQL Flexible Server exists.
      """
      ...
  