def METHOD_NAME(key_name: Optional[pulumi.Input[str]] = None,
                                    managed_instance_name: Optional[pulumi.Input[str]] = None,
                                    resource_group_name: Optional[pulumi.Input[str]] = None,
                                    opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetManagedInstanceKeyResult]:
    """
    Gets a managed instance key.
    :param str key_name: The name of the managed instance key to be retrieved.
    :param str managed_instance_name: The name of the managed instance.
    :param str resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    """
    ...